Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for implementing a multi-level Option Menu on Android?

I'm currently working on a port of an iPhone app into an Android. The iPhone app has a custom global navigation menu at the bottom of the screen, and when bringing this over to Android, it was suggested to replace this custom menu with the generic Option Menu (invoked via the option key on the device) to give it a more native Android look and feel.

The issue is that the menu itself has several layers (e.g. Three main option like A, B, C, and sub-options like A1, A2, A3). I've looked around but have not seen this sort of multi-level option menu on Android apps, so am looking for some guidelines on how this may be best achieved.

I've seen some questions on customizing the Option Menu such as this one; Android: customize application's menu (e.g background color); and they seem to suggest that the native framework doesn't support many options.

Should I be looking at a bit of hacking into the option menu (is this a good idea?), or looking at some other approach to modifying the app flow? Trying to understand what would be the best way to maintain a consistent user experience on Android, while reducing the level of variation from the iPhone app.

Thanks!

like image 390
Madhu Avatar asked Sep 14 '11 07:09

Madhu


2 Answers

I've looked around but have not seen this sort of multi-level option menu on Android apps, so am looking for some guidelines on how this may be best achieved.

Options menus support sub-menus, but only one level deep (i.e., the menu can have a sub-menu, but a sub-menu cannot have a sub-sub-menu).

like image 187
CommonsWare Avatar answered Oct 02 '22 13:10

CommonsWare


If you really need that (and want to violate the Android platform standards regarding menu depth), then you can easily implement this by using an AlertDialog with lists for every nested level of your menu. Visually those appear exactly the same like an options menu.

like image 25
Bananeweizen Avatar answered Oct 02 '22 15:10

Bananeweizen