简体   繁体   English

android更改布局dpi

[英]android change layout dpi

can I change layout dpi that use my application on device? 我可以更改在设备上使用我的应用程序的布局dpi吗?

(on developed application that works fine but on small screen size devices everything looks big ) (在开发的应用程序工作正常,但在小屏幕尺寸设备上一切看起来很大)

small screen size devices everything looks big . 小屏幕尺寸设备一切看起来都很大。

Read this Supporting Different Device 阅读此支持不同的设备

You'll want to supply resources for all the screen size buckets: 您需要为所有屏幕尺寸存储桶提供资源:

/drawable/ (default images)
/drawable-ldpi/ (small dpi screens)
/drawable-mdpi/ (medium dpi screens)
/drawable-hldpi/ (large dpi screens)
/drawable-xhdpi/ (xtra large dpi screens)

See here for help: http://developer.android.com/guide/practices/screens_support.html 请点击此处获取帮助: http//developer.android.com/guide/practices/screens_support.html

and here for a list of devices using which DPI bucket: http://blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/ 这里有一个使用DPI桶的设备列表: http//blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/

You need make images for all DPI screen so that it is supported by all types of devices. 您需要为所有DPI屏幕制作图像,以便所有类型的设备都支持它。 Android automatically sets these images for your application according to your device DPI. Android会根据您的设备DPI自动为您的应用设置这些图像。 Please be sure of all of your resources and see link . 请确保您的所有资源并查看链接 It will help you more. 它会帮助你更多。

它是一个布局问题,尝试使用相对布局和线性布局将对象放置在xml中。对于图像使用.png扩展名并使用九个补丁图像,以便它适合所有屏幕,这将支持大多数屏幕

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM