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
Post a Comment