2014-05-14 67 views
0

的屬性值我有一個RelativeLayout佈局,家長和該佈局被納入另一RelativeLayout孩子TextView如何改變包括佈局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"> 
    <TextView 
    android:text="Test Include" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"/> 
</RelativeLayout> 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 
    <include layout="@layout/include_me" 
     android:layout_alignParentBottom="true" 
    android:layout_marginTop="10dp"/> 
</RelativeLayout> 

問題:我試圖改變包括佈局的屬性值。但android:layout_alignParentBottom="true"android:layout_marginTop="10dp"不起作用。

那是否改變include中的屬性值不起作用?

回答

1

嘗試還加入android:layout_widthandroid:layout_height<include標籤

+0

它worked.Thanks。 'include'標籤是否有其自己的默認「屬性」值?我瞭解到它應該包含佈局屬性值。 – Libin