简体   繁体   English

不同屏幕尺寸的android布局

[英]android layout on different screen sizes

i have an application that am trying to implement it on a tablet 7'. 我有一个试图在平板电脑7'上实现它的应用程序。 this that i have done is the follow. 我所做的是以下操作。 on the folder drawable and layout are my defaults for the normal smartphone screen. 我在普通智能手机屏幕上的默认设置为drawable和layout。 also i have create the layout-xlarge and drawable-mdpi in which on the first one i have change the sizes and on the second one i add the images with different size. 我也创建了layout-xlarge和drawable-mdpi,其中在第一个上我更改了大小,在第二个上我添加了不同大小的图像。 my problem is that the default get the size of images that i have on the drawable-mdpi folder and not from the default drawable folder. 我的问题是默认获取我在drawable-mdpi文件夹上拥有的图像大小,而不是从默认drawable文件夹获取。 what am i doing wrong? 我究竟做错了什么? also i have nothing declare on the manifest. 我也没有在清单上声明。

mdpi is the default, so drawable and drawable-mdpi are the same thing and I don't know which Android chooses in this case - but you're designing for a tablet and tablets are generally mdpi devices so it correctly gets it from drawable-mdpi. mdpi是默认设置,因此drawable和drawable-mdpi是同一件事,我不知道在这种情况下哪个Android会选择-但您是为平板电脑设计的,而平板电脑通常是mdpi设备,因此可以正确地从drawable获取它- mdpi。 You could use drawable-xlarge-mdpi if you want separate mdpi resources to be used for extra-large screens. 如果要将单独的mdpi资源用于超大屏幕,则可以使用drawable-xlarge-mdpi。 Incidentally, remember a 7" 1024x600 tablet is large, not xlarge - so try drawable-large-mdpi and layout-large-mdpi and see if that gives you what you want. 顺便说一句,请记住7英寸1024x600平板电脑很大,而不是xlarge-因此请尝试drawable-large-mdpi和layout-large-mdpi,看看是否能满足您的需求。

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

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