I am building new Android app and i have question on the differences between how UI widgets looks in the emulator and how they look in my device (Samsung S2, OS 4.0.3).
When i run the app in the emulator buttons (BTW, and other UI widget) looks much more "elegant".. buttons (in number picker) are small arrow in blue/gray but in the device buttons (in number picker) are more "regular" (gray rectangle)
(sorry but I can not load pictures..)
my question is, how can i make the UI widget on my device looks like in the emulator?
Thanks,
Dudy.
I think it is the other way around - the emulator shows the default skin from Google, while your device shows what the manufacturer has customized (and burned into the operating system of your device).
So you may look into getting "Samsung skins" (if they exist) to make the emulator more close to the real device.
The nice UI you are talking about is probably the Holo Theme, which was introduced in Android HC, but some OEMs use customized Android Frameworks like Samsung(TouchWiz) or HTC(HTC Sense). If you want to use the same Theme throughout the big range of Android devices you can use third party libraries . A popular Theme, which brings pure Holo to older devices (2.3=<) is HoloEverywhere. If you use this Theme in your App you'll have the Holo Theme in most Android versions and on most devices.
Related
We are getting ready to release an app, there is a slight difference in appearance on my development phones a Moto X and Galaxy Nexus, and my clients phones. He has a HTC One S with Android 4.4.4. Are there any websites or tools that I can test the appearance on for different phones? He lives in Brazil and me in Florida, so using his is out.
You should use the Android Virtual Device for this. You can use whatever version of android you would like, there are tons of predefined device sizes/resolutions or if none of those suit your needs you could always define your own.
Are you using Eclipse/ADT as your IDE? If so, the layout editor provides different views for a handful of different devices.
I am having trouble attaching a screen shot, so I will just explain. In the layout editor, you will see drop-down selectors for (a) Device/Screen Type, (b) Orientation, (c) Application Theme, (d) Android API level. This provide reasonable previews of you layouts.
I develop an android application and I use ActionBarSherlock library. When I run my application on emulator (Android 4.1) then my application looks great.
I tried to run my application on a physical device (HTC Desire, Android 2.2.2) but it does not look the same. It is possible to unification of appearance between different android versions?
Here is a screenshot: http://files.1qa.pl/screen.jpg
I would like to unify appearance of view content (widgets like TextEdit, Spinner etc). The top bar looks fine.
I created an Android application. I tried this on differnet device and I have different layout in any Activity of my app. My Project Build Target is 2.3.3.
The two devices I used are:
Samsung Galaxy S2 - Android 2.3.6
HTC Desire - Android 2.3.5
For example the main Activity produces this layout in my Samsung:
and this in my HTC:
Why the two layout are so different?
This is because before Google introduced holo in Ice Cream Sandwich, manufacturers had a free hand in deciding how their devices' version of Android would look. Because of this, they could theme it to whatever they want.
I'm pretty sure that your app hasn't defined its own theme, and this is why you're getting such radically different looks on different devices.
To fix it, simply create your own theme and apply it to your activities.
This document can help you with styling your app.
You can use ActionBarSherlock with the Holo theme and Action Bar on older android versions (under 3.0).
I have a ListPreference on my android application.
On phone 2.3.4, it has the 'downward triangle with a circle' icon on the right.
But when I run on the same app on Samsung Galaxy, it has no such icon. Can you please tell me how can I fix that?
Thank you.
The missing triangle is probably due to customizations that Samsung has made to Android. If you want to force the list preference to appear the exact same on each device regardless of the vendor you will probably have to subclass the ListPrefernce class and define exactly how you want it to appear, rather than using the definition that ships with the device.
Update I just noticed that you mention you are using a tablet in the title. I'm assuming you're using a Galaxy Tab 10.1 or 8.9. If that is the case the missing triangle is either due to Honeycomb or TouchWiz. If its a Honeycomb customization I wouldn't try to hack one in there.
It really is best for everyone if your app conforms to the UI standards put forth by the OS. Introducing inconsistencies in the UI tends to make users unhappy and can lead to interfaces that are difficult to use.
I have an application with a simple layout that contains a few buttons. When running the application on "plain" android (a G1 with 1.6) the buttons look like they do elsewhere on the phone (grey gradients). They also look more or less the same on Sony Ericsson X10 Mini Pro (with 2.1), but the buttons in other applications on the X10 Mini (eg dialer, pin code input) looks very different (transparent).
Is it possible to somehow make sure that the buttons and other form input elements use the platform (for lack of a better word) styling across different Android devices?
As Falmarri already commented, this is not possible. Falmarri, why don't post an answer to this? ;)
Some time ago I was trying to get the default colors of the buttons of the currently used theme (they also depend on the model and the operator and so on) but in Android this is not possible. In my opinion, this is a lack of flexibility that harms us programmers because applications we build do not look well-integrated into the environment.