質問編集履歴

3

XML修正

2018/04/08 00:47

投稿

yamayamak
yamayamak

スコア131

test CHANGED
File without changes
test CHANGED
@@ -98,7 +98,7 @@
98
98
 
99
99
  <TextView
100
100
 
101
- android:id="@+id/textNum5"
101
+ android:id="@+id/textNum"
102
102
 
103
103
  android:layout_width="3dp"
104
104
 
@@ -106,13 +106,13 @@
106
106
 
107
107
  android:layout_weight="1"
108
108
 
109
- android:text="5" />
109
+ android:text="セット:" />
110
-
111
-
112
-
110
+
111
+
112
+
113
- <Spinner
113
+ <Spinner
114
-
114
+
115
- android:id="@+id/spMaxMin5"
115
+ android:id="@+id/spMa"
116
116
 
117
117
  android:layout_width="wrap_content"
118
118
 
@@ -128,7 +128,7 @@
128
128
 
129
129
  <Spinner
130
130
 
131
- android:id="@+id/spThl5"
131
+ android:id="@+id/spThl"
132
132
 
133
133
  android:layout_width="wrap_content"
134
134
 
@@ -142,61 +142,59 @@
142
142
 
143
143
 
144
144
 
145
- <TextView
145
+ <EditText
146
-
146
+
147
- android:id="@+id/textVtmp5"
147
+ android:id="@+id/eTval"
148
-
148
+
149
- android:layout_width="20dp"
149
+ android:layout_width="50dp"
150
-
150
+
151
- android:layout_height="wrap_content"
151
+ android:layout_height="wrap_content"
152
+
152
-
153
+ android:layout_marginBottom="-7dp"
154
+
155
+ android:gravity="center"
156
+
157
+ android:hint="30"
158
+
159
+ android:inputType="text"
160
+
161
+ android:textColor="@color/colorLightGray"
162
+
163
+ android:textColorHint="@color/colorVeryDarkGray"
164
+
165
+ android:textSize="14sp" />
166
+
167
+
168
+
169
+ <Spinner
170
+
171
+ android:id="@+id/spCnt"
172
+
173
+ android:layout_width="wrap_content"
174
+
175
+ android:layout_height="wrap_content"
176
+
153
- android:layout_weight="1"
177
+ android:layout_weight="1"
178
+
179
+ android:entries="@array/conts"
154
180
 
155
181
  android:gravity="end"
156
182
 
157
- android:text="値:"
158
-
159
- android:textAlignment="textEnd"
160
-
161
- android:textSize="11sp" />
183
+ android:theme="@style/AppTheme_spinner0" />
162
-
163
-
164
-
184
+
185
+
186
+
165
- <EditText
187
+ <Spinner
166
-
188
+
167
- android:id="@+id/eTval5"
189
+ android:id="@+id/spIf"
168
-
190
+
169
- android:layout_width="50dp"
191
+ android:layout_width="wrap_content"
170
-
192
+
171
- android:layout_height="wrap_content"
193
+ android:layout_height="wrap_content"
172
-
173
- android:layout_marginBottom="-7dp"
194
+
174
-
175
- android:gravity="center"
176
-
177
- android:hint="30"
178
-
179
- android:inputType="text"
180
-
181
- android:textColor="@color/colorLightGray"
182
-
183
- android:textColorHint="@color/colorVeryDarkGray"
184
-
185
- android:textSize="14sp" />
186
-
187
-
188
-
189
- <Spinner
190
-
191
- android:id="@+id/spCnt"
192
-
193
- android:layout_width="wrap_content"
194
-
195
- android:layout_height="wrap_content"
196
-
197
- android:layout_weight="1"
195
+ android:layout_weight="1"
198
-
196
+
199
- android:entries="@array/conts"
197
+ android:entries="@array/ifnums"
200
198
 
201
199
  android:gravity="end"
202
200
 
@@ -206,15 +204,13 @@
206
204
 
207
205
  <Spinner
208
206
 
209
- android:id="@+id/spIf"
207
+ android:id="@+id/spRem"
210
-
208
+
211
- android:layout_width="wrap_content"
209
+ android:layout_width="wrap_content"
212
-
210
+
213
- android:layout_height="wrap_content"
211
+ android:layout_height="wrap_content"
214
-
212
+
215
- android:layout_weight="1"
213
+ android:layout_weight="1"
216
-
217
- android:entries="@array/ifnums"
218
214
 
219
215
  android:gravity="end"
220
216
 
@@ -222,22 +218,6 @@
222
218
 
223
219
 
224
220
 
225
- <Spinner
226
-
227
- android:id="@+id/spRem"
228
-
229
- android:layout_width="wrap_content"
230
-
231
- android:layout_height="wrap_content"
232
-
233
- android:layout_weight="1"
234
-
235
- android:gravity="end"
236
-
237
- android:theme="@style/AppTheme_spinner0" />
238
-
239
-
240
-
241
221
  </LinearLayout>
242
222
 
243
223
  ```

2

XML追記

2018/04/08 00:47

投稿

yamayamak
yamayamak

スコア131

test CHANGED
File without changes
test CHANGED
@@ -72,6 +72,222 @@
72
72
 
73
73
 
74
74
 
75
+ activity_set_aaa.xml
76
+
77
+ ```XML
78
+
79
+ <LinearLayout
80
+
81
+ android:id="@+id/linerlayout5"
82
+
83
+ android:layout_width="match_parent"
84
+
85
+ android:layout_height="30dp"
86
+
87
+ android:layout_below="@+id/linerlayout4"
88
+
89
+ android:layout_marginTop="23dp"
90
+
91
+ android:orientation="horizontal"
92
+
93
+ android:paddingLeft="20dp"
94
+
95
+ android:paddingRight="20dp">
96
+
97
+
98
+
99
+ <TextView
100
+
101
+ android:id="@+id/textNum5"
102
+
103
+ android:layout_width="3dp"
104
+
105
+ android:layout_height="wrap_content"
106
+
107
+ android:layout_weight="1"
108
+
109
+ android:text="5" />
110
+
111
+
112
+
113
+ <Spinner
114
+
115
+ android:id="@+id/spMaxMin5"
116
+
117
+ android:layout_width="wrap_content"
118
+
119
+ android:layout_height="wrap_content"
120
+
121
+ android:layout_weight="1"
122
+
123
+ android:entries="@array/maxmins"
124
+
125
+ android:theme="@style/AppTheme_spinner0" />
126
+
127
+
128
+
129
+ <Spinner
130
+
131
+ android:id="@+id/spThl5"
132
+
133
+ android:layout_width="wrap_content"
134
+
135
+ android:layout_height="wrap_content"
136
+
137
+ android:layout_weight="1"
138
+
139
+ android:entries="@array/thls"
140
+
141
+ android:theme="@style/AppTheme_spinner0" />
142
+
143
+
144
+
145
+ <TextView
146
+
147
+ android:id="@+id/textVtmp5"
148
+
149
+ android:layout_width="20dp"
150
+
151
+ android:layout_height="wrap_content"
152
+
153
+ android:layout_weight="1"
154
+
155
+ android:gravity="end"
156
+
157
+ android:text="値:"
158
+
159
+ android:textAlignment="textEnd"
160
+
161
+ android:textSize="11sp" />
162
+
163
+
164
+
165
+ <EditText
166
+
167
+ android:id="@+id/eTval5"
168
+
169
+ android:layout_width="50dp"
170
+
171
+ android:layout_height="wrap_content"
172
+
173
+ android:layout_marginBottom="-7dp"
174
+
175
+ android:gravity="center"
176
+
177
+ android:hint="30"
178
+
179
+ android:inputType="text"
180
+
181
+ android:textColor="@color/colorLightGray"
182
+
183
+ android:textColorHint="@color/colorVeryDarkGray"
184
+
185
+ android:textSize="14sp" />
186
+
187
+
188
+
189
+ <Spinner
190
+
191
+ android:id="@+id/spCnt"
192
+
193
+ android:layout_width="wrap_content"
194
+
195
+ android:layout_height="wrap_content"
196
+
197
+ android:layout_weight="1"
198
+
199
+ android:entries="@array/conts"
200
+
201
+ android:gravity="end"
202
+
203
+ android:theme="@style/AppTheme_spinner0" />
204
+
205
+
206
+
207
+ <Spinner
208
+
209
+ android:id="@+id/spIf"
210
+
211
+ android:layout_width="wrap_content"
212
+
213
+ android:layout_height="wrap_content"
214
+
215
+ android:layout_weight="1"
216
+
217
+ android:entries="@array/ifnums"
218
+
219
+ android:gravity="end"
220
+
221
+ android:theme="@style/AppTheme_spinner0" />
222
+
223
+
224
+
225
+ <Spinner
226
+
227
+ android:id="@+id/spRem"
228
+
229
+ android:layout_width="wrap_content"
230
+
231
+ android:layout_height="wrap_content"
232
+
233
+ android:layout_weight="1"
234
+
235
+ android:gravity="end"
236
+
237
+ android:theme="@style/AppTheme_spinner0" />
238
+
239
+
240
+
241
+ </LinearLayout>
242
+
243
+ ```
244
+
245
+
246
+
247
+ styles.xml
248
+
249
+ ```XML
250
+
251
+ <!-- spinner用Theme -->
252
+
253
+ <style name="AppTheme_spinner0" parent="AppTheme">
254
+
255
+ <item name="android:spinnerItemStyle">@style/mySpinnerStyle0</item>
256
+
257
+ <item name="android:spinnerDropDownItemStyle">@style/mySpinnerStyle0</item>
258
+
259
+ <item name="android:dropDownListViewStyle">@style/dividSpinnerStyle</item>
260
+
261
+ </style>
262
+
263
+ <!-- spinner設定 -->
264
+
265
+ <style name="mySpinnerStyle0">
266
+
267
+ <item name="android:gravity">center</item>
268
+
269
+ <item name="android:textColor">@color/colorLightGray</item>
270
+
271
+ <item name="android:textSize">14sp</item>
272
+
273
+ <item name="android:layout_margin">0dp</item>
274
+
275
+ <item name="android:padding">0dp</item>
276
+
277
+ </style>
278
+
279
+ <style name="dividSpinnerStyle">
280
+
281
+ <item name="android:divider">@color/colorLightGray</item>
282
+
283
+ <item name="android:dividerHeight">1dp</item>
284
+
285
+ </style>
286
+
287
+ ```
288
+
289
+
290
+
75
291
  三角形のみ表示されていて以下のような感じです。
76
292
 
77
293
  ![イメージ説明](686b243870d91932c1082d87a715b762.png)

1

画像追加

2018/04/08 00:40

投稿

yamayamak
yamayamak

スコア131

test CHANGED
File without changes
test CHANGED
@@ -69,3 +69,9 @@
69
69
  android:textSize="11sp" />
70
70
 
71
71
  ```
72
+
73
+
74
+
75
+ 三角形のみ表示されていて以下のような感じです。
76
+
77
+ ![イメージ説明](686b243870d91932c1082d87a715b762.png)