different appearance on different phones for Android - android

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.

Related

Tool for quickly testing Android layouts

Android layouts are very tricky to get right. Especially for an inexperienced layouter like me. At the moment I use the following workflow:
Design the layout in IntelliJ, using IntelliJ's GUI preview window
Test the layout on my device
Test the layout on different emulator images
This approach has several problems:
The IntelliJ is very inaccurate (often the layout looks very different on the device)
Testing on my device is good, but here I have only one fixed resolution and PPI
The emulator takes AGES to start up. If using multiple emulators things get worse
That's why I'm looking for an alternate solution: a tool, that quickly renders Android layouts (no app logic required). This tool should support different resolution and PPI settings and should be as close to the actual looks on real devices as possible.
Is there such a tool?
What other alternatives are there?

Android UI widget appear on emulator differently than in emulator

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.

Program different layouts for different versions in android

I have to program my Android app with the best compatibility to different screen sizes (tablets and smartphones) and to the versions 2.3, 3.2 and 4.0.
I know about the possibliy to name the folders of the layout like res/layout-sw600dp/. to match the layout exactly to different screen sizes.
So, cause I will use completely different layouts for Tablets / Smartphones, I would start with a "Load Screen", which tests which Android-version is used and if there is used a tablet-or smartphone-device, cause for example in the layout for the Tablet, there will be Buttons on some screens that won't be there on the smartphone.
So I will have to separate all this in packages, like this:
Common
2.3
Tablet
Smartphone
3.2
Tablet
Smartphone
4.0
Tablet
Smartphone
I would choose this separation, cause it's the best way, in my opinion, to be prepared for upcoming *updates*, if, let's say there should be added a Button in the ToolBar in Android 4.0.
Is this separation a good thing in your opinion or is this a complete overload?
Are there any other new features in 4.0 that I should be aware of?
You can also name your resource folders to indicate version number (like /res/layout-v11) or (/res/values-v13)
Regarding your question about separation - it really depends on your particular requirement. A common approach to this problem is a fall-back mechanism: You provide a few specific layouts (for example, an xlarge landscape v11 layout), and a few generic ones to fall back to.
Of course, this is an "idealistic" solution; and it doesn't always work that way. In other words, it is mighty difficult to practically implement an app that is compatible with so many versions of Android solely by providing alternative resources. Even if you use the compatibility libraries (which helps a bit in reducing version-specific code); you will still have to adapt your code based on the version at run-time.
You can find out the Android version looking at Build.VERSION.
The documentation recommends you check Build.VERSION.SDK_INT against the values in Build.VERSION_CODES.
And based on that version you can set your layouts in if else conditions

Android phone and Tablet problem

I know this is not a technical related question.But i do not have any idea.I am going to develop a project which should be supported in both phone and tablet.Is it possible having one project working for both tablet and phone ?
Yes. The only thing you need to keep in mind where you keep your graphics. Because it will cause different problems if you do not treat and handle them depending on the screen size. Only thing matters is the android version. If you deploy your app in any phone or a tablet where the version is newer or equal to the target version it works. But of course you cant take a call or some other mobile functionality from a tablet if its not supporting that features.
You can use drawable-hdpi,drawable-mdpi and drawable-ldpi for the graphics(images which use in project) and also use layout with multiple screen by custom layout like layout-480x320 , layout-600x1024 etc. in layout you can custom screen xml file.

How can I use the platform specific styling on the Android platform?

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.

Categories

Resources