[英]How can I get rid of this empty white space on the bottom?
I get this random margin at the bottom of one of my layouts. 我在其中一个布局的底部获得了此随机边距。 It seems to be pushing the background upwards which is why part of the top is cut off(might not be that noticeable. http://i.imgur.com/NNWfIYh.png 似乎是在推高背景,这就是为什么顶部的一部分被剪掉的原因(可能不会那么明显。http://i.imgur.com/NNWfIYh.png
All I did recently was change the theme of my app. 我最近所做的只是更改应用程序的主题。 My MainActivity's layout doesn't show up like this, so i'm guessing it's a problem with this layout. 我的MainActivity的布局没有像这样显示,所以我猜想这是一个布局问题。 Here's the code 这是代码
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/choose_test_bg">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="64dp"
android:id="@+id/linearLayout"
android:layout_alignParentTop="true"
>
<ImageView
android:src="@drawable/ta_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-A"
android:id="@+id/buttonA"
android:onClick="onButton1Click"
android:layout_marginLeft="35dp"/>
<ImageView
android:src="@drawable/tb_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-B"
android:id="@+id/buttonB"
android:layout_marginLeft="10dp"
android:onClick="onButton1Click"/>
<ImageView
android:src="@drawable/tc_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-C"
android:id="@+id/buttonC"
android:layout_marginLeft="10dp"
android:onClick="onButton1Click"/>
<ImageView
android:src="@drawable/td_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-D"
android:id="@+id/buttonD"
android:layout_marginLeft="10dp"
android:onClick="onButton1Click"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout"
android:layout_marginTop="42dp"
android:id="@+id/linearLayout2">
<ImageView
android:src="@drawable/te_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-E"
android:id="@+id/buttonE"
android:layout_alignTop="@+id/linearLayout2"
android:layout_toRightOf="@+id/linearLayout2"
android:layout_toEndOf="@+id/linearLayout2"
android:layout_marginLeft="35dp"/>
<ImageView
android:src="@drawable/tf_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-F"
android:id="@+id/buttonF"
android:layout_marginLeft="10dp"/>
<ImageView
android:src="@drawable/tg_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-D"
android:id="@+id/buttonG"
android:layout_marginLeft="10dp"
android:onClick="onButton1Click"/>
<ImageView
android:src="@drawable/th_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-D"
android:id="@+id/buttonH"
android:layout_marginLeft="10dp"
android:onClick="onButton1Click"/>
</LinearLayout>
</RelativeLayout>
尝试将relativelayout的高度设置为match_parent
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.