I am trying to achieve the following with no success.I have two material design swipe tabs.I used this library 'com.oguzdev:CircularFloatingActionMenu:1.0.2' to achieve FAB but when i swipe the tab to the second tab,the FAB is still attached to the new fragment.
I would like to hide the FAB on the second Fragment. Is there a way to achieve this?
There are 2 situations that I can think of that make this happen:
When getting to the second tab, the previous view, which displayed the FAB button, is not removed when you navigate to your second tab, which leaves it there. For this I suggest looking into
removeAllViews().You're inflating the same xml layout file for both tabs. If you want the two tabs to have different content, then they probably should have differently defined xml layout files (in this case, one that mentions a FAB button, one that does not).
Good luck!