Android的WXGA模拟器得到失真纵向 [英] Android WXGA emulator gets distortion in portrait orientation

查看:179
本文介绍了Android的WXGA模拟器得到失真纵向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发2.1及以上的应用程序。在此应用程序的第一项活动仅支持纵向,所以我有的android:screenOrientation =肖像在AndroidManifest文件。活动看上去几乎所有的屏幕尺寸和SDK版本好,除了WXGA屏幕和4.0.3 SDK(也3.2)。在这个屏幕上,有背景和按钮的扭曲。

I'm developing an app for 2.1 and above. First Activity in this app supports only portrait orientation, so I have android:screenOrientation="portrait" in AndroidManifest file. Activity looks good on almost all screen sizes and SDK versions, except WXGA screen and 4.0.3 SDK (also 3.2). On this screen, there were distortions of the background and buttons.

所以我创建4.0.3 SDK一个新的空Android项目。添加的RelativeLayout和巴顿在main.xml中和的android:screenOrientation =肖像字符串中的Andr​​oidManifest为主要活动。调试(WXGA,4.0.3)后,我得到了相同的结果。

So I create a new empty Android project for 4.0.3 SDK. Add RelativeLayout and Button in the main.xml and android:screenOrientation="portrait" string in the AndroidManifest for main Activity. After debug (WXGA, 4.0.3) I got the same result.

如果我更改的android:screenOrientation =肖像别的东西,按钮看起来不错

If I change android:screenOrientation="portrait" to something else, the button looks good.

同样的事情与Windows。

Same thing with Windows.

为什么出现这种情况?这是模拟器问题?

推荐答案

我也有类似的问题,并且这发生各种片剂模拟器(例如3.0,3.2等等),并且仅在纵向模式。它不为手机版本(例如,蜂窝之前)发生。下面是布局文件我做导致右下方扭曲的文本的setContentView。它可能看起来微不足道,但是,它也扭曲了ImageViews,按钮等我还发现,我把在屏幕的底部提供了更多的意见,他们中的一些会被切去或按钮只有部分突出时pressed。

I have a similar issue, and this occurs with various tablet emulators (eg. 3.0, 3.2, etc.) and only in portrait mode. It does not occur for the phone versions (eg. before Honeycomb). Below is the layout file I do a setContentView with resulting in distorted text in the lower right. It may seem trivial, however, it also distorts ImageViews, Buttons, etc. I also found as I place more views at the bottom of the screen, some of them get clipped, or buttons only partially highlight when pressed.

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#888" >

<TextView
    android:text="ABCDEF"
    android:textSize="24sp"
    android:textStyle="bold"
    android:textColor="#FFF"
    android:background="#000"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|right" />
</FrameLayout>

这篇关于Android的WXGA模拟器得到失真纵向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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