Constructs a single instance of a given abstract class or interface,
can optionally specify the method name
example usage:
view.setOnClickListener(single[View.OnClickListener] { v: View =>
Toast.makeText(view.getContext, view.getId + " was clicked", Toast.LENGTH_SHORT).show()
})
Constructs a single instance of a given abstract class or interface,
can optionally specify the method name
example usage:
view.setOnClickListener(single[View.OnClickListener] { v: View =>
Toast.makeText(view.getContext, view.getId + " was clicked", Toast.LENGTH_SHORT).show()
})
this version, single
, requires all input parameters to be specified
and handled
Constructs a single instance of a given abstract class or interface, can optionally specify the method name if multiple methods need implementation, only the specified method will be implemented, and others will have default, 0, implementations created
Constructs a single instance of a given abstract class or interface, can optionally specify the method name if multiple methods need implementation, only the specified method will be implemented, and others will have default, 0, implementations created
example usage:
view.animate().x(100).setListener(
single0[AnimatorListener].onAnimationEnd(view.setVisibility(View.GONE)))
this version, single0
, ignores all input parameters of the interface