ismail uzunok
ismail uzunok

Reputation: 173

android duplicate action menu on rotation of fragment

I have a fragment activity. If the screen is two panel menu is menu1 else menu2. If a rotate screen it becames one panel with menu1+menu2 when i rotate the action menu. If is it possible to delete previous menu1.

super.onCreateOptionsMenu(menu, inflater);      
inflater.inflate(R.menu.menu1, menu);   

Upvotes: 0

Views: 851

Answers (1)

R4ng3LII
R4ng3LII

Reputation: 457

You can use

menu.clear();

... to clear and remove the menu items.

Upvotes: 1

Related Questions