Sometimes we pass context of an activity as a parameter to some other
function and later we might want the activity too. So instead of
passing the activity also to that function, we can get the activity from
context itself.
You can get the activity from the context by type casting the context to activity.
Activity activity = (Activity) _context;
0 comments:
Post a Comment