I am developing an application which can be installed on any android device. Where should I put the following code in manifest file?
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"/>
Also, I have created three folders layout-normal, layout-small and layout-large. Uniformly i maintain LinearLayout in all my layout and different resolution of images in drawable-hdpi, drawable-mdpi, and drawable-ldpi.
The problem is layout is not suitable for some device, because it take different images based on density and i use mostly WRAP_CONTENT for most of component.
Th开发者_运维技巧e alignment is not uniform in all device.
How can I maintain the Uniform alignment and common layout and images to support all android device Version?
If I am understanding you correctly... you want to display the proper layouts based on screen densities. Is this correct?
If so then you will want to formally name your layout directories. From Android: Supporting Multiple Screens
For example, the following is a list of resource directories in an application that provides different layout designs for different screen sizes and different bitmap drawables for medium, high, and extra high density screens.
res/layout/my_layout.xml // layout for normal screen size ("default")
res/layout-small/my_layout.xml // layout for small screen size
res/layout-large/my_layout.xml // layout for large screen size
res/layout-xlarge/my_layout.xml // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
精彩评论