【发布时间】:2012-12-26 08:27:27
【问题描述】:
我开始学习一些有关 android 编程的知识并观看大量指南/教程,但有一个问题没有指南回答。我有一个由两个按钮组成的单选组,就像这样(在 xml 中):
<RadioButton
android:id="@+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="button1" />
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button2" />
</RadioGroup>
问题是我想根据单击的单选按钮显示不同的文本视图和不同的编辑文本,有人知道我在哪里可以找到一个很好的例子,或者甚至想自己做一个例子吗?
谢谢
【问题讨论】:
标签: android textview radio-button textedit