Android: different layout in differnet devices - android

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).

Related

Same Theme across all android-powered devices

So i currently have a low-end Samsung Galaxy Pocket smartphone which uses the factory version of Android 2.3. When i test my apps in this device, it uses the gingerbread theme which is ugly. Android 4.2 UI is very nice and cool. So I want to know how to use the theme of Android 4.2 when im using lower versions of android. Here are some comparisons:
If you want to use the holo theme, you can use this library: HoloEverywhere. Alternatively, you can also create you're own theme.

Different views of TabHost

App is currently in the store "CalculateMe" It appears differently in different devices. The first one is Galaxy S3 and the second one is Galaxy S1. Not sure how I can fix this so it appears similarly to the first one.
It is maybe because of the theme your are using in your activity.
e.g. If you are using the default theme of device in your manifest.
Samsung Galaxy S3 has 4.2 version of android which has the Holo Theme (picture 1).
While Galaxy S1 has 2.3 which only has the default android Theme without the visual effects of Holo (picture 2). I believe this is the problem in your case.
Possible Solutions:
1)Either define your own theme to style the tabhost and set it in your activity.
2)Or you can use ActionBarSherlock or HoloEverywhere in your project. Probably it will require more time, but it will solve many problems with theming on Holo and pre-Holo devices.

Test a Gingerbread layout on Ice Cream Sandwich

I'm creating an application which works on Froyo until Jelly Beans. I have two layouts on for ICS and above and one for Gingerbread and Froyo.
I test my application on a device which it is on ICS so I see the ICS layout but I would like to test my other layout.
How I can do that ? I think I have to add an option in style.xml or androidManifest but I' not sure.
Thanks.
If you want to test your gingerbread layout but only have an ICS device, you can simply rename your layout folders so it will pick the gingerbread layouts on ICS. Switch the names of the layout-v10 and layout-v15 folders and it will load your v10 layout on your v15 device.
Also, you could use an emulator (running 2.3.3) to test your gingerbread layout. This would allow you to make several emulators with different screen sizes and see how your app would look on different devices. You can also test other things with this like SD-card status, hardware keyboards vs soft keyboards, etc. to ensure your app works with different hardware configurations.

Android compatiblity - micromax funbook

I am new in android development. And I have confusion about android layout compatibility.
I am creating one app in android 4.0.3 but it's UI look like android 2.2 related UI.
I used all default controls in app but it not look like 4.0.3 related UI.
So any one can help me in below problems.
If I am creating app in android 4.0.3 then how it's look in android 2.2 and vice versa?
How can I create app which is run in all android version with standard UI?
Please help me.
Thanks in advance.
Your app will use the system theme that you specify, or the custom styles that you specify. If you do not create custom themes or styles your app will use the default styles on each platform. So on 4.0.3 it will use the ICS theme, and on 2.2 it will use the older theme.
To create an app that will run on all versions, you should probably set your target API to 1.5, but there are few devices with 1.5 left, so you'll probably set your API target to 2.2, and this will make your application run on all the devices with Android 2.2+.

What's the difference between layout-large-v11 and layout-xlarge

I'm working on a Tablet application.
What's the difference between this two res folders: layout-large-v11 and layout-xlarge?
The first option is from the IOSched app.
Are both valid for tablets? Which one is better for design tablets layouts?
Many thanks for the help.
v11 is there to help distinguish between large devices that are still running older versions of android. This distinguishing is necessary because there were some big changes at Android 3.0 (version 11 of the api), in terms of style. So the v11 allows you to say "Ok, if this is a newer version of android, use this newer style of layout, other wise use this older style".
Bottom line, you only need to use it if you want to provide two different layouts: one for versions of android that are pre-3.0, and one for versions that are post-3.0. v11 actually has nothing to do with the size of the screen itself, merely what version of android you're running on.

Categories

Resources