首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Androidmanifest.xml我的安卓应用程序并没有真正填满屏幕

Androidmanifest.xml我的安卓应用程序并没有真正填满屏幕
EN

Stack Overflow用户
提问于 2013-08-14 15:17:06
回答 1查看 659关注 0票数 0

我试图让我的应用程序填满正常显示的屏幕,但这是当我在我的三星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的样子:

代码语言:javascript
运行
复制
<?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>   
EN

Stack Overflow用户

发布于 2013-08-14 17:01:52

下面的属性用于支持多屏幕大小,尝试如下

代码语言:javascript
运行
复制
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=

希望这能解决你的问题。

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18225467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档