I have three items in my bottomNavigationView
When I click on the profile item the code checks whether the person is logged in or not. If the person is not logged in then I need to start a new Activity
else I need to load a fragment
in my frameLayout
.
Now the problem is that when I click on the profile item and the person is not logged in then the activity starts but when I click back then the profile item is highlighted but the home fragment is loaded in the frame layout.
I have tried the following ways to solve this
1) I used setSelectedItemId
to set the item color when profile item is clicked but it didn't work
Is there any other way to do this ?