Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Last active Mar 26, 2022
Embed
What would you like to do?
【Java Quiz】2-1
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical"
android:gravity="center"
tools:ignore="UsingOnClickInXml">
<TextView
android:id="@+id/countLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/count_label"
android:textSize="22sp" />
<TextView
android:id="@+id/questionLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/question_label"
android:textSize="24sp"
android:layout_marginTop="60dp"/>
<Button
android:id="@+id/answerBtn1"
android:layout_width="300dp"
android:layout_height="60dp"
android:text="@string/answer_btn"
android:layout_marginTop="80dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:onClick="checkAnswer" />
<Button
android:id="@+id/answerBtn2"
android:layout_width="300dp"
android:layout_height="60dp"
android:text="@string/answer_btn"
android:layout_marginTop="6dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:onClick="checkAnswer"/>
<Button
android:id="@+id/answerBtn3"
android:layout_width="300dp"
android:layout_height="60dp"
android:text="@string/answer_btn"
android:layout_marginTop="6dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:onClick="checkAnswer"/>
<Button
android:id="@+id/answerBtn4"
android:layout_width="300dp"
android:layout_height="60dp"
android:text="@string/answer_btn"
android:layout_marginTop="6dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:onClick="checkAnswer"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment