我试图让我的应用程序填满正常显示的屏幕,但这是当我在我的三星Captivate i897上启动它时的结果:http://oi39.tinypic.com/2qamhqd.jpg
屏幕的宽度填充正确,但垂直侧填充不正确。当我在androidmanifest.xml中将android:anyDensity设置为"true“时,应用程序的屏幕会全屏显示,但只显示在屏幕的左下角:http://oi44.tinypic.com/29w7n9v.jpg
有人能告诉我如何使应用程序适应屏幕吗?此外,当播放占据整个屏幕的动画时,屏幕周围会出现模糊和拉伸的图像,如第一个屏幕截图链接所示。当我通过moai.exe的OpenGL模拟器运行它时,这不会发生(我正在使用moai-sdk和rapanui-sdk来开发我的应用程序。我将它们都导入到eclipse中以创建apk文件)。我不明白问题出在哪里。
下面是我的androidmanifest.xml的样子:
<?xml version="1.0" encoding="utf-8"?>
<manifest 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:installLocation="auto"
android:versionCode="1" 
android:versionName="1.0" 
package="com.gamefromscratch.moai">
<supports-screens 
        android:smallScreens="false"
        android:normalScreens="true"
        android:largeScreens="false"
        android:xlargeScreens="false"
        android:anyDensity="false"/>
<application 
    android:icon="@drawable/icon" 
    android:debuggable="true" 
    android:enabled="true" 
    android:persistent="false" 
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
    <!-- Moai -->
    <activity 
        android:name="MoaiActivity" 
        android:label="@string/app_name" 
        android:screenOrientation= "portrait"
        android:launchMode="singleTask"
        android:configChanges="keyboard|keyboardHidden|orientation">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity 
        android:name="com.ziplinegames.moai.MoaiMoviePlayer"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:configChanges="keyboardHidden|orientation"
        android:theme="@android:style/Theme.NoTitleBar">
    </activity>
    <receiver android:name="com.ziplinegames.moai.MoaiLocalNotificationReceiver"></receiver>
    <!-- EXTERNAL DECLARATIONS: Placeholder (DO NOT MOVE OR REMOVE) -->
</application>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
<!-- Moai -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- EXTERNAL PERMISSIONS: Placeholder (DO NOT MOVE OR REMOVE) -->
<uses-configuration android:reqTouchScreen="finger" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true" />
</manifest>   发布于 2013-08-14 17:01:52
下面的属性用于支持多屏幕大小,尝试如下
android:smallScreens="true"
 android:normalScreens="true"
 android:largeScreens="true"
 android:xlargeScreens="true"
 android:anyDensity="true"/>为了避免图像模糊问题,您必须为drawable-hdpi、drawable-xhdpi和drawable-xxhdpi文件夹创建具有更多像素的单独图像。
你可以为不同大小的layout-large,layout-xlarge创建单独的布局文件夹。
也可以尝试这个,这将解决方向问题和“unspecified”android:configChanges="keyboardHidden|orientation“android:screenOrientation=
希望这能解决你的问题。
https://stackoverflow.com/questions/18225467
复制相似问题