Android Holo Theme not working in Emulator - android

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.

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)

Related

Default AVD in Android Studio

Does anyone know of a way (or if it's even possible) to set the default preview AVD in Android Studio v0.4.5. Every time I create a new activity it shows it in a Nexus 4 preview but as I have TEGRA Note 7 and have a custom AVD created for that, I want to see that as the default.
Is this possible and, if so, can anyone advise how to do it? I've checked all the settings but can't see anything that jumps out.
Thanks in advance.
In Android Studio 1.2.2, I was able to solve this problem by going to Run > Edit configurations...
From there, you can change the default emulator (avd) by clicking Defaults, then Android Application. From there, under Target Device, select your Preferred Android Virtual Device then click Apply or OK.
If that still does not work, you may need to also change this setting at the application level. Instead of clicking Defaults, click Android Application and select the name of the project in question. Then proceed to define the project-specific, preferred AVD as described above.

Menu item icons no longer display on Android Emulator

As the title says, my menu items no longer have their icons in the Android emulator. I am developing with API 16 and recently downloaded an update that became available for the SDK and the ARM image. Even after removing and reinstalling the whole Android SDK, the issue persists. I know that it isn't my own code because I reverted to a known version and it also has the same issue. The same version runs on an actual device as expected. I also previously ran the app on the emulator using API 7 and the icons appear just fine. Does anyone know if this is a known issue with the recent update?
Screenshot:
Previously, the menu items all appeared in a row at the bottom with icons above the text.
As the title says, my menu items no longer have their icons in the Android emulator.
This is the way the overflow appears on Android 4.0+, for devices and emulators with an off-screen MENU button.
Even after removing and reinstalling the whole Android SDK, the issue persists.
It will persist on the tens of millions of Android 4.x devices as well, or at least those that have a MENU button. Devices sans MENU button will have a similar-looking drop-down menu, emanating from the ... affordance on the right side of their action bar.
The same version runs on an actual device as expected.
That actual device is not running Android 4.x, presumably.
Does anyone know if this is a known issue with the recent update?
If by "recent update" you mean the nearly-year-old release of Android 4.0, then yes.

android emulator setup not quite right

When I run an app on my android emulator after following a tutorial, my app always looks different than it is supposed to. My default background is white with black text but every other emulator I see on the internet has a default black background with white text. Also when I create a Spinner it doesn't have the green selection circles that seem to be default on all the other emulators. I'm using eclipse Juno with android sdk rev 20. It looks like I didn't install something or enable something but I don't know what I'm missing. Here are some pics to show what I mean.
My emulator where I have a Spinner being clicked:
What other emulators seem to look like when Spinner is clicked:
It's not an emulator issue but the theme that you have applied to your application and the target SDK that you are running your application. Please change target SDK in the manifest file to 10 or lower and comment or remove the line that applies theme: android:theme="..." Then you should achieve desired effect.
It's not the emulator. It's the Android Version you are running on them. By default a Spinner will look like the second image in Android 2.0-2.3.3 and the first picture shows a spinner on Android 4.0+, which in normally like a dropdown menu.

HTC One X - shows "compatibility" menu icon

I have application which uses Sherlock ActionBar package.
The application uses platform-specific behavior for menu (so it's 3-dot icon in ActionBar on ICS and classic menu under HW button on pre-ICS)
I had recieved report from one user with HTC One X. It appears, that One X shows some "compatibility" bar with menu button on the bottom of screen, and there is also same button in ActionBar (where it's supposed to be).
I was not able to emulate this in AVD, and I have multiple reports that this issue is not present on Galaxy Nexus or Galaxy S (they show only the icon in ActionBar).
I have no idea where to look to resolve this or how to debug it, so any help or workaround will be appreciated.
Application is built against API14, with targetSdk="11"
You have a typo:
The android:targetSdkVersion in the manifest should be the solution - it's recommended by Google to always set it to the maximum available (currently it's 19).
Some websites do show that HTC shows the huge button on old apps, but not on new ones, as shown here, so if you think it's weird/ugly, simply set the target SDK. Also make sure it's updated in the project.properties file .

Android 3.0 emulator only showing a fraction of the app when loaded

So I've searched for an answer but found nothing. Basically, whenever I run a simple little menu app for android tablets using the eclipse android emulator 3.0, only about 1/6th of the app is shown (the top center piece, if the tablet is held landscape.) I've done tutorials using the 2.2 emulator and they work just fine, but whenever I launch the 3.0, the app (and only the app - the android home runs fine) just doesn't appear. When I look at it in the main.xml layout folder, the graphical layout shows it exactly the way I want it to appear.
Is this a problem with the emulator? This can't be a common problem, otherwise I'm sure I would have found a solution by now, but there must be some switch or something that I'm not seeing that's making the app appear as if it were running on a phone and not a tablet.
Do you have a low resolution set for your 3.0 AVD? If you run the AVD Manager, what resolution does it show?

Categories

Resources