作者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
1F:→ alderis:可以看一下我前两天的自问自答,用inflate的方式动态新增 09/20 21:46
2F:→ jehovah:谢谢:D 09/23 01:19