android: move sort options to separate menu

This is one in a series of commits of trying to unclutter the context
menu, which was pretty unorganized.

Change-Id: I8a9473041730492a0b60c6b71fd7fd7996cedd89
Reviewed-on: https://gerrit.libreoffice.org/33768
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
aleksandar-stefanovic 2017-01-31 21:51:25 +01:00 committed by Christian Lohmaier
parent 05e78bde26
commit 23f39d7283
3 changed files with 36 additions and 6 deletions

View File

@ -0,0 +1,13 @@
<!--
This file is part of the LibreOffice project.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
</vector>

View File

@ -2,14 +2,29 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_sort"
android:title="@string/sort"
android:icon="@drawable/ic_sort_black_24dp"
app:showAsAction="ifRoom">
<menu>
<item android:id="@+id/menu_sort_size"
android:title="@string/menu_sort_size" />
<item android:id="@+id/menu_sort_az"
android:title="@string/menu_sort_az"/>
<item android:id="@+id/menu_sort_modified"
android:title="@string/menu_sort_modified"/>
</menu>
</item>
<item android:id="@+id/menu_view_toggle"
android:title="@string/grid_view"/>
<item android:id="@+id/menu_sort_size"
android:title="@string/menu_sort_size"/>
<item android:id="@+id/menu_sort_az"
android:title="@string/menu_sort_az"/>
<item android:id="@+id/menu_sort_modified"
android:title="@string/menu_sort_modified"/>
<item android:id="@+id/menu_storage_preferences"
android:title="@string/storage_provider_settings"/>
<item android:id="@+id/action_about"

View File

@ -20,6 +20,8 @@
<string name="menu_search">Search</string>
<string name="list_view">List</string>
<string name="grid_view">Grid</string>
<string name="filter">Filter by</string>
<string name="sort">Sort by</string>
<string name="sort_smallest">Smallest first</string>
<string name="sort_largest">Largest first</string>
<string name="sort_az">A-Z</string>