针对不同的设备采用的分辨率 [英] applying resolution for different devices
问题描述
我一直在试图将屏幕分辨率为设备阵列,我已经看过所有的答案起来,从我的理解,如果我创建一个RES /布局正常,RES /布局大等问题,我可以把调整布局有和应用程序会自动加载它们。
I have been trying to Set screen resolution for an Array of devices,I have looked all the answers up and from what I understood if I create an res/layout-normal,res/layout-large and so on I can put adjusted Layouts there and the app will Load them automatically.
如何过这种情况并没有发生... 可有人请你只解释我所创建的布局和设计文件夹后该怎么办 并允许我在XML中使用各种规模的(虽然我觉得默认的是所有的人)。
How ever this has not occurred... can someone PLEASE just explain what to do after i have created the layouts and layout folders and allowed the use of all sizes in my XML (although i think the default is all of them).
感谢您!
推荐答案
它只是一个例子:
设备的分辨率 -
res/values/dimens.xml(default)
res/values-ldpi/dimens.xml (240*320 and nearer resolution)
res/values-mdpi/dimens.xml (320*480 and nearer resolution)
res/values-hdpi/dimens.xml (480*800 and nearer resolution)
res/values-xhdpi/dimens.xml (720*1280 Samsung s3,Micromax HD canvas etc)
res/values-xxhdpi/dimens.xml (1080*1920 samsung s4,HTC one etc)
平板分辨率 -
Tablet resolution-
res/values-sw600dp/dimens.xml (600*1024)
res/values-sw720dp-land/dimens.xml (800*1280)
<TextView
android:id="@+id/textView1"
style="@android:style/TextAppearance.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sample Text - Small" />
<TextView
android:id="@+id/textView2"
style="@android:style/TextAppearance.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sample Text - Medium" />
<TextView
android:id="@+id/textView3"
style="@android:style/TextAppearance.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sample Text - Large" />
这篇关于针对不同的设备采用的分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!