myc_100 2012-09-13 08:38 采纳率: 10%
浏览 2779
已采纳

Android :屏幕底部被裁剪

我最近在开发一个Android应用程序。在图形化编辑器中,屏幕的布局看上去很好。但是当程序在仿真器中运行时,屏幕底部的1/4就看不到。这个程序有几个页面都这样,好像这个问题很普遍。请看以下截屏:
enter image description here

enter image description here

仿真器的运行平台是Android2.3. 这个问题在2.2版本上也出现过。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="fill_parent"
    android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent">
    <ImageView android:layout_height="wrap_content" android:src="@drawable/simpsonstextblack" android:layout_width="fill_parent" android:id="@+id/TitleImage" android:layout_gravity="center_horizontal" android:paddingBottom="20dp"></ImageView>
    <RelativeLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/RelativeLayout1" android:padding="5dp">
        <Button android:text="Take the Simpsons Challenge" android:gravity="center" android:clickable="true" android:id="@+id/ChallengeButton" android:layout_width="fill_parent" android:layout_height="50dp" android:textSize="20dp" android:background="@drawable/buttonbackgroundblue"></Button>
        <TextView android:layout_width="fill_parent" android:layout_below="@+id/ChallengeButton" android:layout_alignLeft="@+id/ChallengeButton" android:id="@+id/spacer1" android:layout_height="5dp"></TextView>
        <Button android:layout_width="fill_parent" android:text="Free Play" android:clickable="true" android:id="@+id/FreePlayButton" android:layout_height="50dp" android:textSize="20dp" android:background="@drawable/buttonbackgroundblue" android:layout_below="@+id/spacer1"></Button>
        <TextView android:layout_width="fill_parent" android:id="@+id/spacer2" android:layout_below="@+id/FreePlayButton" android:layout_alignLeft="@+id/FreePlayButton" android:layout_height="5dp"></TextView>
        <Button android:layout_height="50dp" android:textSize="20dp" android:id="@+id/HighScoreButton" android:background="@drawable/buttonbackgroundblue" android:layout_width="fill_parent" android:text="High Scores" android:layout_below="@+id/spacer2"></Button>
        <TextView android:layout_width="fill_parent" android:id="@+id/spacer3" android:layout_below="@+id/HighScoreButton" android:layout_alignLeft="@+id/HighScoreButton" android:layout_height="5dp"></TextView>
        <Button android:layout_height="50dp" android:textSize="20dp" android:id="@+id/HelpButton" android:background="@drawable/buttonbackgroundblue" android:layout_width="fill_parent" android:text="Help" android:layout_below="@+id/spacer3"></Button>
    </RelativeLayout>
    <RelativeLayout android:layout_width="fill_parent" android:id="@+id/RelativeLayout1" android:layout_height="fill_parent">
        <TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="50dp"></TextView>
        <TextView android:layout_below="@+id/textView1" android:layout_height="wrap_content" android:layout_width="fill_parent" android:textAppearance="?android:attr/textAppearanceMedium" android:id="@+id/QuoteText" android:text='"A woman is a lot like a refrigerator. Six feet tall, 300 pounds…it makes ice."'></TextView>
        <TextView android:layout_below="@+id/QuoteText" android:layout_width="fill_parent" android:id="@+id/QuoteTextSpeaker" android:gravity="right" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_height="wrap_content" android:text=" - Homer"></TextView>
    </RelativeLayout>
</LinearLayout>
  • 写回答

1条回答

  • Curie-87 2012-09-13 09:31
    关注

    当版本是SDK 4时,我还是使用SDK 3。显然是系统超量加载时,android在SDK 3系统中屏幕被截屏,而不是调整屏幕大小让图片显示。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器