Jeff Sharkey | 54e55b7 | 2013-06-30 20:02:59 -0700 | [diff] [blame] | 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 xmlns:android="http://schemas.android.com/apk/res/android"> |
Aga Wronska | 9783148 | 2016-01-08 17:29:24 -0800 | [diff] [blame] | 18 | <!-- showAsAction flag impacts the behavior of SearchView. |
| 19 | When set to collapseActionView, collapsing SearchView to icon is the |
| 20 | default behavior. It would fit UX, however after expanding SearchView is |
| 21 | shown on the left site of the toolbar (replacing title). Since no way to |
| 22 | prevent this behavior was found, the flag is set to always. SearchView is |
| 23 | always visible by default and it is being collapse manually by calling |
| 24 | setIconified() method |
| 25 | --> |
Jeff Sharkey | 54e55b7 | 2013-06-30 20:02:59 -0700 | [diff] [blame] | 26 | <item |
Jeff Sharkey | bc2971d | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 27 | android:id="@+id/menu_search" |
| 28 | android:title="@string/menu_search" |
Jeff Sharkey | 6d97d3c | 2013-09-06 10:43:45 -0700 | [diff] [blame] | 29 | android:icon="@drawable/ic_menu_search" |
Aga Wronska | 9783148 | 2016-01-08 17:29:24 -0800 | [diff] [blame] | 30 | android:showAsAction="always" |
Jeff Sharkey | bc2971d | 2013-07-31 20:53:22 -0700 | [diff] [blame] | 31 | android:actionViewClass="android.widget.SearchView" |
Steve McKay | 3ce9595 | 2016-02-02 11:41:03 -0800 | [diff] [blame] | 32 | android:imeOptions="actionSearch" |
| 33 | android:visible="false" /> |
Aga Wronska | b099856 | 2016-03-24 18:22:09 -0700 | [diff] [blame] | 34 | <!-- This group is being hidden when searching is in full bar mode--> |
| 35 | <group android:id="@+id/group_hide_when_searching"> |
| 36 | <item |
| 37 | android:id="@+id/menu_grid" |
| 38 | android:title="@string/menu_grid" |
| 39 | android:icon="@drawable/ic_menu_view_grid" |
| 40 | android:showAsAction="always" /> |
| 41 | <item |
| 42 | android:id="@+id/menu_list" |
| 43 | android:title="@string/menu_list" |
| 44 | android:icon="@drawable/ic_menu_view_list" |
| 45 | android:showAsAction="always" /> |
Steve McKay | 3ce9595 | 2016-02-02 11:41:03 -0800 | [diff] [blame] | 46 | |
Aga Wronska | b099856 | 2016-03-24 18:22:09 -0700 | [diff] [blame] | 47 | <item |
| 48 | android:id="@+id/menu_new_window" |
| 49 | android:title="@string/menu_new_window" |
| 50 | android:alphabeticShortcut="n" |
| 51 | android:showAsAction="never" |
| 52 | android:visible="false" /> |
| 53 | <item |
| 54 | android:id="@+id/menu_create_dir" |
| 55 | android:title="@string/menu_create_dir" |
| 56 | android:icon="@drawable/ic_menu_new_folder" |
| 57 | android:alphabeticShortcut="e" |
| 58 | android:showAsAction="never" |
| 59 | android:visible="false" /> |
| 60 | <item |
| 61 | android:id="@+id/menu_paste_from_clipboard" |
| 62 | android:title="@string/menu_paste_from_clipboard" |
| 63 | android:alphabeticShortcut="v" |
| 64 | android:showAsAction="never" |
| 65 | android:visible="false" /> |
| 66 | <!-- Copy action is defined in mode_directory.xml --> |
| 67 | <item |
| 68 | android:id="@+id/menu_sort" |
| 69 | android:title="@string/menu_sort" |
| 70 | android:icon="@drawable/ic_menu_sortby" |
| 71 | android:showAsAction="ifRoom"> |
| 72 | <menu> |
| 73 | <item |
| 74 | android:id="@+id/menu_sort_name" |
| 75 | android:title="@string/sort_name" /> |
| 76 | <item |
| 77 | android:id="@+id/menu_sort_date" |
| 78 | android:title="@string/sort_date" /> |
| 79 | <item |
| 80 | android:id="@+id/menu_sort_size" |
| 81 | android:title="@string/sort_size" /> |
| 82 | </menu> |
| 83 | </item> |
| 84 | <item |
| 85 | android:id="@+id/menu_file_size" |
| 86 | android:showAsAction="never" |
| 87 | android:visible="false" /> |
| 88 | <item |
| 89 | android:id="@+id/menu_settings" |
| 90 | android:title="@string/menu_settings" |
| 91 | android:showAsAction="never" |
| 92 | android:visible="false" /> |
| 93 | </group> |
Jeff Sharkey | 54e55b7 | 2013-06-30 20:02:59 -0700 | [diff] [blame] | 94 | </menu> |