icyerasor
icyerasor

Reputation: 5242

Android Holo Theme not working in Emulator

I added a themes.xml in /res/values-v11 and made sure that my Themes defined there extend "@android:style/Theme.Holo.Light" or "@android:style/Theme.Holo". When running my app on the Galaxy Nexus everything looks fine.

When running it on an Emulator with Android 4.0 or 4.0.3, the new Holo-Theme does not seem to take effect; the ActionBar Buttons are not displayed, etc.

Upvotes: 0

Views: 1107

Answers (1)

icyerasor
icyerasor

Reputation: 5242

Turns out that it worked, the "problem" was that the emulator by default is configured to have hardware buttons. Thus the ActionBar Overflow-Icons won't be shown. Instead the menu items will only be shown when the menu-Button is pressed.

To get a preview on what this would look like on a Phone without buttons, you have to create an AVD and add the property "hardware back/home key" set to false. Editing an existing AVD does not achieve this (confusingly).

Another problem are old tools. Make sure to use the latest emulator system images and sdk tools / plugins. Re-create the avd and you should be fine. (In between i had the theme not working at all in an ics emulator it just didn't choose the holo theme)

Upvotes: 1

Related Questions