简体   繁体   English

Android平板电脑的密度和大小

[英]Densities and sizes in android tablets

I'm having problems with the screen view on different tablets and configurations. 我在不同的平板电脑和配置上遇到屏幕视图问题。

I have a tablet wolder mitab with 800x480px and my application is perfectly. 我有一个平板电脑wodder mitab 800x480px,我的应用程序是完美的。 But I have created a virtual machine with the same resolution as my tablet and are the texts more large, overflowing the screen. 但我创建了一个与我的平板电脑具有相同分辨率的虚拟机,并且文本更大,溢出屏幕。

I have two folders: layout for tablets of 7" and x-large for larger tablets. I've tried other 7", 9" and 10" tablets and it looks good. 我有两个文件夹:7英寸平板电脑的布局和较大平板电脑的x尺寸。我尝试过其他7英寸,9英寸和10英寸平板电脑,看起来不错。 But how badly that is all in the emulator has been that you dude in the tablets with different densities. 但是模拟器中的所有情况都是如此严重,以至于你在具有不同密度的平板电脑中花钱。

I also have these lines in the manifest: 我在清单中也有这些行:

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

How can I fix this? 我怎样才能解决这个问题?

Thanks 谢谢

Trusting the emulator and expecting the same on tablets is generally not advisable unless the emulator is set up exactly to mock the tablets (like setting abstracted LCD densities and so on). 除非模拟器完全设置为模拟平板电脑(如设置抽象的LCD密度等),否则通常不建议信任仿真器并在平板电脑上使用它。 Best to test directly debug eclipse/test on different devices(especially non standard chinese ones) connected to your pc. 最好直接测试连接到你电脑的不同设备(尤其是非标准的中国设备)上的eclipse / test。 If you dont have devices, maintain multiple versions emulators each targeting a specific device and create the emulator to nearly be exactly same as the device in terms of resolution, abstracted LCD density, RAM, Storage etc., Not easy to resolve this issue without testing. 如果您没有设备,请维护多个版本模拟器,每个模拟器针对特定设备,并在分辨率,抽象LCD密度,RAM,存储等方面创建与设备几乎完全相同的模拟器,不测试就不容易解决此问题。 But it should work as long as you follow this: http://developer.android.com/training/multiscreen/screendensities.html and http://developer.android.com/guide/practices/screens_support.html 但是只要你遵循这个就行了它: http//developer.android.com/training/multiscreen/screendensities.htmlhttp://developer.android.com/guide/practices/screens_support.html

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

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