What is the difference between Option Menu and Panel Menu in Android?
Asked Answered
C

2

9

I just created a Panel Menu by mistake with the auto-completion of Eclipse and did not realise it before I read my code. As I wanted to have an option menu, I didn't see the slight difference in the display so does anyone know what the difference(s) is/are between these 2 menus? Is there any advantage or drawback for using one or the other? The only difference I saw was (I didn't go into details though):

public boolean onCreateOptionsMenu(Menu menu)

or

public boolean onCreatePanelMenu(int featureId, Menu menu)

thanks (Shouldn't this be a bounty?)

Chinese answered 20/7, 2010 at 10:26 Comment(0)
S
6

onCreatePanelMenu is called after you call addSubMenu from the Menu class. Seems like a rather arcane and badly documented feature. Here is a reference from the Beginning Android 2 book.

Selflove answered 20/8, 2010 at 4:15 Comment(0)
U
-3

Well Sephy

The main difference between options menu an context menu that context menu pops up relatively to a option menu. It only pops up when particular menu option is pressed and not remains in the memory after it is dismissed.

Ukulele answered 4/8, 2010 at 2:37 Comment(2)
You got me confused... You are speaking of context menu but in a way that does not looks like their common use...Chinese
@Ukulele Sephy is talking about Options and Panel Menus which are different from Context Menus. 3 different things.Damnedest

© 2022 - 2024 — McMap. All rights reserved.