user3256145 user3256145 - 1 year ago 105
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download