I have View and one CircleShape , which should show toast in this View. And I use it in main Activity. This is my interface
interface OnClickListenerInterfa
Have you tried to use a lambda expression? For example in your case:
mCircleShape.setOnClickListener( { _ -> ToastUtils.showSuccessMessage(context,"pressed") } )
Or if you want to make it more kotlin style:
mCircleShape.listener = ( { _ -> ToastUtils.showSuccessMessage(context,"pressed") } )