• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2014 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
18        xmlns:tools="http://schemas.android.com/tools"
19        android:layout_width="match_parent"
20        android:layout_height="match_parent"
21        android:paddingBottom="@dimen/activity_vertical_margin"
22        android:paddingLeft="@dimen/activity_horizontal_margin"
23        android:paddingRight="@dimen/activity_horizontal_margin"
24        android:paddingTop="@dimen/activity_vertical_margin"
25        tools:context="com.example.android.support.wearable.quiz.MainActivity"
26        tools:ignore="MergeRootFrame">
27
28    <LinearLayout android:id="@+id/container"
29            android:layout_width="match_parent"
30            android:layout_height="wrap_content"
31            android:orientation="vertical">
32
33        <Button
34            android:layout_width="wrap_content"
35            android:layout_height="wrap_content"
36            android:id="@+id/read_quiz_from_file_button"
37            android:text="@string/read_from_file_button"
38            android:onClick="readQuizFromFile"
39            android:layout_gravity="center"/>
40
41        <LinearLayout
42            android:orientation="horizontal"
43            android:layout_width="match_parent"
44            android:layout_height="wrap_content">
45
46            <TextView
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                android:textAppearance="?android:attr/textAppearanceLarge"
50                android:text="@string/edit_question"
51                android:id="@+id/textView2" />
52
53            <EditText
54                android:layout_width="match_parent"
55                android:layout_height="wrap_content"
56                android:id="@+id/question_text" />
57        </LinearLayout>
58
59        <LinearLayout
60            android:orientation="horizontal"
61            android:layout_width="match_parent"
62            android:layout_height="wrap_content">
63
64            <RadioGroup
65                android:layout_width="wrap_content"
66                android:layout_height="wrap_content"
67                android:orientation="vertical"
68                android:id="@+id/choices_radio_group">
69                <RadioButton
70                    android:layout_width="wrap_content"
71                    android:layout_height="50dp"
72                    android:text="@string/edit_choice_a"
73                    android:id="@+id/choice_a_radio"
74                    android:checked="true" />
75                <RadioButton
76                    android:layout_width="wrap_content"
77                    android:layout_height="50dp"
78                    android:text="@string/edit_choice_b"
79                    android:id="@+id/choice_b_radio"
80                    android:checked="false" />
81                <RadioButton
82                        android:layout_width="wrap_content"
83                    android:layout_height="50dp"
84                        android:text="@string/edit_choice_c"
85                        android:id="@+id/choice_c_radio" />
86                <RadioButton
87                        android:layout_width="wrap_content"
88                    android:layout_height="50dp"
89                        android:text="@string/edit_choice_d"
90                        android:id="@+id/choice_d_radio" />
91            </RadioGroup>
92
93
94            <LinearLayout
95                android:layout_width="match_parent"
96                android:layout_height="wrap_content"
97                android:orientation="vertical">
98                <EditText
99                    android:layout_width="match_parent"
100                    android:layout_height="50dp"
101                    android:id="@+id/choice_a_text" />
102                <EditText
103                    android:layout_width="match_parent"
104                    android:layout_height="50dp"
105                    android:id="@+id/choice_b_text" />
106                <EditText
107                    android:layout_width="match_parent"
108                    android:layout_height="50dp"
109                    android:id="@+id/choice_c_text" />
110                <EditText
111                    android:layout_width="match_parent"
112                    android:layout_height="50dp"
113                    android:id="@+id/choice_d_text" />
114              </LinearLayout>
115
116
117        </LinearLayout>
118
119        <Button android:id="@+id/add_question"
120            android:layout_height="wrap_content"
121            android:layout_width="wrap_content"
122            android:text="@string/add_question"
123            android:onClick="addQuestion"
124            android:layout_gravity="center">
125        </Button>
126
127        <TextView
128            android:layout_width="wrap_content"
129            android:layout_height="wrap_content"
130            android:textAppearance="?android:attr/textAppearanceLarge"
131            android:text="@string/quiz_status"
132            android:id="@+id/quiz_status"
133            android:paddingTop="30dp"
134            android:paddingBottom="10dp"
135            android:visibility="invisible"/>
136
137        <LinearLayout
138            android:layout_width="match_parent"
139            android:layout_height="wrap_content"
140            android:id="@+id/questions_container"
141            android:orientation="vertical"
142            android:paddingBottom="10dp">
143         </LinearLayout>
144
145        <LinearLayout
146            android:layout_width="wrap_content"
147            android:layout_height="wrap_content"
148            android:id="@+id/quiz_buttons"
149            android:layout_gravity="center"
150            android:visibility="invisible">
151            <Button android:id="@+id/reset_quiz_button"
152                android:layout_height="wrap_content"
153                android:layout_width="wrap_content"
154                android:text="@string/reset_quiz"
155                android:onClick="resetQuiz">
156            </Button>
157            <Button android:id="@+id/new_quiz_button"
158                android:layout_height="wrap_content"
159                android:layout_width="wrap_content"
160                android:text="@string/new_quiz"
161                android:onClick="newQuiz">
162            </Button>
163        </LinearLayout>
164
165
166    </LinearLayout>
167
168</ScrollView>
169