Android Development, open source, full market is a messy model, there is always a suitable for such or that model. Share some of the methods you use in your development here.
First of all to introduce drawable-mdpi, drawable-hdpi-1280x800, drawable-hdpi. This is believed to have a good look and understand. Represents the resolution 320X480, 1280x800, 480x800 three screen picture resource pack. In fact, there are a lot of adaptation. I roughly say one on the line, other people slowly pondering, or the internet turnover.
Explain the meaning of this figure, that is, I want to say the configuration method, is a set of picture resources (resource files to see the design of art. Preferably a xxx.9.png) with a set of layout files and multiple sets of numerical files.
Layout file:
[HTML]View Plaincopyprint?
- <? XML version= "1.0" encoding="Utf-8"?>
- <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <ImageView
- android:layout_width="@dimen/imagewidth"
- android:layout_height="wrap_content"
- android:background="@drawable/ic_launcher" />
- </linearlayout>
Value file:
[HTML]View Plaincopyprint?
- <? XML version= "1.0" encoding="Utf-8"?>
- <resources>
- <!--values-hdpi 480X800 --
- <dimen name="ImageWidth">120dip</dimen>
- </Resources>
[HTML]View Plaincopyprint?
- <resources>
- <!--values-hdpi-1280x800 --
- <dimen name="ImageWidth">220dip</dimen>
- </Resources>
[HTML]View Plaincopyprint?
- <? XML version= "1.0" encoding="Utf-8"?>
- <resources>
- <!--values-hdpi 480X320 --
- <dimen name="ImageWidth">80
Android Screen Adaptation summary