質問編集履歴
8
registerForContextMenu\(contextMenuHeader\)を削除しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,8 +90,6 @@
|
|
90
90
|
|
91
91
|
ContextMenuHeader contextMenuHeader = new ContextMenuHeader(getContext());
|
92
92
|
|
93
|
-
registerForContextMenu(contextMenuHeader);
|
94
|
-
|
95
93
|
menu.setHeaderView(contextMenuHeader);
|
96
94
|
|
97
95
|
|
7
コード場所変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -118,6 +118,148 @@
|
|
118
118
|
|
119
119
|
```
|
120
120
|
|
121
|
+
|
122
|
+
|
123
|
+
```xml
|
124
|
+
|
125
|
+
customview_context_menu_header.xml
|
126
|
+
|
127
|
+
<?xml version="1.0" encoding="utf-8"?>
|
128
|
+
|
129
|
+
<RelativeLayout
|
130
|
+
|
131
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
132
|
+
|
133
|
+
android:layout_width="match_parent"
|
134
|
+
|
135
|
+
android:layout_height="wrap_content">
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<LinearLayout
|
140
|
+
|
141
|
+
android:id="@+id/context_menu_header"
|
142
|
+
|
143
|
+
android:layout_width="match_parent"
|
144
|
+
|
145
|
+
android:layout_height="wrap_content"
|
146
|
+
|
147
|
+
android:layout_centerVertical="true"
|
148
|
+
|
149
|
+
android:paddingTop="@dimen/text_padding"
|
150
|
+
|
151
|
+
android:paddingLeft="@dimen/text_padding"
|
152
|
+
|
153
|
+
android:orientation="vertical">
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<TextView
|
158
|
+
|
159
|
+
android:id="@+id/text_header_title"
|
160
|
+
|
161
|
+
android:layout_width="wrap_content"
|
162
|
+
|
163
|
+
android:layout_height="wrap_content"
|
164
|
+
|
165
|
+
android:textSize="@dimen/font_size_title"
|
166
|
+
|
167
|
+
android:text="title1"/>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<LinearLayout
|
172
|
+
|
173
|
+
android:layout_width="match_parent"
|
174
|
+
|
175
|
+
android:layout_height="wrap_content">
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<TextView
|
180
|
+
|
181
|
+
android:id="@+id/label_header_title2"
|
182
|
+
|
183
|
+
android:layout_width="wrap_content"
|
184
|
+
|
185
|
+
android:layout_height="wrap_content"
|
186
|
+
|
187
|
+
android:textSize="@dimen/font_size_subheading"
|
188
|
+
|
189
|
+
android:text="@string/label_title2"/>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<TextView
|
194
|
+
|
195
|
+
android:id="@+id/text_header_title2"
|
196
|
+
|
197
|
+
android:layout_width="wrap_content"
|
198
|
+
|
199
|
+
android:layout_height="wrap_content"
|
200
|
+
|
201
|
+
android:layout_toRightOf="@+id/label_header_"
|
202
|
+
|
203
|
+
android:paddingLeft="@dimen/text_padding"
|
204
|
+
|
205
|
+
android:textSize="@dimen/font_size_subheading"
|
206
|
+
|
207
|
+
android:text="title2"/>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</LinearLayout>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<LinearLayout
|
216
|
+
|
217
|
+
android:layout_width="match_parent"
|
218
|
+
|
219
|
+
android:layout_height="wrap_content">
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<TextView
|
224
|
+
|
225
|
+
android:id="@+id/label_header_title3"
|
226
|
+
|
227
|
+
android:layout_width="wrap_content"
|
228
|
+
|
229
|
+
android:layout_height="wrap_content"
|
230
|
+
|
231
|
+
android:textSize="@dimen/font_size_subheading"
|
232
|
+
|
233
|
+
android:text="@string/label_title3"/>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<TextView
|
238
|
+
|
239
|
+
android:id="@+id/text_header_title3"
|
240
|
+
|
241
|
+
android:layout_width="wrap_content"
|
242
|
+
|
243
|
+
android:layout_height="wrap_content"
|
244
|
+
|
245
|
+
android:layout_toRightOf="@+id/label_header_title3"
|
246
|
+
|
247
|
+
android:paddingLeft="@dimen/text_padding"
|
248
|
+
|
249
|
+
android:textSize="@dimen/font_size_subheading"
|
250
|
+
|
251
|
+
android:text="title3"/>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
</LinearLayout>
|
256
|
+
|
257
|
+
</LinearLayout>
|
258
|
+
|
259
|
+
</RelativeLayout>
|
260
|
+
|
261
|
+
```
|
262
|
+
|
121
263
|
Android 6.0以前
|
122
264
|
|
123
265
|
![イメージ説明](c3da72d6fdf12f395307cf9a0ca8e02a.png)
|
@@ -127,147 +269,3 @@
|
|
127
269
|
Android 7.0
|
128
270
|
|
129
271
|
![イメージ説明](0af2a9a36916d3c257c96f7db89e218d.png)
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
```xml
|
136
|
-
|
137
|
-
customview_context_menu_header.xml
|
138
|
-
|
139
|
-
<?xml version="1.0" encoding="utf-8"?>
|
140
|
-
|
141
|
-
<RelativeLayout
|
142
|
-
|
143
|
-
xmlns:android="http://schemas.android.com/apk/res/android"
|
144
|
-
|
145
|
-
android:layout_width="match_parent"
|
146
|
-
|
147
|
-
android:layout_height="wrap_content">
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<LinearLayout
|
152
|
-
|
153
|
-
android:id="@+id/context_menu_header"
|
154
|
-
|
155
|
-
android:layout_width="match_parent"
|
156
|
-
|
157
|
-
android:layout_height="wrap_content"
|
158
|
-
|
159
|
-
android:layout_centerVertical="true"
|
160
|
-
|
161
|
-
android:paddingTop="@dimen/text_padding"
|
162
|
-
|
163
|
-
android:paddingLeft="@dimen/text_padding"
|
164
|
-
|
165
|
-
android:orientation="vertical">
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
<TextView
|
170
|
-
|
171
|
-
android:id="@+id/text_header_title"
|
172
|
-
|
173
|
-
android:layout_width="wrap_content"
|
174
|
-
|
175
|
-
android:layout_height="wrap_content"
|
176
|
-
|
177
|
-
android:textSize="@dimen/font_size_title"
|
178
|
-
|
179
|
-
android:text="title1"/>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<LinearLayout
|
184
|
-
|
185
|
-
android:layout_width="match_parent"
|
186
|
-
|
187
|
-
android:layout_height="wrap_content">
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
<TextView
|
192
|
-
|
193
|
-
android:id="@+id/label_header_title2"
|
194
|
-
|
195
|
-
android:layout_width="wrap_content"
|
196
|
-
|
197
|
-
android:layout_height="wrap_content"
|
198
|
-
|
199
|
-
android:textSize="@dimen/font_size_subheading"
|
200
|
-
|
201
|
-
android:text="@string/label_title2"/>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
<TextView
|
206
|
-
|
207
|
-
android:id="@+id/text_header_title2"
|
208
|
-
|
209
|
-
android:layout_width="wrap_content"
|
210
|
-
|
211
|
-
android:layout_height="wrap_content"
|
212
|
-
|
213
|
-
android:layout_toRightOf="@+id/label_header_"
|
214
|
-
|
215
|
-
android:paddingLeft="@dimen/text_padding"
|
216
|
-
|
217
|
-
android:textSize="@dimen/font_size_subheading"
|
218
|
-
|
219
|
-
android:text="title2"/>
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
</LinearLayout>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
<LinearLayout
|
228
|
-
|
229
|
-
android:layout_width="match_parent"
|
230
|
-
|
231
|
-
android:layout_height="wrap_content">
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
<TextView
|
236
|
-
|
237
|
-
android:id="@+id/label_header_title3"
|
238
|
-
|
239
|
-
android:layout_width="wrap_content"
|
240
|
-
|
241
|
-
android:layout_height="wrap_content"
|
242
|
-
|
243
|
-
android:textSize="@dimen/font_size_subheading"
|
244
|
-
|
245
|
-
android:text="@string/label_title3"/>
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
<TextView
|
250
|
-
|
251
|
-
android:id="@+id/text_header_title3"
|
252
|
-
|
253
|
-
android:layout_width="wrap_content"
|
254
|
-
|
255
|
-
android:layout_height="wrap_content"
|
256
|
-
|
257
|
-
android:layout_toRightOf="@+id/label_header_title3"
|
258
|
-
|
259
|
-
android:paddingLeft="@dimen/text_padding"
|
260
|
-
|
261
|
-
android:textSize="@dimen/font_size_subheading"
|
262
|
-
|
263
|
-
android:text="title3"/>
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
</LinearLayout>
|
268
|
-
|
269
|
-
</LinearLayout>
|
270
|
-
|
271
|
-
</RelativeLayout>
|
272
|
-
|
273
|
-
```
|
6
表示されていないので最更新
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
5
xmlの表記を変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -134,6 +134,8 @@
|
|
134
134
|
|
135
135
|
```xml
|
136
136
|
|
137
|
+
customview_context_menu_header.xml
|
138
|
+
|
137
139
|
<?xml version="1.0" encoding="utf-8"?>
|
138
140
|
|
139
141
|
<RelativeLayout
|
4
customview_context_menu_header\.xmlを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -127,3 +127,145 @@
|
|
127
127
|
Android 7.0
|
128
128
|
|
129
129
|
![イメージ説明](0af2a9a36916d3c257c96f7db89e218d.png)
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
```xml
|
136
|
+
|
137
|
+
<?xml version="1.0" encoding="utf-8"?>
|
138
|
+
|
139
|
+
<RelativeLayout
|
140
|
+
|
141
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
142
|
+
|
143
|
+
android:layout_width="match_parent"
|
144
|
+
|
145
|
+
android:layout_height="wrap_content">
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<LinearLayout
|
150
|
+
|
151
|
+
android:id="@+id/context_menu_header"
|
152
|
+
|
153
|
+
android:layout_width="match_parent"
|
154
|
+
|
155
|
+
android:layout_height="wrap_content"
|
156
|
+
|
157
|
+
android:layout_centerVertical="true"
|
158
|
+
|
159
|
+
android:paddingTop="@dimen/text_padding"
|
160
|
+
|
161
|
+
android:paddingLeft="@dimen/text_padding"
|
162
|
+
|
163
|
+
android:orientation="vertical">
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<TextView
|
168
|
+
|
169
|
+
android:id="@+id/text_header_title"
|
170
|
+
|
171
|
+
android:layout_width="wrap_content"
|
172
|
+
|
173
|
+
android:layout_height="wrap_content"
|
174
|
+
|
175
|
+
android:textSize="@dimen/font_size_title"
|
176
|
+
|
177
|
+
android:text="title1"/>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<LinearLayout
|
182
|
+
|
183
|
+
android:layout_width="match_parent"
|
184
|
+
|
185
|
+
android:layout_height="wrap_content">
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<TextView
|
190
|
+
|
191
|
+
android:id="@+id/label_header_title2"
|
192
|
+
|
193
|
+
android:layout_width="wrap_content"
|
194
|
+
|
195
|
+
android:layout_height="wrap_content"
|
196
|
+
|
197
|
+
android:textSize="@dimen/font_size_subheading"
|
198
|
+
|
199
|
+
android:text="@string/label_title2"/>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<TextView
|
204
|
+
|
205
|
+
android:id="@+id/text_header_title2"
|
206
|
+
|
207
|
+
android:layout_width="wrap_content"
|
208
|
+
|
209
|
+
android:layout_height="wrap_content"
|
210
|
+
|
211
|
+
android:layout_toRightOf="@+id/label_header_"
|
212
|
+
|
213
|
+
android:paddingLeft="@dimen/text_padding"
|
214
|
+
|
215
|
+
android:textSize="@dimen/font_size_subheading"
|
216
|
+
|
217
|
+
android:text="title2"/>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</LinearLayout>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
<LinearLayout
|
226
|
+
|
227
|
+
android:layout_width="match_parent"
|
228
|
+
|
229
|
+
android:layout_height="wrap_content">
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<TextView
|
234
|
+
|
235
|
+
android:id="@+id/label_header_title3"
|
236
|
+
|
237
|
+
android:layout_width="wrap_content"
|
238
|
+
|
239
|
+
android:layout_height="wrap_content"
|
240
|
+
|
241
|
+
android:textSize="@dimen/font_size_subheading"
|
242
|
+
|
243
|
+
android:text="@string/label_title3"/>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
<TextView
|
248
|
+
|
249
|
+
android:id="@+id/text_header_title3"
|
250
|
+
|
251
|
+
android:layout_width="wrap_content"
|
252
|
+
|
253
|
+
android:layout_height="wrap_content"
|
254
|
+
|
255
|
+
android:layout_toRightOf="@+id/label_header_title3"
|
256
|
+
|
257
|
+
android:paddingLeft="@dimen/text_padding"
|
258
|
+
|
259
|
+
android:textSize="@dimen/font_size_subheading"
|
260
|
+
|
261
|
+
android:text="title3"/>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</LinearLayout>
|
266
|
+
|
267
|
+
</LinearLayout>
|
268
|
+
|
269
|
+
</RelativeLayout>
|
270
|
+
|
271
|
+
```
|
3
スクリーンショットを追加しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -118,6 +118,12 @@
|
|
118
118
|
|
119
119
|
```
|
120
120
|
|
121
|
+
Android 6.0以前
|
122
|
+
|
123
|
+
![イメージ説明](c3da72d6fdf12f395307cf9a0ca8e02a.png)
|
121
124
|
|
122
125
|
|
126
|
+
|
127
|
+
Android 7.0
|
128
|
+
|
123
|
-
|
129
|
+
![イメージ説明](0af2a9a36916d3c257c96f7db89e218d.png)
|
2
コメント追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -117,3 +117,7 @@
|
|
117
117
|
}
|
118
118
|
|
119
119
|
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
なかなか回答が付かないので、なにか答えではなく検証方法などでもいいのでヒントを頂きたいです。
|
1
言語追記
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|