From b3234bd37784e8d0b7ff0719877b6358e4caec53 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 19 Apr 2024 06:39:38 +0300 Subject: [PATCH] add sort and categories floating buttons --- .../ru/yourok/torrserve/server/api/Api.kt | 2 +- .../ru/yourok/torrserve/settings/Settings.kt | 13 +- .../ui/activities/main/MainActivity.kt | 213 ++++++++++++++++-- .../torrserve/ui/fragments/add/AddFragment.kt | 5 +- .../main/settings/SettingsFragment.kt | 24 +- .../main/torrents/TorrentsFragment.kt | 74 +++--- app/src/main/res/drawable/round_check_24.xml | 12 + .../res/drawable/round_filter_list_24.xml | 16 +- .../main/res/drawable/round_live_tv_24.xml | 16 ++ .../main/res/drawable/round_more_horiz_24.xml | 5 + app/src/main/res/drawable/round_movie_24.xml | 16 ++ .../main/res/drawable/round_music_note_24.xml | 5 + .../res/drawable/round_sort_by_alpha_24.xml | 5 + app/src/main/res/layout/main_activity.xml | 184 ++++++++++++++- app/src/main/res/values-bg/strings.xml | 11 + app/src/main/res/values-ru/strings.xml | 11 + app/src/main/res/values-uk/strings.xml | 11 + app/src/main/res/values-zh-rCN/strings.xml | 13 ++ app/src/main/res/values/strings.xml | 13 ++ app/src/main/res/xml/preferences.xml | 14 ++ 20 files changed, 587 insertions(+), 76 deletions(-) create mode 100644 app/src/main/res/drawable/round_check_24.xml create mode 100644 app/src/main/res/drawable/round_live_tv_24.xml create mode 100644 app/src/main/res/drawable/round_more_horiz_24.xml create mode 100644 app/src/main/res/drawable/round_movie_24.xml create mode 100644 app/src/main/res/drawable/round_music_note_24.xml create mode 100644 app/src/main/res/drawable/round_sort_by_alpha_24.xml diff --git a/app/src/main/java/ru/yourok/torrserve/server/api/Api.kt b/app/src/main/java/ru/yourok/torrserve/server/api/Api.kt index e7e3863a..c78ed055 100644 --- a/app/src/main/java/ru/yourok/torrserve/server/api/Api.kt +++ b/app/src/main/java/ru/yourok/torrserve/server/api/Api.kt @@ -76,7 +76,7 @@ object Api { val host = Net.getHostUrl("/torrents") val req = TorrentReq("list").toString() val resp = postJson(host, req) - return if (Settings.sortTorrByTitle()) + return if (Settings.sortTorrByTitle) Gson().fromJson(resp, Array::class.java).toList().sortedWith(compareBy { it.title }) else Gson().fromJson(resp, Array::class.java).toList() diff --git a/app/src/main/java/ru/yourok/torrserve/settings/Settings.kt b/app/src/main/java/ru/yourok/torrserve/settings/Settings.kt index b5df2f23..56f94ed1 100644 --- a/app/src/main/java/ru/yourok/torrserve/settings/Settings.kt +++ b/app/src/main/java/ru/yourok/torrserve/settings/Settings.kt @@ -12,6 +12,14 @@ import ru.yourok.torrserve.server.api.Api import java.io.File object Settings { + val showFab: Boolean + get() = get("show_fab", true) + + val showSortFab: Boolean + get() = get("show_sort_fab", true) + + val sortTorrByTitle: Boolean + get() = get("sort_torrents", false) fun getServerAuth(): String = get("server_auth", "").trim() fun useLocalAuth(): Boolean = get("local_auth", false) @@ -43,9 +51,6 @@ object Settings { fun setShowBanner(v: Boolean) = set("show_banner", v) fun showCover(): Boolean = get("show_cover", true) - fun sortTorrByTitle(): Boolean = get("sort_torrents", false) - fun showFab(): Boolean = get("show_fab", true) - fun getTheme(): String = get("theme", "auto") fun setTheme(v: String) = set("theme", v) @@ -88,7 +93,7 @@ object Settings { suspend fun isShowCat(): Boolean { return try { val vi = Api.getMatrixVersionInt() - vi > 131 && get("show_cats", false) // MatriX.132 add Categories + vi > 131 && get("show_cat_fab", true) // MatriX.132 add Categories } catch (e: Exception) { false } diff --git a/app/src/main/java/ru/yourok/torrserve/ui/activities/main/MainActivity.kt b/app/src/main/java/ru/yourok/torrserve/ui/activities/main/MainActivity.kt index 496616de..a9f70121 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/activities/main/MainActivity.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/activities/main/MainActivity.kt @@ -27,6 +27,7 @@ import kotlinx.coroutines.withContext import ru.yourok.torrserve.BuildConfig import ru.yourok.torrserve.R import ru.yourok.torrserve.app.App +import ru.yourok.torrserve.atv.Utils import ru.yourok.torrserve.ext.clearStackFragment import ru.yourok.torrserve.server.api.Api import ru.yourok.torrserve.server.local.ServerFile @@ -139,7 +140,8 @@ class MainActivity : AppCompatActivity() { themeUtil.onResume(this) //TorrService.start() updateStatus() - if (Settings.showFab()) setupFab() + if (Settings.showFab) setupFab() + if (Settings.showSortFab) setupSortFab() lifecycleScope.launch(Dispatchers.IO) { if (Settings.isShowCat()) { withContext(Dispatchers.Main) { @@ -186,7 +188,8 @@ class MainActivity : AppCompatActivity() { override fun onDrawerOpened(drawerView: View) { super.onDrawerOpened(drawerView) - if (Settings.showFab()) showFab(false) + if (Settings.showFab) showFab(false) + if (Settings.showSortFab) showSortFab(false) lifecycleScope.launch(Dispatchers.IO) { if (Settings.isShowCat()) withContext(Dispatchers.Main) { showCatFab(false) } } @@ -194,7 +197,8 @@ class MainActivity : AppCompatActivity() { override fun onDrawerClosed(drawerView: View) { super.onDrawerClosed(drawerView) - if (Settings.showFab()) showFab(true) + if (Settings.showFab) showFab(true) + if (Settings.showSortFab && isInTorrents) showSortFab(true) lifecycleScope.launch(Dispatchers.IO) { if (Settings.isShowCat() && isInTorrents) withContext(Dispatchers.Main) { showCatFab(true) } else withContext(Dispatchers.Main) { showCatFab(false) } } @@ -265,15 +269,8 @@ class MainActivity : AppCompatActivity() { } } - private fun showFab(show: Boolean = true) { - val fab: FloatingActionButton? = findViewById(R.id.fab) - if (show) - fab?.show() - else - fab?.hide() - } - private fun setupFab() { // Fab + if (Utils.isTvBox()) return val fab: FloatingActionButton? = findViewById(R.id.fab) fab?.apply { setImageDrawable(AppCompatResources.getDrawable(this.context, R.mipmap.ic_launcher)) @@ -294,30 +291,204 @@ class MainActivity : AppCompatActivity() { } } - private fun showCatFab(show: Boolean = true) { - val fab: FloatingActionButton? = findViewById(R.id.cat_fab) + private fun showFab(show: Boolean = true) { + val fab: FloatingActionButton? = findViewById(R.id.fab) if (show) fab?.show() else fab?.hide() } - private fun setupCatFab() { // categories options menu - val fab: FloatingActionButton? = findViewById(R.id.cat_fab) - val color = ThemeUtil.getColorFromAttr(this, R.attr.colorAccent) + private fun setupSortFab() { + if (Utils.isTvBox()) return + + val accentColor = ThemeUtil.getColorFromAttr(this, R.attr.colorAccent) + val actionsColor = ThemeUtil.getColorFromAttr(this, R.attr.colorMainMenu) + + val fab: FloatingActionButton? = findViewById(R.id.sort_fab) fab?.apply { - setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_view_list_24)) + if (Settings.sortTorrByTitle) + setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_filter_list_24)) + else + setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_sort_by_alpha_24)) customSize = dp2px(32f) setMaxImageSize(dp2px(24f)) - backgroundTintList = ColorStateList.valueOf( - color - ) + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) setOnClickListener { - // TODO + if (isInTorrents) { + val f = supportFragmentManager.findFragmentById(R.id.container) + (f as TorrentsFragment?)?.sort() + } + if (Settings.sortTorrByTitle) + setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_filter_list_24)) + else + setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_sort_by_alpha_24)) } } + // visibility change if (isInTorrents) + showSortFab(true) + else + showSortFab(false) + } + + private fun showSortFab(show: Boolean = true) { + val fab: FloatingActionButton? = findViewById(R.id.sort_fab) + if (show) + fab?.show() + else + fab?.hide() + } + + private fun showCatFab(show: Boolean = true) { + val fab: FloatingActionButton? = findViewById(R.id.cat_fab) + if (show) { + fab?.show() + } else { + hideActions() + isCatsOpen = false + fab?.hide() + } + } + + private var isCatsOpen = false + private var movFab: FloatingActionButton? = null + private var movText: TextView? = null + private var tvFab: FloatingActionButton? = null + private var tvText: TextView? = null + private var musFab: FloatingActionButton? = null + private var musText: TextView? = null + private var othFab: FloatingActionButton? = null + private var othText: TextView? = null + private var allFab: FloatingActionButton? = null + private var allText: TextView? = null + + private fun setupCatFab() { // categories options menu + if (Utils.isTvBox()) return + + val accentColor = ThemeUtil.getColorFromAttr(this, R.attr.colorAccent) + val actionsColor = ThemeUtil.getColorFromAttr(this, R.attr.colorMainMenu) + //val textColor = ThemeUtil.getColorFromAttr(this, R.attr.colorBright) + + val catFab: FloatingActionButton? = findViewById(R.id.cat_fab) + movFab = findViewById(R.id.mov_fab) + movText = findViewById(R.id.mov_fab_text)?.apply { setTextColor(accentColor) } + tvFab = findViewById(R.id.tv_fab) + tvText = findViewById(R.id.tv_fab_text)?.apply { setTextColor(accentColor) } + musFab = findViewById(R.id.mus_fab) + musText = findViewById(R.id.mus_fab_text)?.apply { setTextColor(accentColor) } + othFab = findViewById(R.id.oth_fab) + othText = findViewById(R.id.oth_fab_text)?.apply { setTextColor(accentColor) } + allFab = findViewById(R.id.all_fab) + allText = findViewById(R.id.all_fab_text)?.apply { setTextColor(accentColor) } + catFab?.apply { + setImageDrawable(AppCompatResources.getDrawable(this.context, R.drawable.round_view_list_24)) + customSize = dp2px(32f) + setMaxImageSize(dp2px(24f)) + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + if (!isCatsOpen) { + showActions() + } else { + hideActions() + } + isCatsOpen = !isCatsOpen + } + } + movFab?.apply { + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + filterTorrents("movie") + hideActions() + isCatsOpen = false + } + } + tvFab?.apply { + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + filterTorrents("tv") + hideActions() + isCatsOpen = false + } + } + musFab?.apply { + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + filterTorrents("music") + hideActions() + isCatsOpen = false + } + } + othFab?.apply { + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + filterTorrents("other") + hideActions() + isCatsOpen = false + } + } + allFab?.apply { + backgroundTintList = ColorStateList.valueOf(actionsColor) + setColorFilter(accentColor) + setRippleColor(ColorStateList.valueOf(accentColor)) + setOnClickListener { + filterTorrents() + hideActions() + isCatsOpen = false + } + } + // visibility change + if (isInTorrents) { showCatFab(true) + //hideActions() + } else { + showCatFab(false) + } + } + + private fun showActions() { + movFab?.show() + tvFab?.show() + musFab?.show() + othFab?.show() + allFab?.show() + movText?.visibility = View.VISIBLE + tvText?.visibility = View.VISIBLE + musText?.visibility = View.VISIBLE + othText?.visibility = View.VISIBLE + allText?.visibility = View.VISIBLE + } + + private fun hideActions() { + movFab?.hide() + tvFab?.hide() + musFab?.hide() + othFab?.hide() + allFab?.hide() + movText?.visibility = View.GONE + tvText?.visibility = View.GONE + musText?.visibility = View.GONE + othText?.visibility = View.GONE + allText?.visibility = View.GONE + } + + private fun filterTorrents(category: String = "") { + if (isInTorrents) { + val f = supportFragmentManager.findFragmentById(R.id.container) + lifecycleScope.launch { (f as TorrentsFragment?)?.filter(category) } + } } private fun setupNavigator() { diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/add/AddFragment.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/add/AddFragment.kt index 283649a8..3812e23c 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/add/AddFragment.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/add/AddFragment.kt @@ -254,7 +254,7 @@ class AddFragment : TSFragment() { @SuppressLint("NotifyDataSetChanged") private fun sortResults() { - val list = torrsAdapter.list.toMutableList() + val list = torrsAdapter.list //.toMutableList() when (sortMode) { 0 -> { torrsAdapter.set(list.sortedBy { it.Title }) @@ -303,7 +303,6 @@ class AddFragment : TSFragment() { } private fun setupSortFab() { // Sort Fab - //if (Utils.isTV()) return val fab: FloatingActionButton? = requireActivity().findViewById(R.id.sortFab) val themedContext = ContextThemeWrapper(App.context, ThemeUtil.selectedTheme) val selectedColor = getColorFromAttr(themedContext, R.attr.colorPrimary) @@ -337,13 +336,11 @@ class AddFragment : TSFragment() { } private fun showSortFab() { - //if (Utils.isTV()) return val fab: FloatingActionButton? = requireActivity().findViewById(R.id.sortFab) fab?.show() } private fun hideSortFab() { - //if (Utils.isTV()) return val fab: FloatingActionButton? = requireActivity().findViewById(R.id.sortFab) fab?.hide() } diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/settings/SettingsFragment.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/settings/SettingsFragment.kt index bc053c5f..dc5dcea0 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/settings/SettingsFragment.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/settings/SettingsFragment.kt @@ -132,6 +132,20 @@ class SettingsFragment : PreferenceFragmentCompat() { } } + findPreference("show_sort_fab")?.apply { + setOnPreferenceClickListener { + requireActivity().recreate() + true + } + } + + findPreference("show_cat_fab")?.apply { + setOnPreferenceClickListener { + requireActivity().recreate() + true + } + } + findPreference("app_theme")?.apply { val darkMode = if (isDarkMode(this.context)) "NM" else "DM" summary = "$summary (${darkMode})" @@ -228,11 +242,15 @@ class SettingsFragment : PreferenceFragmentCompat() { true } } - // hide FAB pref on TVs (no FAB in landscape) + // hide FAB prefs on TVs (no FAB in landscape) val fabPref = findPreference("show_fab") - if (Utils.isTvBox()) + val sortFabPref = findPreference("show_sort_fab") + val catFabPref = findPreference("show_cat_fab") + if (Utils.isTvBox()) { fabPref?.let { ps?.removePreference(it) } - + sortFabPref?.let { ps?.removePreference(it) } + catFabPref?.let { ps?.removePreference(it) } + } } override fun onResume() { diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsFragment.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsFragment.kt index e5146ff2..0ac8c931 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsFragment.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/torrents/TorrentsFragment.kt @@ -28,7 +28,7 @@ class TorrentsFragment : TSFragment() { private var torrentAdapter: TorrentsAdapter? = null private lateinit var emptyView: TextView -// private var isOpened = false + private var sortMode: Boolean = Settings.sortTorrByTitle override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -64,6 +64,45 @@ class TorrentsFragment : TSFragment() { } } + fun sort(mode: Boolean = sortMode) { + val list = torrentAdapter!!.list + if (list.size > 0) { + when (mode) { + false -> { + torrentAdapter?.update(list.sortedBy { it.title }) + App.toast(R.string.sort_by_name) + } + + true -> { + torrentAdapter?.update(list.sortedByDescending { it.timestamp }) + App.toast(R.string.sort_by_date) + } + } + sortMode = !mode + Settings.set("sort_torrents", sortMode) + activity?.findViewById(R.id.lvTorrents)?.apply { + this.setSelection(0) + requestFocus() + } + } + } + + suspend fun filter(cat: String = "") = withContext(Dispatchers.Main) { + val data = (viewModel as TorrentsViewModel).getData() + data.observe(this@TorrentsFragment) { list -> + val fltList = if (cat.isNotBlank()) + list.filter { it.category?.contains(cat, true) == true } + else + list + torrentAdapter?.update(fltList) + if (fltList.isEmpty()) { + emptyView.visibility = View.VISIBLE + } else { + emptyView.visibility = View.GONE + } + } + } + suspend fun start() = withContext(Dispatchers.Main) { viewModel = ViewModelProvider(this@TorrentsFragment)[TorrentsViewModel::class.java] val data = (viewModel as TorrentsViewModel).getData() @@ -71,16 +110,8 @@ class TorrentsFragment : TSFragment() { torrentAdapter?.update(it) if (it.isEmpty()) { emptyView.visibility = View.VISIBLE -// if (!isOpened) { -// activity?.findViewById(R.id.drawerLayout)?.openDrawer(GravityCompat.START) -// isOpened = true -// } - } else { // close menu + } else { emptyView.visibility = View.GONE -// if (isOpened) { -// activity?.findViewById(R.id.drawerLayout)?.closeDrawers() -// isOpened = false -// } } } } @@ -96,8 +127,6 @@ class TorrentsFragment : TSFragment() { return false } - private var sortMode: Boolean = Settings.sortTorrByTitle() - @SuppressLint("NotifyDataSetChanged") fun onKeyDown(keyCode: Int): Boolean { when (keyCode) { @@ -122,26 +151,7 @@ class TorrentsFragment : TSFragment() { KeyEvent.KEYCODE_MENU, KeyEvent.KEYCODE_BUTTON_X -> { - val list = torrentAdapter!!.list - if (list.size > 0) { - when (sortMode) { - false -> { - torrentAdapter?.update(list.sortedBy { it.title }) - App.toast(R.string.sort_by_name) - } - - true -> { - torrentAdapter?.update(list.sortedByDescending { it.timestamp }) - App.toast(R.string.sort_by_date) - } - } - sortMode = !sortMode - Settings.set("sort_torrents", sortMode) - activity?.findViewById(R.id.lvTorrents)?.apply { - this.setSelection(0) - requestFocus() - } - } + sort(sortMode) if (Utils.isTvBox()) return true } diff --git a/app/src/main/res/drawable/round_check_24.xml b/app/src/main/res/drawable/round_check_24.xml new file mode 100644 index 00000000..33452083 --- /dev/null +++ b/app/src/main/res/drawable/round_check_24.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/app/src/main/res/drawable/round_filter_list_24.xml b/app/src/main/res/drawable/round_filter_list_24.xml index 7c40a5f9..57e5ae92 100644 --- a/app/src/main/res/drawable/round_filter_list_24.xml +++ b/app/src/main/res/drawable/round_filter_list_24.xml @@ -1,5 +1,13 @@ - - - - + + + + diff --git a/app/src/main/res/drawable/round_live_tv_24.xml b/app/src/main/res/drawable/round_live_tv_24.xml new file mode 100644 index 00000000..8d28872d --- /dev/null +++ b/app/src/main/res/drawable/round_live_tv_24.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/app/src/main/res/drawable/round_more_horiz_24.xml b/app/src/main/res/drawable/round_more_horiz_24.xml new file mode 100644 index 00000000..3524d0f3 --- /dev/null +++ b/app/src/main/res/drawable/round_more_horiz_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/round_movie_24.xml b/app/src/main/res/drawable/round_movie_24.xml new file mode 100644 index 00000000..c2f610c9 --- /dev/null +++ b/app/src/main/res/drawable/round_movie_24.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/app/src/main/res/drawable/round_music_note_24.xml b/app/src/main/res/drawable/round_music_note_24.xml new file mode 100644 index 00000000..3fa55e2d --- /dev/null +++ b/app/src/main/res/drawable/round_music_note_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/round_sort_by_alpha_24.xml b/app/src/main/res/drawable/round_sort_by_alpha_24.xml new file mode 100644 index 00000000..2b95a2e4 --- /dev/null +++ b/app/src/main/res/drawable/round_sort_by_alpha_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml index d3bdaaf1..e2a5f0d2 100644 --- a/app/src/main/res/layout/main_activity.xml +++ b/app/src/main/res/layout/main_activity.xml @@ -38,26 +38,196 @@ app:tint="@null" tools:visibility="visible" /> + + - + android:layout_height="match_parent"> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 3deb7245..d0b604e7 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -190,6 +190,12 @@ Плаващ бутон на менюто в портрет Показване на плаващ бутон за действие Не показвай плаващ бутон за действие + Бутон за сортиране във вертикална ориентация + Показване на плаващ бутон за сортиране + Не показвай плаващ бутон за сортиране + Бутон за категории във вертикална ориентация + Показване на бутона за плаващи категории + Не показвай бутона за плаващи категории Активирайте услугата %1$s в секцията Предпочитания на устройството / Достъпност Деактивирайте услугата %1$s в секцията Предпочитания на устройството / Достъпност Активирането на тази услуга може да предотврати изключване на локалният TorrServer от операционната система @@ -219,4 +225,9 @@ Не са намерени ъпдейти Не се използва Не е инсталирано + Филми + Сериал + Музика + Друго + Всички торенти diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 25ef4b8c..1bf87c91 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -190,6 +190,12 @@ Кнопка вызова меню на экране Показать кнопку вызова меню Не показывать кнопку вызова меню + Кнопка сортировки на экране + Показать кнопку сортировки + Не показывать кнопку сортировки + Кнопка фильтра по категории + Показать кнопку фильтра категорий + Не показывать кнопку фильтра категорий Включите сервис «%1$s» в разделе «Настройки устройства» / «Специальные возможности» Отключите сервис «%1$s» в разделе «Настройки устройства» / «Специальные возможности» Включение этого сервиса может предотвратить завершение локального TorrServer системой @@ -219,4 +225,9 @@ Нет обновлений Не используется Не установлен + Фильмы + Сериалы + Музыка + Другое + Все торренты \ No newline at end of file diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 636fd52f..4c16673d 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -181,6 +181,12 @@ Кнопка виклику меню на екрані Відображати кнопку виклику меню Не відображати кнопку виклику меню + Кнопка сортування в портретній орієнтації + Показати кнопку сортування + Не показувати кнопку сортування + Кнопка категорій в портретній орієнтації + Показати кнопку категорій + Не показувати кнопку категорій Увімкнути службу «%1$s» в розділі «Параметри пристрою» / «Спеціальні можливості» Вимкнути службу «%1$s» в розділі «Параметри пристрою» / «Спеціальні можливості» Включення цього сервісу може запобігти завершення локального TorrServer системою @@ -219,4 +225,9 @@ Встановіть FFProbe Видалити FFProbe Завантажте FFProbe, щоб отримати додаткові відеоканчини, такі як тривалість, бітрейт тощо. + Фільми + Серіал + Музика + Інше + Усі торренти diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 48bd07ea..335306eb 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -221,6 +221,14 @@ 显示浮动操作按钮 不要显示浮动操作按钮 + 纵向浮动排序按钮 + 显示浮动排序按钮 + 不显示浮动排序按钮 + + 纵向浮动类别按钮 + 显示浮动类别按钮 + 不显示浮动类别按钮 + 在设备首选项/辅助功能部分启用服务 %1$s 在设备首选项/辅助功能部分禁用服务 %1$s 启用该服务可以防止本地 TorrServer 被操作系统关闭 @@ -261,4 +269,9 @@ 刪除FFProbe 下載FFProbe以獲取其他視頻數據,例如持續時間,比特率等。 + 电影 + 系列 + 音乐 + 其他 + 所有种子 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 86e1eb45..8c1cfce7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -238,6 +238,14 @@ Show floating action button Don\'t show floating action button + Floating sort button in portrait + Show floating sort button + Don\'t show floating sort button + + Floating categories button in portrait + Show floating categories button + Don\'t show floating categories button + Enable service %1$s in Device Preferences / Accessibility section Disable service %1$s in Device Preferences / Accessibility section Enabling this service can prevent local TorrServer shutdown by OS @@ -272,4 +280,9 @@ Not Used Not Installed + Movies + Series + Music + Other + All torrents \ No newline at end of file diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 5288d7d5..b985f921 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -87,6 +87,20 @@ app:key="show_fab" app:title="@string/show_fab_title" /> + + + +