1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2013 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<menu 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto"> 20<!-- showAsAction flag impacts the behavior of SearchView. 21 When set to collapseActionView, collapsing SearchView to icon is the 22 default behavior. It would fit UX, however after expanding SearchView is 23 shown on the left site of the toolbar (replacing title). Since no way to 24 prevent this behavior was found, the flag is set to always. SearchView is 25 always visible by default and it is being collapse manually by calling 26 setIconified() method 27--> 28 <item 29 android:id="@+id/option_menu_search" 30 android:title="@string/menu_search" 31 android:icon="@drawable/ic_menu_search" 32 android:imeOptions="actionSearch" 33 android:visible="false" 34 app:showAsAction="always|collapseActionView" 35 app:actionViewClass="androidx.appcompat.widget.SearchView"/> 36<!-- This group is being hidden when searching is in full bar mode--> 37 <group android:id="@+id/group_hide_when_searching"> 38 <item 39 android:id="@+id/option_menu_debug" 40 android:title="Debug" 41 android:icon="@drawable/ic_debug_menu" 42 android:visible="false" 43 app:showAsAction="always"/> 44 <item 45 android:id="@+id/option_menu_new_window" 46 android:title="@string/menu_new_window" 47 android:alphabeticShortcut="n" 48 android:visible="false" 49 app:showAsAction="never"/> 50 <item 51 android:id="@+id/option_menu_create_dir" 52 android:title="@string/menu_create_dir" 53 android:icon="@drawable/ic_create_new_folder" 54 android:alphabeticShortcut="e" 55 android:visible="false" 56 app:showAsAction="never"/> 57 <item 58 android:id="@+id/option_menu_sort" 59 android:title="@string/menu_sort" 60 android:icon="@drawable/ic_sort" 61 android:showAsAction="never" 62 android:visible="false" /> 63 <item 64 android:id="@+id/option_menu_select_all" 65 android:title="@string/menu_select_all" 66 android:alphabeticShortcut="a" 67 android:visible="false" 68 app:showAsAction="never"/> 69 <item 70 android:id="@+id/option_menu_settings" 71 android:title="@string/menu_settings" 72 android:visible="false" 73 app:showAsAction="never"/> 74 <item 75 android:id="@+id/option_menu_inspect" 76 android:title="@string/menu_inspect" 77 android:visible="false" 78 app:showAsAction="never"/> 79 <item 80 android:id="@+id/option_menu_show_hidden_files" 81 android:title="@string/menu_show_hidden_files" 82 android:visible="false" 83 app:showAsAction="never"/> 84 <item 85 android:id="@+id/option_menu_launcher" 86 android:visible="false" 87 app:showAsAction="never"/> 88 </group> 89</menu> 90