Buda Gavril Buda Gavril - 8 months ago 121
Android Question

android finish activity context

If I have reference to context, is it possible to finish the current activity? I don't have the reference to current activity.

Answer

yes, with a cast:

((Activity) ctx).finish();