简体   繁体   中英

Layout for tablets from 8'' to 10'' inches particularly 8" inch tablet

I am new in android development and I need to design layouts for 8 inch and 10 inch tablets in landscape mode. Reading all the docs it is showing for 7 inch and 10 inch tablets. But what about 8 inch tablet then? And moreover do I need separate drawable for them?

Use NinePatches to generate images for different dens. http://romannurik.github.io/AndroidAssetStudio/nine-patches.html

and instead of using dp in width and height,try to use weightSum and layout_weight.

Tell me if it helps. :)

Android allows you to specify a different layout for up to 4 device classes. You should not concern yourself with how these classes map to actual devices.

As for need ping separate resources for each, it depends. If you care a lot about the quality of your display (like a lot of people) then yes, you will need different sets of resources (eg Images) for each class of layout. However, if your drawables are just solid color or gradient based backgrounds then you can define them only once and the platform will scale them for you.

对于图像,将drawable文件夹创建为: drawable-large-mdpi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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