I tried with passing context
of activity into the adapter and then i tried context.finish();
But its giving me one error like The method finish() is undefined for the type Context
Try passing your Activity as an activity parameter, then you'll be able to call finish() on it. Hope this helps.
type cast it with activity.
((Activity)context).finish();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With