Android的 - 设置片 [英] Android - Setting for Tablets

查看:366
本文介绍了Android的 - 设置片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是pretty新到Android。我想知道,如果我想设计一个平板电脑的应用程序,然后什么样的变化,我想使现有code这是我设计的普通电话。

I am pretty new to Android. I wanted to know that if i want to design a tablet application then what changes i want make in the existing code which i designed for normal phone.

我做了研究,结果发现,

I did the Research and found,

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
res/drawable-mdpi/my_icon.png        // bitmap for medium density
res/drawable-hdpi/my_icon.png        // bitmap for high density
res/drawable-xhdpi/my_icon.png       // bitmap for extra high density

在清单

<supports-screens android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true"
      android:xlargeScreens="true"
      android:anyDensity="true" />

时的这一切做?或者我想换其他东西比这??

Is it all done?? or I want to change something other than this??

推荐答案

您需要为平板电脑版本的新布局文件,Java的部分是足够的,但布局和图像图形内容是你需要的。

You need to create new layout files for tablet versions, Java part is enough but layouts and image drawables are the main things you need.

去支持多种屏幕,在这里,你将有一个完整的有关如何创建UI支持片和知道他们的资源文件夹。

Go through Supporting Multiple Screens, Here you will have a complete idea about how to create UI supporting Tablets and their res folders.

有关平板电脑的所有决议,检查此链接

For all tablet resolutions check this link

下面是Android手机和平板电脑的可用的分辨率

below are the available resolutions for android mobile and tablet

1   2560*1600
2   1366*768
3   1280*800
4   1280*768
5   1024*768
6   1024*600
7   960*640
8   960*540
9   854*480
10  800*600
11  800*480
12  800*400
13  640*360
14  640*240
15  480*320
16  400*240
17  320*240

最常见的平板电脑分辨率

Most Common tablet resolutions are

Samsung Galaxy Tab 10.1 3G - 10.1 inches, 1280 x 800 pixels
Samsung P1000 Galaxy Tab - 7.0 inches, 600 x 1024 pixels

这篇关于Android的 - 设置片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆