SyntaxFix
Write A Post
Hire A Developer
Questions
getActivity() is used for fragment. For activity, wherever you can use this, you can replace the this in fragment in similar cases with getActivity().
getActivity()
fragment
activity
this