我有這樣一個問題:如何對齊RelativeLayout的帶空白0
如何對齊RelativeLayout
對準在以下情況下左右,上?
我想刪除此空白,並在屏幕使藍色和黃色RelativeLayout
。
這裏是我的佈局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#EAEAEA" >
<RelativeLayout
android:id="@+id/layout_cenas_bottom"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="#FFFF00" >
<Button
android:id="@+id/btnAdicionarCenas"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/title_adicionar_cena"
android:layout_weight="1"
android:background="@drawable/mybutton"
android:textColor="@drawable/mybuttoncolors"
android:textSize="15sp"
android:layout_marginBottom="10dp">
</Button>
</RelativeLayout>
<RelativeLayout
android:id="@+id/layout_cenas_conteudo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/layout_cenas_bottom"
android:layout_alignParentTop="true"
android:background="#00FFFF">
<ListView
android:id="@+id/lvCenas"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</ListView>
</RelativeLayout>
</RelativeLayout>
您試圖對齊哪種佈局? – JonasCz 2015-03-08 19:38:20
我試圖填充左側,右側,頂部和底部的空白區域。隨着佈局。我清楚了嗎? – 2015-03-08 19:41:33
是否將此佈局添加到活動的主佈局? – gyosida 2015-03-08 19:42:24