问题描述
我已经开发了一个应用程序,它是要在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:
希望这有助于。
这篇关于适用于平板电脑的Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!