From 4ba197c713bfd6b87845eefb8aaa549ad76a415e Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 8 Feb 2020 14:39:56 -0800 Subject: [PATCH] Near final fixes to filter bottom sheet Fixed title sometimes still showing when expanded Popup menu show sorting option --- .../data/database/models/Category.kt | 34 ++- .../tachiyomi/ui/library/LibraryPresenter.kt | 42 ++-- .../ui/library/filter/FilterBottomSheet.kt | 188 +++++++++------ app/src/main/res/drawable/ic_blank_24dp.xml | 10 + .../main/res/drawable/ic_check_white_24dp.xml | 5 + .../res/layout-land/filter_bottom_sheet.xml | 215 ++++++++++++++++++ .../layout-sw600dp/filter_bottom_sheet.xml | 215 ++++++++++++++++++ .../main/res/layout/filter_bottom_sheet.xml | 33 ++- app/src/main/res/menu/cat_sort.xml | 20 +- app/src/main/res/menu/main_sort.xml | 26 +-- app/src/main/res/values/strings.xml | 2 + 11 files changed, 638 insertions(+), 152 deletions(-) create mode 100644 app/src/main/res/drawable/ic_blank_24dp.xml create mode 100644 app/src/main/res/drawable/ic_check_white_24dp.xml create mode 100644 app/src/main/res/layout-land/filter_bottom_sheet.xml create mode 100644 app/src/main/res/layout-sw600dp/filter_bottom_sheet.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt index ecf8988560..318cb79b55 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.data.database.models import android.content.Context import eu.kanade.tachiyomi.R +import eu.kanade.tachiyomi.ui.library.LibrarySort import java.io.Serializable interface Category : Serializable { @@ -25,16 +26,31 @@ interface Category : Serializable { return ((mangaSort?.minus('a') ?: 0) % 2) != 1 } - companion object { - const val ALPHA_ASC = 'a' - const val ALPHA_DSC = 'b' - const val UPDATED_ASC = 'c' - const val UPDATED_DSC = 'd' - const val UNREAD_ASC = 'e' - const val UNREAD_DSC = 'f' - const val LAST_READ_ASC = 'g' - const val LAST_READ_DSC = 'h' + fun sortingMode(): Int? = when (mangaSort) { + ALPHA_ASC, ALPHA_DSC -> LibrarySort.ALPHA + UPDATED_ASC, UPDATED_DSC -> LibrarySort.LAST_UPDATED + UNREAD_ASC, UNREAD_DSC -> LibrarySort.UNREAD + LAST_READ_ASC, LAST_READ_DSC -> LibrarySort.LAST_READ + else -> null + } + fun catSortingMode(): Int? = when (mangaSort) { + ALPHA_ASC, ALPHA_DSC -> 0 + UPDATED_ASC, UPDATED_DSC -> 1 + UNREAD_ASC, UNREAD_DSC -> 2 + LAST_READ_ASC, LAST_READ_DSC -> 3 + else -> null + } + + companion object { + private const val ALPHA_ASC = 'a' + private const val ALPHA_DSC = 'b' + private const val UPDATED_ASC = 'c' + private const val UPDATED_DSC = 'd' + private const val UNREAD_ASC = 'e' + private const val UNREAD_DSC = 'f' + private const val LAST_READ_ASC = 'g' + private const val LAST_READ_DSC = 'h' fun create(name: String): Category = CategoryImpl().apply { this.name = name diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 38fde9f85b..b34f1e015f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -4,14 +4,6 @@ import android.os.Bundle import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.models.Category -import eu.kanade.tachiyomi.data.database.models.Category.Companion.ALPHA_ASC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.ALPHA_DSC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.LAST_READ_ASC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.LAST_READ_DSC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.UNREAD_ASC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.UNREAD_DSC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.UPDATED_ASC -import eu.kanade.tachiyomi.data.database.models.Category.Companion.UPDATED_DSC import eu.kanade.tachiyomi.data.database.models.LibraryManga import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.database.models.MangaCategory @@ -246,16 +238,16 @@ class LibraryPresenter( val sortFn: (LibraryItem, LibraryItem) -> Int = { i1, i2 -> val compare = when { category.mangaSort != null -> { - var sort = when (category.mangaSort) { - ALPHA_ASC, ALPHA_DSC -> sortAlphabetical(i1, i2) - UPDATED_ASC, UPDATED_DSC -> i2.manga.last_update.compareTo(i1.manga.last_update) - UNREAD_ASC, UNREAD_DSC -> when { + var sort = when (category.sortingMode()) { + LibrarySort.ALPHA -> sortAlphabetical(i1, i2) + LibrarySort.LAST_UPDATED -> i2.manga.last_update.compareTo(i1.manga.last_update) + LibrarySort.UNREAD -> when { i1.manga.unread == i2.manga.unread -> 0 i1.manga.unread == 0 -> if (category.isAscending()) 1 else -1 i2.manga.unread == 0 -> if (category.isAscending()) -1 else 1 else -> i1.manga.unread.compareTo(i2.manga.unread) } - LAST_READ_ASC, LAST_READ_DSC -> { + LibrarySort.LAST_READ -> { val manga1LastRead = lastReadManga[i1.manga.id!!] ?: lastReadManga.size val manga2LastRead = lastReadManga[i2.manga.id!!] ?: lastReadManga.size manga1LastRead.compareTo(manga2LastRead) @@ -336,20 +328,16 @@ class LibraryPresenter( val category = catListing.find { it.id == i1.manga.category } when { category?.mangaSort != null -> { - var sort = when (category.mangaSort) { - ALPHA_ASC, ALPHA_DSC -> sortAlphabetical(i1, i2) - UPDATED_ASC, UPDATED_DSC -> - i2.manga.last_update.compareTo(i1.manga.last_update) - UNREAD_ASC, UNREAD_DSC -> - when { - i1.manga.unread == i2.manga.unread -> 0 - i1.manga.unread == 0 -> - if (category.isAscending()) 1 else -1 - i2.manga.unread == 0 -> - if (category.isAscending()) -1 else 1 - else -> i1.manga.unread.compareTo(i2.manga.unread) - } - LAST_READ_ASC, LAST_READ_DSC -> { + var sort = when (category.sortingMode()) { + LibrarySort.ALPHA -> sortAlphabetical(i1, i2) + LibrarySort.LAST_UPDATED -> i2.manga.last_update.compareTo(i1.manga.last_update) + LibrarySort.UNREAD -> when { + i1.manga.unread == i2.manga.unread -> 0 + i1.manga.unread == 0 -> if (category.isAscending()) 1 else -1 + i2.manga.unread == 0 -> if (category.isAscending()) -1 else 1 + else -> i1.manga.unread.compareTo(i2.manga.unread) + } + LibrarySort.LAST_READ -> { val manga1LastRead = lastReadManga[i1.manga.id!!] ?: lastReadManga.size val manga2LastRead = lastReadManga[i2.manga.id!!] ?: lastReadManga.size manga1LastRead.compareTo(manga2LastRead) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt index 33d3016224..561b9c5fcb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt @@ -4,13 +4,13 @@ import android.content.Context import android.content.res.Configuration import android.graphics.drawable.Drawable import android.util.AttributeSet -import android.view.MenuItem import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.LinearLayout import android.widget.RadioButton import android.widget.RadioGroup +import androidx.appcompat.view.menu.MenuBuilder import androidx.appcompat.widget.PopupMenu import androidx.core.content.ContextCompat import com.f2prateek.rx.preferences.Preference @@ -86,14 +86,13 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri var pager:View? = null fun onCreate(pagerView:View) { - if (context.resources.configuration?.orientation == Configuration.ORIENTATION_LANDSCAPE - || isTablet()) { + if (isLandscape() || isTablet()) { sideLayout.orientation = HORIZONTAL sortingLayout.updateLayoutParams { bottomMargin = 0 topMargin = 0 } - sortScrollView.updatePadding( + sortScrollView?.updatePadding( bottom = 10.dpToPx, top = 0 ) @@ -117,14 +116,16 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri val coordLayout:View = (pagerView.parent as ViewGroup).findViewById(R.id.snackbar_layout) sheetBehavior?.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() { override fun onSlide(bottomSheet: View, progress: Float) { - updateRootPadding(progress) topbar.alpha = 1 - progress shadow2.alpha = (1 - progress) * 0.25f + updateRootPadding(progress) } override fun onStateChanged(p0: View, state: Int) { if (state == BottomSheetBehavior.STATE_COLLAPSED) reSortViews() else setMainSortText() + if (state == BottomSheetBehavior.STATE_EXPANDED) + topbar.alpha = 0f topbar.isClickable = state == BottomSheetBehavior.STATE_COLLAPSED topbar.isFocusable = state == BottomSheetBehavior.STATE_COLLAPSED } @@ -167,6 +168,10 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri displayGroup.bindToPreference(preferences.libraryAsList()) } + private fun isLandscape(): Boolean { + return context.resources.configuration?.orientation == Configuration.ORIENTATION_LANDSCAPE + } + private fun isTablet(): Boolean { return (context.resources.configuration.screenLayout and Configuration .SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE @@ -345,17 +350,41 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri // Set a listener so we are notified if a menu item is clicked popup.setOnMenuItemClickListener { menuItem -> - onMainSortClicked(menuItem) + onMainSortClicked(menuItem.itemId) true } - popup.menu.findItem(R.id.action_reverse).isVisible = - preferences.librarySortingMode().getOrDefault() != LibrarySort.DRAG_AND_DROP + + if (popup.menu is MenuBuilder) { + val m = popup.menu as MenuBuilder + m.setOptionalIconsVisible(true) + } + + val sortingMode = preferences.librarySortingMode().getOrDefault() + val currentItem = popup.menu.findItem( + when (sortingMode) { + LibrarySort.DRAG_AND_DROP -> R.id.action_drag_and_drop + LibrarySort.TOTAL -> R.id.action_total_chaps + LibrarySort.LAST_READ -> R.id.action_last_read + LibrarySort.UNREAD -> R.id.action_unread + LibrarySort.LAST_UPDATED -> R.id.action_update + else -> R.id.action_alpha + } + ) + currentItem.icon = tintVector( + when { + sortingMode == LibrarySort.DRAG_AND_DROP -> R.drawable.ic_check_white_24dp + !preferences.librarySortingAscending().getOrDefault() -> + R.drawable.ic_arrow_down_white_24dp + else -> R.drawable.ic_arrow_up_white_24dp + }, android.R.attr.colorAccent + ) // Finally show the PopupMenu popup.show() } private fun showCatSortOptions() { + val category = lastCategory ?: return // Create a PopupMenu, giving it the clicked view for an anchor val popup = PopupMenu(context, catSortTextView) @@ -364,23 +393,45 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri // Set a listener so we are notified if a menu item is clicked popup.setOnMenuItemClickListener { menuItem -> - onCatSortClicked(menuItem) + onCatSortClicked(menuItem.itemId) true } - popup.menu.findItem(R.id.action_reverse).isVisible = lastCategory?.mangaSort != null + + val sortingMode = category.sortingMode() + val currentItem = if (sortingMode == null) null + else popup.menu.findItem( + when (sortingMode) { + LibrarySort.DRAG_AND_DROP -> R.id.action_drag_and_drop + LibrarySort.TOTAL -> R.id.action_total_chaps + LibrarySort.LAST_READ -> R.id.action_last_read + LibrarySort.UNREAD -> R.id.action_unread + LibrarySort.LAST_UPDATED -> R.id.action_update + else -> R.id.action_alpha + } + ) + + if (sortingMode != null && popup.menu is MenuBuilder) { + val m = popup.menu as MenuBuilder + m.setOptionalIconsVisible(true) + } + + currentItem?.icon = tintVector( + if (category.isAscending()) R.drawable.ic_arrow_up_white_24dp + else R.drawable.ic_arrow_down_white_24dp, + android.R.attr.colorAccent + ) // Finally show the PopupMenu popup.show() } - private fun onMainSortClicked(menu: MenuItem) { - if (menu.itemId == R.id.action_reverse) { + private fun onMainSortClicked(menuId: Int) { + if (menuId == R.id.action_reverse) { preferences.librarySortingAscending().set( !preferences.librarySortingAscending().getOrDefault()) } else { - preferences.librarySortingMode().set( - when (menu.itemId) { + val sort = when (menuId) { R.id.action_update -> LibrarySort.LAST_UPDATED R.id.action_unread -> LibrarySort.UNREAD R.id.action_total_chaps -> LibrarySort.TOTAL @@ -388,27 +439,36 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri R.id.action_drag_and_drop -> LibrarySort.DRAG_AND_DROP else -> LibrarySort.ALPHA } - ) + if (sort == preferences.librarySortingMode().getOrDefault()) { + if (sort != LibrarySort.DRAG_AND_DROP) + onMainSortClicked(R.id.action_reverse) + return + } + preferences.librarySortingMode().set(sort) preferences.librarySortingAscending().set(true) } setMainSortText() onGroupClicked(ACTION_SORT) } - private fun onCatSortClicked(menu: MenuItem) { + private fun onCatSortClicked(menuId: Int) { val category = lastCategory ?: return - val modType = if (menu.itemId == R.id.action_reverse) { + val modType = if (menuId == R.id.action_reverse) { val t = (category.mangaSort?.minus('a') ?: 0) + 1 if (t % 2 != 0) t + 1 else t - 1 } else { - val order = when (menu.itemId) { + val order = when (menuId) { R.id.action_last_read -> 3 R.id.action_unread -> 2 R.id.action_update -> 1 else -> 0 } + if (order == category.catSortingMode()) { + onCatSortClicked(R.id.action_reverse) + return + } (2 * order + 1) } launchUI { @@ -430,25 +490,21 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri } private fun setMainSortText() { - //if (sheetBehavior?.state == BottomSheetBehavior.STATE_COLLAPSED) return launchUI { val sortId = withContext(Dispatchers.IO) { sorting(true) } - val drawable = withContext(Dispatchers.IO) { - tintVector( - when { - sortId == LibrarySort.DRAG_AND_DROP -> R.drawable.ic_sort_white_24dp - preferences.librarySortingAscending().getOrDefault() -> R.drawable - .ic_arrow_up_white_24dp - else -> R.drawable.ic_arrow_down_white_24dp - } + val drawableL = withContext(Dispatchers.IO) { + tintVector( + when { + sortId == LibrarySort.DRAG_AND_DROP -> R.drawable.ic_sort_white_24dp + preferences.librarySortingAscending().getOrDefault() -> R.drawable.ic_arrow_up_white_24dp + else -> R.drawable.ic_arrow_down_white_24dp + }, android.R.attr.colorAccent ) } - mainSortTextView.setCompoundDrawablesRelativeWithIntrinsicBounds( - null, null, drawable, null - ) mainSortTextView.text = withContext(Dispatchers.IO) { - if (sortId == LibrarySort.DRAG_AND_DROP) - context.getString( + context.getString( + if (sortId == LibrarySort.DRAG_AND_DROP) R.string.sort_library_by_ + else R.string.sort_by_, context.getString( when (sortId) { LibrarySort.LAST_UPDATED -> R.string.action_sort_last_updated LibrarySort.DRAG_AND_DROP -> R.string.action_sort_drag_and_drop @@ -458,9 +514,32 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri else -> R.string.title } ) - else { - context.getString( - R.string.sort_by_, context.getString( + ) + } + mainSortTextView.setCompoundDrawablesRelativeWithIntrinsicBounds( + drawableL, null, null, null + ) + setCatSortText() + } + } + + private fun setCatSortText() { + launchUI { + if (preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP && + !preferences.hideCategories().getOrDefault() && lastCategory != null) { + val sortId = withContext(Dispatchers.IO) { sorting() } + val drawableL = withContext(Dispatchers.IO) { + tintVector( + when { + sortId == LibrarySort.DRAG_AND_DROP -> R.drawable.ic_label_outline_white_24dp + lastCategory?.isAscending() == true -> R.drawable.ic_arrow_up_white_24dp + else -> R.drawable.ic_arrow_down_white_24dp + }, android.R.attr.colorAccent + ) + } + catSortTextView.text = withContext(Dispatchers.IO) { + context.getString( + R.string.sort_category_by_, context.getString( when (sortId) { LibrarySort.LAST_UPDATED -> R.string.action_sort_last_updated LibrarySort.DRAG_AND_DROP -> R.string.action_sort_drag_and_drop @@ -472,42 +551,9 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri ) ) } - } - setCatSortText() - } - } - - private fun setCatSortText() { - launchUI { - if (preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP && - !preferences.hideCategories().getOrDefault() && lastCategory != null) { - val sortId = withContext(Dispatchers.IO) { sorting() } - val drawable = withContext(Dispatchers.IO) { - tintVector( - R.drawable.ic_label_outline_white_24dp - /*when { - sortId == LibrarySort.DRAG_AND_DROP -> R.drawable.ic_sort_white_24dp - lastCategory?.isAscending() == true -> R.drawable - .ic_arrow_up_white_24dp - else -> R.drawable.ic_arrow_down_white_24dp - }*/ - ) - } catSortTextView.setCompoundDrawablesRelativeWithIntrinsicBounds( - null, null, drawable, null + drawableL, null, null, null ) - catSortTextView.text = withContext(Dispatchers.IO) { - context.getString( - when (sortId) { - LibrarySort.LAST_UPDATED -> R.string.action_sort_last_updated - LibrarySort.DRAG_AND_DROP -> R.string.action_sort_drag_and_drop - LibrarySort.TOTAL -> R.string.action_sort_total - LibrarySort.UNREAD -> R.string.action_filter_unread - LibrarySort.LAST_READ -> R.string.action_sort_last_read - else -> R.string.title - } - ) - } if (catSortTextView.visibility != View.VISIBLE) catSortTextView.visible() } else if (catSortTextView.visibility == View.VISIBLE) catSortTextView.gone() } @@ -527,9 +573,9 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri private fun Boolean.toInt() = if (this) 1 else 0 - private fun tintVector(resId: Int): Drawable? { + private fun tintVector(resId: Int, attrId: Int? = null): Drawable? { return ContextCompat.getDrawable(context, resId)?.mutate()?.apply { - setTint(context.getResourceColor(R.attr.actionBarTintColor)) + setTint(context.getResourceColor(attrId ?: android.R.attr.textColorPrimary)) } } diff --git a/app/src/main/res/drawable/ic_blank_24dp.xml b/app/src/main/res/drawable/ic_blank_24dp.xml new file mode 100644 index 0000000000..fdb1e51ddb --- /dev/null +++ b/app/src/main/res/drawable/ic_blank_24dp.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_check_white_24dp.xml b/app/src/main/res/drawable/ic_check_white_24dp.xml new file mode 100644 index 0000000000..17aca2af18 --- /dev/null +++ b/app/src/main/res/drawable/ic_check_white_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout-land/filter_bottom_sheet.xml b/app/src/main/res/layout-land/filter_bottom_sheet.xml new file mode 100644 index 0000000000..a708f43901 --- /dev/null +++ b/app/src/main/res/layout-land/filter_bottom_sheet.xml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp/filter_bottom_sheet.xml b/app/src/main/res/layout-sw600dp/filter_bottom_sheet.xml new file mode 100644 index 0000000000..a708f43901 --- /dev/null +++ b/app/src/main/res/layout-sw600dp/filter_bottom_sheet.xml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/filter_bottom_sheet.xml b/app/src/main/res/layout/filter_bottom_sheet.xml index 935c0c0a67..6fe0dba0af 100644 --- a/app/src/main/res/layout/filter_bottom_sheet.xml +++ b/app/src/main/res/layout/filter_bottom_sheet.xml @@ -7,8 +7,6 @@ app:behavior_peekHeight="0dp" android:layout_height="wrap_content" android:background="@drawable/bg_bottom_sheet_dialog_fragment" - android:clickable="true" - android:focusable="true" android:orientation="vertical" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> @@ -60,20 +58,13 @@ - - @@ -90,14 +81,15 @@ - - + android:title="@string/title" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_last_read" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_last_updated" + android:icon="@drawable/ic_blank_24dp"/> - - - - + android:title="@string/action_filter_unread" + android:icon="@drawable/ic_blank_24dp"/> \ No newline at end of file diff --git a/app/src/main/res/menu/main_sort.xml b/app/src/main/res/menu/main_sort.xml index 6c4e187902..c65b085088 100644 --- a/app/src/main/res/menu/main_sort.xml +++ b/app/src/main/res/menu/main_sort.xml @@ -1,35 +1,35 @@ - + android:title="@string/title" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_last_read" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_last_updated" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_filter_unread" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_total" + android:icon="@drawable/ic_blank_24dp"/> + android:title="@string/action_sort_drag_and_drop" + android:icon="@drawable/ic_blank_24dp"/> - - - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c54d0ec70c..9b175c3ac3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -51,6 +51,8 @@ Sorting by %1$s Sort by: %1$s + Sort library by: %1$s + Sort category by: %1$s Remove filter Alphabetically Enabled