Thorium-android-app/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java

591 lines
22 KiB
Java
Raw Normal View History

2018-12-29 14:19:54 +01:00
/*
2020-11-28 22:36:47 +01:00
* Copyright (C) 2020 Stefan Schüller <sschueller@techdroid.com>
2018-12-29 14:19:54 +01:00
*
* This program is free software: you can redistribute it and/or modify
2020-11-28 22:36:47 +01:00
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
2018-12-29 14:19:54 +01:00
*
* 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
2020-11-28 22:36:47 +01:00
* GNU Affero General Public License for more details.
2018-12-29 14:19:54 +01:00
*
2020-11-28 22:36:47 +01:00
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2018-12-29 14:19:54 +01:00
*/
2018-03-03 01:10:13 +01:00
package net.schueller.peertube.activity;
2018-03-11 02:24:06 +01:00
import android.Manifest;
import android.app.AlertDialog;
2018-12-02 17:28:18 +01:00
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
2018-03-04 01:06:32 +01:00
import android.content.Intent;
2018-03-04 01:44:34 +01:00
import android.content.SharedPreferences;
2018-03-11 02:24:06 +01:00
import android.content.pm.PackageManager;
Release v1.0.37 (#171) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 * Master (#170) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 (#166) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> * Adding configuration setting and supporting code to pause playback on back button. (#167) Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com> * Making Selecting a search suggestion fill search field (#169) * Adding configuration setting and supporting code to choose language (#168) * Version Bump * Fixed merge issue Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com>
2020-06-19 21:41:11 +02:00
import android.database.Cursor;
import android.preference.PreferenceManager;
2018-12-02 17:28:18 +01:00
import android.provider.SearchRecentSuggestions;
import androidx.annotation.NonNull;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
import androidx.core.app.ActivityCompat;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
2018-03-03 01:10:13 +01:00
import android.os.Bundle;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
2018-03-03 01:10:13 +01:00
import android.util.Log;
import android.view.Menu;
2018-03-04 01:06:32 +01:00
import android.view.MenuInflater;
import android.view.MenuItem;
2018-12-02 17:28:18 +01:00
import android.view.View;
import android.widget.TextView;
import com.mikepenz.iconics.IconicsDrawable;
2021-01-24 00:31:51 +01:00
import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome;
2018-03-03 01:10:13 +01:00
import net.schueller.peertube.R;
import net.schueller.peertube.adapter.VideoAdapter;
import net.schueller.peertube.helper.APIUrlHelper;
import net.schueller.peertube.helper.ErrorHelper;
import net.schueller.peertube.model.Video;
2018-03-03 01:10:13 +01:00
import net.schueller.peertube.model.VideoList;
2018-12-29 22:10:13 +01:00
import net.schueller.peertube.network.GetUserService;
2018-03-03 01:10:13 +01:00
import net.schueller.peertube.network.GetVideoDataService;
import net.schueller.peertube.network.RetrofitInstance;
2018-12-29 22:10:13 +01:00
import net.schueller.peertube.network.Session;
2018-12-02 17:28:18 +01:00
import net.schueller.peertube.provider.SearchSuggestionsProvider;
2018-12-26 15:24:02 +01:00
import net.schueller.peertube.service.VideoPlayerService;
2018-03-03 01:10:13 +01:00
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
2018-03-03 01:10:13 +01:00
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class VideoListActivity extends CommonActivity {
2018-03-03 01:10:13 +01:00
private String TAG = "VideoListActivity";
public static final String EXTRA_VIDEOID = "VIDEOID";
public static final String EXTRA_ACCOUNTDISPLAYNAME = "ACCOUNTDISPLAYNAMEANDHOST";
2020-06-21 17:01:15 +02:00
public static final Integer SWITCH_INSTANCE = 2;
2018-03-04 01:06:32 +01:00
2018-03-03 01:10:13 +01:00
private VideoAdapter videoAdapter;
private SwipeRefreshLayout swipeRefreshLayout;
2018-03-03 01:10:13 +01:00
2018-03-03 02:02:00 +01:00
private int currentStart = 0;
private int count = 12;
private String sort = "-createdAt";
2018-12-29 15:20:06 +01:00
private String filter = null;
2018-12-02 17:28:18 +01:00
private String searchQuery = "";
2018-12-29 22:10:13 +01:00
private Boolean subscriptions = false;
2018-12-02 17:28:18 +01:00
private TextView emptyView;
private RecyclerView recyclerView;
2018-03-03 02:02:00 +01:00
private boolean isLoading = false;
2018-03-03 01:10:13 +01:00
@Override
protected void onCreate(Bundle savedInstanceState) {
2018-03-03 01:10:13 +01:00
super.onCreate(savedInstanceState);
2018-12-21 21:59:10 +01:00
2018-03-03 01:10:13 +01:00
setContentView(R.layout.activity_video_list);
2018-12-29 15:20:06 +01:00
filter = null;
createBottomBarNavigation();
2018-03-04 01:06:32 +01:00
// Attaching the layout to the toolbar object
2018-11-10 22:40:27 +01:00
Toolbar toolbar = findViewById(R.id.tool_bar);
// Setting toolbar as the ActionBar with setSupportActionBar() call
setSupportActionBar(toolbar);
// load Video List
2018-03-03 02:02:00 +01:00
createList();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
2018-03-04 01:06:32 +01:00
MenuInflater inflater = getMenuInflater();
2018-12-29 22:10:13 +01:00
inflater.inflate(R.menu.menu_top_videolist, menu);
2018-03-04 01:06:32 +01:00
// Set an icon in the ActionBar
menu.findItem(R.id.action_account).setIcon(
2021-01-24 00:31:51 +01:00
new IconicsDrawable(this, FontAwesome.Icon.faw_user_circle));
2020-06-21 17:01:15 +02:00
menu.findItem(R.id.action_server_address_book).setIcon(
2021-01-24 00:31:51 +01:00
new IconicsDrawable(this, FontAwesome.Icon.faw_server));
2019-02-17 16:26:17 +01:00
2018-12-02 17:28:18 +01:00
MenuItem searchMenuItem = menu.findItem(R.id.action_search);
2018-12-02 17:28:18 +01:00
searchMenuItem.setIcon(
2021-01-24 00:31:51 +01:00
new IconicsDrawable(this, FontAwesome.Icon.faw_search));
2018-03-04 01:06:32 +01:00
2018-12-02 17:28:18 +01:00
// Get the SearchView and set the searchable configuration
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
SearchView searchView = (SearchView) searchMenuItem.getActionView();
// Assumes current activity is the searchable activity
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
searchView.setQueryRefinementEnabled(true);
searchMenuItem.getActionView().setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
new AlertDialog.Builder(VideoListActivity.this)
.setTitle(getString(R.string.clear_search_history))
.setMessage(getString(R.string.clear_search_history_prompt))
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
SearchRecentSuggestions suggestions = new SearchRecentSuggestions(getApplicationContext(),
SearchSuggestionsProvider.AUTHORITY,
SearchSuggestionsProvider.MODE);
suggestions.clearHistory();
}
})
.setNegativeButton(android.R.string.no, null)
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
return true;
}
});
2018-12-02 17:28:18 +01:00
searchMenuItem.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem menuItem) {
return true;
}
@Override
public boolean onMenuItemActionCollapse(MenuItem menuItem) {
searchQuery = "";
Log.d(TAG, "onMenuItemActionCollapse: ");
loadVideos(0, count, sort, filter);
return true;
}
});
// TODO, this doesn't work
searchManager.setOnDismissListener(() -> {
searchQuery = "";
Log.d(TAG, "onDismiss: ");
loadVideos(0, count, sort, filter);
});
Release v1.0.37 (#171) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 * Master (#170) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 (#166) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> * Adding configuration setting and supporting code to pause playback on back button. (#167) Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com> * Making Selecting a search suggestion fill search field (#169) * Adding configuration setting and supporting code to choose language (#168) * Version Bump * Fixed merge issue Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com>
2020-06-19 21:41:11 +02:00
searchView.setOnSuggestionListener(new SearchView.OnSuggestionListener() {
@Override
public boolean onSuggestionClick(int position) {
String suggestion = getSuggestion(position);
searchView.setQuery(suggestion, true);
return true;
}
private String getSuggestion(int position) {
Cursor cursor = (Cursor) searchView.getSuggestionsAdapter().getItem(
position);
return cursor.getString(cursor
.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1));
}
2018-12-02 17:28:18 +01:00
Release v1.0.37 (#171) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 * Master (#170) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 (#166) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 * try to fix 'cannot make a new request because the previous response ... ' error (#164) * Translations (#163) * Translated using Weblate (Italian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/it/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 38.7% (125 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 48.0% (155 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ * Translated using Weblate (German) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ * Translated using Weblate (French) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fr/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Russian) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * Translated using Weblate (Bengali) Currently translated at 99.3% (321 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Spanish) Currently translated at 42.1% (136 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/es/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Persian) Currently translated at 40.2% (130 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/fa/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 99.6% (322 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Bengali) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/pl/ * Translated using Weblate (Russian) Currently translated at 100.0% (323 of 323 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/ru/ * update library and more (#160) * download files with friendly name (not video ID) * Update Picasso library FIX : add extension in downloaded filename. download files with friendly name (not video ID) * Update Gradle Add 0.75x and 1.25x to play speed * Release v1.0.35 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * try to fix 'cannot make a new request because the previous response is still open' when login. Co-authored-by: Stefan Schüller <sschueller@techdroid.com> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> * Release 1.0.36 Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> * Adding configuration setting and supporting code to pause playback on back button. (#167) Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com> * Making Selecting a search suggestion fill search field (#169) * Adding configuration setting and supporting code to choose language (#168) * Version Bump * Fixed merge issue Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: mostkai <admin@pwplayer.com> Co-authored-by: B0pol <bopol@e.email> Co-authored-by: Jeannette L <j.lavoie@net-c.ca> Co-authored-by: Nathan <bonnemainsnathan@gmail.com> Co-authored-by: Mihail Iosilevitch <yosik@tutanota.com> Co-authored-by: anonymous <noreply@weblate.org> Co-authored-by: Oymate <dhruboadittya96@gmail.com> Co-authored-by: Juanro49 <juanrobertogarciasanchez@gmail.com> Co-authored-by: Mostafa Ahangarha <ahangarha@gmail.com> Co-authored-by: Szylu <chipolade@gmail.com> Co-authored-by: Artem <KovalevArtem.ru@gmail.com> Co-authored-by: jmgfr <13685004+jmgfr@users.noreply.github.com> Co-authored-by: Stefan Schueller <sschueller@nunight.com> Co-authored-by: lishoujun <lsjun@aliyun.com> Co-authored-by: Don Kimberlin <donkimberlin@hotmail.com>
2020-06-19 21:41:11 +02:00
@Override
public boolean onSuggestionSelect(int position) {
/* Required to implement */
return true;
}
});
return true;
}
2018-12-26 15:24:02 +01:00
@Override
protected void onDestroy() {
super.onDestroy();
stopService(new Intent(this, VideoPlayerService.class));
}
2018-03-04 01:06:32 +01:00
2020-06-21 17:01:15 +02:00
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == SWITCH_INSTANCE) {
if(resultCode == RESULT_OK) {
loadVideos(currentStart, count, sort, filter);
}
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
switch (item.getItemId()) {
// action with ID action_refresh was selected
2018-03-14 14:33:17 +01:00
case R.id.action_search:
2018-11-10 22:40:27 +01:00
//Toast.makeText(this, "Search Selected", Toast.LENGTH_SHORT).show();
2018-03-14 14:33:17 +01:00
return false;
case R.id.action_account:
2020-06-21 17:01:15 +02:00
// if (!Session.getInstance().isLoggedIn()) {
//Intent intentLogin = new Intent(this, ServerAddressBookActivity.class);
Intent intentMe = new Intent(this, MeActivity.class);
this.startActivity(intentMe);
2020-06-21 17:01:15 +02:00
//overridePendingTransition(R.anim.slide_in_bottom, 0);
// this.startActivity(intentLogin);
// } else {
// Intent intentMe = new Intent(this, MeActivity.class);
// this.startActivity(intentMe);
// }
return false;
case R.id.action_server_address_book:
Intent addressBookActivityIntent = new Intent(this, ServerAddressBookActivity.class);
this.startActivityForResult(addressBookActivityIntent, SWITCH_INSTANCE);
return false;
default:
break;
}
return super.onOptionsItemSelected(item);
}
2018-03-03 02:02:00 +01:00
private void createList() {
2018-12-02 17:28:18 +01:00
recyclerView = findViewById(R.id.recyclerView);
swipeRefreshLayout = findViewById(R.id.swipeRefreshLayout);
2018-03-03 02:02:00 +01:00
2018-12-02 17:28:18 +01:00
emptyView = findViewById(R.id.empty_view);
2018-03-03 02:02:00 +01:00
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(VideoListActivity.this);
recyclerView.setLayoutManager(layoutManager);
videoAdapter = new VideoAdapter(new ArrayList<>(), VideoListActivity.this);
recyclerView.setAdapter(videoAdapter);
loadVideos(currentStart, count, sort, filter);
2018-03-03 02:02:00 +01:00
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
2018-11-10 22:40:27 +01:00
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
2018-03-03 02:02:00 +01:00
super.onScrollStateChanged(recyclerView, newState);
}
@Override
2018-11-10 22:40:27 +01:00
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
2018-03-03 02:02:00 +01:00
if (dy > 0) {
// is at end of list?
if (!recyclerView.canScrollVertically(RecyclerView.FOCUS_DOWN)) {
2018-03-03 02:02:00 +01:00
if (!isLoading) {
currentStart = currentStart + count;
loadVideos(currentStart, count, sort, filter);
2018-03-03 02:02:00 +01:00
}
}
}
}
});
swipeRefreshLayout.setOnRefreshListener(() -> {
// Refresh items
if (!isLoading) {
currentStart = 0;
loadVideos(currentStart, count, sort, filter);
}
});
2018-03-03 02:02:00 +01:00
}
private void loadVideos(int start, int count, String sort, String filter) {
2018-03-03 02:02:00 +01:00
isLoading = true;
2018-11-07 23:11:19 +01:00
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
2020-07-05 16:12:35 +02:00
String nsfw = sharedPref.getBoolean(getString(R.string.pref_show_nsfw_key), false) ? "both" : "false";
2021-01-24 00:31:51 +01:00
//
// Locale locale = getResources().getConfiguration().locale;
// String country = locale.getLanguage();
//
// HashSet<String> countries = new HashSet<>(1);
// countries.add(country);
2021-01-24 00:31:51 +01:00
// We set this to default to null so that on initial start there are videos listed.
Set<String> languages = sharedPref.getStringSet(getString(R.string.pref_video_language_key), null);
2018-11-13 22:16:30 +01:00
String apiBaseURL = APIUrlHelper.getUrlWithVersion(this);
2018-03-04 01:44:34 +01:00
2020-11-22 13:54:54 +01:00
GetVideoDataService service = RetrofitInstance.getRetrofitInstance(apiBaseURL, APIUrlHelper.useInsecureConnection(this)).create(GetVideoDataService.class);
2018-03-03 01:10:13 +01:00
2018-12-02 17:28:18 +01:00
Call<VideoList> call;
if (!searchQuery.equals("")) {
call = service.searchVideosData(start, count, sort, nsfw, searchQuery, filter, languages);
2018-12-29 22:10:13 +01:00
} else if (subscriptions) {
2020-11-22 13:54:54 +01:00
GetUserService userService = RetrofitInstance.getRetrofitInstance(apiBaseURL, APIUrlHelper.useInsecureConnection(this)).create(GetUserService.class);
2018-12-29 22:10:13 +01:00
call = userService.getVideosSubscripions(start, count, sort);
2018-12-02 17:28:18 +01:00
} else {
call = service.getVideosData(start, count, sort, nsfw, filter, languages);
2018-12-02 17:28:18 +01:00
}
2018-03-03 01:10:13 +01:00
/*Log the URL called*/
Log.d("URL Called", call.request().url() + "");
2018-11-10 17:48:09 +01:00
// Toast.makeText(VideoListActivity.this, "URL Called: " + call.request().url(), Toast.LENGTH_SHORT).show();
2018-03-03 01:10:13 +01:00
call.enqueue(new Callback<VideoList>() {
@Override
public void onResponse(@NonNull Call<VideoList> call, @NonNull Response<VideoList> response) {
if (currentStart == 0) {
videoAdapter.clearData();
}
2018-11-07 23:11:19 +01:00
if (response.body() != null) {
ArrayList<Video> videoList = response.body().getVideoArrayList();
if (videoList != null) {
videoAdapter.setData(response.body().getVideoArrayList());
}
2018-11-07 23:11:19 +01:00
}
2018-12-02 17:28:18 +01:00
// no results show no results message
if (currentStart == 0 && videoAdapter.getItemCount() == 0) {
emptyView.setVisibility(View.VISIBLE);
recyclerView.setVisibility(View.GONE);
} else {
emptyView.setVisibility(View.GONE);
recyclerView.setVisibility(View.VISIBLE);
}
2018-03-03 02:02:00 +01:00
isLoading = false;
swipeRefreshLayout.setRefreshing(false);
2018-03-03 01:10:13 +01:00
}
@Override
public void onFailure(@NonNull Call<VideoList> call, @NonNull Throwable t) {
2018-03-03 01:10:13 +01:00
Log.wtf("err", t.fillInStackTrace());
ErrorHelper.showToastFromCommunicationError( VideoListActivity.this, t );
2018-03-03 02:02:00 +01:00
isLoading = false;
swipeRefreshLayout.setRefreshing(false);
2018-03-03 01:10:13 +01:00
}
});
}
2018-03-11 02:24:06 +01:00
@Override
protected void onResume() {
super.onResume();
// only check when we actually need the permission
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED &&
2020-07-05 16:12:35 +02:00
sharedPref.getBoolean(getString(R.string.pref_torrent_player_key), false)) {
2018-03-11 02:24:06 +01:00
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);
}
}
2018-12-02 17:28:18 +01:00
@Override
protected void onNewIntent(Intent intent) {
2020-06-21 17:01:15 +02:00
super.onNewIntent(intent);
2018-12-02 17:28:18 +01:00
setIntent(intent);
handleIntent(intent);
}
private void handleIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this,
SearchSuggestionsProvider.AUTHORITY,
SearchSuggestionsProvider.MODE);
// Save recent searches
suggestions.saveRecentQuery(query, null);
searchQuery = query;
loadVideos(0, count, sort, filter);
}
}
@Override
public boolean onSearchRequested() {
Bundle appData = new Bundle();
startSearch(null, false, appData, false);
return true;
}
private void createBottomBarNavigation() {
// Get Bottom Navigation
BottomNavigationView navigation = findViewById(R.id.navigation);
// Always show text label
navigation.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED);
// Add Icon font
Menu navMenu = navigation.getMenu();
navMenu.findItem(R.id.navigation_overview).setIcon(
new IconicsDrawable(this, FontAwesome.Icon.faw_globe));
navMenu.findItem(R.id.navigation_trending).setIcon(
new IconicsDrawable(this, FontAwesome.Icon.faw_fire));
navMenu.findItem(R.id.navigation_recent).setIcon(
new IconicsDrawable(this, FontAwesome.Icon.faw_plus_circle));
2018-12-29 15:20:06 +01:00
navMenu.findItem(R.id.navigation_local).setIcon(
new IconicsDrawable(this, FontAwesome.Icon.faw_home));
navMenu.findItem(R.id.navigation_subscriptions).setIcon(
new IconicsDrawable(this, FontAwesome.Icon.faw_folder));
// navMenu.findItem(R.id.navigation_account).setIcon(
// new IconicsDrawable(this, FontAwesome.Icon.faw_user_circle));
// Click Listener
navigation.setOnNavigationItemSelectedListener(menuItem -> {
switch (menuItem.getItemId()) {
case R.id.navigation_overview:
// TODO
if (!isLoading) {
sort = "-createdAt";
currentStart = 0;
2018-12-29 15:20:06 +01:00
filter = null;
2018-12-29 22:10:13 +01:00
subscriptions = false;
loadVideos(currentStart, count, sort, filter);
}
return true;
case R.id.navigation_trending:
//Log.v(TAG, "navigation_trending");
if (!isLoading) {
sort = "-trending";
currentStart = 0;
2018-12-29 15:20:06 +01:00
filter = null;
2018-12-29 22:10:13 +01:00
subscriptions = false;
2018-12-29 15:20:06 +01:00
loadVideos(currentStart, count, sort, filter);
}
return true;
case R.id.navigation_recent:
if (!isLoading) {
sort = "-createdAt";
currentStart = 0;
filter = null;
subscriptions = false;
loadVideos(currentStart, count, sort, filter);
}
2018-12-29 15:20:06 +01:00
return true;
case R.id.navigation_local:
//Log.v(TAG, "navigation_trending");
if (!isLoading) {
sort = "-publishedAt";
filter = "local";
currentStart = 0;
2018-12-29 22:10:13 +01:00
subscriptions = false;
loadVideos(currentStart, count, sort, filter);
}
return true;
case R.id.navigation_subscriptions:
//Log.v(TAG, "navigation_subscriptions");
2018-12-29 22:10:13 +01:00
if (!Session.getInstance().isLoggedIn()) {
2020-06-21 17:01:15 +02:00
// Intent intent = new Intent(this, LoginActivity.class);
// this.startActivity(intent);
Intent addressBookActivityIntent = new Intent(this, ServerAddressBookActivity.class);
this.startActivityForResult(addressBookActivityIntent, SWITCH_INSTANCE);
2018-12-31 20:32:22 +01:00
return false;
2018-12-29 22:10:13 +01:00
} else {
if (!isLoading) {
sort = "-publishedAt";
filter = null;
currentStart = 0;
subscriptions = true;
loadVideos(currentStart, count, sort, filter);
}
2018-12-31 20:32:22 +01:00
return true;
2018-12-29 22:10:13 +01:00
}
// case R.id.navigation_account:
// //Log.v(TAG, "navigation_account");
// //Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show();
//
// if (!Session.getInstance().isLoggedIn()) {
// Intent intent = new Intent(this, LoginActivity.class);
// this.startActivity(intent);
// } else {
// Intent intent = new Intent(this, MeActivity.class);
// this.startActivity(intent);
// }
//
// return false;
}
return false;
});
// TODO: on double click jump to top and reload
// navigation.setOnNavigationItemReselectedListener(menuItemReselected -> {
// switch (menuItemReselected.getItemId()) {
// case R.id.navigation_home:
// if (!isLoading) {
// sort = "-createdAt";
// currentStart = 0;
// filter = null;
// subscriptions = false;
// loadVideos(currentStart, count, sort, filter);
// }
// case R.id.navigation_trending:
// if (!isLoading) {
// sort = "-trending";
// currentStart = 0;
// filter = null;
// subscriptions = false;
// loadVideos(currentStart, count, sort, filter);
// }
// case R.id.navigation_local:
// if (!isLoading) {
// sort = "-publishedAt";
// filter = "local";
// currentStart = 0;
// subscriptions = false;
// loadVideos(currentStart, count, sort, filter);
// }
// case R.id.navigation_subscriptions:
// if (Session.getInstance().isLoggedIn()) {
// if (!isLoading) {
// sort = "-publishedAt";
// filter = null;
// currentStart = 0;
// subscriptions = true;
// loadVideos(currentStart, count, sort, filter);
// }
// }
// }
// });
}
2018-03-03 01:10:13 +01:00
}