3
我想告訴像動作按鈕(3 ...圖標)的點擊圖像選項的彈出窗口。
我試圖通過選項菜單,但圖標不來。請建議我如何添加圖標。
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="ui.dealroomcontent.DealRoomContentActivity">
<item
android:id="@+id/action_view_details"
android:title="View room details"
android:orderInCategory="100"
android:icon="@drawable/ic_dealroom_details_normal"
app:showAsAction="never" />
<item
android:id="@+id/action_add_file"
android:title="@string/action_create_file"
android:orderInCategory="100"
android:icon="@drawable/ic_dealroom_createfolder_normal"
app:showAsAction="never" />
<item
android:id="@+id/action_add_folder"
android:title="@string/action_create_folder"
android:icon="@drawable/ic_dealroom_createfile_normal"
android:orderInCategory="100"
app:showAsAction="never" />
<item
android:id="@+id/action_upload_from_camera"
android:title="@string/action_upload_from_camera"
android:icon="@drawable/ic_dealroom_uploadcamera_normal"
android:orderInCategory="100"
app:showAsAction="never" />
<item
android:id="@+id/action_upload_from_gallery"
android:title="@string/action_upload_from_gallery"
android:icon="@drawable/ic_dealroom_uploadgallery_normal"
android:orderInCategory="100"
app:showAsAction="never" />
<item
android:id="@+id/action_upload_from_local"
android:title="@string/action_upload_from_local"
android:orderInCategory="100"
android:icon="@drawable/ic_dealroom_upload_normal"
app:showAsAction="never" />
嘗試在' '內添加'app:showAsAction =「never | withText」'。它工作嗎? –
檢查此:http://stackoverflow.com/questions/8908985/android-options-menu-icon-wont-display – SANAT