user3256145 user3256145 - 8 months ago 56
Android Question

How to go move from one activity to a fragment in android?

I have this code to move from a Fragment MyTask extends Fragment to an Activity NewPage extends activity.

Intent i4=new Intent(getActivity(),NewPage.class);

Now I want to go from NewPage.class back to my MyTask fragment.
How can I do that?


Use the finish() method in the Activity to close it.