【发布时间】:2016-12-28 00:36:00
【问题描述】:
我是 android 编程新手,我制作了一个测验应用程序来学习。在我的应用程序中有两个按钮,当用户单击另一个按钮时,我想禁用一个按钮。提前致谢。
这是两个按钮:
这是我的布局:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15.2M"
android:layout_marginTop="100dp"
android:layout_marginRight="55dp"
android:layout_marginLeft="55dp"
android:id="@+id/submitWrong"
android:onClick="submitWrong"
android:background="#faa20a"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13.3M"
android:layout_toRightOf="@id/submitWrong"
android:layout_marginTop="100dp"
android:background="#faa20a"
android:id="@+id/submitCorrect"
android:onClick="submitCorrect"
/>
【问题讨论】:
-
现在它正在工作。我太高兴了。谢谢