I'm trying below code to replace the new fragment, but it's not Replaced.
android.app.Fragment Manager fragmentManager = ((Activity) context). getFragmentManager(); android.app.FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction(); fragmentTransaction.add(R.id.frame_container, menuItemDetailsFragment); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit();
0
votes
Do you mean navigating From one fragment to another ?
– Ahlem Jarrar
stackoverflow.com/questions/5658675/… check this and see if it answers your problem
– Ahmed Saad Harmoush
Yes sir, when user click on the old fragment button, then opens a new fragment.Finally means replace the new fragment. I did above code but the fragments are overlapping.
– Kailash Karankal