質問編集履歴
2
質問の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
このxmlのコードは何が問題なのでしょうか?よろしくお願いします
|
1
|
+
このxmlのコードは何が問題なのでしょうか?ScrollViewにエラーが出ます。よろしくお願いします
|
body
CHANGED
File without changes
|
1
コードの変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,12 +4,17 @@
|
|
4
4
|
<FrameLayout
|
5
5
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
6
6
|
xmlns:tools="http://schemas.android.com/tools"
|
7
|
-
|
7
|
+
|
8
8
|
android:layout_width="match_parent"
|
9
9
|
android:layout_height="match_parent"
|
10
|
+
|
10
11
|
tools:context="com.example.android.sample.calculator.MainActivity">
|
11
12
|
|
13
|
+
<ScrollView
|
14
|
+
layout_width="match_parent"
|
15
|
+
layout_height="match_parent">
|
16
|
+
|
12
|
-
<RelativeLayout
|
17
|
+
<RelativeLayout
|
13
18
|
android:layout_width="wrap_content"
|
14
19
|
android:layout_height="wrap_content"
|
15
20
|
android:layout_gravity="top|center_horizontal"
|
@@ -29,15 +34,18 @@
|
|
29
34
|
android:layout_alignParentTop="true"
|
30
35
|
android:layout_alignParentStart="true"
|
31
36
|
android:layout_marginTop="52dp"
|
32
|
-
android:hint="
|
37
|
+
android:hint="@string/hint_input_number" />
|
33
38
|
|
39
|
+
|
40
|
+
<!--このボタンにエフェクト-->
|
34
41
|
<Button
|
35
42
|
android:layout_width="wrap_content"
|
36
43
|
android:layout_height="wrap_content"
|
37
44
|
android:id="@+id/calcButton1"
|
38
45
|
android:layout_toEndOf="@+id/numberInput1"
|
39
|
-
android:text="
|
46
|
+
android:text="@string/button_calc"
|
40
47
|
android:singleLine="true"
|
48
|
+
android:background="@drawable/button_background_ripple"
|
41
49
|
android:layout_alignBaseline="@+id/numberInput1" />
|
42
50
|
|
43
51
|
<Spinner
|
@@ -45,8 +53,8 @@
|
|
45
53
|
android:layout_height="wrap_content"
|
46
54
|
android:id="@+id/operatorSelector"
|
47
55
|
android:layout_below="@+id/calcButton1"
|
48
|
-
android:layout_alignParentStart="false"
|
49
56
|
android:layout_marginTop="35dp"
|
57
|
+
android:entries="@array/operators"
|
50
58
|
android:layout_alignEnd="@+id/numberInput1" />
|
51
59
|
|
52
60
|
<EditText
|
@@ -57,14 +65,15 @@
|
|
57
65
|
android:id="@+id/numberInput2"
|
58
66
|
android:layout_below="@+id/operatorSelector"
|
59
67
|
android:layout_alignParentStart="true"
|
60
|
-
android:hint="
|
68
|
+
android:hint="@string/hint_input_number"
|
69
|
+
android:textSize="@dimen/primary_text_size"
|
61
70
|
android:layout_marginTop="35dp"
|
62
71
|
android:layout_alignEnd="@+id/numberInput1" />
|
63
72
|
|
64
73
|
<Button
|
65
74
|
android:layout_width="wrap_content"
|
66
75
|
android:layout_height="wrap_content"
|
67
|
-
android:text="
|
76
|
+
android:text="@string/button_calc"
|
68
77
|
android:id="@+id/calcButton2"
|
69
78
|
android:layout_alignTop="@+id/numberInput2"
|
70
79
|
android:layout_toEndOf="@+id/numberInput2" />
|
@@ -72,7 +81,7 @@
|
|
72
81
|
<TextView
|
73
82
|
android:layout_width="wrap_content"
|
74
83
|
android:layout_height="wrap_content"
|
75
|
-
android:text="
|
84
|
+
android:text="@string/calc_result_text"
|
76
85
|
android:id="@+id/calcResult"
|
77
86
|
android:layout_below="@+id/calcButton2"
|
78
87
|
android:layout_alignEnd="@+id/numberInput2"
|
@@ -83,14 +92,16 @@
|
|
83
92
|
<Button
|
84
93
|
android:layout_width="wrap_content"
|
85
94
|
android:layout_height="wrap_content"
|
86
|
-
android:text="
|
95
|
+
android:text="@string/button_next"
|
87
96
|
android:id="@+id/nextButton"
|
88
97
|
android:layout_below="@+id/calcResult"
|
89
98
|
android:layout_alignParentEnd="true"
|
90
99
|
android:layout_marginTop="35dp"
|
100
|
+
android:background="@drawable/button_background"
|
91
101
|
android:layout_alignEnd="@+id/calcButton2" />
|
92
102
|
</RelativeLayout>
|
93
103
|
|
104
|
+
</ScrollView>
|
94
105
|
</FrameLayout>
|
95
106
|
|
96
107
|
|