Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/talk-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Scherzinger <info@andy-scherzinger.de>2021-07-07 19:30:06 +0300
committerMarcel Hibbe <dev@mhibbe.de>2021-09-03 13:58:46 +0300
commit85b2cea6182e82ec73387a8f8c23881fe5d4eed2 (patch)
treefdf563104b5497bbcb68e8516dac59e981785c8f /app/src/main/res
parent3cfc8274f208650f4a30fd0bb82e478819cb3c0b (diff)
Add order capabilities to file browser
Resolves #919 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/borderless_btn.xml29
-rw-r--r--app/src/main/res/drawable/ic_alphabetical_asc.xml25
-rw-r--r--app/src/main/res/drawable/ic_alphabetical_desc.xml26
-rw-r--r--app/src/main/res/drawable/ic_keyboard_arrow_down.xml25
-rw-r--r--app/src/main/res/drawable/ic_modification_asc.xml25
-rw-r--r--app/src/main/res/drawable/ic_modification_desc.xml25
-rw-r--r--app/src/main/res/drawable/ic_size_asc.xml25
-rw-r--r--app/src/main/res/drawable/ic_size_desc.xml25
-rw-r--r--app/src/main/res/layout/controller_browser.xml60
-rw-r--r--app/src/main/res/layout/sorting_order_fragment.xml308
-rw-r--r--app/src/main/res/values-night/colors.xml1
-rw-r--r--app/src/main/res/values/colors.xml1
-rw-r--r--app/src/main/res/values/dimens.xml1
-rw-r--r--app/src/main/res/values/strings.xml9
-rw-r--r--app/src/main/res/values/styles.xml11
15 files changed, 590 insertions, 6 deletions
diff --git a/app/src/main/res/drawable/borderless_btn.xml b/app/src/main/res/drawable/borderless_btn.xml
new file mode 100644
index 000000000..a0997b82d
--- /dev/null
+++ b/app/src/main/res/drawable/borderless_btn.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Nextcloud Android client application
+
+ Copyright (C) 2017 Andy Scherzinger
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+ You should have received a copy of the GNU Affero General Public
+ License along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item
+ android:state_enabled="false"
+ android:color="@color/disabled_text" />
+
+ <item
+ android:color="@color/colorAccent"/>
+
+</selector> \ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_alphabetical_asc.xml b/app/src/main/res/drawable/ic_alphabetical_asc.xml
new file mode 100644
index 000000000..e7b83f2c9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_alphabetical_asc.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M20.401,13.623L18.877,13.621L18.868,20.218L17.228,18.57L16.145,19.651L19.627,23.145L23.12,19.663L22.039,18.58L20.392,20.219L20.401,13.623ZM15.034,12.122L15.034,13.376L10.691,19.609L10.691,19.684L15.1,19.684L15.1,21.481L7.847,21.481L7.847,20.302L12.292,13.967L12.292,13.91L8.268,13.91L8.268,12.122L15.034,12.122ZM13.051,1.85L15.981,11.208L13.678,11.208L12.949,8.68L10.244,8.68L9.571,11.208L7.352,11.208L10.244,1.85L13.051,1.85ZM12.64,7.165L12.05,5.182L11.807,4.273L11.573,3.374L11.545,3.374L11.339,4.283L11.114,5.2L10.553,7.165L12.64,7.165Z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_alphabetical_desc.xml b/app/src/main/res/drawable/ic_alphabetical_desc.xml
new file mode 100644
index 000000000..fd3706809
--- /dev/null
+++ b/app/src/main/res/drawable/ic_alphabetical_desc.xml
@@ -0,0 +1,26 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M10.244,12.122L7.352,21.481L9.571,21.481L10.244,18.953L12.949,18.953L13.678,21.481L15.981,21.481L13.051,12.122L10.244,12.122ZM11.545,13.647L11.573,13.647L11.807,14.546L12.05,15.454L12.64,17.437L10.553,17.437L11.114,15.473L11.339,14.555L11.545,13.647L11.545,13.647Z" />
+ <path android:fillColor="#757575" android:pathData="M20.401,13.623L18.877,13.621L18.868,20.218L17.228,18.57L16.145,19.651L19.627,23.145L23.12,19.663L22.039,18.58L20.392,20.219L20.401,13.623ZM15.034,1.85L15.034,3.104L10.691,9.337L10.691,9.412L15.1,9.412L15.1,11.209L7.847,11.209L7.847,10.03L12.292,3.694L12.292,3.638L8.268,3.638L8.268,1.85L15.034,1.85Z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_keyboard_arrow_down.xml b/app/src/main/res/drawable/ic_keyboard_arrow_down.xml
new file mode 100644
index 000000000..0052b3a31
--- /dev/null
+++ b/app/src/main/res/drawable/ic_keyboard_arrow_down.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ Copyright (C) 2018 Google LLC
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M7.41,7.84L12,12.42l4.59,-4.58L18,9.25l-6,6 -6,-6z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_modification_asc.xml b/app/src/main/res/drawable/ic_modification_asc.xml
new file mode 100644
index 000000000..bfb874ec4
--- /dev/null
+++ b/app/src/main/res/drawable/ic_modification_asc.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M17.611,20.838L17.611,22.69L14.635,22.69L14.635,20.838L17.611,20.838ZM11.59,2.133C16.177,2.138 20.131,5.479 20.902,10L18.979,10C18.232,6.53 15.139,4.029 11.59,4.025C7.44,4.026 4.026,7.44 4.025,11.59C4.025,15.74 7.44,19.156 11.59,19.156C12.068,19.155 12.546,19.109 13.016,19.018L13.016,20.922C12.544,21 12.068,21.043 11.59,21.049C6.36,21.049 2.133,16.791 2.133,11.59C2.133,6.402 6.402,2.133 11.59,2.133ZM20.587,16.208L20.587,18.06L14.635,18.06L14.635,16.208L20.587,16.208ZM12.062,6.863L12.062,11.826L13.016,12.393L13.016,13.957L10.645,12.535L10.645,6.863L12.062,6.863ZM23.563,11.577L23.563,13.429L14.635,13.429L14.635,11.577L23.563,11.577Z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_modification_desc.xml b/app/src/main/res/drawable/ic_modification_desc.xml
new file mode 100644
index 000000000..59d79f97a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_modification_desc.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M23.563,22.69L14.635,22.69L14.635,20.838L23.563,20.838L23.563,22.69ZM11.59,2.133C16.177,2.138 20.131,5.479 20.902,10L18.979,10C18.232,6.53 15.139,4.029 11.59,4.025C7.44,4.026 4.026,7.44 4.025,11.59C4.025,15.74 7.44,19.156 11.59,19.156C12.068,19.155 12.546,19.109 13.016,19.018L13.016,20.922C12.544,21 12.068,21.043 11.59,21.049C6.36,21.049 2.133,16.791 2.133,11.59C2.133,6.402 6.402,2.133 11.59,2.133ZM20.587,18.06L14.635,18.06L14.635,16.208L20.587,16.208L20.587,18.06ZM12.062,6.863L12.062,11.826L13.016,12.393L13.016,13.957L10.645,12.535L10.645,6.863L12.062,6.863ZM17.611,13.429L14.635,13.429L14.635,11.577L17.611,11.577L17.611,13.429Z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_size_asc.xml b/app/src/main/res/drawable/ic_size_asc.xml
new file mode 100644
index 000000000..688d6a880
--- /dev/null
+++ b/app/src/main/res/drawable/ic_size_asc.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M23.564,22.69L14.635,22.69L14.635,20.838L23.564,20.838L23.564,22.69ZM10.412,1.805C15.122,1.81 19.145,5.333 19.773,10L17.869,10C17.257,6.376 14.087,3.697 10.412,3.695C6.262,3.695 2.846,7.11 2.846,11.26C2.846,11.26 2.846,11.26 2.846,11.261C2.846,15.411 6.261,18.826 10.411,18.826C10.412,18.826 10.412,18.826 10.412,18.826C11.301,18.822 12.182,18.661 13.016,18.352L13.016,20.338C12.17,20.586 11.293,20.714 10.412,20.719C5.224,20.719 0.955,16.45 0.955,11.262C0.955,11.261 0.955,11.26 0.955,11.26C0.956,6.073 5.225,1.805 10.412,1.805ZM20.587,18.06L14.635,18.06L14.635,16.208L20.587,16.208L20.587,18.06ZM10.412,5.588L10.412,11.26L6.402,15.27C8.191,17.058 10.881,17.4 13.016,16.297L13.016,10L15.941,10C15.712,8.993 15.207,8.036 14.42,7.252C13.313,6.136 11.859,5.588 10.412,5.588ZM17.611,13.43L14.635,13.43L14.635,11.578L17.611,11.578L17.611,13.43Z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_size_desc.xml b/app/src/main/res/drawable/ic_size_desc.xml
new file mode 100644
index 000000000..824e03397
--- /dev/null
+++ b/app/src/main/res/drawable/ic_size_desc.xml
@@ -0,0 +1,25 @@
+<!--
+ @author Google LLC
+ @author Andy Scherzinger
+ Copyright (C) 2018 Google LLC
+ Copyright (C) 2018 Andy Scherzinger
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#757575" android:pathData="M17.611,20.838l0,1.852l-2.976,0l0,-1.852l2.976,0Zm-7.199,-19.033c4.71,0.005 8.733,3.528 9.361,8.195l-1.904,0c-0.612,-3.624 -3.782,-6.303 -7.457,-6.305c-4.15,0 -7.566,3.415 -7.566,7.565c0,0 0,0 0,0.001c0,4.15 3.415,7.565 7.565,7.565c0.001,0 0.001,0 0.001,0c0.889,-0.004 1.77,-0.165 2.604,-0.474l0,1.986c-0.846,0.248 -1.723,0.376 -2.604,0.381c-5.188,0 -9.457,-4.269 -9.457,-9.457c0,-0.001 0,-0.002 0,-0.002c0.001,-5.187 4.27,-9.455 9.457,-9.455Zm10.175,14.403l0,1.852l-5.952,0l0,-1.852l5.952,0Zm-10.175,-10.62l0,5.672l-4.01,4.01c1.789,1.788 4.479,2.13 6.614,1.027l0,-6.297l2.925,0c-0.229,-1.007 -0.734,-1.964 -1.521,-2.748c-1.107,-1.116 -2.561,-1.664 -4.008,-1.664Zm13.151,5.989l0,1.852l-8.928,0l0,-1.852l8.928,0Z" />
+</vector>
diff --git a/app/src/main/res/layout/controller_browser.xml b/app/src/main/res/layout/controller_browser.xml
index 934dd3173..4bb100e08 100644
--- a/app/src/main/res/layout/controller_browser.xml
+++ b/app/src/main/res/layout/controller_browser.xml
@@ -2,6 +2,8 @@
~ Nextcloud Talk application
~
~ @author Mario Danic
+ ~ @author Andy Scherzinger
+ ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
~
~ This program is free software: you can redistribute it and/or modify
@@ -26,25 +28,71 @@
android:background="@color/bg_default"
android:orientation="vertical">
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recycler_view"
+ <!-- sorting/layout bar -->
+ <RelativeLayout
+ android:id="@+id/sort_list_button_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_above="@id/bottom_navigation"
- android:layout_below="@id/path_navigation"
- tools:listitem="@layout/rv_item_browser_file" />
+ android:background="@color/appbar"
+ android:visibility="visible"
+ tools:visibility="visible">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sort_button"
+ style="@style/Nextcloud.Material.TextButton"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_marginStart="7dp"
+ android:contentDescription=""
+ android:text="@string/menu_item_sort_by_date_newest_first"
+ android:textAlignment="textStart"
+ android:textAllCaps="false"
+ android:textColor="@color/fontAppbar"
+ android:textSize="14sp"
+ app:icon="@drawable/ic_keyboard_arrow_down"
+ app:iconGravity="textEnd"
+ app:iconSize="16dp"
+ app:iconTint="@color/fontAppbar" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/switch_grid_view_button"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_marginEnd="1dp"
+ android:contentDescription=""
+ android:layout_alignEnd="@+id/sort_button"
+ android:layout_alignParentEnd="true"
+ android:visibility="invisible"
+ app:cornerRadius="24dp"
+ app:icon="@drawable/ic_search_grey"
+ app:iconTint="@color/fontAppbar" />
+
+ </RelativeLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/path_navigation"
+ style="@style/BottomNavigationView"
android:layout_width="match_parent"
android:layout_height="64dp"
+ android:layout_below="@id/sort_list_button_group"
+ android:layout_marginTop="-1dp"
android:background="@color/bg_default"
- app:itemTextColor="@color/fg_default"
app:itemIconTint="@color/fg_default"
+ app:itemTextColor="@color/fg_default"
app:menu="@menu/file_browser_path" />
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_above="@id/bottom_navigation"
+ android:layout_below="@id/path_navigation"
+ tools:listitem="@layout/rv_item_browser_file" />
+
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
+ style="@style/BottomNavigationView"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_alignParentBottom="true"
diff --git a/app/src/main/res/layout/sorting_order_fragment.xml b/app/src/main/res/layout/sorting_order_fragment.xml
new file mode 100644
index 000000000..be373868c
--- /dev/null
+++ b/app/src/main/res/layout/sorting_order_fragment.xml
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Nextcloud Android client application
+
+ Copyright (C) 2017 Andy Scherzinger
+ Copyright (C) 2017 Nextcloud
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+ You should have received a copy of the GNU Affero General Public
+ License along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/root"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minWidth="300dp"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/header"
+ style="@style/Base.DialogWindowTitle.AppCompat"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/standard_margin"
+ android:text="@string/nc_sort_by" />
+
+ <ScrollView
+ android:id="@+id/scrollableSortings"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1">
+
+ <TableLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortByNameAscending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_name_a_z"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_alphabetical_asc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortByNameAZText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_name_a_z"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortByNameDescending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_name_z_a"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_alphabetical_desc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortByNameZAText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_name_z_a"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/standard_half_margin">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortByModificationDateDescending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_date_oldest_first"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_modification_desc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortByModificationDateNewestFirstText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_date_newest_first"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortByModificationDateAscending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_date_newest_first"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_modification_asc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortByModificationDateOldestFirstText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_date_oldest_first"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+
+ android:layout_marginTop="@dimen/standard_half_margin">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortBySizeDescending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_size_biggest_first"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_size_desc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortBySizeBiggestFirstText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_size_biggest_first"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sortBySizeAscending"
+ style="@style/Widget.AppTheme.Button.IconButton"
+ android:layout_width="@dimen/min_size_clickable_area"
+ android:layout_height="@dimen/min_size_clickable_area"
+ android:layout_gravity="center_vertical"
+ android:background="@color/bg_default"
+ android:contentDescription="@string/menu_item_sort_by_size_smallest_first"
+ android:paddingStart="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ app:cornerRadius="@dimen/button_corner_radius"
+ app:icon="@drawable/ic_size_asc"
+ app:iconTint="@color/grey_600" />
+
+ <TextView
+ android:id="@+id/sortBySizeSmallestFirstText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:paddingStart="@dimen/zero"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingEnd="@dimen/standard_double_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:singleLine="true"
+ android:text="@string/menu_item_sort_by_size_smallest_first"
+ android:textColor="@color/grey_600"
+ android:textSize="@dimen/two_line_primary_text_size" />
+
+ </TableRow>
+
+ </TableLayout>
+
+ </ScrollView>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="end">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/cancel"
+ style="@style/Button.Borderless"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/min_size_clickable_area"
+ android:text="@string/nc_cancel" />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
index 501f515c6..622e1a854 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -27,6 +27,7 @@
<color name="colorPrimary">#0082C9</color>
<color name="colorPrimaryDark">#006AA3</color>
<color name="colorAccent">@color/colorPrimary</color>
+ <color name="disabled_text">#ff6F6F6F</color>
<!-- App bar -->
<color name="appbar">#1E1E1E</color>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 2519f9f27..d8422386c 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -25,6 +25,7 @@
<color name="colorPrimary">#0082C9</color>
<color name="colorPrimaryDark">#006AA3</color>
<color name="colorAccent">@color/colorPrimary</color>
+ <color name="disabled_text">#ff888888</color>
<color name="textColorOnPrimaryBackground">#ffffff</color> <!-- white/black depending on primary color -->
<color name="nc_login_text_color">#B3FFFFFF</color>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 84881fc10..61a76806e 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -62,4 +62,5 @@
<dimen name="call_grid_item_min_height">180dp</dimen>
<dimen name="call_controls_height">110dp</dimen>
+ <dimen name="zero">0dp</dimen>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 807345106..6acfb7fd4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -336,6 +336,15 @@
<string name="nc_file_browser_refresh">Refresh</string>
<string name="nc_last_modified">%1$s | Last modified: %2$s</string>
<string name="nc_file_browser_reshare_forbidden">You are not allowed to re-share this file</string>
+ <string name="nc_sort_by">Sort by</string>
+ <string name="nc_file_browser_sort_by_key" translatable="false">file_browser_sort_by</string>
+ <string name="nc_file_browser_sort_by_default" translatable="false">sort_a_to_z</string>
+ <string name="menu_item_sort_by_name_a_z">A - Z</string>
+ <string name="menu_item_sort_by_name_z_a">Z - A</string>
+ <string name="menu_item_sort_by_date_newest_first">Newest first</string>
+ <string name="menu_item_sort_by_date_oldest_first">Oldest first</string>
+ <string name="menu_item_sort_by_size_biggest_first">Biggest first</string>
+ <string name="menu_item_sort_by_size_smallest_first">Smallest first</string>
<!-- Lobby -->
<string name="nc_webinar">Webinar</string>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 7b09c2017..c266cc46d 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -55,6 +55,10 @@
<item name="android:navigationBarColor">@color/grey950</item>
</style>
+ <style name="BottomNavigationView" parent="@style/Widget.MaterialComponents.BottomNavigationView">
+ <item name="elevation">1dp</item>
+ </style>
+
<style name="ErrorAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/nc_darkRed</item>
<item name="android:textSize">12sp</item>
@@ -113,6 +117,13 @@
<item name="iconPadding">0dp</item>
</style>
+ <style name="Button.Borderless" parent="Widget.MaterialComponents.Button.TextButton">
+ <item name="android:textColor">@drawable/borderless_btn</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:typeface">sans</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
<style name="Widget.App.Login.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="colorControlActivated">@color/white</item>
<item name="colorControlHighlight">@color/white</item>