質問編集履歴
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -319,3 +319,21 @@
|
|
319
319
|
なぜ、アイコンにすると長押しでの反応になるのでしょう・・・?
|
320
320
|
|
321
321
|
設定前と同じくタップで反応させたいのですが・・・。
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
2018/08/22 追加
|
332
|
+
|
333
|
+
実機で動作確認してます。
|
334
|
+
|
335
|
+
実機は、
|
336
|
+
|
337
|
+
HUAWEI Honor 6 Plus PE-TL10
|
338
|
+
|
339
|
+
Androidバージョンは、5.1.1 です。
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -255,3 +255,67 @@
|
|
255
255
|
|
256
256
|
|
257
257
|
```
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
2018/08/21 更新
|
264
|
+
|
265
|
+
アイコンを設定する前のxml
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
android:icon="@drawable/ic_action_settings"
|
270
|
+
|
271
|
+
を付け加えたのと、
|
272
|
+
|
273
|
+
app:showAsActionを、neverから ifRoomに変更しました。
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
ソースの変更はこの2行だけです。
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
app\src\main\res\menu\menu_main.xml
|
282
|
+
|
283
|
+
```xml
|
284
|
+
|
285
|
+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
286
|
+
|
287
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
288
|
+
|
289
|
+
xmlns:tools="http://schemas.android.com/tools"
|
290
|
+
|
291
|
+
tools:context="com.example.administrator.myapplication.MainActivity">
|
292
|
+
|
293
|
+
<item
|
294
|
+
|
295
|
+
android:id="@+id/action_settings"
|
296
|
+
|
297
|
+
android:orderInCategory="100"
|
298
|
+
|
299
|
+
android:title="@string/action_settings"
|
300
|
+
|
301
|
+
app:showAsAction="never" />
|
302
|
+
|
303
|
+
</menu>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
```
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
【気付いたこと】
|
314
|
+
|
315
|
+
今気付いたのですが、(アイコン設定後の画面は)タップでは反応しないのですが、
|
316
|
+
|
317
|
+
長押しで反応しました。
|
318
|
+
|
319
|
+
なぜ、アイコンにすると長押しでの反応になるのでしょう・・・?
|
320
|
+
|
321
|
+
設定前と同じくタップで反応させたいのですが・・・。
|