2013-05-31 42 views
0

我有以下問題:Android設計不對齊正確

時,我想的LinearLayout中放入一個RelativeLayout的它不會對齊到左邊或右邊它還是有一定的空白。從相對佈局

+1

做高度match_parent! – duggu

+4

粘貼您的xml獲取詳細幫助 –

+0

@MarkoLazić添加xml –

回答

0

你需要做的第一件事

解決方案

檢查填充物,是從「match_parent」到「FILL_PARENT」改變你的頂部的RelativeLayout的寬度屬性。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/RelativeLayout1" 
android:layout_width="fill_parent" 
android:layout_height="match_parent" 
... 

其次,我改變你的左佈局的寬度屬性,以 「match_parent」

<LinearLayout 
    android:id="@+id/LinearLayout3" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
...