質問編集履歴

2

xmlの修正

2016/11/03 11:09

投稿

hijiri
hijiri

スコア61

test CHANGED
File without changes
test CHANGED
@@ -16,15 +16,19 @@
16
16
 
17
17
 
18
18
 
19
- TextView text = (TextView)findViewById(R.id.text);
19
+ TextView empty_text = (TextView)findViewById(R.id.empty_text);
20
20
 
21
- EditText edit = (EditText)findViewbyId(R.id.edit);
21
+ EditText input_board = (EditText)findViewbyId(R.id.input_board);
22
+
23
+ EditText answer_display = (EditText)findViewbyId(R.id.answer_display);
22
24
 
23
25
 
24
26
 
25
- text.setText("aa");
27
+ empty_text.setText("aa");
26
28
 
29
+ input_board.setText("aa")
30
+
27
- edit.setText("aa");
31
+ answer_display.setText("aa");
28
32
 
29
33
 
30
34
 

1

xmlの追記

2016/11/03 11:09

投稿

hijiri
hijiri

スコア61

test CHANGED
File without changes
test CHANGED
@@ -33,3 +33,67 @@
33
33
 
34
34
 
35
35
  どうすればいいでしょうか?
36
+
37
+
38
+
39
+ <EditText
40
+
41
+ android:layout_width="match_parent"
42
+
43
+ android:layout_height="wrap_content"
44
+
45
+ android:id="@+id/input_board"
46
+
47
+ android:singleLine="true"
48
+
49
+ android:gravity="right"
50
+
51
+ android:textSize="20sp"
52
+
53
+ android:layout_marginTop="10dp"
54
+
55
+ android:inputType="textNoSuggestions" />
56
+
57
+
58
+
59
+ <EditText
60
+
61
+ android:layout_width="match_parent"
62
+
63
+ android:layout_height="wrap_content"
64
+
65
+ android:id="@+id/answer_display"
66
+
67
+ android:textSize="22dp"
68
+
69
+ android:gravity="right"
70
+
71
+ android:singleLine="true"
72
+
73
+ android:inputType="textNoSuggestions"
74
+
75
+ android:background="#00000000"
76
+
77
+ android:layout_marginTop="10dp"
78
+
79
+ android:focusable="false"
80
+
81
+ android:focusableInTouchMode="false" />
82
+
83
+
84
+
85
+ <TextView
86
+
87
+ android:layout_width="match_parent"
88
+
89
+ android:layout_height="0dp"
90
+
91
+ android:id="@+id/empty_text"
92
+
93
+ android:layout_weight="1" />
94
+
95
+
96
+
97
+ 上記2つのEditTextには、どちらも起動時に文字を入力させることができません。
98
+
99
+ Text Viewには起動時に入力させることが出来ます!