作者jehovah (Lucius)
看板AndroidDev
標題[問題] layout reuse的問題 (include)
時間Sat Sep 17 17:42:40 2011
我有個簡單的RelativeLayout是會大量重複使用的:
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="A"
/>
<TextView android:id="@+id/text2"
android:layout_toRightOf="@id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="B"
/>
</RelativeLayout>
我想在LinearLayout中多次include上述的RelativeLayout,
但text1, text2的內容想要由include之後去修改, 請問辦得到嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.186.181
→ alderis:可以看一下我前兩天的自問自答,用inflate的方式動態新增 09/20 21:46
→ jehovah:謝謝:D 09/23 01:19