如果用户选中了checkbox1和checkbox2以及checkbox3然后单击button1,我希望代码将他带到另一个活动。
有我的xml文件代码:
<CheckBox
android:id="@+id/checkBox0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:text="stomache" />
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:text="Couphing" />
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:text="shortness of breath" />
<CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:text="weezing" />
<CheckBox
android:id="@+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:text="Dermatitis or eczema" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Determine your Doctor" />
所以我希望if语句在检查CheckBox1和2和3时做某事。