If I'm inside a Fragment how can I call a parent's activity?
Yes, Its right by calling getActivity and cast it with parent activity to access its methods or variables ((ParentActivityName)getActivity())
((ParentActivityName)getActivity())
Try this one.
ParentActivityName is parent class name
ParentActivityName
1.4m articles
1.4m replys
5 comments
57.0k users