I have a fragment in an activity that I am using as a navigation drawer. It contains buttons that when clicked start new activities (startActivity from a fragment simply ca
When working with fragments, instead of using this or refering to the context, always use getActivity(). You should call
this
getActivity()
getActivity().finish();
to finish your activity from fragment.