我们将升级GeoQuiz应用,提供更多的地理知识测试题目
功能:
1、用户点击问题或者是Next按钮可以显示下一个问题
2、用户点击True/False按钮,可以即时给出答案正确与否的提示
点击问题后的页面:
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
<TextView
android:id="@+id/question_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/question_australia"
android:padding="24dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/true_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/true_button"
/>
<Button
android:id="@+id/false_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/false_button"
/>
</LinearLayout>
<Button
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_button"
/>
</LinearLayout>
这里的布局组件与GeoGuiz中差不多,只是增加了一个Next按钮
strings.xml
<resources>
<string name="app_name">GeoQuiz</string>
<string name="true_butto