Recommendations for implementing a multi-level menu of options on Android?

I am currently working on the port of an iPhone application in Android. The iPhone application has a customizable global navigation menu at the bottom of the screen, and when porting it to Android, it was suggested to replace this customizable menu with a universal options menu (called using the select key on the device) to give it a more familiar Android look.

The problem is that the menu itself has several levels (for example, three main options, such as A, B, C and auxiliary parameters, such as A1, A2, A3). I looked around, but did not see such a multi-level menu of options in Android applications, so I am looking for some recommendations on how this can be achieved in the best way.

I saw some questions on setting up an options menu such as this one; Android: customize the application menu (for example, background color) ; and they seem to suggest that the embedded environment does not support many parameters.

Should I take a look at a bit of hacking in the options menu (is this a good idea?) Or take a look at another approach to changing application flow? Trying to figure out what would be the best way to maintain a consistent Android user interface while reducing the variation from the iPhone app.

Thanks!

+7
source share
4 answers

I looked around but did not see such a multi-level menu of options in Android applications, so I'm looking for some recommendations on how this can be achieved in the best way.

Support menu menus support submenus, but only one level in depth (i.e., a menu can have a submenu, a menu cannot be a submenu).

+8
source

If you really need it (and you want to violate the standards of the Android platform regarding the depth of the menu), you can easily implement this using AlertDialog with lists for each nested level of your menu. Visually, they look exactly like the options menu.

+1
source

I did something similar to what the banana suggested. I would simply add that the reason for the limitation is the many numbers or devices and screen resolutions that need to be supported. A few nested menus may look good on a tablet, but not on a 5-inch screen, so we should keep that in mind.

+1
source

For me, adding

android:onClick="onOptionsItemSelected" 

for the operation of nested menu items.

0
source

All Articles