2012-04-22 90 views
0

它可以在Android 4.0上正常工作,但2.3版本在整个屏幕上都有额外的填充。它似乎认为屏幕比它小。我正在使用4.0.3来编译它。Android:为什么我的屏幕上有额外的填充?

我正在开发一个应用程序。

enter image description here

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="com.yolo" 
     android:versionCode="1" 
     android:versionName="1.0"> 
    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher"> 
     <activity android:name="Categories" 
        android:label="@string/app_name"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name="Main"> 
     </activity> 
    </application> 
</manifest> 

layout.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
     > 
    <TextView 
      android:id="@+id/text" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:gravity="center_horizontal" 
      android:textSize="24sp" 
      android:text="Where are you?" 
      /> 
    <Button 
      android:id="@+id/mall" 
      android:layout_width="fill_parent" 
      android:layout_height="75dp" 
      android:layout_centerInParent="true" 
      android:text="At the mall" 
      android:onClick="selectCategory"/> 
    <Button 
      android:id="@+id/home" 
      android:layout_width="fill_parent" 
      android:layout_height="75dp" 
      android:layout_centerInParent="true" 
      android:layout_below="@+id/mall" 
      android:text="At home" 
      android:onClick="selectCategory"/> 
    <Button 
      android:id="@+id/store" 
      android:layout_width="fill_parent" 
      android:layout_height="75dp" 
      android:layout_centerInParent="true" 
      android:layout_above="@+id/mall" 
      android:text="At a store" 
      android:onClick="selectCategory"/> 
    <Button 
      android:id="@+id/downtown" 
      android:layout_width="fill_parent" 
      android:layout_height="75dp" 
      android:layout_centerInParent="true" 
      android:layout_below="@+id/home" 
      android:text="Downtown" 
      android:onClick="selectCategory"/> 
</RelativeLayout> 
</LinearLayout> 
+0

发布问题的屏幕截图。同时发布你的AndroidManifest.xml文件。这很可能是您的清单的问题。 – 2012-04-22 22:04:45

+0

请发布您的布局文件。 – 2012-04-22 23:16:18

+0

什么是carrer? – 2012-04-22 23:30:45

回答

0

你需要给更多的细节。但它可能与特定Android系统的开发人员可能进行的修改有关。

+0

有没有更多的细节给。 – 2012-04-22 21:53:32

+0

首先,“整个屏幕”是什么意思?状态栏是否也与显示器的实际物理边界不一致? – 2012-04-22 22:03:57

+0

我更新了我的ish – 2012-04-22 23:15:17