Closed sohampandya00 closed 6 years ago
Hello @sohampandya00,
Basically listener must be implemented by activity. This is the same like in standard android pattern : https://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents
We cannot implement passing explicit callback e.g. "setDialogListener" bacause it can cause some serialization problems when turning off display or rotating device.
Regarding your question. You should not create dialog's listener directly indside adapter. You can implement RatingDialogListener to your activity and then delegate events to adapter.
BR, Piotr
I am Showing rating dialog on listviewitem click . and listview is inside fragment . so is it possible to create rating dialog listner inside the custom adapter ?