适用于平板电脑的Andr​​oid应用程序 [英] Android application for Tablet

查看:193
本文介绍了适用于平板电脑的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个应用程序,它是要在Android平板电脑以及运行。它正在开发Android手机莫属。当我跑了它的平板,它没有扩大整个屏幕上。它只是覆盖等于移动装置的区域。我想,它也运行在平板电脑和覆盖整个屏幕上的移动设备上运行。我必须使用设计之前创建的每个类型,并在运行时两种不同的设计,我会检查它是否是android手机或表?

I have developed an application that is to be run on android Tablet as well. It is working on android phones perfectly. When I ran it on Tablet, it did not expand on whole screen. It just covered a area equal to a mobile device. I want that it also runs on Tablet and cover the whole screen as running on mobile device. Do I have to create two different designs for each type and at run time before using design, I would have to check it whether it is android phone or table?

推荐答案

添加code以下块在你的清单文件中的℃之后,使用-SDK> 标签:

Add the following block of code in your manifest file after the <uses-sdk>tag:

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

注意:添加的android:xlargeScreens =真正的属性,当且仅当你的的minSdkVersion 9 等于或以上。

Note: Add the android:xlargeScreens="true" attribute if and only if your minSdkVersion is equal to or more than 9.

除了增加code的这个块,按照链接。另外建议你去通过以下链接:

In addition to adding this block of code, follow this link. Also suggest you to go through the following links:

支持多种屏幕

支持不同的屏幕尺寸

支持不同密度

希望这有助于。

这篇关于适用于平板电脑的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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