Create grid-style layout for Options Menu in Android 4.0.3
-
25-10-2019 - |
문제
I've just met some troubles in Android 4.0.3 with menu because it displays menu item in a list. But I can't a way to set it displaying in a grid-like layout. Appreciate help.
해결책
My friend, I found the main reason why you couldn't display option menu as grid-style in Android 4.0.3. Because you used @android:style/Theme.Holo for your application. Menu of Theme.Holo was set for displaying in list-style.
The solutions are:
1, Try to use another theme such as @android:style/Theme.Wallpaper.NoTitleBar instead of @android:style/Theme.Holo.Wallpaper.NoTitleBar
2, Or if you still want to use Theme.Holo, so try to create a style for menu in values/style.xml. References: see styles in Android Framework. (Sr, I don't have Android framework here, so I can't show you what to do exactly now)
Hope this help!