
I have a button in Fragment. When Button is clicked it has to Open new Fragment/Activity within Fragment. I have written code using Intent,
Intent i = new Intent();
i.setClass(getActivity(), UpdateProfile.class);
startActivity(i);
but its opening in new activity like in below image.

My requirement is in Picture 1. Can someone suggest me how to do it?
EDIT: As suggested by rai and ADK, its working fine but new fragment overlays on old fragment. See the below image. "Change Password"(TextView) is New Fragment which overlays on existing fragment.
