I have two sizes of 5.1 inches, a 4-inch for 480x800.
When I design in 5.1 screen and run with 4 inch screen, I have some trouble that some button missed position on screen.
I designed by layout.
Android runs on a variety of devices that offer different screen sizes
and densities. For applications, the Android system provides a
consistent development environment across devices and handles most of
the work to adjust each application's user interface to the screen on
which it is displayed.
Please read below Links
Supporting Multiple Screens
How to support multiple screen in Android
How to support different screen size in android
Supporting multiple screen size - Android
Place your view inside a <ScrollView>. Doing so will mean users with smaller devices will be able to scroll the view if it is too large.
Related
i need that my app Android will be supported by 2 devices phone and tablet .
i can find library to integer in my app and supported all screen size.
Thanks
I am assuming you want to support multiple screen sizes for your app. You can refer to this guide from Android Developers. Tl;dr you should make your layouts as flexible as possible. That includes but not limited to
Use ConstraintLayout to define the percentage of screen covered by a component, ratio of sizes etc etc
Avoid using hardcoded values(like layout_width="100dp" etc)
Also for a tablet, you must design an alternative layout which can take advantage of the larger screen in landscape mode
So I'm working on scaling my application to different screen sizes. Right now Its optimized for a 10.1 inch screen but I'm working to get it to run on the kindle fire which has a 7 inch screen. I'm only using relative layouts. As of now my background scales perfectly but the image buttons ontop of the background don't scale and I was wondering if there was a reason for this. Also I use margins to adjust the positions of my buttons, is this okay for scaling sizes?
to support application on different screen refer the following link
http://developer.android.com/guide/practices/screens_support.html
and to scale image button use nine patch images they scale well.
Also I use margins to adjust the positions of my buttons, is this okay for scaling sizes?
yes it okay.
You should always define in your manifest because the default values can change from one version to another.
But if you want to support xlarge screens then you're stuck because this attribute was introduced in API level 9 (android 2.3). You have to create two different APKs, one for android versions >= 2.3 and the other for the older ones.
Since it's a common issue, android provides a nice way to publish only one application on the market even if you use multiple APKs.
So basically I had to switch from 1.5 to 1.6 to add in Mobfox. As soon as I did this all the images being called by url are now being displayed much smaller. Is there a way to counter act this because it is kind of annoying and they were just the right size before.
I suspect you'll have to rework your images due to the different way that Android v1.6 onwards handles differing screen sizes and resolutions.
From Strategies for Android 1.5
All applications written for Android 1.5 or earlier, by default, support only the baseline HVGA screen used on the T-Mobile G1 and similar devices, which is normal screen size and medium density (mdpi). Android 1.6 introduced support for different screen configurations and added APIs that allow applications to control how they operate on different screens, using alternative resources for different screen configurations.
See this article for supporting different screens for v1.6 onwards...Supporting Multiple Screens
I have read the Documentation for distribution to Specfic screens.
But I have doubt that on, Normal Screen- hdpi itself, we have 3 Screen sizes. that are
WVGA800 (480x800)
WVGA854 (480x854)
600x1024
For these screen how can distribute my App. My App is collapsing in the screen Samsung Galaxy Tab(600X1024). ANy Idea to handle this.
Thanks in Advance.
The link that you give provides information on how you can limit which devices your app will be available to when you publish it to the Android Market.
To actually get your app to display well across different screen sizes and densities is a completely different matter. You should refer to the link that Pragna gave in his answer; you should avoid AbsoluteLayout; you should avoid absolute dimensions and always use dp / sp; you should allow Android to organise your layouts through LinearLayout and RelativeLayout; you should provide different bitmap drawables for different screen densities; you should consider optimising your layouts at different screen sizes / densities.
Without seeing any of your code, it is difficult to identify any specific reasons why your app is not working well on the Galaxy Tab, but these are generally the practices that you need to adopt in order to get your app workig across a variety of scree sizes, densities, & form-factors.
I want to develop application with single binary for Android device and for Android tablets with target android 2.1 version.
My orientation also depends upon whether app is running on device or on tablet.
So i just want to know, is there any specification like tablet should be minimum of "X" inches.
There is heaps of information on screen sizes and each device can be different so you should use the Android standards talked about here to figure out exactly what screen you are dealing with and react accordingly. There are no hard and fast "atleast X inches" rules; just different screen sizes of different resolutions. You can use the Android manifest to restrict the screen sizes to just the ones that you want to support.
My orientation also depends upon whether app is running on device or on tablet.
Your application should depend on whether the screen is small, normal, large, or xlarge. There is no concept of "device or on tablet" in Android.
is there any specification like tablet should be minimum of "X" inches.
There is no concept of "tablet" in Android. What a user will think of as a "tablet" will tend to be large or xlarge screen size.