質問編集履歴

2

質問の変更

2016/12/01 10:52

投稿

edoooooo
edoooooo

スコア476

test CHANGED
@@ -1 +1 @@
1
- このxmlのコードは何が問題なのでしょうか?よろしくお願いします
1
+ このxmlのコードは何が問題なのでしょうか?ScrollViewにエラーが出ます。よろしくお願いします
test CHANGED
File without changes

1

コードの変更

2016/12/01 10:51

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -10,17 +10,27 @@
10
10
 
11
11
  xmlns:tools="http://schemas.android.com/tools"
12
12
 
13
- xmlns:android="http://schemas.android.com/apk/res-auto"
13
+
14
14
 
15
15
  android:layout_width="match_parent"
16
16
 
17
17
  android:layout_height="match_parent"
18
18
 
19
+
20
+
19
21
  tools:context="com.example.android.sample.calculator.MainActivity">
20
22
 
21
23
 
22
24
 
25
+ <ScrollView
26
+
27
+ layout_width="match_parent"
28
+
29
+ layout_height="match_parent">
30
+
31
+
32
+
23
- <RelativeLayout
33
+ <RelativeLayout
24
34
 
25
35
  android:layout_width="wrap_content"
26
36
 
@@ -60,9 +70,13 @@
60
70
 
61
71
  android:layout_marginTop="52dp"
62
72
 
63
- android:hint="数字を入力" />
73
+ android:hint="@string/hint_input_number" />
74
+
75
+
76
+
77
+
78
+
64
-
79
+ <!--このボタンにエフェクト-->
65
-
66
80
 
67
81
  <Button
68
82
 
@@ -74,10 +88,12 @@
74
88
 
75
89
  android:layout_toEndOf="@+id/numberInput1"
76
90
 
77
- android:text="計算"
91
+ android:text="@string/button_calc"
78
92
 
79
93
  android:singleLine="true"
80
94
 
95
+ android:background="@drawable/button_background_ripple"
96
+
81
97
  android:layout_alignBaseline="@+id/numberInput1" />
82
98
 
83
99
 
@@ -92,9 +108,9 @@
92
108
 
93
109
  android:layout_below="@+id/calcButton1"
94
110
 
95
- android:layout_alignParentStart="false"
96
-
97
- android:layout_marginTop="35dp"
111
+ android:layout_marginTop="35dp"
112
+
113
+ android:entries="@array/operators"
98
114
 
99
115
  android:layout_alignEnd="@+id/numberInput1" />
100
116
 
@@ -116,7 +132,9 @@
116
132
 
117
133
  android:layout_alignParentStart="true"
118
134
 
119
- android:hint="数字を入力"
135
+ android:hint="@string/hint_input_number"
136
+
137
+ android:textSize="@dimen/primary_text_size"
120
138
 
121
139
  android:layout_marginTop="35dp"
122
140
 
@@ -130,7 +148,7 @@
130
148
 
131
149
  android:layout_height="wrap_content"
132
150
 
133
- android:text="計算"
151
+ android:text="@string/button_calc"
134
152
 
135
153
  android:id="@+id/calcButton2"
136
154
 
@@ -146,7 +164,7 @@
146
164
 
147
165
  android:layout_height="wrap_content"
148
166
 
149
- android:text="=計算結果"
167
+ android:text="@string/calc_result_text"
150
168
 
151
169
  android:id="@+id/calcResult"
152
170
 
@@ -168,7 +186,7 @@
168
186
 
169
187
  android:layout_height="wrap_content"
170
188
 
171
- android:text="続けて計算する"
189
+ android:text="@string/button_next"
172
190
 
173
191
  android:id="@+id/nextButton"
174
192
 
@@ -178,12 +196,16 @@
178
196
 
179
197
  android:layout_marginTop="35dp"
180
198
 
199
+ android:background="@drawable/button_background"
200
+
181
201
  android:layout_alignEnd="@+id/calcButton2" />
182
202
 
183
203
  </RelativeLayout>
184
204
 
185
205
 
186
206
 
207
+ </ScrollView>
208
+
187
209
  </FrameLayout>
188
210
 
189
211