When the user has selected a contact, I am switching from the first fragment to the second fragment. My app switches to the second fragment, but the tab icon still shows the first fragment as selected.
This is the code I am using to switch to my second fragment.
Fragment fragment = new ItemSecondFragment();
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, fragment).addToBackStack(null).commit();
Where R.id.content_frame is my frame layout.
How can I fix the above issue?