android - Nested fragment still being visible when tab change -


i have activity tab view have 2 fragments(a , b). fragments have framelayout nested fragment c.

when changed c d , change tab item, method "isvisible" of fragment d still returning visible, action menu visible.

i thoungt in solution:

@override public void onprepareoptionsmenu(menu menu) {     boolean v = ((actionbaractivity) getactivity()).getsupportactionbar().getselectedtab().getposition() == 0;      menu.finditem(r.id.act_search).setvisible(v); } 

but worse solution of world xd

the problem might framelayout displays single view, views added framelayout placed @ top left of layout , other view added framelayout overlap view came before. try using layout , see if problem persists.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -