mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-06-05 21:09:11 +02:00
Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
7415b752cc | |||
0a52060223 | |||
1024b1e6f9 | |||
23fc061711 | |||
bfa3ede06b | |||
c7f6cdc8c6 | |||
58f280d347 | |||
0715824ae1 | |||
5540c8cacc | |||
14efbdd08f | |||
7ceb04d548 | |||
e9608f63db | |||
64e1c7ca81 | |||
7823b30900 | |||
1e45e4454c | |||
1dd3a193c5 | |||
30416837a9 | |||
363132d331 | |||
ebc0d744ed | |||
d685031ee8 | |||
3ea012f62e | |||
9a06f5660b | |||
dff76aada1 | |||
50a9f8a1b0 | |||
8ff3b81112 | |||
38f73a5d60 | |||
15f6835a0c | |||
84e3264726 | |||
dbd068d95f | |||
acba219e44 | |||
c8e7c23855 | |||
f0ff8a6feb | |||
91a1380fef | |||
3351ef7d91 | |||
564cda58a5 | |||
3233fe673d | |||
8cc8b284ce | |||
3ecdedc17c | |||
8f361c605a | |||
9d599e8b57 | |||
9c676d8002 | |||
8c95554d8e |
@ -6,7 +6,7 @@ The other app is **[TubeLab](#TubeLab)** a Peertube Android app working for all
|
|||||||
|
|
||||||
## <a name="TubeLab">TubeLab</a>
|
## <a name="TubeLab">TubeLab</a>
|
||||||
|
|
||||||
Tubelab is an Android app for Peertube (GNU GPLv3).
|
Tubelab is an Android app for Peertube (GNU GPLv3). <img src='https://img.shields.io/f-droid/v/app.fedilab.tubelab?include_prereleases' />
|
||||||
|
|
||||||
[<img alt='Get it on Google Play' src='./images/get-it-on-play.png' height="80"/>](https://play.google.com/store/apps/details?id=app.fedilab.tubelab)
|
[<img alt='Get it on Google Play' src='./images/get-it-on-play.png' height="80"/>](https://play.google.com/store/apps/details?id=app.fedilab.tubelab)
|
||||||
[<img alt='Get it on F-Droid' src='./images/get-it-on-fdroid.png' height="80"/>](https://f-droid.org/packages/app.fedilab.tubelab/)
|
[<img alt='Get it on F-Droid' src='./images/get-it-on-fdroid.png' height="80"/>](https://f-droid.org/packages/app.fedilab.tubelab/)
|
||||||
|
@ -11,8 +11,8 @@ android {
|
|||||||
|
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 25
|
versionCode 27
|
||||||
versionName "1.7.0"
|
versionName "1.8.0"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -118,8 +118,8 @@ dependencies {
|
|||||||
implementation "com.github.bumptech.glide:glide:4.11.0"
|
implementation "com.github.bumptech.glide:glide:4.11.0"
|
||||||
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
|
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
implementation "net.gotev:uploadservice:3.5.2"
|
implementation "net.gotev:uploadservice:4.5.1"
|
||||||
implementation "net.gotev:uploadservice-okhttp:3.5.2"
|
implementation "net.gotev:uploadservice-okhttp:4.5.1"
|
||||||
implementation "com.google.code.gson:gson:2.8.6"
|
implementation "com.google.code.gson:gson:2.8.6"
|
||||||
implementation 'androidx.media:media:1.2.0'
|
implementation 'androidx.media:media:1.2.0'
|
||||||
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
|
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
<color name="tag_color_text">#FAFAFA</color>
|
<color name="tag_color_text">#FAFAFA</color>
|
||||||
<color name="positive_thumbs">#2b90d9</color>
|
<color name="positive_thumbs">#2b90d9</color>
|
||||||
<color name="negative_thumbs">#F44336</color>
|
<color name="negative_thumbs">#F44336</color>
|
||||||
|
<color name="backgroundDark">#DD000000</color>
|
||||||
<color name="red_1">#F44336</color>
|
<color name="red_1">#F44336</color>
|
||||||
</resources>
|
</resources>
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<string name="export_list">Exporter</string>
|
<string name="export_list">Exporter</string>
|
||||||
<string name="import_list">Importer</string>
|
<string name="import_list">Importer</string>
|
||||||
|
<string name="originally_published">Date de publication</string>
|
||||||
|
|
||||||
<string name="delete_history">Supprimer l\'historique de vidéos</string>
|
<string name="delete_history">Supprimer l\'historique de vidéos</string>
|
||||||
<string name="delete_history_confirm">Êtes vous sur de vouloir supprimer toutes les vidéos de votre historique ?</string>
|
<string name="delete_history_confirm">Êtes vous sur de vouloir supprimer toutes les vidéos de votre historique ?</string>
|
||||||
@ -201,6 +202,9 @@
|
|||||||
<string name="all_of_these_tags">Tous ces labels</string>
|
<string name="all_of_these_tags">Tous ces labels</string>
|
||||||
<string name="one_of_these_tags">Un de ces labels</string>
|
<string name="one_of_these_tags">Un de ces labels</string>
|
||||||
<string name="apply_filter">Appliquer le filtre</string>
|
<string name="apply_filter">Appliquer le filtre</string>
|
||||||
|
|
||||||
|
<string name="playback_speed">Vitesse du lecteur</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string-array name="sort_by_array">
|
<string-array name="sort_by_array">
|
||||||
<item>Meilleurs résultats</item>
|
<item>Meilleurs résultats</item>
|
||||||
<item>Les plus récentes</item>
|
<item>Les plus récentes</item>
|
||||||
@ -300,6 +304,7 @@
|
|||||||
<item>Moyenne</item>
|
<item>Moyenne</item>
|
||||||
<item>Faible</item>
|
<item>Faible</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
<string name="set_autoplay_next_video_settings">Lecture automatique</string>
|
||||||
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
||||||
<string name="no_playlist">Aucune liste de lecture !</string>
|
<string name="no_playlist">Aucune liste de lecture !</string>
|
||||||
<string name="title_video_peertube">Titre de la vidéo</string>
|
<string name="title_video_peertube">Titre de la vidéo</string>
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
Added:
|
Added:
|
||||||
- Display follow button for Sepia Search
|
- playback speed
|
||||||
- Reach owner from channels
|
- video attributes (clickable tags)
|
||||||
- Surfing mode (store instances in db with quick switch)
|
- update channel photo
|
||||||
- Allow to delete history
|
- higher definition for video preview
|
||||||
|
|
||||||
Changed:
|
Changed:
|
||||||
- Quicker access to account settings
|
- Improve player
|
||||||
- Improve landscape mode
|
- Auto-play next video accessible in player
|
||||||
|
|
||||||
Fix:
|
Fixed:
|
||||||
- Pull to refresh crashes
|
- video upload error
|
||||||
- Settings crashes
|
- screen lock is not working
|
||||||
- Fix an issue with unlisted playlists
|
- url intent does not recognise url with current time
|
||||||
|
- editing a video having long description shows only truncated description
|
||||||
|
- pasting video url has a bug
|
||||||
|
- sepia search visual bug in dark mode
|
||||||
|
- 0p resolution for the low definition in settings
|
||||||
|
- unlisted playlist error
|
||||||
|
- resolution does not seem to change
|
||||||
|
- Fix playing videos in notifications from remote accounts
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -122,7 +124,7 @@
|
|||||||
<string name="toast_error_loading_account">طرأ هناك خطأ أثناء التحوّل مِن حساب إلى آخر!</string>
|
<string name="toast_error_loading_account">طرأ هناك خطأ أثناء التحوّل مِن حساب إلى آخر!</string>
|
||||||
<string name="toast_error_search">وقع خطأ أثناء عملية البحث!</string>
|
<string name="toast_error_search">وقع خطأ أثناء عملية البحث!</string>
|
||||||
<string name="nothing_to_do">لا يمكن اتخاذ أي إجراء</string>
|
<string name="nothing_to_do">لا يمكن اتخاذ أي إجراء</string>
|
||||||
<string name="action_follow">اتبع</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">كتم</string>
|
<string name="action_mute">كتم</string>
|
||||||
<string name="search">البحث</string>
|
<string name="search">البحث</string>
|
||||||
<string name="delete">حذف</string>
|
<string name="delete">حذف</string>
|
||||||
@ -223,6 +225,8 @@
|
|||||||
<string name="send_comment">ارسل تعليق</string>
|
<string name="send_comment">ارسل تعليق</string>
|
||||||
<string name="all">الكل</string>
|
<string name="all">الكل</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -281,7 +285,7 @@
|
|||||||
<string name="agreement_check_peertube">أبلُغ مِن العُمر 16 سنة على الأقل وأوافق على %1$s هذا الخادم</string>
|
<string name="agreement_check_peertube">أبلُغ مِن العُمر 16 سنة على الأقل وأوافق على %1$s هذا الخادم</string>
|
||||||
<string name="edit_profile">عدّل الصفحة التعريفية</string>
|
<string name="edit_profile">عدّل الصفحة التعريفية</string>
|
||||||
<string name="make_an_action">القيام بإجراء</string>
|
<string name="make_an_action">القيام بإجراء</string>
|
||||||
<string name="action_unfollow">إلغاء المتابعة</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="set_video_in_list">Videoliste</string>
|
<string name="set_video_in_list">Listenmodus</string>
|
||||||
<string name="set_video_in_list_description">Layout für die Anzeige von Videos in einer Liste ändern</string>
|
<string name="set_video_in_list_description">Video-Übersicht als Liste anzeigen</string>
|
||||||
<string name="no_instances">Keine Instanzen !</string>
|
<string name="no_instances">Keine Instanzen !</string>
|
||||||
<string name="show_more">Mehr anzeigen</string>
|
<string name="show_more">Mehr anzeigen</string>
|
||||||
<string name="show_less">Weniger anzeigen</string>
|
<string name="show_less">Weniger anzeigen</string>
|
||||||
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">Wenn aktiviert, werden Videos automatisch abgespielt</string>
|
<string name="set_autoplay_description">Wenn aktiviert, werden Videos automatisch abgespielt</string>
|
||||||
<string name="set_fullscreen">Vollbild</string>
|
<string name="set_fullscreen">Vollbild</string>
|
||||||
<string name="set_fullscreen_description">Videos automatisch im Vollbildmodus öffnen</string>
|
<string name="set_fullscreen_description">Videos automatisch im Vollbildmodus öffnen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatisch nächstes Video starten</string>
|
<string name="set_autoplay_next_video">Automatisch nächstes Video starten</string>
|
||||||
<string name="set_autoplay_next_video_description">Wenn ein Video endet, nächstes vorgeschlagene starten.</string>
|
<string name="set_autoplay_next_video_description">Wenn ein Video endet, nächstes vorgeschlagene starten.</string>
|
||||||
<string name="add_public_reply">Öffentliche Antwort hinzufügen</string>
|
<string name="add_public_reply">Öffentliche Antwort hinzufügen</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Aktivität</string>
|
<string name="activity">Aktivität</string>
|
||||||
<string name="app">Anwendung</string>
|
<string name="app">Anwendung</string>
|
||||||
<string name="notif_new_video">Neues Video aus deinen Abonnements</string>
|
<string name="notif_new_video">Neues Video aus deinen Abonnements</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Ein Fehler ist während des Kontowechsels aufgetreten!</string>
|
<string name="toast_error_loading_account">Ein Fehler ist während des Kontowechsels aufgetreten!</string>
|
||||||
<string name="toast_error_search">Ein Fehler ist während der Suche aufgetreten!</string>
|
<string name="toast_error_search">Ein Fehler ist während der Suche aufgetreten!</string>
|
||||||
<string name="nothing_to_do">Keine Aktion möglich</string>
|
<string name="nothing_to_do">Keine Aktion möglich</string>
|
||||||
<string name="action_follow">Folge</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Stummschalten</string>
|
<string name="action_mute">Stummschalten</string>
|
||||||
<string name="search">Suche</string>
|
<string name="search">Suche</string>
|
||||||
<string name="delete">Löschen</string>
|
<string name="delete">Löschen</string>
|
||||||
@ -132,7 +134,7 @@
|
|||||||
<string name="information" tools:ignore="UnusedResources">Information</string>
|
<string name="information" tools:ignore="UnusedResources">Information</string>
|
||||||
<string name="app_logo">Logo der Anwendung</string>
|
<string name="app_logo">Logo der Anwendung</string>
|
||||||
<!-- languages not translated -->
|
<!-- languages not translated -->
|
||||||
<string name="subscriptions">Abonnements</string>
|
<string name="subscriptions">Abos</string>
|
||||||
<string name="delete_instance">Eine Instanz entfernen</string>
|
<string name="delete_instance">Eine Instanz entfernen</string>
|
||||||
<string name="delete_instance_confirm">Möchtest du diese Instanz wirklich entfernen?</string>
|
<string name="delete_instance_confirm">Möchtest du diese Instanz wirklich entfernen?</string>
|
||||||
<string name="delete_comment">Kommentar löschen</string>
|
<string name="delete_comment">Kommentar löschen</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Kommentar absenden</string>
|
<string name="send_comment">Kommentar absenden</string>
|
||||||
<string name="all">Alle</string>
|
<string name="all">Alle</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">Ich bin mindestens 16 Jahre alt und stimme den %1$s dieser Instanz zu</string>
|
<string name="agreement_check_peertube">Ich bin mindestens 16 Jahre alt und stimme den %1$s dieser Instanz zu</string>
|
||||||
<string name="edit_profile">Profil bearbeiten</string>
|
<string name="edit_profile">Profil bearbeiten</string>
|
||||||
<string name="make_an_action">Aktion ausführen</string>
|
<string name="make_an_action">Aktion ausführen</string>
|
||||||
<string name="action_unfollow">Nicht mehr folgen</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Heikle Videos anzeigen</string>
|
<string name="display_nsfw_videos">Heikle Videos anzeigen</string>
|
||||||
<string name="fullscreen">Vollbildmodus</string>
|
<string name="fullscreen">Vollbildmodus</string>
|
||||||
<string name="bookmark_peertube_empty">Keine Videos in den Favoriten!</string>
|
<string name="bookmark_peertube_empty">Keine Videos in den Favoriten!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Προσθήκη δημόσιας απάντησης</string>
|
<string name="add_public_reply">Προσθήκη δημόσιας απάντησης</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Παρουσιάστηκε κάποιο σφάλμα, κατά την εναλλαγή μεταξύ των λογαριασμών!</string>
|
<string name="toast_error_loading_account">Παρουσιάστηκε κάποιο σφάλμα, κατά την εναλλαγή μεταξύ των λογαριασμών!</string>
|
||||||
<string name="toast_error_search">Παρουσιάστηκε κάποιο σφάλμα κατά την αναζήτηση!</string>
|
<string name="toast_error_search">Παρουσιάστηκε κάποιο σφάλμα κατά την αναζήτηση!</string>
|
||||||
<string name="nothing_to_do">Δεν μπορεί να εκτελεστεί καμία ενέργεια</string>
|
<string name="nothing_to_do">Δεν μπορεί να εκτελεστεί καμία ενέργεια</string>
|
||||||
<string name="action_follow">Ακολούθηση</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Σίγαση</string>
|
<string name="action_mute">Σίγαση</string>
|
||||||
<string name="search">Αναζήτηση</string>
|
<string name="search">Αναζήτηση</string>
|
||||||
<string name="delete">Διαγραφή</string>
|
<string name="delete">Διαγραφή</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Αποστολή σχόλιου</string>
|
<string name="send_comment">Αποστολή σχόλιου</string>
|
||||||
<string name="all">Όλα</string>
|
<string name="all">Όλα</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -276,7 +280,7 @@
|
|||||||
<string name="agreement_check_peertube">Είμαι τουλάχιστον 16 χρονών, και συμφωνώ με %1$s αυτής της υπόστασης</string>
|
<string name="agreement_check_peertube">Είμαι τουλάχιστον 16 χρονών, και συμφωνώ με %1$s αυτής της υπόστασης</string>
|
||||||
<string name="edit_profile">Επεξεργασία προφίλ</string>
|
<string name="edit_profile">Επεξεργασία προφίλ</string>
|
||||||
<string name="make_an_action">Κάντε μια ενέργεια</string>
|
<string name="make_an_action">Κάντε μια ενέργεια</string>
|
||||||
<string name="action_unfollow">Διακοπή παρακολούθησης</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Εμφάνιση ευαίσθητων βίντεο</string>
|
<string name="display_nsfw_videos">Εμφάνιση ευαίσθητων βίντεο</string>
|
||||||
<string name="fullscreen">Πλήρης οθόνη</string>
|
<string name="fullscreen">Πλήρης οθόνη</string>
|
||||||
<string name="bookmark_peertube_empty">Δεν υπάρχουν βίντεο στα αγαπημένα σας!</string>
|
<string name="bookmark_peertube_empty">Δεν υπάρχουν βίντεο στα αγαπημένα σας!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Añade una respuesta pública</string>
|
<string name="add_public_reply">Añade una respuesta pública</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">¡Ocurrió un error al cambiar de cuentas!</string>
|
<string name="toast_error_loading_account">¡Ocurrió un error al cambiar de cuentas!</string>
|
||||||
<string name="toast_error_search">¡Ocurrió un error durante la búsqueda!</string>
|
<string name="toast_error_search">¡Ocurrió un error durante la búsqueda!</string>
|
||||||
<string name="nothing_to_do">No hay ninguna acción disponible</string>
|
<string name="nothing_to_do">No hay ninguna acción disponible</string>
|
||||||
<string name="action_follow">Seguir</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Silenciar</string>
|
<string name="action_mute">Silenciar</string>
|
||||||
<string name="search">Buscar</string>
|
<string name="search">Buscar</string>
|
||||||
<string name="delete">Eliminar</string>
|
<string name="delete">Eliminar</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Enviar comentario</string>
|
<string name="send_comment">Enviar comentario</string>
|
||||||
<string name="all">Todo</string>
|
<string name="all">Todo</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">Tengo por lo menos 16 años y estoy de acuerdo con los %1$s de esta instancia</string>
|
<string name="agreement_check_peertube">Tengo por lo menos 16 años y estoy de acuerdo con los %1$s de esta instancia</string>
|
||||||
<string name="edit_profile">Editar perfil</string>
|
<string name="edit_profile">Editar perfil</string>
|
||||||
<string name="make_an_action">Haga una acción</string>
|
<string name="make_an_action">Haga una acción</string>
|
||||||
<string name="action_unfollow">Unfollow</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Mostrar videos sensibles</string>
|
<string name="display_nsfw_videos">Mostrar videos sensibles</string>
|
||||||
<string name="fullscreen">Pantalla completa</string>
|
<string name="fullscreen">Pantalla completa</string>
|
||||||
<string name="bookmark_peertube_empty">No hay videos en tus favoritos!</string>
|
<string name="bookmark_peertube_empty">No hay videos en tus favoritos!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Ajouter une réponse publique</string>
|
<string name="add_public_reply">Ajouter une réponse publique</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Une erreur s’est produite pendant le chargement du compte !</string>
|
<string name="toast_error_loading_account">Une erreur s’est produite pendant le chargement du compte !</string>
|
||||||
<string name="toast_error_search">Une erreur s’est produite lors de la recherche !</string>
|
<string name="toast_error_search">Une erreur s’est produite lors de la recherche !</string>
|
||||||
<string name="nothing_to_do">Aucune action ne peut être réalisée</string>
|
<string name="nothing_to_do">Aucune action ne peut être réalisée</string>
|
||||||
<string name="action_follow">S\'abonner</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Mettre en sourdine</string>
|
<string name="action_mute">Mettre en sourdine</string>
|
||||||
<string name="search">Chercher</string>
|
<string name="search">Chercher</string>
|
||||||
<string name="delete">Supprimer</string>
|
<string name="delete">Supprimer</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Envoyer un commentaire</string>
|
<string name="send_comment">Envoyer un commentaire</string>
|
||||||
<string name="all">Tout</string>
|
<string name="all">Tout</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -273,7 +277,7 @@
|
|||||||
<string name="agreement_check_peertube">J\'ai au moins 16 ans et je suis d\'accord avec les %1$s de cette instance</string>
|
<string name="agreement_check_peertube">J\'ai au moins 16 ans et je suis d\'accord avec les %1$s de cette instance</string>
|
||||||
<string name="edit_profile">Éditer le profil</string>
|
<string name="edit_profile">Éditer le profil</string>
|
||||||
<string name="make_an_action">Faire une action</string>
|
<string name="make_an_action">Faire une action</string>
|
||||||
<string name="action_unfollow">Se désabonner</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Afficher les vidéos sensibles</string>
|
<string name="display_nsfw_videos">Afficher les vidéos sensibles</string>
|
||||||
<string name="fullscreen">Vidéo plein écran</string>
|
<string name="fullscreen">Vidéo plein écran</string>
|
||||||
<string name="bookmark_peertube_empty">Il n’y a aucune vidéo Peertube dans vos favoris !</string>
|
<string name="bookmark_peertube_empty">Il n’y a aucune vidéo Peertube dans vos favoris !</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Aggiungere una risposta pubblica</string>
|
<string name="add_public_reply">Aggiungere una risposta pubblica</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Si è verificato un errore durante il cambio tra gli account!</string>
|
<string name="toast_error_loading_account">Si è verificato un errore durante il cambio tra gli account!</string>
|
||||||
<string name="toast_error_search">Si è verificato un errore durante la ricerca!</string>
|
<string name="toast_error_search">Si è verificato un errore durante la ricerca!</string>
|
||||||
<string name="nothing_to_do">Nessuna azione può essere intrapresa</string>
|
<string name="nothing_to_do">Nessuna azione può essere intrapresa</string>
|
||||||
<string name="action_follow">Segui</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Silenzia</string>
|
<string name="action_mute">Silenzia</string>
|
||||||
<string name="search">Cerca</string>
|
<string name="search">Cerca</string>
|
||||||
<string name="delete">Elimina</string>
|
<string name="delete">Elimina</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Invia commento</string>
|
<string name="send_comment">Invia commento</string>
|
||||||
<string name="all">Tutto</string>
|
<string name="all">Tutto</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">Ho almeno 16 anni e accetto le %1$s di questa istanza</string>
|
<string name="agreement_check_peertube">Ho almeno 16 anni e accetto le %1$s di questa istanza</string>
|
||||||
<string name="edit_profile">Modifica profilo</string>
|
<string name="edit_profile">Modifica profilo</string>
|
||||||
<string name="make_an_action">Scegli un\'azione</string>
|
<string name="make_an_action">Scegli un\'azione</string>
|
||||||
<string name="action_unfollow">Smetti di seguire</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Mostra video sensibili</string>
|
<string name="display_nsfw_videos">Mostra video sensibili</string>
|
||||||
<string name="fullscreen">A tutto schermo</string>
|
<string name="fullscreen">A tutto schermo</string>
|
||||||
<string name="bookmark_peertube_empty">Non c\'è nessun video nei tuoi favoriti!</string>
|
<string name="bookmark_peertube_empty">Non c\'è nessun video nei tuoi favoriti!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -117,7 +119,7 @@
|
|||||||
<string name="toast_error_loading_account">アカウントの切り替え中にエラーが発生しました!</string>
|
<string name="toast_error_loading_account">アカウントの切り替え中にエラーが発生しました!</string>
|
||||||
<string name="toast_error_search">検索中にエラーが発生しました!</string>
|
<string name="toast_error_search">検索中にエラーが発生しました!</string>
|
||||||
<string name="nothing_to_do">何もすることはできません</string>
|
<string name="nothing_to_do">何もすることはできません</string>
|
||||||
<string name="action_follow">フォローする</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">ミュート</string>
|
<string name="action_mute">ミュート</string>
|
||||||
<string name="search">検索</string>
|
<string name="search">検索</string>
|
||||||
<string name="delete">削除</string>
|
<string name="delete">削除</string>
|
||||||
@ -218,6 +220,8 @@
|
|||||||
<string name="send_comment">コメントを送信</string>
|
<string name="send_comment">コメントを送信</string>
|
||||||
<string name="all">すべて</string>
|
<string name="all">すべて</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -276,7 +280,7 @@
|
|||||||
<string name="agreement_check_peertube">私は16歳以上で、インスタンスの %1$s に同意します。</string>
|
<string name="agreement_check_peertube">私は16歳以上で、インスタンスの %1$s に同意します。</string>
|
||||||
<string name="edit_profile">プロフィールを編集</string>
|
<string name="edit_profile">プロフィールを編集</string>
|
||||||
<string name="make_an_action">アクションを作成</string>
|
<string name="make_an_action">アクションを作成</string>
|
||||||
<string name="action_unfollow">フォロー解除</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -117,7 +119,7 @@
|
|||||||
<string name="toast_error_loading_account">An error occurred while switching between accounts!</string>
|
<string name="toast_error_loading_account">An error occurred while switching between accounts!</string>
|
||||||
<string name="toast_error_search">An error occurred while searching!</string>
|
<string name="toast_error_search">An error occurred while searching!</string>
|
||||||
<string name="nothing_to_do">아무 조치를 취할 수 없습니다</string>
|
<string name="nothing_to_do">아무 조치를 취할 수 없습니다</string>
|
||||||
<string name="action_follow">팔로우</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">뮤트</string>
|
<string name="action_mute">뮤트</string>
|
||||||
<string name="search">검색</string>
|
<string name="search">검색</string>
|
||||||
<string name="delete">삭제</string>
|
<string name="delete">삭제</string>
|
||||||
@ -218,6 +220,8 @@
|
|||||||
<string name="send_comment">댓글 보내기</string>
|
<string name="send_comment">댓글 보내기</string>
|
||||||
<string name="all">모두</string>
|
<string name="all">모두</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -276,7 +280,7 @@
|
|||||||
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
||||||
<string name="edit_profile">프로필 수정</string>
|
<string name="edit_profile">프로필 수정</string>
|
||||||
<string name="make_an_action">Make an action</string>
|
<string name="make_an_action">Make an action</string>
|
||||||
<string name="action_unfollow">언팔로우</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">Als deze optie is ingeschakeld, worden de video\'s automatisch afgespeeld</string>
|
<string name="set_autoplay_description">Als deze optie is ingeschakeld, worden de video\'s automatisch afgespeeld</string>
|
||||||
<string name="set_fullscreen">Volledig scherm</string>
|
<string name="set_fullscreen">Volledig scherm</string>
|
||||||
<string name="set_fullscreen_description">Video\'s automatisch openen op volledig scherm</string>
|
<string name="set_fullscreen_description">Video\'s automatisch openen op volledig scherm</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">De volgende video automatisch afspelen</string>
|
<string name="set_autoplay_next_video">De volgende video automatisch afspelen</string>
|
||||||
<string name="set_autoplay_next_video_description">Wanneer een video eindigt, begin dan met de volgende voorgestelde video.</string>
|
<string name="set_autoplay_next_video_description">Wanneer een video eindigt, begin dan met de volgende voorgestelde video.</string>
|
||||||
<string name="add_public_reply">Voeg een openbaar antwoord toe</string>
|
<string name="add_public_reply">Voeg een openbaar antwoord toe</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activiteit</string>
|
<string name="activity">Activiteit</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">Nieuwe video uit uw abonnementen</string>
|
<string name="notif_new_video">Nieuwe video uit uw abonnementen</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Er is een fout opgetreden bij het wisselen tussen de accounts!</string>
|
<string name="toast_error_loading_account">Er is een fout opgetreden bij het wisselen tussen de accounts!</string>
|
||||||
<string name="toast_error_search">Er is een fout opgetreden tijdens het zoeken!</string>
|
<string name="toast_error_search">Er is een fout opgetreden tijdens het zoeken!</string>
|
||||||
<string name="nothing_to_do">Er kan geen actie worden ondernomen</string>
|
<string name="nothing_to_do">Er kan geen actie worden ondernomen</string>
|
||||||
<string name="action_follow">Volg</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Stomme</string>
|
<string name="action_mute">Stomme</string>
|
||||||
<string name="search">Zoek</string>
|
<string name="search">Zoek</string>
|
||||||
<string name="delete">Verwijder</string>
|
<string name="delete">Verwijder</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Reactie versturen</string>
|
<string name="send_comment">Reactie versturen</string>
|
||||||
<string name="all">Allemaal</string>
|
<string name="all">Allemaal</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Exporteren</string>
|
<string name="export_list">Exporteren</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">Ik ben minstens 16 jaar oud en ga akkoord met de %1$s van dit geval</string>
|
<string name="agreement_check_peertube">Ik ben minstens 16 jaar oud en ga akkoord met de %1$s van dit geval</string>
|
||||||
<string name="edit_profile">Profiel bewerken</string>
|
<string name="edit_profile">Profiel bewerken</string>
|
||||||
<string name="make_an_action">Maak een actie</string>
|
<string name="make_an_action">Maak een actie</string>
|
||||||
<string name="action_unfollow">Ontvouw</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Gevoelige video\'s weergeven</string>
|
<string name="display_nsfw_videos">Gevoelige video\'s weergeven</string>
|
||||||
<string name="fullscreen">Volledig scherm</string>
|
<string name="fullscreen">Volledig scherm</string>
|
||||||
<string name="bookmark_peertube_empty">Er zijn geen video\'s in uw favorieten!</string>
|
<string name="bookmark_peertube_empty">Er zijn geen video\'s in uw favorieten!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">Jeśli włączone, filmy będą odtwarzane automatycznie</string>
|
<string name="set_autoplay_description">Jeśli włączone, filmy będą odtwarzane automatycznie</string>
|
||||||
<string name="set_fullscreen">Pełny ekran</string>
|
<string name="set_fullscreen">Pełny ekran</string>
|
||||||
<string name="set_fullscreen_description">Automatycznie otwieraj filmy w trybie pełnoekranowym</string>
|
<string name="set_fullscreen_description">Automatycznie otwieraj filmy w trybie pełnoekranowym</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatycznie rozpocznij odtwarzanie następnego filmu</string>
|
<string name="set_autoplay_next_video">Automatycznie rozpocznij odtwarzanie następnego filmu</string>
|
||||||
<string name="set_autoplay_next_video_description">Kiedy film się skończy, odtwórz następny sugerowany film.</string>
|
<string name="set_autoplay_next_video_description">Kiedy film się skończy, odtwórz następny sugerowany film.</string>
|
||||||
<string name="add_public_reply">Dodaj publiczną odpowiedź</string>
|
<string name="add_public_reply">Dodaj publiczną odpowiedź</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Aktywność</string>
|
<string name="activity">Aktywność</string>
|
||||||
<string name="app">Aplikacja</string>
|
<string name="app">Aplikacja</string>
|
||||||
<string name="notif_new_video">Nowy film z twoich subskrypcji</string>
|
<string name="notif_new_video">Nowy film z twoich subskrypcji</string>
|
||||||
@ -120,7 +122,7 @@
|
|||||||
<string name="toast_error_loading_account">Wystąpił błąd podczas przełączania konta!</string>
|
<string name="toast_error_loading_account">Wystąpił błąd podczas przełączania konta!</string>
|
||||||
<string name="toast_error_search">Podczas wyszukiwania wystąpił błąd!</string>
|
<string name="toast_error_search">Podczas wyszukiwania wystąpił błąd!</string>
|
||||||
<string name="nothing_to_do">Nie można podjąć żadnych działań</string>
|
<string name="nothing_to_do">Nie można podjąć żadnych działań</string>
|
||||||
<string name="action_follow">Obserwuj</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Wycisz</string>
|
<string name="action_mute">Wycisz</string>
|
||||||
<string name="search">Szukaj</string>
|
<string name="search">Szukaj</string>
|
||||||
<string name="delete">Usuń</string>
|
<string name="delete">Usuń</string>
|
||||||
@ -221,6 +223,8 @@
|
|||||||
<string name="send_comment">Prześlij komentarz</string>
|
<string name="send_comment">Prześlij komentarz</string>
|
||||||
<string name="all">Wszystkie</string>
|
<string name="all">Wszystkie</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Eksportuj</string>
|
<string name="export_list">Eksportuj</string>
|
||||||
@ -279,7 +283,7 @@
|
|||||||
<string name="agreement_check_peertube">Mam co najmniej 16 lat i zgadzam się na %1$s w tym przypadku</string>
|
<string name="agreement_check_peertube">Mam co najmniej 16 lat i zgadzam się na %1$s w tym przypadku</string>
|
||||||
<string name="edit_profile">Profil edycyjny</string>
|
<string name="edit_profile">Profil edycyjny</string>
|
||||||
<string name="make_an_action">Podejmij działania</string>
|
<string name="make_an_action">Podejmij działania</string>
|
||||||
<string name="action_unfollow">Rozwiń</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Wyświetlanie wrażliwych filmów wideo</string>
|
<string name="display_nsfw_videos">Wyświetlanie wrażliwych filmów wideo</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">Nie ma żadnych filmów w twoich ulubionych!</string>
|
<string name="bookmark_peertube_empty">Nie ma żadnych filmów w twoich ulubionych!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Ocorreu um erro ao alternar entre as contas!</string>
|
<string name="toast_error_loading_account">Ocorreu um erro ao alternar entre as contas!</string>
|
||||||
<string name="toast_error_search">Ocorreu um erro na pesquisa!</string>
|
<string name="toast_error_search">Ocorreu um erro na pesquisa!</string>
|
||||||
<string name="nothing_to_do">A ação não pode ser feita ou não é suportada</string>
|
<string name="nothing_to_do">A ação não pode ser feita ou não é suportada</string>
|
||||||
<string name="action_follow">Seguir</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Silenciar</string>
|
<string name="action_mute">Silenciar</string>
|
||||||
<string name="search">Pesquisa</string>
|
<string name="search">Pesquisa</string>
|
||||||
<string name="delete">Remover</string>
|
<string name="delete">Remover</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Enviar comentário</string>
|
<string name="send_comment">Enviar comentário</string>
|
||||||
<string name="all">Tudo</string>
|
<string name="all">Tudo</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
||||||
<string name="edit_profile">Editar perfil</string>
|
<string name="edit_profile">Editar perfil</string>
|
||||||
<string name="make_an_action">Make an action</string>
|
<string name="make_an_action">Make an action</string>
|
||||||
<string name="action_unfollow">Deixar de seguir</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -119,7 +121,7 @@
|
|||||||
<string name="toast_error_loading_account">A apărut o eroare în timp ce schimbați între conturi!</string>
|
<string name="toast_error_loading_account">A apărut o eroare în timp ce schimbați între conturi!</string>
|
||||||
<string name="toast_error_search">S-a produs o eroare în timpul căutării!</string>
|
<string name="toast_error_search">S-a produs o eroare în timpul căutării!</string>
|
||||||
<string name="nothing_to_do">Nu se poate efectua nici o acțiune</string>
|
<string name="nothing_to_do">Nu se poate efectua nici o acțiune</string>
|
||||||
<string name="action_follow">Urmărește</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Mod silențios</string>
|
<string name="action_mute">Mod silențios</string>
|
||||||
<string name="search">Căutare</string>
|
<string name="search">Căutare</string>
|
||||||
<string name="delete">Șterge</string>
|
<string name="delete">Șterge</string>
|
||||||
@ -220,6 +222,8 @@
|
|||||||
<string name="send_comment">Send comment</string>
|
<string name="send_comment">Send comment</string>
|
||||||
<string name="all">All</string>
|
<string name="all">All</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -278,7 +282,7 @@
|
|||||||
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
<string name="agreement_check_peertube">I am at least 16 years old and agree to the %1$s of this instance</string>
|
||||||
<string name="edit_profile">Editează profilul</string>
|
<string name="edit_profile">Editează profilul</string>
|
||||||
<string name="make_an_action">Make an action</string>
|
<string name="make_an_action">Make an action</string>
|
||||||
<string name="action_unfollow">Nu mai urmări</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">Если включено, видео будут воспроизводиться автоматически</string>
|
<string name="set_autoplay_description">Если включено, видео будут воспроизводиться автоматически</string>
|
||||||
<string name="set_fullscreen">Полноэкранный режим</string>
|
<string name="set_fullscreen">Полноэкранный режим</string>
|
||||||
<string name="set_fullscreen_description">Автоматически открывать видео в полноэкранном режиме</string>
|
<string name="set_fullscreen_description">Автоматически открывать видео в полноэкранном режиме</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Автоматически начать воспроизведение следующего видео</string>
|
<string name="set_autoplay_next_video">Автоматически начать воспроизведение следующего видео</string>
|
||||||
<string name="set_autoplay_next_video_description">Когда видео заканчивается, перейдите к следующему предложенному видео.</string>
|
<string name="set_autoplay_next_video_description">Когда видео заканчивается, перейдите к следующему предложенному видео.</string>
|
||||||
<string name="add_public_reply">Добавить публичный ответ</string>
|
<string name="add_public_reply">Добавить публичный ответ</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Действия</string>
|
<string name="activity">Действия</string>
|
||||||
<string name="app">Приложение</string>
|
<string name="app">Приложение</string>
|
||||||
<string name="notif_new_video">Новое видео из ваших подписок</string>
|
<string name="notif_new_video">Новое видео из ваших подписок</string>
|
||||||
@ -120,7 +122,7 @@
|
|||||||
<string name="toast_error_loading_account">Произошла ошибка при переключении между аккаунтами!</string>
|
<string name="toast_error_loading_account">Произошла ошибка при переключении между аккаунтами!</string>
|
||||||
<string name="toast_error_search">Произошла ошибка при поиске!</string>
|
<string name="toast_error_search">Произошла ошибка при поиске!</string>
|
||||||
<string name="nothing_to_do">Ничего нельзя сделать</string>
|
<string name="nothing_to_do">Ничего нельзя сделать</string>
|
||||||
<string name="action_follow">Подписаться</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Игнорировать</string>
|
<string name="action_mute">Игнорировать</string>
|
||||||
<string name="search">Поиск</string>
|
<string name="search">Поиск</string>
|
||||||
<string name="delete">Удалить</string>
|
<string name="delete">Удалить</string>
|
||||||
@ -221,6 +223,8 @@
|
|||||||
<string name="send_comment">Оставить комментарий</string>
|
<string name="send_comment">Оставить комментарий</string>
|
||||||
<string name="all">Все</string>
|
<string name="all">Все</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -279,7 +283,7 @@
|
|||||||
<string name="agreement_check_peertube">Мне 16 или более лет и я согласен с %1$s этого экземпляра</string>
|
<string name="agreement_check_peertube">Мне 16 или более лет и я согласен с %1$s этого экземпляра</string>
|
||||||
<string name="edit_profile">Редактировать профиль</string>
|
<string name="edit_profile">Редактировать профиль</string>
|
||||||
<string name="make_an_action">Предпринять действие</string>
|
<string name="make_an_action">Предпринять действие</string>
|
||||||
<string name="action_unfollow">Отписаться</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Показывать неприличные видео</string>
|
<string name="display_nsfw_videos">Показывать неприличные видео</string>
|
||||||
<string name="fullscreen">На полный экран</string>
|
<string name="fullscreen">На полный экран</string>
|
||||||
<string name="bookmark_peertube_empty">В избранном нет видео!</string>
|
<string name="bookmark_peertube_empty">В избранном нет видео!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<string name="toast_error_loading_account">Ett fel uppstod vid växling mellan konton!</string>
|
<string name="toast_error_loading_account">Ett fel uppstod vid växling mellan konton!</string>
|
||||||
<string name="toast_error_search">Ett fel uppstod under sökningen!</string>
|
<string name="toast_error_search">Ett fel uppstod under sökningen!</string>
|
||||||
<string name="nothing_to_do">Inga åtgärder kan vidtas</string>
|
<string name="nothing_to_do">Inga åtgärder kan vidtas</string>
|
||||||
<string name="action_follow">Följ</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">Tysta</string>
|
<string name="action_mute">Tysta</string>
|
||||||
<string name="search">Sök</string>
|
<string name="search">Sök</string>
|
||||||
<string name="delete">Ta bort</string>
|
<string name="delete">Ta bort</string>
|
||||||
@ -219,6 +221,8 @@
|
|||||||
<string name="send_comment">Skicka kommentar</string>
|
<string name="send_comment">Skicka kommentar</string>
|
||||||
<string name="all">Allt</string>
|
<string name="all">Allt</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -277,7 +281,7 @@
|
|||||||
<string name="agreement_check_peertube">Jag är minst 16 år gammal och godkänner %1$s för denna instans</string>
|
<string name="agreement_check_peertube">Jag är minst 16 år gammal och godkänner %1$s för denna instans</string>
|
||||||
<string name="edit_profile">Ändra profil</string>
|
<string name="edit_profile">Ändra profil</string>
|
||||||
<string name="make_an_action">Gör en handling</string>
|
<string name="make_an_action">Gör en handling</string>
|
||||||
<string name="action_unfollow">Sluta följa</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">添加公开回复</string>
|
<string name="add_public_reply">添加公开回复</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -117,7 +119,7 @@
|
|||||||
<string name="toast_error_loading_account">在切换帐户时出现了错误!</string>
|
<string name="toast_error_loading_account">在切换帐户时出现了错误!</string>
|
||||||
<string name="toast_error_search">搜索时出现了错误!</string>
|
<string name="toast_error_search">搜索时出现了错误!</string>
|
||||||
<string name="nothing_to_do">无法进行任何操作</string>
|
<string name="nothing_to_do">无法进行任何操作</string>
|
||||||
<string name="action_follow">订阅</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">静音</string>
|
<string name="action_mute">静音</string>
|
||||||
<string name="search">搜索</string>
|
<string name="search">搜索</string>
|
||||||
<string name="delete">删除</string>
|
<string name="delete">删除</string>
|
||||||
@ -218,6 +220,8 @@
|
|||||||
<string name="send_comment">发送评论</string>
|
<string name="send_comment">发送评论</string>
|
||||||
<string name="all">全部</string>
|
<string name="all">全部</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -275,7 +279,7 @@
|
|||||||
<string name="agreement_check_peertube">我已至少年满十六岁,并且同意该实例的 %1$s</string>
|
<string name="agreement_check_peertube">我已至少年满十六岁,并且同意该实例的 %1$s</string>
|
||||||
<string name="edit_profile">编辑个人资料</string>
|
<string name="edit_profile">编辑个人资料</string>
|
||||||
<string name="make_an_action">请选择其中一项操作</string>
|
<string name="make_an_action">请选择其中一项操作</string>
|
||||||
<string name="action_unfollow">取消订阅</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">显示敏感视频</string>
|
<string name="display_nsfw_videos">显示敏感视频</string>
|
||||||
<string name="fullscreen">全屏</string>
|
<string name="fullscreen">全屏</string>
|
||||||
<string name="bookmark_peertube_empty">您的收藏列表为空!</string>
|
<string name="bookmark_peertube_empty">您的收藏列表为空!</string>
|
||||||
|
@ -14,9 +14,11 @@
|
|||||||
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
<string name="set_autoplay_description">If enabled, videos will be played automatically</string>
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -117,7 +119,7 @@
|
|||||||
<string name="toast_error_loading_account">在帳號間切換時發生錯誤!</string>
|
<string name="toast_error_loading_account">在帳號間切換時發生錯誤!</string>
|
||||||
<string name="toast_error_search">搜尋時發生錯誤!</string>
|
<string name="toast_error_search">搜尋時發生錯誤!</string>
|
||||||
<string name="nothing_to_do">無法採取行動</string>
|
<string name="nothing_to_do">無法採取行動</string>
|
||||||
<string name="action_follow">關注</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
<string name="action_mute">靜音</string>
|
<string name="action_mute">靜音</string>
|
||||||
<string name="search">搜尋</string>
|
<string name="search">搜尋</string>
|
||||||
<string name="delete">刪除</string>
|
<string name="delete">刪除</string>
|
||||||
@ -218,6 +220,8 @@
|
|||||||
<string name="send_comment">傳送留言</string>
|
<string name="send_comment">傳送留言</string>
|
||||||
<string name="all">全部</string>
|
<string name="all">全部</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
<string name="export_list">Export</string>
|
<string name="export_list">Export</string>
|
||||||
@ -276,7 +280,7 @@
|
|||||||
<string name="agreement_check_peertube">我至少 16 歲並同意此站台的 %1$s</string>
|
<string name="agreement_check_peertube">我至少 16 歲並同意此站台的 %1$s</string>
|
||||||
<string name="edit_profile">編輯個人資料</string>
|
<string name="edit_profile">編輯個人資料</string>
|
||||||
<string name="make_an_action">做動作</string>
|
<string name="make_an_action">做動作</string>
|
||||||
<string name="action_unfollow">取消追蹤</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
<color name="tag_color_text">#FAFAFA</color>
|
<color name="tag_color_text">#FAFAFA</color>
|
||||||
<color name="positive_thumbs">#2b90d9</color>
|
<color name="positive_thumbs">#2b90d9</color>
|
||||||
<color name="negative_thumbs">#F44336</color>
|
<color name="negative_thumbs">#F44336</color>
|
||||||
|
<color name="backgroundDark">#DD000000</color>
|
||||||
<color name="red_1">#F44336</color>
|
<color name="red_1">#F44336</color>
|
||||||
</resources>
|
</resources>
|
@ -31,10 +31,12 @@
|
|||||||
|
|
||||||
<string name="set_fullscreen">Fullscreen</string>
|
<string name="set_fullscreen">Fullscreen</string>
|
||||||
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
<string name="set_fullscreen_description">Automatically open videos in fullscreen</string>
|
||||||
|
<string name="set_autoplay_next_video_settings">Autoplay</string>
|
||||||
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
<string name="set_autoplay_next_video">Automatically start playing the next video</string>
|
||||||
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
<string name="set_autoplay_next_video_description">When a video ends, follow up with the next suggested video.</string>
|
||||||
<string name="add_public_reply">Add a public reply</string>
|
<string name="add_public_reply">Add a public reply</string>
|
||||||
|
|
||||||
|
<string name="originally_published">Originally published</string>
|
||||||
<string name="activity">Activity</string>
|
<string name="activity">Activity</string>
|
||||||
<string name="app">App</string>
|
<string name="app">App</string>
|
||||||
<string name="notif_new_video">New video from your subscriptions</string>
|
<string name="notif_new_video">New video from your subscriptions</string>
|
||||||
@ -154,7 +156,7 @@
|
|||||||
<string name="nothing_to_do">No action can be taken</string>
|
<string name="nothing_to_do">No action can be taken</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="action_follow">Follow</string>
|
<string name="action_follow">Subscribe</string>
|
||||||
|
|
||||||
<string name="action_mute">Mute</string>
|
<string name="action_mute">Mute</string>
|
||||||
|
|
||||||
@ -282,8 +284,8 @@
|
|||||||
<string name="send_comment">Send comment</string>
|
<string name="send_comment">Send comment</string>
|
||||||
<string name="all">All</string>
|
<string name="all">All</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
<string name="playback_speed">Playback speed</string>
|
||||||
|
<string name="normal">Normal</string>
|
||||||
<string name="delete_history">Delete videos history</string>
|
<string name="delete_history">Delete videos history</string>
|
||||||
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
<string name="delete_history_confirm">Are you sure you want to delete all your videos history?</string>
|
||||||
|
|
||||||
@ -355,7 +357,7 @@
|
|||||||
<string name="make_an_action">Make an action</string>
|
<string name="make_an_action">Make an action</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="action_unfollow">Unfollow</string>
|
<string name="action_unfollow">Unsubscribe</string>
|
||||||
|
|
||||||
<string name="display_nsfw_videos">Display sensitive videos</string>
|
<string name="display_nsfw_videos">Display sensitive videos</string>
|
||||||
<string name="fullscreen">Fullscreen</string>
|
<string name="fullscreen">Fullscreen</string>
|
||||||
|
@ -157,13 +157,6 @@
|
|||||||
<service
|
<service
|
||||||
android:name=".services.RetrieveInfoService"
|
android:name=".services.RetrieveInfoService"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<receiver
|
|
||||||
android:name=".services.PeertubeUploadReceiver"
|
|
||||||
android:exported="false">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="app.fedilab.fedilabtube.uploadservice.broadcast.status" />
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.work.impl.WorkManagerInitializer"
|
android:name="androidx.work.impl.WorkManagerInitializer"
|
||||||
|
@ -59,7 +59,7 @@ import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
|||||||
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistAdapter.AllPlaylistRemoved {
|
public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistAdapter.AllPlaylistRemoved {
|
||||||
|
@ -14,22 +14,30 @@ package app.fedilab.fedilabtube;
|
|||||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
* see <http://www.gnu.org/licenses>. */
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.app.NotificationChannel;
|
||||||
|
import android.app.NotificationManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
import androidx.multidex.MultiDex;
|
import androidx.multidex.MultiDex;
|
||||||
import androidx.multidex.MultiDexApplication;
|
import androidx.multidex.MultiDexApplication;
|
||||||
import androidx.work.Configuration;
|
import androidx.work.Configuration;
|
||||||
import androidx.work.WorkManager;
|
import androidx.work.WorkManager;
|
||||||
|
|
||||||
import net.gotev.uploadservice.UploadService;
|
import net.gotev.uploadservice.UploadServiceConfig;
|
||||||
|
import net.gotev.uploadservice.observer.request.GlobalRequestObserver;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import app.fedilab.fedilabtube.helper.ThemeHelper;
|
import app.fedilab.fedilabtube.helper.ThemeHelper;
|
||||||
|
import app.fedilab.fedilabtube.services.GlobalUploadObserver;
|
||||||
import app.fedilab.fedilabtube.worker.WorkHelper;
|
import app.fedilab.fedilabtube.worker.WorkHelper;
|
||||||
|
|
||||||
public class FedilabTube extends MultiDexApplication {
|
public class FedilabTube extends MultiDexApplication {
|
||||||
|
|
||||||
|
static String UPLOAD_CHANNEL_ID = "upload_info_peertube";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
@ -44,6 +52,10 @@ public class FedilabTube extends MultiDexApplication {
|
|||||||
if (interval >= 15) {
|
if (interval >= 15) {
|
||||||
WorkHelper.fetchNotifications(this, interval);
|
WorkHelper.fetchNotifications(this, interval);
|
||||||
}
|
}
|
||||||
|
createNotificationChannel();
|
||||||
|
UploadServiceConfig.initialize(FedilabTube.this, UPLOAD_CHANNEL_ID, true);
|
||||||
|
|
||||||
|
new GlobalRequestObserver(this, new GlobalUploadObserver());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -52,8 +64,6 @@ public class FedilabTube extends MultiDexApplication {
|
|||||||
super.attachBaseContext(base);
|
super.attachBaseContext(base);
|
||||||
|
|
||||||
MultiDex.install(FedilabTube.this);
|
MultiDex.install(FedilabTube.this);
|
||||||
|
|
||||||
UploadService.NAMESPACE = BuildConfig.APPLICATION_ID;
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
int themePref = sharedpreferences.getInt(Helper.SET_THEME, Helper.DEFAULT_MODE);
|
int themePref = sharedpreferences.getInt(Helper.SET_THEME, Helper.DEFAULT_MODE);
|
||||||
ThemeHelper.switchTo(themePref);
|
ThemeHelper.switchTo(themePref);
|
||||||
@ -61,5 +71,13 @@ public class FedilabTube extends MultiDexApplication {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createNotificationChannel() {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
NotificationChannel channel = new NotificationChannel(UPLOAD_CHANNEL_ID,
|
||||||
|
getString(R.string.notification_channel_name),
|
||||||
|
NotificationManager.IMPORTANCE_LOW);
|
||||||
|
channel.setSound(null, null);
|
||||||
|
((NotificationManager) Objects.requireNonNull(getSystemService(Context.NOTIFICATION_SERVICE))).createNotificationChannel(channel);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -48,7 +48,7 @@ import app.fedilab.fedilabtube.helper.RoundedBackgroundSpan;
|
|||||||
import app.fedilab.fedilabtube.viewmodel.InstancesVM;
|
import app.fedilab.fedilabtube.viewmodel.InstancesVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class InstancePickerActivity extends AppCompatActivity {
|
public class InstancePickerActivity extends AppCompatActivity {
|
||||||
|
@ -149,6 +149,14 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
} else if (instance.endsWith("/")) {
|
||||||
|
try {
|
||||||
|
URL url = new URL("https://" + instance);
|
||||||
|
instance = url.getHost();
|
||||||
|
host = instance;
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!Patterns.WEB_URL.matcher("https://" + instance).matches()) {
|
if (!Patterns.WEB_URL.matcher("https://" + instance).matches()) {
|
||||||
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();
|
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();
|
||||||
|
@ -77,10 +77,10 @@ import es.dmoral.toasty.Toasty;
|
|||||||
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.NORMAL;
|
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.NORMAL;
|
||||||
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.SURFING;
|
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.SURFING;
|
||||||
import static app.fedilab.fedilabtube.helper.Helper.academies;
|
import static app.fedilab.fedilabtube.helper.Helper.academies;
|
||||||
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
public static PeertubeInformation peertubeInformation;
|
|
||||||
|
|
||||||
public static int PICK_INSTANCE = 5641;
|
public static int PICK_INSTANCE = 5641;
|
||||||
public static int PICK_INSTANCE_SURF = 5642;
|
public static int PICK_INSTANCE_SURF = 5642;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,21 +16,17 @@ package app.fedilab.fedilabtube;
|
|||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
@ -40,39 +36,34 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
|
||||||
import net.gotev.uploadservice.MultipartUploadRequest;
|
|
||||||
import net.gotev.uploadservice.ServerResponse;
|
|
||||||
import net.gotev.uploadservice.UploadInfo;
|
|
||||||
import net.gotev.uploadservice.UploadNotificationConfig;
|
|
||||||
import net.gotev.uploadservice.UploadStatusDelegate;
|
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.client.APIResponse;
|
import app.fedilab.fedilabtube.client.APIResponse;
|
||||||
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
||||||
import app.fedilab.fedilabtube.client.data.ChannelData.Channel;
|
import app.fedilab.fedilabtube.client.data.ChannelData.Channel;
|
||||||
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
import app.fedilab.fedilabtube.client.data.VideoData.Video;
|
import app.fedilab.fedilabtube.client.data.VideoData.Video;
|
||||||
import app.fedilab.fedilabtube.client.entities.Item;
|
import app.fedilab.fedilabtube.client.entities.Item;
|
||||||
import app.fedilab.fedilabtube.client.entities.ItemStr;
|
import app.fedilab.fedilabtube.client.entities.ItemStr;
|
||||||
import app.fedilab.fedilabtube.client.entities.VideoParams;
|
import app.fedilab.fedilabtube.client.entities.VideoParams;
|
||||||
|
import app.fedilab.fedilabtube.databinding.ActivityPeertubeEditBinding;
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
||||||
import app.fedilab.fedilabtube.viewmodel.MyVideoVM;
|
import app.fedilab.fedilabtube.viewmodel.MyVideoVM;
|
||||||
import app.fedilab.fedilabtube.viewmodel.PostActionsVM;
|
import app.fedilab.fedilabtube.viewmodel.PostActionsVM;
|
||||||
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
|
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
import mabbas007.tagsedittext.TagsEditText;
|
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.PEERTUBEDELETEVIDEO;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.PEERTUBEDELETEVIDEO;
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
||||||
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class PeertubeEditUploadActivity extends AppCompatActivity {
|
public class PeertubeEditUploadActivity extends AppCompatActivity {
|
||||||
@ -82,23 +73,21 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 724;
|
private final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 724;
|
||||||
Item licenseToSend, privacyToSend, categoryToSend;
|
Item licenseToSend, privacyToSend, categoryToSend;
|
||||||
ItemStr languageToSend;
|
ItemStr languageToSend;
|
||||||
private Button set_upload_submit;
|
|
||||||
private Spinner set_upload_privacy, set_upload_categories, set_upload_licenses, set_upload_languages, set_upload_channel;
|
|
||||||
private EditText p_video_title, p_video_description;
|
|
||||||
private TagsEditText p_video_tags;
|
|
||||||
private CheckBox set_upload_nsfw, set_upload_enable_comments;
|
|
||||||
private LinkedHashMap<String, String> channels;
|
private LinkedHashMap<String, String> channels;
|
||||||
private String videoId;
|
private String videoId;
|
||||||
private Channel channel;
|
private Channel channel;
|
||||||
private ImageView p_video_preview;
|
|
||||||
private Button set_preview;
|
|
||||||
private VideoParams videoParams;
|
private VideoParams videoParams;
|
||||||
private Video video;
|
private Video video;
|
||||||
private String channelToSendId;
|
private String channelToSendId;
|
||||||
|
private ActivityPeertubeEditBinding binding;
|
||||||
|
private Uri inputData;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
binding = ActivityPeertubeEditBinding.inflate(getLayoutInflater());
|
||||||
|
View view = binding.getRoot();
|
||||||
|
setContentView(view);
|
||||||
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
|
|
||||||
@ -113,23 +102,8 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
if (getSupportActionBar() != null)
|
if (getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_peertube_edit);
|
|
||||||
set_upload_submit = findViewById(R.id.set_upload_submit);
|
|
||||||
Button set_upload_delete = findViewById(R.id.set_upload_delete);
|
|
||||||
set_upload_privacy = findViewById(R.id.set_upload_privacy);
|
|
||||||
set_upload_channel = findViewById(R.id.set_upload_channel);
|
|
||||||
set_upload_categories = findViewById(R.id.set_upload_categories);
|
|
||||||
set_upload_licenses = findViewById(R.id.set_upload_licenses);
|
|
||||||
set_upload_languages = findViewById(R.id.set_upload_languages);
|
|
||||||
p_video_title = findViewById(R.id.p_video_title);
|
|
||||||
p_video_description = findViewById(R.id.p_video_description);
|
|
||||||
p_video_tags = findViewById(R.id.p_video_tags);
|
|
||||||
p_video_preview = findViewById(R.id.p_video_preview);
|
|
||||||
set_upload_nsfw = findViewById(R.id.set_upload_nsfw);
|
|
||||||
set_upload_enable_comments = findViewById(R.id.set_upload_enable_comments);
|
|
||||||
set_preview = findViewById(R.id.set_preview);
|
|
||||||
|
|
||||||
set_upload_delete.setOnClickListener(v -> {
|
binding.setUploadDelete.setOnClickListener(v -> {
|
||||||
AlertDialog.Builder builderInner;
|
AlertDialog.Builder builderInner;
|
||||||
builderInner = new AlertDialog.Builder(PeertubeEditUploadActivity.this);
|
builderInner = new AlertDialog.Builder(PeertubeEditUploadActivity.this);
|
||||||
builderInner.setMessage(getString(R.string.delete_video_confirmation));
|
builderInner.setMessage(getString(R.string.delete_video_confirmation));
|
||||||
@ -165,7 +139,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
ArrayAdapter<String> adapterCatgories = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
ArrayAdapter<String> adapterCatgories = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, categoriesA);
|
android.R.layout.simple_spinner_dropdown_item, categoriesA);
|
||||||
set_upload_categories.setAdapter(adapterCatgories);
|
binding.setUploadCategories.setAdapter(adapterCatgories);
|
||||||
|
|
||||||
|
|
||||||
//Populate licenses
|
//Populate licenses
|
||||||
@ -183,7 +157,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
ArrayAdapter<String> adapterLicenses = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
ArrayAdapter<String> adapterLicenses = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, licensesA);
|
android.R.layout.simple_spinner_dropdown_item, licensesA);
|
||||||
set_upload_licenses.setAdapter(adapterLicenses);
|
binding.setUploadLicenses.setAdapter(adapterLicenses);
|
||||||
|
|
||||||
|
|
||||||
//Populate languages
|
//Populate languages
|
||||||
@ -201,7 +175,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
ArrayAdapter<String> adapterLanguages = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
ArrayAdapter<String> adapterLanguages = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, languagesA);
|
android.R.layout.simple_spinner_dropdown_item, languagesA);
|
||||||
set_upload_languages.setAdapter(adapterLanguages);
|
binding.setUploadLanguages.setAdapter(adapterLanguages);
|
||||||
|
|
||||||
|
|
||||||
//Populate languages
|
//Populate languages
|
||||||
@ -220,18 +194,19 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
ArrayAdapter<String> adapterPrivacies = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
ArrayAdapter<String> adapterPrivacies = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, privaciesA);
|
android.R.layout.simple_spinner_dropdown_item, privaciesA);
|
||||||
set_upload_privacy.setAdapter(adapterPrivacies);
|
binding.setUploadPrivacy.setAdapter(adapterPrivacies);
|
||||||
|
|
||||||
|
|
||||||
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeEditUploadActivity.this).get(TimelineVM.class);
|
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeEditUploadActivity.this).get(TimelineVM.class);
|
||||||
feedsViewModel.getMyVideo(null, videoId).observe(PeertubeEditUploadActivity.this, this::manageVIewVideo);
|
feedsViewModel.getMyVideo(null, videoId).observe(PeertubeEditUploadActivity.this, this::manageVIewVideo);
|
||||||
|
|
||||||
channels = new LinkedHashMap<>();
|
channels = new LinkedHashMap<>();
|
||||||
|
|
||||||
setTitle(R.string.edit_video);
|
setTitle(R.string.edit_video);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void manageUpdate(APIResponse apiResponse) {
|
public void manageUpdate(APIResponse apiResponse) {
|
||||||
set_upload_submit.setEnabled(true);
|
binding.setUploadSubmit.setEnabled(true);
|
||||||
if (apiResponse.getError() != null) {
|
if (apiResponse.getError() != null) {
|
||||||
if (apiResponse.getError() != null && apiResponse.getError().getError() != null)
|
if (apiResponse.getError() != null && apiResponse.getError().getError() != null)
|
||||||
Toasty.error(PeertubeEditUploadActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
Toasty.error(PeertubeEditUploadActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||||
@ -247,7 +222,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
Toasty.error(PeertubeEditUploadActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
Toasty.error(PeertubeEditUploadActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||||
else
|
else
|
||||||
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
set_upload_submit.setEnabled(true);
|
binding.setUploadSubmit.setEnabled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,11 +238,11 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
categoryToSend = video.getCategory();
|
categoryToSend = video.getCategory();
|
||||||
|
|
||||||
if (video.getThumbnailPath() != null) {
|
if (video.getThumbnailPath() != null) {
|
||||||
Helper.loadGiF(PeertubeEditUploadActivity.this, video.getThumbnailPath(), p_video_preview);
|
Helper.loadGiF(PeertubeEditUploadActivity.this, video.getThumbnailPath(), binding.pVideoPreview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
set_preview.setOnClickListener(v -> {
|
binding.setPreview.setOnClickListener(v -> {
|
||||||
if (ContextCompat.checkSelfPermission(PeertubeEditUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
if (ContextCompat.checkSelfPermission(PeertubeEditUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
||||||
PackageManager.PERMISSION_GRANTED) {
|
PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(PeertubeEditUploadActivity.this,
|
ActivityCompat.requestPermissions(PeertubeEditUploadActivity.this,
|
||||||
@ -324,11 +299,28 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
boolean commentEnabled = video.isCommentsEnabled();
|
boolean commentEnabled = video.isCommentsEnabled();
|
||||||
boolean isNSFW = video.isNsfw();
|
boolean isNSFW = video.isNsfw();
|
||||||
|
|
||||||
set_upload_enable_comments.setChecked(commentEnabled);
|
binding.setUploadEnableComments.setChecked(commentEnabled);
|
||||||
set_upload_nsfw.setChecked(isNSFW);
|
binding.setUploadNsfw.setChecked(isNSFW);
|
||||||
|
|
||||||
p_video_title.setText(title);
|
binding.pVideoTitle.setText(title);
|
||||||
p_video_description.setText(video.getDescription());
|
binding.pVideoDescription.setText(video.getDescription());
|
||||||
|
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
RetrofitPeertubeAPI api;
|
||||||
|
api = new RetrofitPeertubeAPI(PeertubeEditUploadActivity.this);
|
||||||
|
VideoData.Description description = api.getVideoDescription(video.getUuid());
|
||||||
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
|
Runnable myRunnable = () -> {
|
||||||
|
if (description != null) {
|
||||||
|
binding.pVideoDescription.setText(description.getDescription());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mainHandler.post(myRunnable);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
LinkedHashMap<Integer, String> categories = new LinkedHashMap<>(peertubeInformation.getCategories());
|
LinkedHashMap<Integer, String> categories = new LinkedHashMap<>(peertubeInformation.getCategories());
|
||||||
LinkedHashMap<Integer, String> licences = new LinkedHashMap<>(peertubeInformation.getLicences());
|
LinkedHashMap<Integer, String> licences = new LinkedHashMap<>(peertubeInformation.getLicences());
|
||||||
@ -382,7 +374,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Manage privacies
|
//Manage privacies
|
||||||
set_upload_privacy.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadPrivacy.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
updatePrivacyPosition(position);
|
updatePrivacyPosition(position);
|
||||||
@ -393,7 +385,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
set_upload_licenses.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadLicenses.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
updateLicensePosition(position);
|
updateLicensePosition(position);
|
||||||
@ -405,7 +397,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
//Manage categories
|
//Manage categories
|
||||||
set_upload_categories.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadCategories.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
updateCategoryPosition(position);
|
updateCategoryPosition(position);
|
||||||
@ -418,7 +410,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Manage languages
|
//Manage languages
|
||||||
set_upload_languages.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadLanguages.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
updateLanguagesPosition(position);
|
updateLanguagesPosition(position);
|
||||||
@ -430,7 +422,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
//Manage languages
|
//Manage languages
|
||||||
set_upload_channel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadChannel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
|
||||||
@ -447,11 +439,11 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
Item finalLicenseToSend = licenseToSend;
|
Item finalLicenseToSend = licenseToSend;
|
||||||
ItemStr finalLanguageToSend = languageToSend;
|
ItemStr finalLanguageToSend = languageToSend;
|
||||||
Item finalPrivacyToSend = privacyToSend;
|
Item finalPrivacyToSend = privacyToSend;
|
||||||
set_upload_submit.setOnClickListener(v -> {
|
binding.setUploadSubmit.setOnClickListener(v -> {
|
||||||
String title1 = p_video_title.getText().toString().trim();
|
String title1 = binding.pVideoTitle.getText() != null ? binding.pVideoTitle.getText().toString().trim() : "";
|
||||||
String description = p_video_description.getText().toString().trim();
|
String description = binding.pVideoDescription.getText() != null ? binding.pVideoDescription.getText().toString().trim() : "";
|
||||||
boolean isNSFW1 = set_upload_nsfw.isChecked();
|
boolean isNSFW1 = binding.setUploadNsfw.isChecked();
|
||||||
boolean commentEnabled1 = set_upload_enable_comments.isChecked();
|
boolean commentEnabled1 = binding.setUploadEnableComments.isChecked();
|
||||||
videoParams = new VideoParams();
|
videoParams = new VideoParams();
|
||||||
videoParams.setName(title1);
|
videoParams.setName(title1);
|
||||||
videoParams.setDescription(description);
|
videoParams.setDescription(description);
|
||||||
@ -460,28 +452,27 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
videoParams.setCategory(finalCategoryToSend.getId());
|
videoParams.setCategory(finalCategoryToSend.getId());
|
||||||
videoParams.setLicence(String.valueOf(finalLicenseToSend.getId()));
|
videoParams.setLicence(String.valueOf(finalLicenseToSend.getId()));
|
||||||
videoParams.setLanguage(finalLanguageToSend.getId());
|
videoParams.setLanguage(finalLanguageToSend.getId());
|
||||||
|
|
||||||
videoParams.setChannelId(channelToSendId);
|
videoParams.setChannelId(channelToSendId);
|
||||||
videoParams.setPrivacy(finalPrivacyToSend.getId());
|
videoParams.setPrivacy(finalPrivacyToSend.getId());
|
||||||
List<String> tags = p_video_tags.getTags();
|
List<String> tags = binding.pVideoTags.getTags();
|
||||||
videoParams.setTags(tags);
|
videoParams.setTags(tags);
|
||||||
set_upload_submit.setEnabled(false);
|
binding.setUploadSubmit.setEnabled(false);
|
||||||
MyVideoVM myVideoVM = new ViewModelProvider(PeertubeEditUploadActivity.this).get(MyVideoVM.class);
|
MyVideoVM myVideoVM = new ViewModelProvider(PeertubeEditUploadActivity.this).get(MyVideoVM.class);
|
||||||
myVideoVM.updateVideo(videoId, videoParams, null, null).observe(PeertubeEditUploadActivity.this, this::manageUpdate);
|
myVideoVM.updateVideo(videoId, videoParams, inputData, inputData).observe(PeertubeEditUploadActivity.this, this::manageUpdate);
|
||||||
});
|
});
|
||||||
|
|
||||||
set_upload_privacy.setSelection(privacyPosition, false);
|
binding.setUploadPrivacy.setSelection(privacyPosition, false);
|
||||||
updatePrivacyPosition(privacyPosition);
|
updatePrivacyPosition(privacyPosition);
|
||||||
set_upload_languages.setSelection(languagePosition, false);
|
binding.setUploadLanguages.setSelection(languagePosition, false);
|
||||||
updateLanguagesPosition(languagePosition);
|
updateLanguagesPosition(languagePosition);
|
||||||
set_upload_licenses.setSelection(licensePosition, false);
|
binding.setUploadLicenses.setSelection(licensePosition, false);
|
||||||
updateLicensePosition(licensePosition);
|
updateLicensePosition(licensePosition);
|
||||||
set_upload_categories.setSelection(categoryPosition, false);
|
binding.setUploadCategories.setSelection(categoryPosition, false);
|
||||||
updateCategoryPosition(categoryPosition);
|
updateCategoryPosition(categoryPosition);
|
||||||
|
|
||||||
List<String> tags = video.getTags();
|
List<String> tags = video.getTags();
|
||||||
if (tags != null && tags.size() > 0) {
|
if (tags != null && tags.size() > 0) {
|
||||||
p_video_tags.setTags(tags.toArray(new String[0]));
|
binding.pVideoTags.setTags(tags.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,53 +563,12 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UploadNotificationConfig uploadConfig = new UploadNotificationConfig();
|
inputData = data.getData();
|
||||||
uploadConfig.getCompleted().autoClear = true;
|
|
||||||
try {
|
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
|
||||||
Uri uri = data.getData();
|
|
||||||
try {
|
|
||||||
String uploadId = UUID.randomUUID().toString();
|
|
||||||
new MultipartUploadRequest(PeertubeEditUploadActivity.this, uploadId, "https://" + Helper.getLiveInstance(PeertubeEditUploadActivity.this) + "/api/v1/" + String.format("/videos/%s", video.getId()))
|
|
||||||
.addFileToUpload(uri.toString().replace("file://", ""), "thumbnailfile")
|
|
||||||
.setMethod("PUT")
|
|
||||||
.addHeader("Authorization", "Bearer " + token)
|
|
||||||
.setNotificationConfig(uploadConfig)
|
|
||||||
.setMaxRetries(2)
|
|
||||||
.setDelegate(new UploadStatusDelegate() {
|
|
||||||
@Override
|
|
||||||
public void onProgress(Context context, UploadInfo uploadInfo) {
|
|
||||||
// your code here
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Context context, UploadInfo uploadInfo, ServerResponse serverResponse,
|
|
||||||
Exception exception) {
|
|
||||||
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCompleted(Context context, UploadInfo uploadInfo, ServerResponse serverResponse) {
|
|
||||||
Glide.with(PeertubeEditUploadActivity.this)
|
Glide.with(PeertubeEditUploadActivity.this)
|
||||||
.load(uri)
|
.load(data.getData())
|
||||||
.into(p_video_preview);
|
.thumbnail(0.1f)
|
||||||
}
|
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||||
|
.into(binding.pVideoPreview);
|
||||||
@Override
|
|
||||||
public void onCancelled(Context context, UploadInfo uploadInfo) {
|
|
||||||
// your code here
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.startUpload();
|
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -651,7 +601,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
ArrayAdapter<String> adapterChannel = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
ArrayAdapter<String> adapterChannel = new ArrayAdapter<>(PeertubeEditUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, channelName);
|
android.R.layout.simple_spinner_dropdown_item, channelName);
|
||||||
set_upload_channel.setAdapter(adapterChannel);
|
binding.setUploadChannel.setAdapter(adapterChannel);
|
||||||
int channelPosition = 0;
|
int channelPosition = 0;
|
||||||
if (channels.containsKey(channel.getName())) {
|
if (channels.containsKey(channel.getName())) {
|
||||||
LinkedHashMap<String, String> channelsIterator = new LinkedHashMap<>(channels);
|
LinkedHashMap<String, String> channelsIterator = new LinkedHashMap<>(channels);
|
||||||
@ -666,9 +616,15 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
channelPosition++;
|
channelPosition++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_upload_channel.setSelection(channelPosition, false);
|
binding.setUploadChannel.setSelection(channelPosition, false);
|
||||||
updateUploadChannel(channelPosition);
|
updateUploadChannel(channelPosition);
|
||||||
set_upload_submit.setEnabled(true);
|
binding.setUploadSubmit.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
super.onBackPressed();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
@SuppressWarnings({"unused", "RedundantSuppression"})
|
||||||
|
@ -21,46 +21,45 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.database.Cursor;
|
import android.graphics.Color;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.OpenableColumns;
|
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.documentfile.provider.DocumentFile;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
import net.gotev.uploadservice.MultipartUploadRequest;
|
|
||||||
import net.gotev.uploadservice.UploadNotificationAction;
|
|
||||||
import net.gotev.uploadservice.UploadNotificationConfig;
|
|
||||||
|
|
||||||
import java.io.File;
|
import net.gotev.uploadservice.data.UploadNotificationAction;
|
||||||
|
import net.gotev.uploadservice.data.UploadNotificationConfig;
|
||||||
|
import net.gotev.uploadservice.data.UploadNotificationStatusConfig;
|
||||||
|
import net.gotev.uploadservice.extensions.ContextExtensionsKt;
|
||||||
|
import net.gotev.uploadservice.protocols.multipart.MultipartUploadRequest;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.client.APIResponse;
|
import app.fedilab.fedilabtube.client.APIResponse;
|
||||||
import app.fedilab.fedilabtube.client.data.ChannelData;
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
|
import app.fedilab.fedilabtube.databinding.ActivityPeertubeUploadBinding;
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
||||||
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class PeertubeUploadActivity extends AppCompatActivity {
|
public class PeertubeUploadActivity extends AppCompatActivity {
|
||||||
@ -68,16 +67,12 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public static final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 724;
|
public static final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 724;
|
||||||
private final int PICK_IVDEO = 52378;
|
private final int PICK_IVDEO = 52378;
|
||||||
private Button set_upload_file, set_upload_submit;
|
|
||||||
private Spinner set_upload_privacy, set_upload_channel;
|
|
||||||
private TextView set_upload_file_name;
|
|
||||||
private EditText video_title;
|
|
||||||
private HashMap<String, String> channels;
|
private HashMap<String, String> channels;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
private String filename;
|
private String filename;
|
||||||
private HashMap<Integer, String> privacyToSend;
|
private HashMap<Integer, String> privacyToSend;
|
||||||
private HashMap<String, String> channelToSend;
|
private HashMap<String, String> channelToSend;
|
||||||
|
private ActivityPeertubeUploadBinding binding;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -86,14 +81,10 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
if (getSupportActionBar() != null)
|
if (getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
setContentView(R.layout.activity_peertube_upload);
|
binding = ActivityPeertubeUploadBinding.inflate(getLayoutInflater());
|
||||||
|
View view = binding.getRoot();
|
||||||
|
setContentView(view);
|
||||||
|
|
||||||
set_upload_file = findViewById(R.id.set_upload_file);
|
|
||||||
set_upload_file_name = findViewById(R.id.set_upload_file_name);
|
|
||||||
set_upload_channel = findViewById(R.id.set_upload_channel);
|
|
||||||
set_upload_privacy = findViewById(R.id.set_upload_privacy);
|
|
||||||
set_upload_submit = findViewById(R.id.set_upload_submit);
|
|
||||||
video_title = findViewById(R.id.video_title);
|
|
||||||
|
|
||||||
ChannelsVM viewModelC = new ViewModelProvider(PeertubeUploadActivity.this).get(ChannelsVM.class);
|
ChannelsVM viewModelC = new ViewModelProvider(PeertubeUploadActivity.this).get(ChannelsVM.class);
|
||||||
viewModelC.get(MY_CHANNELS, null).observe(PeertubeUploadActivity.this, this::manageVIewChannels);
|
viewModelC.get(MY_CHANNELS, null).observe(PeertubeUploadActivity.this, this::manageVIewChannels);
|
||||||
@ -109,33 +100,18 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
Toasty.error(PeertubeUploadActivity.this, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
Toasty.error(PeertubeUploadActivity.this, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
set_upload_submit.setEnabled(true);
|
binding.setUploadSubmit.setEnabled(true);
|
||||||
|
|
||||||
uri = data.getData();
|
uri = data.getData();
|
||||||
|
|
||||||
String uriString = uri.toString();
|
|
||||||
File myFile = new File(uriString);
|
|
||||||
filename = null;
|
filename = null;
|
||||||
if (uriString.startsWith("content://")) {
|
DocumentFile documentFile = DocumentFile.fromSingleUri(this, uri);
|
||||||
Cursor cursor = null;
|
if (documentFile != null) {
|
||||||
try {
|
filename = documentFile.getName();
|
||||||
cursor = getContentResolver().query(uri, null, null, null, null);
|
|
||||||
if (cursor != null && cursor.moveToFirst()) {
|
|
||||||
filename = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
assert cursor != null;
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
} else if (uriString.startsWith("file://")) {
|
|
||||||
filename = myFile.getName();
|
|
||||||
}
|
}
|
||||||
if (filename == null) {
|
if (filename == null) {
|
||||||
filename = new Date().toString();
|
filename = new Date().toString();
|
||||||
}
|
}
|
||||||
set_upload_file_name.setVisibility(View.VISIBLE);
|
binding.setUploadFileName.setVisibility(View.VISIBLE);
|
||||||
set_upload_file_name.setText(filename);
|
binding.setUploadFileName.setText(filename);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +155,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
channelToSend.put(channelName[0], channelId[0]);
|
channelToSend.put(channelName[0], channelId[0]);
|
||||||
ArrayAdapter<String> adapterChannel = new ArrayAdapter<>(PeertubeUploadActivity.this,
|
ArrayAdapter<String> adapterChannel = new ArrayAdapter<>(PeertubeUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, channelName);
|
android.R.layout.simple_spinner_dropdown_item, channelName);
|
||||||
set_upload_channel.setAdapter(adapterChannel);
|
binding.setUploadChannel.setAdapter(adapterChannel);
|
||||||
|
|
||||||
if (peertubeInformation == null) {
|
if (peertubeInformation == null) {
|
||||||
return;
|
return;
|
||||||
@ -209,10 +185,10 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
ArrayAdapter<String> adapterPrivacies = new ArrayAdapter<>(PeertubeUploadActivity.this,
|
ArrayAdapter<String> adapterPrivacies = new ArrayAdapter<>(PeertubeUploadActivity.this,
|
||||||
android.R.layout.simple_spinner_dropdown_item, privaciesA);
|
android.R.layout.simple_spinner_dropdown_item, privaciesA);
|
||||||
set_upload_privacy.setAdapter(adapterPrivacies);
|
binding.setUploadPrivacy.setAdapter(adapterPrivacies);
|
||||||
|
|
||||||
//Manage privacies
|
//Manage privacies
|
||||||
set_upload_privacy.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadPrivacy.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
LinkedHashMap<Integer, String> privaciesCheck = new LinkedHashMap<>(peertubeInformation.getPrivacies());
|
LinkedHashMap<Integer, String> privaciesCheck = new LinkedHashMap<>(peertubeInformation.getPrivacies());
|
||||||
@ -235,9 +211,9 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
set_upload_file.setEnabled(true);
|
binding.setUploadFile.setEnabled(true);
|
||||||
|
|
||||||
set_upload_file.setOnClickListener(v -> {
|
binding.setUploadFile.setOnClickListener(v -> {
|
||||||
if (ContextCompat.checkSelfPermission(PeertubeUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
if (ContextCompat.checkSelfPermission(PeertubeUploadActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
||||||
PackageManager.PERMISSION_GRANTED) {
|
PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(PeertubeUploadActivity.this,
|
ActivityCompat.requestPermissions(PeertubeUploadActivity.this,
|
||||||
@ -245,7 +221,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
|
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
intent.setType("*/*");
|
intent.setType("*/*");
|
||||||
String[] mimetypes = {"video/*"};
|
String[] mimetypes = {"video/*"};
|
||||||
@ -255,7 +231,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Manage languages
|
//Manage languages
|
||||||
set_upload_channel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
binding.setUploadChannel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
LinkedHashMap<String, String> channelsCheck = new LinkedHashMap<>(channels);
|
LinkedHashMap<String, String> channelsCheck = new LinkedHashMap<>(channels);
|
||||||
@ -279,44 +255,33 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
set_upload_submit.setOnClickListener(v -> {
|
binding.setUploadSubmit.setOnClickListener(v -> {
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
Map.Entry<String, String> channelM = channelToSend.entrySet().iterator().next();
|
Map.Entry<String, String> channelM = channelToSend.entrySet().iterator().next();
|
||||||
String idChannel = channelM.getValue();
|
String idChannel = channelM.getValue();
|
||||||
Map.Entry<Integer, String> privacyM = privacyToSend.entrySet().iterator().next();
|
Map.Entry<Integer, String> privacyM = privacyToSend.entrySet().iterator().next();
|
||||||
Integer idPrivacy = privacyM.getKey();
|
Integer idPrivacy = privacyM.getKey();
|
||||||
|
if (binding.videoTitle.getText() != null && binding.videoTitle.getText().toString().trim().length() > 0) {
|
||||||
|
filename = binding.videoTitle.getText().toString().trim();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
||||||
UploadNotificationConfig uploadConfig = new UploadNotificationConfig();
|
|
||||||
Intent in = new Intent(PeertubeUploadActivity.this, PeertubeEditUploadActivity.class);
|
|
||||||
PendingIntent clickIntent = PendingIntent.getActivity(PeertubeUploadActivity.this, 1, in, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
||||||
uploadConfig
|
|
||||||
.setClearOnActionForAllStatuses(true);
|
|
||||||
|
|
||||||
|
new MultipartUploadRequest(PeertubeUploadActivity.this, "https://" + Helper.getLiveInstance(PeertubeUploadActivity.this) + "/api/v1/videos/upload")
|
||||||
uploadConfig.getProgress().message = getString(R.string.uploading);
|
.setMethod("POST")
|
||||||
uploadConfig.getCompleted().message = getString(R.string.upload_video_success);
|
.setBearerAuth(token)
|
||||||
uploadConfig.getError().message = getString(R.string.toast_error);
|
.addHeader("User-Agent", getString(R.string.app_name) + "/" + BuildConfig.VERSION_NAME)
|
||||||
uploadConfig.getCancelled().message = getString(R.string.toast_cancelled);
|
|
||||||
uploadConfig.getCompleted().actions.add(new UploadNotificationAction(R.drawable.ic_baseline_check_24, getString(R.string.video_uploaded_action), clickIntent));
|
|
||||||
|
|
||||||
if (video_title != null && video_title.getText() != null && video_title.getText().toString().trim().length() > 0) {
|
|
||||||
filename = video_title.getText().toString().trim();
|
|
||||||
}
|
|
||||||
String uploadId = UUID.randomUUID().toString();
|
|
||||||
new MultipartUploadRequest(PeertubeUploadActivity.this, uploadId, "https://" + Helper.getLiveInstance(PeertubeUploadActivity.this) + "/api/v1/videos/upload")
|
|
||||||
.addFileToUpload(uri.toString().replace("file://", ""), "videofile")
|
|
||||||
.addHeader("Authorization", "Bearer " + token)
|
|
||||||
.setNotificationConfig(uploadConfig)
|
|
||||||
.addParameter("name", filename)
|
|
||||||
.addParameter("channelId", idChannel)
|
|
||||||
.addParameter("privacy", String.valueOf(idPrivacy))
|
.addParameter("privacy", String.valueOf(idPrivacy))
|
||||||
.addParameter("nsfw", "false")
|
.addParameter("nsfw", "false")
|
||||||
|
.addParameter("name", filename)
|
||||||
.addParameter("commentsEnabled", "true")
|
.addParameter("commentsEnabled", "true")
|
||||||
|
.addParameter("downloadEnabled", "true")
|
||||||
.addParameter("waitTranscoding", "true")
|
.addParameter("waitTranscoding", "true")
|
||||||
.setMaxRetries(3)
|
.addParameter("channelId", idChannel)
|
||||||
|
.addFileToUpload(uri.toString(), "videofile")
|
||||||
|
.setNotificationConfig((context, uploadId) -> getNotificationConfig(uploadId))
|
||||||
|
.setMaxRetries(2)
|
||||||
.startUpload();
|
.startUpload();
|
||||||
finish();
|
finish();
|
||||||
} catch (Exception exc) {
|
} catch (Exception exc) {
|
||||||
@ -325,4 +290,74 @@ public class PeertubeUploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UploadNotificationConfig getNotificationConfig(String uploadId) {
|
||||||
|
PendingIntent clickIntent = PendingIntent.getActivity(
|
||||||
|
PeertubeUploadActivity.this, 1, new Intent(this, PeertubeEditUploadActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
|
final boolean autoClear = false;
|
||||||
|
final boolean clearOnAction = true;
|
||||||
|
final boolean ringToneEnabled = true;
|
||||||
|
final ArrayList<UploadNotificationAction> noActions = new ArrayList<>(1);
|
||||||
|
|
||||||
|
final UploadNotificationAction cancelAction = new UploadNotificationAction(
|
||||||
|
R.drawable.ic_baseline_cancel_24,
|
||||||
|
getString(R.string.cancel),
|
||||||
|
ContextExtensionsKt.getCancelUploadIntent(this, uploadId)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
final ArrayList<UploadNotificationAction> progressActions = new ArrayList<>(1);
|
||||||
|
progressActions.add(cancelAction);
|
||||||
|
|
||||||
|
UploadNotificationStatusConfig progress = new UploadNotificationStatusConfig(
|
||||||
|
getString(R.string.app_name),
|
||||||
|
getString(R.string.uploading),
|
||||||
|
R.drawable.ic_baseline_cloud_upload_24,
|
||||||
|
Color.BLUE,
|
||||||
|
null,
|
||||||
|
clickIntent,
|
||||||
|
progressActions,
|
||||||
|
clearOnAction,
|
||||||
|
autoClear
|
||||||
|
);
|
||||||
|
|
||||||
|
UploadNotificationStatusConfig success = new UploadNotificationStatusConfig(
|
||||||
|
getString(R.string.app_name),
|
||||||
|
getString(R.string.upload_video_success),
|
||||||
|
R.drawable.ic_baseline_check_24,
|
||||||
|
Color.GREEN,
|
||||||
|
null,
|
||||||
|
clickIntent,
|
||||||
|
noActions,
|
||||||
|
clearOnAction,
|
||||||
|
autoClear
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
UploadNotificationStatusConfig error = new UploadNotificationStatusConfig(
|
||||||
|
getString(R.string.app_name),
|
||||||
|
getString(R.string.toast_error),
|
||||||
|
R.drawable.ic_baseline_error_24,
|
||||||
|
Color.RED,
|
||||||
|
null,
|
||||||
|
clickIntent,
|
||||||
|
noActions,
|
||||||
|
clearOnAction,
|
||||||
|
autoClear
|
||||||
|
);
|
||||||
|
|
||||||
|
UploadNotificationStatusConfig cancelled = new UploadNotificationStatusConfig(
|
||||||
|
getString(R.string.app_name),
|
||||||
|
getString(R.string.toast_cancelled),
|
||||||
|
R.drawable.ic_baseline_cancel_24,
|
||||||
|
Color.YELLOW,
|
||||||
|
null,
|
||||||
|
clickIntent,
|
||||||
|
noActions,
|
||||||
|
clearOnAction
|
||||||
|
);
|
||||||
|
|
||||||
|
return new UploadNotificationConfig(FedilabTube.UPLOAD_CHANNEL_ID, ringToneEnabled, progress, success, error, cancelled);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,8 @@ import app.fedilab.fedilabtube.fragment.DisplaySepiaSearchFragment;
|
|||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import mabbas007.tagsedittext.TagsEditText;
|
import mabbas007.tagsedittext.TagsEditText;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
|
||||||
import static app.fedilab.fedilabtube.PeertubeActivity.hideKeyboard;
|
import static app.fedilab.fedilabtube.PeertubeActivity.hideKeyboard;
|
||||||
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class SepiaSearchActivity extends AppCompatActivity {
|
public class SepiaSearchActivity extends AppCompatActivity {
|
||||||
|
@ -131,6 +131,11 @@ public class VideosTimelineActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
super.onBackPressed();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
package app.fedilab.fedilabtube.client;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
public class MenuItemVideo {
|
||||||
|
|
||||||
|
int icon;
|
||||||
|
String title;
|
||||||
|
actionType action;
|
||||||
|
|
||||||
|
public int getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(int icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public actionType getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAction(actionType action) {
|
||||||
|
this.action = action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum actionType {
|
||||||
|
RESOLUTION,
|
||||||
|
SPEED,
|
||||||
|
CAPTION,
|
||||||
|
AUTONEXT
|
||||||
|
}
|
||||||
|
}
|
@ -142,6 +142,13 @@ public interface PeertubeService {
|
|||||||
@Field("nsfwPolicy") String nsfwPolicy
|
@Field("nsfwPolicy") String nsfwPolicy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@Multipart
|
||||||
|
@POST("video-channels/{channelHandle}/avatar/pick")
|
||||||
|
Call<UserMe.AvatarResponse> updateChannelProfilePicture(
|
||||||
|
@Header("Authorization") String credentials,
|
||||||
|
@Path("channelHandle") String channelHandle,
|
||||||
|
@Part MultipartBody.Part avatarfile);
|
||||||
|
|
||||||
@Multipart
|
@Multipart
|
||||||
@POST("users/me/avatar/pick")
|
@POST("users/me/avatar/pick")
|
||||||
Call<UserMe.AvatarResponse> updateProfilePicture(
|
Call<UserMe.AvatarResponse> updateProfilePicture(
|
||||||
|
@ -19,10 +19,17 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
|
|
||||||
|
import androidx.documentfile.provider.DocumentFile;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -559,22 +566,7 @@ public class RetrofitPeertubeAPI {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
if (userSettings.getAvatarfile() != null) {
|
if (userSettings.getAvatarfile() != null) {
|
||||||
InputStream inputStream = _context.getContentResolver().openInputStream(userSettings.getAvatarfile());
|
MultipartBody.Part bodyThumbnail = createFile("avatarfile", userSettings.getAvatarfile(), userSettings.getFileName());
|
||||||
ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
|
|
||||||
int bufferSize = 1024;
|
|
||||||
byte[] buffer = new byte[bufferSize];
|
|
||||||
|
|
||||||
int len;
|
|
||||||
while ((len = inputStream.read(buffer)) != -1) {
|
|
||||||
byteBuffer.write(buffer, 0, len);
|
|
||||||
}
|
|
||||||
byte[] imageBytes = byteBuffer.toByteArray();
|
|
||||||
String mime = MimeTypeMap.getFileExtensionFromUrl(userSettings.getAvatarfile().toString());
|
|
||||||
if (mime == null || mime.trim().length() == 0) {
|
|
||||||
mime = "png";
|
|
||||||
}
|
|
||||||
RequestBody requestFile = RequestBody.create(MediaType.parse("image/" + mime), imageBytes);
|
|
||||||
MultipartBody.Part bodyThumbnail = MultipartBody.Part.createFormData("avatarfile", userSettings.getFileName(), requestFile);
|
|
||||||
Call<UserMe.AvatarResponse> updateProfilePicture = peertubeService.updateProfilePicture(getToken(), bodyThumbnail);
|
Call<UserMe.AvatarResponse> updateProfilePicture = peertubeService.updateProfilePicture(getToken(), bodyThumbnail);
|
||||||
Response<UserMe.AvatarResponse> responseAvatar = updateProfilePicture.execute();
|
Response<UserMe.AvatarResponse> responseAvatar = updateProfilePicture.execute();
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
@ -594,6 +586,29 @@ public class RetrofitPeertubeAPI {
|
|||||||
return avatarResponse;
|
return avatarResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private MultipartBody.Part createFile(@NotNull String paramName, @NotNull Uri uri, String filename) throws IOException {
|
||||||
|
|
||||||
|
InputStream inputStream = _context.getContentResolver().openInputStream(uri);
|
||||||
|
ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
|
||||||
|
int bufferSize = 1024;
|
||||||
|
byte[] buffer = new byte[bufferSize];
|
||||||
|
|
||||||
|
int len;
|
||||||
|
while ((len = inputStream.read(buffer)) != -1) {
|
||||||
|
byteBuffer.write(buffer, 0, len);
|
||||||
|
}
|
||||||
|
byte[] imageBytes = byteBuffer.toByteArray();
|
||||||
|
String mime = MimeTypeMap.getFileExtensionFromUrl(uri.toString());
|
||||||
|
if (mime == null || mime.trim().length() == 0) {
|
||||||
|
mime = "png";
|
||||||
|
}
|
||||||
|
if (filename == null) {
|
||||||
|
filename = "my_image." + mime;
|
||||||
|
}
|
||||||
|
RequestBody requestFile = RequestBody.create(imageBytes, MediaType.parse("image/" + mime));
|
||||||
|
return MultipartBody.Part.createFormData(paramName, filename, requestFile);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if users via their uris are following the authenticated user
|
* Check if users via their uris are following the authenticated user
|
||||||
*
|
*
|
||||||
@ -949,34 +964,47 @@ public class RetrofitPeertubeAPI {
|
|||||||
* @param previewfile File preview
|
* @param previewfile File preview
|
||||||
* @return APIResponse
|
* @return APIResponse
|
||||||
*/
|
*/
|
||||||
public APIResponse updateVideo(String videoId, VideoParams videoParams, File thumbnail, File previewfile) {
|
public APIResponse updateVideo(String videoId, VideoParams videoParams, Uri thumbnail, Uri previewfile) {
|
||||||
PeertubeService peertubeService = init();
|
PeertubeService peertubeService = init();
|
||||||
|
|
||||||
MultipartBody.Part bodyThumbnail = null;
|
MultipartBody.Part bodyThumbnail = null;
|
||||||
MultipartBody.Part bodyPreviewfile = null;
|
MultipartBody.Part bodyPreviewfile = null;
|
||||||
|
try {
|
||||||
if (thumbnail != null) {
|
if (thumbnail != null) {
|
||||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), thumbnail);
|
DocumentFile documentFile = DocumentFile.fromSingleUri(_context, thumbnail);
|
||||||
bodyThumbnail = MultipartBody.Part.createFormData("image", thumbnail.getName(), requestFile);
|
String thumbnailName = null;
|
||||||
|
if (documentFile != null) {
|
||||||
|
thumbnailName = documentFile.getName();
|
||||||
}
|
}
|
||||||
if (previewfile != null) {
|
bodyThumbnail = createFile("avatarfile", thumbnail, thumbnailName);
|
||||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), previewfile);
|
|
||||||
bodyPreviewfile = MultipartBody.Part.createFormData("image", previewfile.getName(), requestFile);
|
|
||||||
}
|
}
|
||||||
RequestBody channelId = RequestBody.create(MediaType.parse("text/plain"), videoParams.getChannelId());
|
if (previewfile != null && thumbnail != null) {
|
||||||
RequestBody description = RequestBody.create(MediaType.parse("text/plain"), videoParams.getDescription());
|
DocumentFile documentFile = DocumentFile.fromSingleUri(_context, thumbnail);
|
||||||
RequestBody language = RequestBody.create(MediaType.parse("text/plain"), videoParams.getLanguage());
|
String previewfileName = null;
|
||||||
RequestBody license = RequestBody.create(MediaType.parse("text/plain"), videoParams.getLicence());
|
if (documentFile != null) {
|
||||||
RequestBody name = RequestBody.create(MediaType.parse("text/plain"), videoParams.getName());
|
previewfileName = documentFile.getName();
|
||||||
|
}
|
||||||
|
bodyPreviewfile = createFile("image", previewfile, previewfileName);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
RequestBody channelId = RequestBody.create(videoParams.getChannelId(), MediaType.parse("text/plain"));
|
||||||
|
RequestBody description = RequestBody.create(videoParams.getDescription(), MediaType.parse("text/plain"));
|
||||||
|
RequestBody language = RequestBody.create(videoParams.getLanguage(), MediaType.parse("text/plain"));
|
||||||
|
RequestBody license = RequestBody.create(videoParams.getLicence(), MediaType.parse("text/plain"));
|
||||||
|
RequestBody name = RequestBody.create(videoParams.getName(), MediaType.parse("text/plain"));
|
||||||
|
|
||||||
List<RequestBody> tags = null;
|
List<RequestBody> tags = null;
|
||||||
if (videoParams.getTags() != null && videoParams.getTags().size() > 0) {
|
if (videoParams.getTags() != null && videoParams.getTags().size() > 0) {
|
||||||
tags = new ArrayList<>();
|
tags = new ArrayList<>();
|
||||||
for (String tag : videoParams.getTags()) {
|
for (String tag : videoParams.getTags()) {
|
||||||
tags.add(RequestBody.create(MediaType.parse("text/plain"), tag));
|
tags.add(RequestBody.create(tag, MediaType.parse("text/plain")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RequestBody support = null;
|
RequestBody support = null;
|
||||||
if (videoParams.getSupport() != null) {
|
if (videoParams.getSupport() != null) {
|
||||||
support = RequestBody.create(MediaType.parse("text/plain"), videoParams.getSupport());
|
support = RequestBody.create(videoParams.getSupport(), MediaType.parse("text/plain"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1187,7 +1215,7 @@ public class RetrofitPeertubeAPI {
|
|||||||
* @param channelParams PlaylistParams
|
* @param channelParams PlaylistParams
|
||||||
* @return APIResponse
|
* @return APIResponse
|
||||||
*/
|
*/
|
||||||
public APIResponse createOrUpdateChannel(ChannelsVM.action apiAction, String channelId, ChannelParams channelParams) {
|
public APIResponse createOrUpdateChannel(ChannelsVM.action apiAction, String channelId, ChannelParams channelParams, Uri avatar) {
|
||||||
PeertubeService peertubeService = init();
|
PeertubeService peertubeService = init();
|
||||||
|
|
||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
@ -1210,6 +1238,21 @@ public class RetrofitPeertubeAPI {
|
|||||||
setError(apiResponse, response.code(), response.errorBody());
|
setError(apiResponse, response.code(), response.errorBody());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (avatar != null) {
|
||||||
|
DocumentFile documentFile = DocumentFile.fromSingleUri(_context, avatar);
|
||||||
|
String avatarfileName = null;
|
||||||
|
if (documentFile != null) {
|
||||||
|
avatarfileName = documentFile.getName();
|
||||||
|
}
|
||||||
|
MultipartBody.Part bodyThumbnail = createFile("avatarfile", avatar, avatarfileName);
|
||||||
|
Call<UserMe.AvatarResponse> updateProfilePicture = peertubeService.updateChannelProfilePicture(getToken(), channelId, bodyThumbnail);
|
||||||
|
Response<UserMe.AvatarResponse> responseAvatar = updateProfilePicture.execute();
|
||||||
|
if (responseAvatar.isSuccessful()) {
|
||||||
|
UserMe.AvatarResponse avatarResponse = responseAvatar.body();
|
||||||
|
} else {
|
||||||
|
setError(apiResponse, responseAvatar.code(), responseAvatar.errorBody());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Error error = new Error();
|
Error error = new Error();
|
||||||
error.setError(_context.getString(R.string.toast_error));
|
error.setError(_context.getString(R.string.toast_error));
|
||||||
@ -1339,13 +1382,13 @@ public class RetrofitPeertubeAPI {
|
|||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
MultipartBody.Part body = null;
|
MultipartBody.Part body = null;
|
||||||
if (thumbnail != null) {
|
if (thumbnail != null) {
|
||||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), thumbnail);
|
RequestBody requestFile = RequestBody.create(thumbnail, MediaType.parse("multipart/form-data"));
|
||||||
body = MultipartBody.Part.createFormData("image", thumbnail.getName(), requestFile);
|
body = MultipartBody.Part.createFormData("image", thumbnail.getName(), requestFile);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
RequestBody displayName = RequestBody.create(MediaType.parse("text/plain"), playlistParams.getDisplayName());
|
RequestBody displayName = RequestBody.create(playlistParams.getDisplayName(), MediaType.parse("text/plain"));
|
||||||
RequestBody description = RequestBody.create(MediaType.parse("text/plain"), playlistParams.getDescription());
|
RequestBody description = RequestBody.create(playlistParams.getDescription(), MediaType.parse("text/plain"));
|
||||||
RequestBody channelId = RequestBody.create(MediaType.parse("text/plain"), playlistParams.getVideoChannelId());
|
RequestBody channelId = RequestBody.create(playlistParams.getVideoChannelId(), MediaType.parse("text/plain"));
|
||||||
if (apiAction == PlaylistsVM.action.CREATE_PLAYLIST) {
|
if (apiAction == PlaylistsVM.action.CREATE_PLAYLIST) {
|
||||||
Call<VideoPlaylistData.VideoPlaylistCreation> stringCall = peertubeService.addPlaylist(getToken(), displayName, description, playlistParams.getPrivacy(), channelId, body);
|
Call<VideoPlaylistData.VideoPlaylistCreation> stringCall = peertubeService.addPlaylist(getToken(), displayName, description, playlistParams.getPrivacy(), channelId, body);
|
||||||
Response<VideoPlaylistData.VideoPlaylistCreation> response = stringCall.execute();
|
Response<VideoPlaylistData.VideoPlaylistCreation> response = stringCall.execute();
|
||||||
@ -1621,10 +1664,10 @@ public class RetrofitPeertubeAPI {
|
|||||||
* @param id String id
|
* @param id String id
|
||||||
* @return APIResponse
|
* @return APIResponse
|
||||||
*/
|
*/
|
||||||
public APIResponse getVideos(String id, boolean myVideo) {
|
public APIResponse getVideos(String id, boolean myVideo, boolean canUseToken) {
|
||||||
PeertubeService peertubeService = init();
|
PeertubeService peertubeService = init();
|
||||||
Call<VideoData.Video> video;
|
Call<VideoData.Video> video;
|
||||||
if (myVideo) {
|
if (myVideo || canUseToken) {
|
||||||
video = peertubeService.getMyVideo(getToken(), id);
|
video = peertubeService.getMyVideo(getToken(), id);
|
||||||
} else {
|
} else {
|
||||||
video = peertubeService.getVideo(id);
|
video = peertubeService.getVideo(id);
|
||||||
@ -1632,12 +1675,40 @@ public class RetrofitPeertubeAPI {
|
|||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
try {
|
try {
|
||||||
Response<VideoData.Video> response = video.execute();
|
Response<VideoData.Video> response = video.execute();
|
||||||
|
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
List<VideoData.Video> videos = new ArrayList<>();
|
List<VideoData.Video> videos = new ArrayList<>();
|
||||||
videos.add(response.body());
|
videos.add(response.body());
|
||||||
apiResponse.setPeertubes(videos);
|
apiResponse.setPeertubes(videos);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if (response.errorBody() != null) {
|
||||||
|
|
||||||
|
String error = response.errorBody().string();
|
||||||
|
if (error.contains("originUrl")) {
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = new JSONObject(error);
|
||||||
|
List<VideoData.Video> videos = new ArrayList<>();
|
||||||
|
VideoData.Video videoRedirect = new VideoData.Video();
|
||||||
|
videoRedirect.setErrorCode(jsonObject.getInt("errorCode"));
|
||||||
|
videoRedirect.setOriginUrl(jsonObject.getString("originUrl"));
|
||||||
|
videos.add(videoRedirect);
|
||||||
|
apiResponse.setPeertubes(videos);
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
} else if (error.contains("error")) {
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = new JSONObject(error);
|
||||||
|
List<VideoData.Video> videos = new ArrayList<>();
|
||||||
|
VideoData.Video videoErrorMessage = new VideoData.Video();
|
||||||
|
videoErrorMessage.setErrorMessage(jsonObject.getString("error"));
|
||||||
|
videos.add(videoErrorMessage);
|
||||||
|
apiResponse.setPeertubes(videos);
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Error error = new Error();
|
Error error = new Error();
|
||||||
error.setStatusCode(response.code());
|
error.setStatusCode(response.code());
|
||||||
if (response.errorBody() != null) {
|
if (response.errorBody() != null) {
|
||||||
@ -1646,6 +1717,8 @@ public class RetrofitPeertubeAPI {
|
|||||||
error.setError(_context.getString(R.string.toast_error));
|
error.setError(_context.getString(R.string.toast_error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Error error = new Error();
|
Error error = new Error();
|
||||||
error.setError(_context.getString(R.string.toast_error));
|
error.setError(_context.getString(R.string.toast_error));
|
||||||
|
@ -43,6 +43,7 @@ public class VideoData {
|
|||||||
@SerializedName("data")
|
@SerializedName("data")
|
||||||
public List<Video> data;
|
public List<Video> data;
|
||||||
|
|
||||||
|
|
||||||
public static class Video implements Parcelable {
|
public static class Video implements Parcelable {
|
||||||
public static final Creator<Video> CREATOR = new Creator<Video>() {
|
public static final Creator<Video> CREATOR = new Creator<Video>() {
|
||||||
@Override
|
@Override
|
||||||
@ -130,6 +131,9 @@ public class VideoData {
|
|||||||
@SerializedName("waitTranscoding")
|
@SerializedName("waitTranscoding")
|
||||||
private boolean waitTranscoding;
|
private boolean waitTranscoding;
|
||||||
private String myRating;
|
private String myRating;
|
||||||
|
private String originUrl;
|
||||||
|
private int errorCode;
|
||||||
|
private String errorMessage;
|
||||||
//Dedicated to overview videos to reuse the logic of videos
|
//Dedicated to overview videos to reuse the logic of videos
|
||||||
private boolean hasTitle = false;
|
private boolean hasTitle = false;
|
||||||
private String title;
|
private String title;
|
||||||
@ -541,6 +545,22 @@ public class VideoData {
|
|||||||
this.waitTranscoding = waitTranscoding;
|
this.waitTranscoding = waitTranscoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOriginUrl() {
|
||||||
|
return originUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginUrl(String originUrl) {
|
||||||
|
this.originUrl = originUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getErrorCode() {
|
||||||
|
return errorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorCode(int errorCode) {
|
||||||
|
this.errorCode = errorCode;
|
||||||
|
}
|
||||||
|
|
||||||
public String getMyRating() {
|
public String getMyRating() {
|
||||||
return myRating;
|
return myRating;
|
||||||
}
|
}
|
||||||
@ -581,6 +601,14 @@ public class VideoData {
|
|||||||
this.playlistExists = playlistExists;
|
this.playlistExists = playlistExists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
public UserHistory getUserHistory() {
|
public UserHistory getUserHistory() {
|
||||||
return userHistory;
|
return userHistory;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,92 @@
|
|||||||
|
package app.fedilab.fedilabtube.client.entities;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings({"unused", "RedundantSuppression"})
|
||||||
|
public class MenuItemView {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
private String strId;
|
||||||
|
private String label;
|
||||||
|
private boolean selected;
|
||||||
|
|
||||||
|
public MenuItemView() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuItemView(int id, String label) {
|
||||||
|
this.id = id;
|
||||||
|
this.label = label;
|
||||||
|
selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuItemView(int id, String label, boolean selected) {
|
||||||
|
this.id = id;
|
||||||
|
this.label = label;
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuItemView(String strId, String label, boolean selected) {
|
||||||
|
this.strId = strId;
|
||||||
|
this.label = label;
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuItemView(String strId, String label) {
|
||||||
|
this.strId = strId;
|
||||||
|
this.label = label;
|
||||||
|
this.selected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuItemView(int id, String strId, String label, boolean selected) {
|
||||||
|
this.id = id;
|
||||||
|
this.strId = strId;
|
||||||
|
this.label = label;
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSelected() {
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelected(boolean selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStrId() {
|
||||||
|
return strId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrId(String strId) {
|
||||||
|
this.strId = strId;
|
||||||
|
}
|
||||||
|
}
|
@ -78,12 +78,14 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
public AllCommentRemoved allCommentRemoved;
|
public AllCommentRemoved allCommentRemoved;
|
||||||
boolean isVideoOwner;
|
boolean isVideoOwner;
|
||||||
private Context context;
|
private Context context;
|
||||||
|
private final String instance;
|
||||||
|
|
||||||
public CommentListAdapter(List<Comment> comments, boolean isVideoOwner, boolean isThread) {
|
public CommentListAdapter(List<Comment> comments, boolean isVideoOwner, boolean isThread, String instance) {
|
||||||
this.comments = comments;
|
this.comments = comments;
|
||||||
commentListAdapter = this;
|
commentListAdapter = this;
|
||||||
this.isVideoOwner = isVideoOwner;
|
this.isVideoOwner = isVideoOwner;
|
||||||
this.isThread = isThread;
|
this.isThread = isThread;
|
||||||
|
this.instance = instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -128,7 +130,7 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
if (comment.isReply()) {
|
if (comment.isReply()) {
|
||||||
int ident = CommentDecorationHelper.getIndentation(comment.getInReplyToCommentId(), comments);
|
int ident = CommentDecorationHelper.getIndentation(comment.getInReplyToCommentId(), comments);
|
||||||
holder.decoration.setVisibility(View.VISIBLE);
|
holder.decoration.setVisibility(View.VISIBLE);
|
||||||
params.setMargins((int) Helper.convertDpToPixel(ident * 15, context), 0, 0, 0);
|
params.setMargins((int) Helper.convertDpToPixel(ident * 10, context), 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
holder.decoration.setVisibility(View.GONE);
|
holder.decoration.setVisibility(View.GONE);
|
||||||
params.setMargins(0, 0, 0, 0);
|
params.setMargins(0, 0, 0, 0);
|
||||||
@ -268,8 +270,13 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
|
|
||||||
holder.comment_date.setText(Helper.dateDiff(context, comment.getCreatedAt()));
|
holder.comment_date.setText(Helper.dateDiff(context, comment.getCreatedAt()));
|
||||||
|
|
||||||
|
String avatarUrl;
|
||||||
Helper.loadGiF(context, comment.getAccount().getAvatar() != null ? comment.getAccount().getAvatar().getPath() : null, holder.comment_account_profile);
|
if (instance != null) {
|
||||||
|
avatarUrl = comment.getAccount().getAvatar() != null ? "https://" + instance + comment.getAccount().getAvatar().getPath() : null;
|
||||||
|
} else {
|
||||||
|
avatarUrl = comment.getAccount().getAvatar() != null ? comment.getAccount().getAvatar().getPath() : null;
|
||||||
|
}
|
||||||
|
Helper.loadGiF(context, avatarUrl, holder.comment_account_profile);
|
||||||
|
|
||||||
holder.comment_account_profile.setOnClickListener(v -> {
|
holder.comment_account_profile.setOnClickListener(v -> {
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
|
@ -38,7 +38,7 @@ import app.fedilab.fedilabtube.client.data.InstanceData.Instance;
|
|||||||
import app.fedilab.fedilabtube.helper.RoundedBackgroundSpan;
|
import app.fedilab.fedilabtube.helper.RoundedBackgroundSpan;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
@ -0,0 +1,87 @@
|
|||||||
|
package app.fedilab.fedilabtube.drawer;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.client.MenuItemVideo;
|
||||||
|
import app.fedilab.fedilabtube.databinding.DrawerMenuBinding;
|
||||||
|
|
||||||
|
|
||||||
|
public class MenuAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
|
||||||
|
|
||||||
|
private final List<MenuItemVideo> menuItemVideos;
|
||||||
|
public ItemClicked itemClicked;
|
||||||
|
|
||||||
|
|
||||||
|
public MenuAdapter(List<MenuItemVideo> menuItemVideos) {
|
||||||
|
this.menuItemVideos = menuItemVideos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return menuItemVideos.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
DrawerMenuBinding itemBinding = DrawerMenuBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
|
||||||
|
return new ViewHolder(itemBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, int i) {
|
||||||
|
|
||||||
|
final ViewHolder holder = (ViewHolder) viewHolder;
|
||||||
|
|
||||||
|
final MenuItemVideo menuItemVideo = menuItemVideos.get(i);
|
||||||
|
|
||||||
|
holder.binding.menuIcon.setImageResource(menuItemVideo.getIcon());
|
||||||
|
holder.binding.title.setText(menuItemVideo.getTitle());
|
||||||
|
holder.binding.itemMenuContainer.setOnClickListener(v -> itemClicked.onItemClicked(menuItemVideo.getAction()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ItemClicked {
|
||||||
|
void onItemClicked(MenuItemVideo.actionType actionType);
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
DrawerMenuBinding binding;
|
||||||
|
|
||||||
|
ViewHolder(DrawerMenuBinding itemView) {
|
||||||
|
super(itemView.getRoot());
|
||||||
|
binding = itemView;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package app.fedilab.fedilabtube.drawer;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.client.MenuItemVideo;
|
||||||
|
import app.fedilab.fedilabtube.client.entities.MenuItemView;
|
||||||
|
import app.fedilab.fedilabtube.databinding.DrawerMenuItemBinding;
|
||||||
|
|
||||||
|
|
||||||
|
public class MenuItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
|
||||||
|
private final List<MenuItemView> items;
|
||||||
|
public ItemAction itemAction;
|
||||||
|
MenuItemVideo.actionType actionType;
|
||||||
|
|
||||||
|
public MenuItemAdapter(MenuItemVideo.actionType actionType, List<MenuItemView> items) {
|
||||||
|
this.items = items;
|
||||||
|
this.actionType = actionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return items.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
DrawerMenuItemBinding itemBinding = DrawerMenuItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
|
||||||
|
return new ViewHolder(itemBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, int i) {
|
||||||
|
|
||||||
|
|
||||||
|
final ViewHolder holder = (ViewHolder) viewHolder;
|
||||||
|
|
||||||
|
final MenuItemView item = items.get(i);
|
||||||
|
|
||||||
|
holder.binding.title.setText(item.getLabel());
|
||||||
|
holder.binding.radio.setChecked(item.isSelected());
|
||||||
|
holder.binding.itemMenuContainer.setOnClickListener(v -> itemAction.which(actionType, item));
|
||||||
|
holder.binding.radio.setOnClickListener(v -> itemAction.which(actionType, item));
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ItemAction {
|
||||||
|
void which(MenuItemVideo.actionType actionType, MenuItemView item);
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
DrawerMenuItemBinding binding;
|
||||||
|
|
||||||
|
ViewHolder(DrawerMenuItemBinding itemView) {
|
||||||
|
super(itemView.getRoot());
|
||||||
|
binding = itemView;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -14,10 +14,12 @@ package app.fedilab.fedilabtube.drawer;
|
|||||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
* see <http://www.gnu.org/licenses>. */
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -25,17 +27,24 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.widget.PopupMenu;
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
||||||
import androidx.lifecycle.LifecycleOwner;
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.lifecycle.ViewModelStoreOwner;
|
import androidx.lifecycle.ViewModelStoreOwner;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.RequestBuilder;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -50,11 +59,13 @@ import app.fedilab.fedilabtube.client.data.PlaylistData;
|
|||||||
import app.fedilab.fedilabtube.client.data.VideoData;
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
|
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
|
||||||
import app.fedilab.fedilabtube.client.entities.Report;
|
import app.fedilab.fedilabtube.client.entities.Report;
|
||||||
|
import app.fedilab.fedilabtube.databinding.DrawerPeertubeBinding;
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
||||||
import app.fedilab.fedilabtube.viewmodel.PostActionsVM;
|
import app.fedilab.fedilabtube.viewmodel.PostActionsVM;
|
||||||
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
|
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
import jp.wasabeef.glide.transformations.BlurTransformation;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.FOLLOW;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.FOLLOW;
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.UNFOLLOW;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.UNFOLLOW;
|
||||||
@ -87,8 +98,8 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
context = parent.getContext();
|
context = parent.getContext();
|
||||||
LayoutInflater layoutInflater = LayoutInflater.from(context);
|
DrawerPeertubeBinding itemBinding = DrawerPeertubeBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
|
||||||
return new ViewHolder(layoutInflater.inflate(R.layout.drawer_peertube, parent, false));
|
return new ViewHolder(itemBinding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -120,43 +131,43 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
instance = video.getAccount().getHost();
|
instance = video.getAccount().getHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.peertube_account_name.setText(video.getChannel().getAcct());
|
holder.binding.peertubeAccountName.setText(video.getChannel().getAcct());
|
||||||
Helper.loadGiF(context, instance, video.getChannel().getAvatar() != null ? video.getChannel().getAvatar().getPath() : null, holder.peertube_profile);
|
Helper.loadGiF(context, instance, video.getChannel().getAvatar() != null ? video.getChannel().getAvatar().getPath() : null, holder.binding.peertubeProfile);
|
||||||
|
|
||||||
holder.peertube_title.setText(video.getName());
|
holder.binding.peertubeTitle.setText(video.getName());
|
||||||
holder.peertube_duration.setText(Helper.secondsToString(video.getDuration()));
|
holder.binding.peertubeDuration.setText(Helper.secondsToString(video.getDuration()));
|
||||||
holder.peertube_date.setText(String.format(" - %s", Helper.dateDiff(context, video.getCreatedAt())));
|
holder.binding.peertubeDate.setText(String.format(" - %s", Helper.dateDiff(context, video.getCreatedAt())));
|
||||||
holder.peertube_views.setText(context.getString(R.string.number_view_video, Helper.withSuffix(video.getViews())));
|
holder.binding.peertubeViews.setText(context.getString(R.string.number_view_video, Helper.withSuffix(video.getViews())));
|
||||||
|
|
||||||
boolean blur = sharedpreferences.getString(context.getString(R.string.set_video_sensitive_choice), Helper.BLUR).compareTo("blur") == 0 && video.isNsfw();
|
boolean blur = sharedpreferences.getString(context.getString(R.string.set_video_sensitive_choice), Helper.BLUR).compareTo("blur") == 0 && video.isNsfw();
|
||||||
if (videoInList) {
|
if (videoInList) {
|
||||||
Helper.loadGiF(context, instance, video.getThumbnailPath(), holder.peertube_video_image_small, blur);
|
Helper.loadGiF(context, instance, video.getThumbnailPath(), holder.binding.peertubeVideoImageSmall, blur);
|
||||||
holder.peertube_video_image_small.setVisibility(View.VISIBLE);
|
holder.binding.peertubeVideoImageSmall.setVisibility(View.VISIBLE);
|
||||||
holder.preview_container.setVisibility(View.GONE);
|
holder.binding.previewContainer.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
Helper.loadGiF(context, instance, video.getThumbnailPath(), holder.peertube_video_image, blur);
|
loadImage(holder.binding.peertubeVideoImage, instance, video.getPreviewPath(), video.getThumbnailPath(), blur);
|
||||||
holder.peertube_video_image_small.setVisibility(View.GONE);
|
holder.binding.peertubeVideoImageSmall.setVisibility(View.GONE);
|
||||||
holder.preview_container.setVisibility(View.VISIBLE);
|
holder.binding.previewContainer.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//For Overview Videos: boolean values for displaying title is managed in the fragment
|
//For Overview Videos: boolean values for displaying title is managed in the fragment
|
||||||
if (video.isHasTitle()) {
|
if (video.isHasTitle()) {
|
||||||
holder.header_title.setVisibility(View.VISIBLE);
|
holder.binding.headerTitle.setVisibility(View.VISIBLE);
|
||||||
switch (video.getTitleType()) {
|
switch (video.getTitleType()) {
|
||||||
case TAG:
|
case TAG:
|
||||||
holder.header_title.setText(String.format("#%s", video.getTitle()));
|
holder.binding.headerTitle.setText(String.format("#%s", video.getTitle()));
|
||||||
break;
|
break;
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
case CATEGORY:
|
case CATEGORY:
|
||||||
holder.header_title.setText(String.format("%s", video.getTitle()));
|
holder.binding.headerTitle.setText(String.format("%s", video.getTitle()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
holder.header_title.setVisibility(View.GONE);
|
holder.binding.headerTitle.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ownVideos) {
|
if (!ownVideos) {
|
||||||
holder.peertube_profile.setOnClickListener(v -> {
|
holder.binding.peertubeProfile.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(context, ShowChannelActivity.class);
|
Intent intent = new Intent(context, ShowChannelActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
b.putParcelable("channel", video.getChannel());
|
b.putParcelable("channel", video.getChannel());
|
||||||
@ -170,8 +181,8 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
holder.more_actions.setOnClickListener(view -> {
|
holder.binding.moreActions.setOnClickListener(view -> {
|
||||||
PopupMenu popup = new PopupMenu(context, holder.more_actions);
|
PopupMenu popup = new PopupMenu(context, holder.binding.moreActions);
|
||||||
popup.getMenuInflater()
|
popup.getMenuInflater()
|
||||||
.inflate(R.menu.video_drawer_menu, popup.getMenu());
|
.inflate(R.menu.video_drawer_menu, popup.getMenu());
|
||||||
if (timelineType == MY_VIDEOS) {
|
if (timelineType == MY_VIDEOS) {
|
||||||
@ -256,7 +267,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
});
|
});
|
||||||
popup.show();
|
popup.show();
|
||||||
});
|
});
|
||||||
holder.bottom_container.setOnClickListener(v -> {
|
holder.binding.bottomContainer.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(context, PeertubeActivity.class);
|
Intent intent = new Intent(context, PeertubeActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
b.putString("video_id", video.getId());
|
b.putString("video_id", video.getId());
|
||||||
@ -270,7 +281,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
holder.peertube_video_image.setOnClickListener(v -> {
|
holder.binding.peertubeVideoImage.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(context, PeertubeActivity.class);
|
Intent intent = new Intent(context, PeertubeActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
b.putString("video_id", video.getId());
|
b.putString("video_id", video.getId());
|
||||||
@ -385,29 +396,74 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
Map<String, List<PlaylistExist>> getPlaylist();
|
Map<String, List<PlaylistExist>> getPlaylist();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
|
private void loadImage(ImageView target, String instance, String urlPreview, String thumbnail, boolean blur) {
|
||||||
|
if (urlPreview == null || urlPreview.startsWith("null")) {
|
||||||
|
urlPreview = thumbnail;
|
||||||
|
}
|
||||||
|
if (instance != null) {
|
||||||
|
urlPreview = "https://" + instance + urlPreview;
|
||||||
|
thumbnail = "https://" + instance + thumbnail;
|
||||||
|
} else {
|
||||||
|
urlPreview = "https://" + Helper.getLiveInstance(context) + urlPreview;
|
||||||
|
thumbnail = "https://" + Helper.getLiveInstance(context) + thumbnail;
|
||||||
|
}
|
||||||
|
RequestBuilder<Drawable> requestBuilder = Glide.with(context)
|
||||||
|
.asDrawable();
|
||||||
|
if (blur) {
|
||||||
|
requestBuilder.apply(new RequestOptions().transform(new BlurTransformation(50, 3), new CenterCrop(), new RoundedCorners(10)));
|
||||||
|
} else {
|
||||||
|
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)));
|
||||||
|
}
|
||||||
|
final Drawable[] initialResource = new Drawable[1];
|
||||||
|
String finalUrlPreview = urlPreview;
|
||||||
|
requestBuilder.load(thumbnail).into(
|
||||||
|
new CustomTarget<Drawable>() {
|
||||||
|
@Override
|
||||||
|
public void onResourceReady(@NonNull final Drawable resource, Transition<? super Drawable> transition) {
|
||||||
|
target.setImageDrawable(resource);
|
||||||
|
initialResource[0] = resource;
|
||||||
|
RequestBuilder<Drawable> requestBuilder = Glide.with(context)
|
||||||
|
.asDrawable();
|
||||||
|
if (blur) {
|
||||||
|
requestBuilder.apply(new RequestOptions().transform(new BlurTransformation(50, 3), new CenterCrop(), new RoundedCorners(10)));
|
||||||
|
} else {
|
||||||
|
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)));
|
||||||
|
}
|
||||||
|
requestBuilder.load(finalUrlPreview).into(
|
||||||
|
new CustomTarget<Drawable>() {
|
||||||
|
@Override
|
||||||
|
public void onResourceReady(@NonNull final Drawable resource, Transition<? super Drawable> transition) {
|
||||||
|
target.setImageDrawable(resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||||
|
target.setImageDrawable(initialResource[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
LinearLayout main_container, bottom_container;
|
DrawerPeertubeBinding binding;
|
||||||
ImageView peertube_profile, peertube_video_image, peertube_video_image_small;
|
|
||||||
TextView peertube_account_name, peertube_views, peertube_duration;
|
|
||||||
TextView peertube_title, peertube_date, header_title, more_actions;
|
|
||||||
ConstraintLayout preview_container;
|
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
ViewHolder(DrawerPeertubeBinding itemView) {
|
||||||
super(itemView);
|
super(itemView.getRoot());
|
||||||
peertube_account_name = itemView.findViewById(R.id.peertube_account_name);
|
binding = itemView;
|
||||||
peertube_video_image_small = itemView.findViewById(R.id.peertube_video_image_small);
|
|
||||||
peertube_title = itemView.findViewById(R.id.peertube_title);
|
|
||||||
peertube_video_image = itemView.findViewById(R.id.peertube_video_image);
|
|
||||||
peertube_profile = itemView.findViewById(R.id.peertube_profile);
|
|
||||||
peertube_date = itemView.findViewById(R.id.peertube_date);
|
|
||||||
peertube_views = itemView.findViewById(R.id.peertube_views);
|
|
||||||
peertube_duration = itemView.findViewById(R.id.peertube_duration);
|
|
||||||
main_container = itemView.findViewById(R.id.main_container);
|
|
||||||
header_title = itemView.findViewById(R.id.header_title);
|
|
||||||
bottom_container = itemView.findViewById(R.id.bottom_container);
|
|
||||||
more_actions = itemView.findViewById(R.id.more_actions);
|
|
||||||
preview_container = itemView.findViewById(R.id.preview_container);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,12 @@ package app.fedilab.fedilabtube.fragment;
|
|||||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
* see <http://www.gnu.org/licenses>. */
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
@ -25,20 +29,22 @@ import android.view.ViewGroup;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.core.app.ActivityCompat;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -49,30 +55,37 @@ import app.fedilab.fedilabtube.client.APIResponse;
|
|||||||
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
||||||
import app.fedilab.fedilabtube.client.data.ChannelData;
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
import app.fedilab.fedilabtube.client.entities.ChannelParams;
|
import app.fedilab.fedilabtube.client.entities.ChannelParams;
|
||||||
|
import app.fedilab.fedilabtube.databinding.AddChannelBinding;
|
||||||
|
import app.fedilab.fedilabtube.databinding.FragmentRecyclerviewBinding;
|
||||||
import app.fedilab.fedilabtube.drawer.ChannelListAdapter;
|
import app.fedilab.fedilabtube.drawer.ChannelListAdapter;
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
|
import static app.fedilab.fedilabtube.PeertubeUploadActivity.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE;
|
||||||
|
|
||||||
|
|
||||||
public class DisplayChannelsFragment extends Fragment implements ChannelListAdapter.AllChannelRemoved, ChannelListAdapter.EditAlertDialog {
|
public class DisplayChannelsFragment extends Fragment implements ChannelListAdapter.AllChannelRemoved, ChannelListAdapter.EditAlertDialog {
|
||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
private static final int PICK_AVATAR = 467;
|
||||||
private ChannelListAdapter channelListAdapter;
|
private ChannelListAdapter channelListAdapter;
|
||||||
private List<ChannelData.Channel> channels;
|
private List<ChannelData.Channel> channels;
|
||||||
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
||||||
private SwipeRefreshLayout swipeRefreshLayout;
|
|
||||||
private String name;
|
private String name;
|
||||||
private RecyclerView lv_channels;
|
|
||||||
private View rootView;
|
private View rootView;
|
||||||
private FloatingActionButton action_button;
|
|
||||||
private boolean myChannels;
|
private boolean myChannels;
|
||||||
|
private FloatingActionButton action_button;
|
||||||
|
private FragmentRecyclerviewBinding binding;
|
||||||
|
private AddChannelBinding bindingDialog;
|
||||||
|
private Uri inputData;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
|
||||||
rootView = inflater.inflate(R.layout.fragment_recyclerview, container, false);
|
|
||||||
|
|
||||||
|
binding = FragmentRecyclerviewBinding.inflate(LayoutInflater.from(context));
|
||||||
|
rootView = binding.getRoot();
|
||||||
context = getContext();
|
context = getContext();
|
||||||
Bundle bundle = this.getArguments();
|
Bundle bundle = this.getArguments();
|
||||||
channels = new ArrayList<>();
|
channels = new ArrayList<>();
|
||||||
@ -83,7 +96,6 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
swipeRefreshLayout = rootView.findViewById(R.id.swipeContainer);
|
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
action_button = getActivity().findViewById(R.id.action_button);
|
action_button = getActivity().findViewById(R.id.action_button);
|
||||||
@ -93,8 +105,7 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_channels = rootView.findViewById(R.id.lv_elements);
|
binding.lvElements.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
||||||
lv_channels.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
|
||||||
mainLoader = rootView.findViewById(R.id.loader);
|
mainLoader = rootView.findViewById(R.id.loader);
|
||||||
nextElementLoader = rootView.findViewById(R.id.loading_next);
|
nextElementLoader = rootView.findViewById(R.id.loading_next);
|
||||||
textviewNoAction = rootView.findViewById(R.id.no_action);
|
textviewNoAction = rootView.findViewById(R.id.no_action);
|
||||||
@ -103,13 +114,13 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
channelListAdapter = new ChannelListAdapter(this.channels, myChannels);
|
channelListAdapter = new ChannelListAdapter(this.channels, myChannels);
|
||||||
channelListAdapter.allChannelRemoved = this;
|
channelListAdapter.allChannelRemoved = this;
|
||||||
channelListAdapter.editAlertDialog = this;
|
channelListAdapter.editAlertDialog = this;
|
||||||
lv_channels.setAdapter(channelListAdapter);
|
binding.lvElements.setAdapter(channelListAdapter);
|
||||||
|
|
||||||
final LinearLayoutManager mLayoutManager;
|
final LinearLayoutManager mLayoutManager;
|
||||||
mLayoutManager = new LinearLayoutManager(context);
|
mLayoutManager = new LinearLayoutManager(context);
|
||||||
lv_channels.setLayoutManager(mLayoutManager);
|
binding.lvElements.setLayoutManager(mLayoutManager);
|
||||||
|
|
||||||
swipeRefreshLayout.setOnRefreshListener(this::pullToRefresh);
|
binding.swipeContainer.setOnRefreshListener(this::pullToRefresh);
|
||||||
ChannelsVM viewModel = new ViewModelProvider(this).get(ChannelsVM.class);
|
ChannelsVM viewModel = new ViewModelProvider(this).get(ChannelsVM.class);
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
viewModel.get(RetrofitPeertubeAPI.DataType.CHANNELS_FOR_ACCOUNT, name).observe(DisplayChannelsFragment.this.requireActivity(), this::manageViewChannels);
|
viewModel.get(RetrofitPeertubeAPI.DataType.CHANNELS_FOR_ACCOUNT, name).observe(DisplayChannelsFragment.this.requireActivity(), this::manageViewChannels);
|
||||||
@ -119,6 +130,25 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == PICK_AVATAR && resultCode == Activity.RESULT_OK) {
|
||||||
|
if (data == null || data.getData() == null) {
|
||||||
|
Toasty.error(context, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
inputData = data.getData();
|
||||||
|
Glide.with(context)
|
||||||
|
.load(inputData)
|
||||||
|
.thumbnail(0.1f)
|
||||||
|
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||||
|
.into(bindingDialog.profilePicture);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
@ -153,8 +183,7 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void scrollToTop() {
|
public void scrollToTop() {
|
||||||
if (lv_channels != null)
|
binding.lvElements.setAdapter(channelListAdapter);
|
||||||
lv_channels.setAdapter(channelListAdapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void manageViewChannels(APIResponse apiResponse) {
|
private void manageViewChannels(APIResponse apiResponse) {
|
||||||
@ -162,7 +191,7 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
if (apiResponse.getError() != null) {
|
if (apiResponse.getError() != null) {
|
||||||
Toasty.error(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
Toasty.error(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
binding.swipeContainer.setRefreshing(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<ChannelData.Channel> channels = apiResponse.getChannels();
|
List<ChannelData.Channel> channels = apiResponse.getChannels();
|
||||||
@ -178,18 +207,18 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
channelListAdapter = new ChannelListAdapter(this.channels, myChannels);
|
channelListAdapter = new ChannelListAdapter(this.channels, myChannels);
|
||||||
channelListAdapter.allChannelRemoved = DisplayChannelsFragment.this;
|
channelListAdapter.allChannelRemoved = DisplayChannelsFragment.this;
|
||||||
channelListAdapter.editAlertDialog = DisplayChannelsFragment.this;
|
channelListAdapter.editAlertDialog = DisplayChannelsFragment.this;
|
||||||
lv_channels.setAdapter(channelListAdapter);
|
binding.lvElements.setAdapter(channelListAdapter);
|
||||||
} else {
|
} else {
|
||||||
channelListAdapter.notifyItemRangeChanged(currentPosition, channels.size());
|
channelListAdapter.notifyItemRangeChanged(currentPosition, channels.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
binding.swipeContainer.setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pullToRefresh() {
|
public void pullToRefresh() {
|
||||||
channels = new ArrayList<>();
|
channels = new ArrayList<>();
|
||||||
|
|
||||||
swipeRefreshLayout.setRefreshing(true);
|
binding.swipeContainer.setRefreshing(true);
|
||||||
ChannelsVM viewModel = new ViewModelProvider(this).get(ChannelsVM.class);
|
ChannelsVM viewModel = new ViewModelProvider(this).get(ChannelsVM.class);
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
viewModel.get(RetrofitPeertubeAPI.DataType.CHANNELS_FOR_ACCOUNT, name).observe(DisplayChannelsFragment.this.requireActivity(), this::manageViewChannels);
|
viewModel.get(RetrofitPeertubeAPI.DataType.CHANNELS_FOR_ACCOUNT, name).observe(DisplayChannelsFragment.this.requireActivity(), this::manageViewChannels);
|
||||||
@ -206,48 +235,82 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
|
|
||||||
public void manageAlert(ChannelParams oldChannelValues) {
|
public void manageAlert(ChannelParams oldChannelValues) {
|
||||||
|
|
||||||
|
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
|
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
|
||||||
LayoutInflater inflater1 = ((Activity) context).getLayoutInflater();
|
bindingDialog = AddChannelBinding.inflate(LayoutInflater.from(context), null, false);
|
||||||
View dialogView = inflater1.inflate(R.layout.add_channel, new LinearLayout(context), false);
|
dialogBuilder.setView(bindingDialog.getRoot());
|
||||||
dialogBuilder.setView(dialogView);
|
|
||||||
EditText display_name = dialogView.findViewById(R.id.display_name);
|
|
||||||
EditText name = dialogView.findViewById(R.id.name);
|
|
||||||
EditText description = dialogView.findViewById(R.id.description);
|
|
||||||
if (oldChannelValues != null) {
|
if (oldChannelValues != null) {
|
||||||
display_name.setText(oldChannelValues.getDisplayName());
|
bindingDialog.displayName.setText(oldChannelValues.getDisplayName());
|
||||||
name.setText(oldChannelValues.getName());
|
bindingDialog.name.setText(oldChannelValues.getName());
|
||||||
description.setText(oldChannelValues.getDescription());
|
bindingDialog.description.setText(oldChannelValues.getDescription());
|
||||||
name.setEnabled(false);
|
bindingDialog.name.setEnabled(false);
|
||||||
}
|
}
|
||||||
dialogBuilder.setPositiveButton(R.string.validate, null);
|
dialogBuilder.setPositiveButton(R.string.validate, null);
|
||||||
dialogBuilder.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
|
dialogBuilder.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
|
||||||
|
|
||||||
AlertDialog alertDialog = dialogBuilder.create();
|
AlertDialog alertDialog = dialogBuilder.create();
|
||||||
|
int position;
|
||||||
|
if (oldChannelValues == null) {
|
||||||
|
position = -1;
|
||||||
|
} else {
|
||||||
|
position = 0;
|
||||||
|
for (ChannelData.Channel channel : channels) {
|
||||||
|
if (channel.getName().compareTo(oldChannelValues.getName()) == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bindingDialog.selectFile.setOnClickListener(v -> {
|
||||||
|
if (ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
||||||
|
PackageManager.PERMISSION_GRANTED) {
|
||||||
|
ActivityCompat.requestPermissions((Activity) context,
|
||||||
|
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
|
||||||
|
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||||
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
|
intent.setType("*/*");
|
||||||
|
String[] mimetypes = {"image/*"};
|
||||||
|
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
|
||||||
|
startActivityForResult(intent, PICK_AVATAR);
|
||||||
|
});
|
||||||
|
if (position >= 0) {
|
||||||
|
Helper.loadGiF(context, channels.get(position).getAvatar() != null ? channels.get(position).getAvatar().getPath() : null, bindingDialog.profilePicture);
|
||||||
|
} else {
|
||||||
|
Glide.with(context)
|
||||||
|
.load(R.drawable.missing_peertube)
|
||||||
|
.thumbnail(0.1f)
|
||||||
|
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||||
|
.into(bindingDialog.profilePicture);
|
||||||
|
}
|
||||||
|
int finalPosition = position;
|
||||||
alertDialog.setOnShowListener(dialogInterface -> {
|
alertDialog.setOnShowListener(dialogInterface -> {
|
||||||
|
|
||||||
Button button = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
|
Button button = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
|
||||||
button.setOnClickListener(view -> {
|
button.setOnClickListener(view -> {
|
||||||
if (display_name.getText() != null && display_name.getText().toString().trim().length() > 0 && name.getText() != null && name.getText().toString().trim().length() > 0) {
|
if (bindingDialog.displayName.getText() != null && bindingDialog.displayName.getText().toString().trim().length() > 0 && bindingDialog.name.getText() != null && bindingDialog.name.getText().toString().trim().length() > 0) {
|
||||||
|
|
||||||
ChannelParams channelCreation = new ChannelParams();
|
ChannelParams channelCreation = new ChannelParams();
|
||||||
channelCreation.setDisplayName(display_name.getText().toString().trim());
|
channelCreation.setDisplayName(bindingDialog.displayName.getText().toString().trim());
|
||||||
channelCreation.setName(name.getText().toString().trim());
|
channelCreation.setName(bindingDialog.name.getText().toString().trim());
|
||||||
if (description.getText() != null && description.getText().toString().trim().length() > 0) {
|
if (bindingDialog.description.getText() != null && bindingDialog.description.getText().toString().trim().length() > 0) {
|
||||||
channelCreation.setDescription(description.getText().toString().trim());
|
channelCreation.setDescription(bindingDialog.description.getText().toString().trim());
|
||||||
}
|
}
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
APIResponse apiResponse;
|
APIResponse apiResponse;
|
||||||
if (oldChannelValues == null) {
|
if (oldChannelValues == null) {
|
||||||
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.CREATE_CHANNEL, null, channelCreation);
|
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.CREATE_CHANNEL, null, channelCreation, inputData);
|
||||||
} else {
|
} else {
|
||||||
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.UPDATE_CHANNEL, channelCreation.getName() + "@" + Helper.getLiveInstance(context), channelCreation);
|
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.UPDATE_CHANNEL, channelCreation.getName() + "@" + Helper.getLiveInstance(context), channelCreation, inputData);
|
||||||
}
|
}
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> {
|
Runnable myRunnable = () -> {
|
||||||
|
|
||||||
if (getActivity() == null)
|
|
||||||
return;
|
|
||||||
if (oldChannelValues == null) {
|
if (oldChannelValues == null) {
|
||||||
ChannelData.Channel channel = new ChannelData.Channel();
|
ChannelData.Channel channel = new ChannelData.Channel();
|
||||||
channel.setId(apiResponse.getActionReturn());
|
channel.setId(apiResponse.getActionReturn());
|
||||||
@ -257,16 +320,10 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
channels.add(0, channel);
|
channels.add(0, channel);
|
||||||
channelListAdapter.notifyItemInserted(0);
|
channelListAdapter.notifyItemInserted(0);
|
||||||
} else {
|
} else {
|
||||||
int position = 0;
|
channels.get(finalPosition).setName(channelCreation.getName());
|
||||||
for (ChannelData.Channel channel : channels) {
|
channels.get(finalPosition).setDisplayName(channelCreation.getDisplayName());
|
||||||
if (channel.getName().compareTo(oldChannelValues.getName()) == 0) {
|
channels.get(finalPosition).setDescription(channelCreation.getDescription());
|
||||||
channel.setDescription(channelCreation.getDescription());
|
channelListAdapter.notifyItemChanged(finalPosition);
|
||||||
channel.setDisplayName(channelCreation.getDisplayName());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
position++;
|
|
||||||
}
|
|
||||||
channelListAdapter.notifyItemChanged(position);
|
|
||||||
}
|
}
|
||||||
if (action_button != null) {
|
if (action_button != null) {
|
||||||
action_button.setEnabled(true);
|
action_button.setEnabled(true);
|
||||||
@ -292,7 +349,7 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
|
|||||||
//Hide keyboard
|
//Hide keyboard
|
||||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
assert imm != null;
|
assert imm != null;
|
||||||
imm.hideSoftInputFromWindow(display_name.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(bindingDialog.displayName.getWindowToken(), 0);
|
||||||
});
|
});
|
||||||
if (alertDialog.getWindow() != null)
|
if (alertDialog.getWindow() != null)
|
||||||
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||||
|
@ -65,8 +65,8 @@ import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
|
|||||||
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.MY_CHANNELS;
|
||||||
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class DisplayPlaylistsFragment extends Fragment {
|
public class DisplayPlaylistsFragment extends Fragment {
|
||||||
|
@ -42,7 +42,6 @@ import app.fedilab.fedilabtube.helper.Helper;
|
|||||||
import app.fedilab.fedilabtube.helper.ThemeHelper;
|
import app.fedilab.fedilabtube.helper.ThemeHelper;
|
||||||
import es.dmoral.toasty.Toasty;
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.userMe;
|
import static app.fedilab.fedilabtube.MainActivity.userMe;
|
||||||
|
|
||||||
/* Copyright 2020 Thomas Schneider
|
/* Copyright 2020 Thomas Schneider
|
||||||
@ -393,7 +392,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
|
|||||||
set_video_in_list_choice.setChecked(videosInList);
|
set_video_in_list_choice.setChecked(videosInList);
|
||||||
|
|
||||||
//****** Language filter *********
|
//****** Language filter *********
|
||||||
LinkedHashMap<String, String> languages = new LinkedHashMap<>(peertubeInformation.getLanguages());
|
LinkedHashMap<String, String> languages = new LinkedHashMap<>(Helper.peertubeInformation.getLanguages());
|
||||||
List<CharSequence> entriesLanguages = new ArrayList<>();
|
List<CharSequence> entriesLanguages = new ArrayList<>();
|
||||||
List<CharSequence> valuesLanguages = new ArrayList<>();
|
List<CharSequence> valuesLanguages = new ArrayList<>();
|
||||||
Iterator<Map.Entry<String, String>> it = languages.entrySet().iterator();
|
Iterator<Map.Entry<String, String>> it = languages.entrySet().iterator();
|
||||||
|
@ -1,130 +0,0 @@
|
|||||||
package app.fedilab.fedilabtube.helper;
|
|
||||||
/* Copyright 2020 Thomas Schneider
|
|
||||||
*
|
|
||||||
* This file is a part of TubeLab
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
||||||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
||||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
* Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
|
||||||
* see <http://www.gnu.org/licenses>. */
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.Resources;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.MediaController;
|
|
||||||
|
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.PeertubeActivity;
|
|
||||||
import app.fedilab.fedilabtube.R;
|
|
||||||
import app.fedilab.fedilabtube.client.data.VideoData.Video;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Thomas
|
|
||||||
* FullScreenMediaController. Inspired from the work at http://www.zoftino.com/android-videoview-playing-videos-full-screen
|
|
||||||
*/
|
|
||||||
public class FullScreenMediaController extends MediaController {
|
|
||||||
|
|
||||||
private final Context context;
|
|
||||||
private ImageButton fullScreen;
|
|
||||||
private Button resolution;
|
|
||||||
private Video peertube;
|
|
||||||
private String resolutionVal;
|
|
||||||
|
|
||||||
public FullScreenMediaController(Context context) {
|
|
||||||
super(context);
|
|
||||||
this.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
|
||||||
public FullScreenMediaController(Context context, Video peertube) {
|
|
||||||
super(context);
|
|
||||||
this.peertube = peertube;
|
|
||||||
this.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAnchorView(View view) {
|
|
||||||
|
|
||||||
super.setAnchorView(view);
|
|
||||||
|
|
||||||
//image button for full screen to be added to media controller
|
|
||||||
fullScreen = new ImageButton(context);
|
|
||||||
LayoutParams params =
|
|
||||||
new LayoutParams(LayoutParams.WRAP_CONTENT,
|
|
||||||
LayoutParams.WRAP_CONTENT);
|
|
||||||
params.gravity = Gravity.END;
|
|
||||||
params.rightMargin = 80;
|
|
||||||
params.topMargin = 22;
|
|
||||||
addView(fullScreen, params);
|
|
||||||
|
|
||||||
if (resolutionVal == null)
|
|
||||||
resolutionVal = peertube.getFiles().get(0).getResolutions().getLabel() + "p";
|
|
||||||
resolution = new Button(context);
|
|
||||||
resolution.setAllCaps(false);
|
|
||||||
resolution.setBackgroundColor(Color.TRANSPARENT);
|
|
||||||
resolution.setText(resolutionVal);
|
|
||||||
resolution.setPadding(0, 0, 0, 0);
|
|
||||||
LayoutParams paramsButton =
|
|
||||||
new LayoutParams(LayoutParams.WRAP_CONTENT,
|
|
||||||
LayoutParams.WRAP_CONTENT);
|
|
||||||
paramsButton.gravity = Gravity.START;
|
|
||||||
paramsButton.rightMargin = 80;
|
|
||||||
paramsButton.topMargin = 22;
|
|
||||||
resolution.setOnClickListener(v -> ((PeertubeActivity) getContext()).displayResolution());
|
|
||||||
addView(resolution, paramsButton);
|
|
||||||
|
|
||||||
if (((PeertubeActivity) getContext()).getFullscreen() == fullscreen.ON) {
|
|
||||||
Resources resources = getResources();
|
|
||||||
fullScreen.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_baseline_fullscreen_exit_24, null));
|
|
||||||
} else {
|
|
||||||
Resources resources = getResources();
|
|
||||||
fullScreen.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_baseline_fullscreen_24, null));
|
|
||||||
}
|
|
||||||
//add listener to image button to handle full screen and exit full screen events
|
|
||||||
fullScreen.setOnClickListener(v -> {
|
|
||||||
|
|
||||||
if (((PeertubeActivity) getContext()).getFullscreen() == fullscreen.ON) {
|
|
||||||
((PeertubeActivity) getContext()).setFullscreen(fullscreen.OFF);
|
|
||||||
} else {
|
|
||||||
((PeertubeActivity) getContext()).setFullscreen(fullscreen.ON);
|
|
||||||
}
|
|
||||||
((PeertubeActivity) getContext()).change();
|
|
||||||
changeIcon();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
|
||||||
public void setResolutionVal(String resolutionVal) {
|
|
||||||
this.resolutionVal = resolutionVal;
|
|
||||||
if (resolution != null)
|
|
||||||
resolution.setText(String.format("%sp", resolutionVal));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void changeIcon() {
|
|
||||||
//fullscreen indicator from intent
|
|
||||||
if (((PeertubeActivity) getContext()).getFullscreen() == fullscreen.ON) {
|
|
||||||
Resources resources = getResources();
|
|
||||||
fullScreen.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_baseline_fullscreen_exit_24, null));
|
|
||||||
} else {
|
|
||||||
Resources resources = getResources();
|
|
||||||
fullScreen.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_baseline_fullscreen_24, null));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum fullscreen {
|
|
||||||
OFF,
|
|
||||||
ON
|
|
||||||
}
|
|
||||||
}
|
|
@ -68,6 +68,7 @@ import app.fedilab.fedilabtube.client.data.AccountData.Account;
|
|||||||
import app.fedilab.fedilabtube.client.data.ChannelData;
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
import app.fedilab.fedilabtube.client.data.VideoData;
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
import app.fedilab.fedilabtube.client.entities.File;
|
import app.fedilab.fedilabtube.client.entities.File;
|
||||||
|
import app.fedilab.fedilabtube.client.entities.PeertubeInformation;
|
||||||
import app.fedilab.fedilabtube.sqlite.AccountDAO;
|
import app.fedilab.fedilabtube.sqlite.AccountDAO;
|
||||||
import app.fedilab.fedilabtube.sqlite.Sqlite;
|
import app.fedilab.fedilabtube.sqlite.Sqlite;
|
||||||
import app.fedilab.fedilabtube.webview.CustomWebview;
|
import app.fedilab.fedilabtube.webview.CustomWebview;
|
||||||
@ -79,6 +80,7 @@ import static android.content.Context.DOWNLOAD_SERVICE;
|
|||||||
|
|
||||||
public class Helper {
|
public class Helper {
|
||||||
|
|
||||||
|
public static PeertubeInformation peertubeInformation;
|
||||||
public static final int RELOAD_MYVIDEOS = 10;
|
public static final int RELOAD_MYVIDEOS = 10;
|
||||||
public static final String SET_VIDEO_MODE = "set_video_mode";
|
public static final String SET_VIDEO_MODE = "set_video_mode";
|
||||||
public static final String SET_QUALITY_MODE = "set_quality_mode";
|
public static final String SET_QUALITY_MODE = "set_quality_mode";
|
||||||
@ -128,7 +130,6 @@ public class Helper {
|
|||||||
public static final String APP_PREFS = "app_prefs";
|
public static final String APP_PREFS = "app_prefs";
|
||||||
|
|
||||||
public static final int VIDEOS_PER_PAGE = 10;
|
public static final int VIDEOS_PER_PAGE = 10;
|
||||||
public static final String INTENT_ADD_UPLOADED_MEDIA = "intent_add_uploaded_media";
|
|
||||||
public static final String RECEIVE_ACTION = "receive_action";
|
public static final String RECEIVE_ACTION = "receive_action";
|
||||||
public static final String SET_UNFOLLOW_VALIDATION = "set_unfollow_validation";
|
public static final String SET_UNFOLLOW_VALIDATION = "set_unfollow_validation";
|
||||||
//List of available academies
|
//List of available academies
|
||||||
@ -734,7 +735,15 @@ public class Helper {
|
|||||||
if (video_quality == QUALITY_HIGH) {
|
if (video_quality == QUALITY_HIGH) {
|
||||||
return files.get(0);
|
return files.get(0);
|
||||||
} else if (video_quality == QUALITY_LOW) {
|
} else if (video_quality == QUALITY_LOW) {
|
||||||
|
if (files.get(files.size() - 1).getResolutions().getLabel().trim().toLowerCase().compareTo("0p") != 0) {
|
||||||
return files.get(files.size() - 1);
|
return files.get(files.size() - 1);
|
||||||
|
} else {
|
||||||
|
if (files.size() > 1) {
|
||||||
|
return files.get(files.size() - 2);
|
||||||
|
} else {
|
||||||
|
return files.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (files.size() < 3) {
|
if (files.size() < 3) {
|
||||||
return files.get(files.size() - 1);
|
return files.get(files.size() - 1);
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
package app.fedilab.fedilabtube.services;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
|
import net.gotev.uploadservice.data.UploadInfo;
|
||||||
|
import net.gotev.uploadservice.network.ServerResponse;
|
||||||
|
import net.gotev.uploadservice.observer.request.RequestObserverDelegate;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
|
|
||||||
|
public class GlobalUploadObserver implements RequestObserverDelegate {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCompleted(@NotNull Context context, @NotNull UploadInfo uploadInfo) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCompletedWhileNotObserving() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NotNull Context context, @NotNull UploadInfo uploadInfo, @NotNull Throwable throwable) {
|
||||||
|
throwable.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgress(@NotNull Context context, @NotNull UploadInfo uploadInfo) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ApplySharedPref")
|
||||||
|
@Override
|
||||||
|
public void onSuccess(@NotNull Context context, @NotNull UploadInfo uploadInfo, @NotNull ServerResponse serverResponse) {
|
||||||
|
try {
|
||||||
|
JSONObject response = new JSONObject(serverResponse.getBodyString());
|
||||||
|
|
||||||
|
if (response.has("video")) {
|
||||||
|
String videoUuid = response.getJSONObject("video").getString("uuid");
|
||||||
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
editor.putString(Helper.VIDEO_ID, videoUuid);
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,77 +0,0 @@
|
|||||||
package app.fedilab.fedilabtube.services;
|
|
||||||
/* Copyright 2020 Thomas Schneider
|
|
||||||
*
|
|
||||||
* This file is a part of TubeLab
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
||||||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
||||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
* Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
|
||||||
* see <http://www.gnu.org/licenses>. */
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
|
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
||||||
|
|
||||||
import net.gotev.uploadservice.ServerResponse;
|
|
||||||
import net.gotev.uploadservice.UploadInfo;
|
|
||||||
import net.gotev.uploadservice.UploadServiceBroadcastReceiver;
|
|
||||||
|
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
|
||||||
|
|
||||||
|
|
||||||
public class PeertubeUploadReceiver extends UploadServiceBroadcastReceiver {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProgress(Context context, UploadInfo uploadInfo) {
|
|
||||||
// your code here
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Context context, UploadInfo uploadInfo, ServerResponse serverResponse,
|
|
||||||
Exception exception) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("ApplySharedPref")
|
|
||||||
@Override
|
|
||||||
public void onCompleted(Context context, UploadInfo uploadInfo, ServerResponse serverResponse) {
|
|
||||||
try {
|
|
||||||
JSONObject response = new JSONObject(serverResponse.getBodyAsString());
|
|
||||||
|
|
||||||
if (!response.has("video")) { //IT's not from Peertube
|
|
||||||
ArrayList<String> file = uploadInfo.getSuccessfullyUploadedFiles();
|
|
||||||
Intent addMedia = new Intent(Helper.INTENT_ADD_UPLOADED_MEDIA);
|
|
||||||
addMedia.putExtra("response", serverResponse.getBodyAsString());
|
|
||||||
addMedia.putStringArrayListExtra("uploadInfo", file);
|
|
||||||
LocalBroadcastManager.getInstance(context).sendBroadcast(addMedia);
|
|
||||||
} else {
|
|
||||||
String videoID = response.getJSONObject("video").get("id").toString();
|
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
|
||||||
editor.putString(Helper.VIDEO_ID, videoID);
|
|
||||||
editor.apply();
|
|
||||||
}
|
|
||||||
} catch (JSONException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCancelled(Context context, UploadInfo uploadInfo) {
|
|
||||||
// your code here
|
|
||||||
}
|
|
||||||
}
|
|
@ -36,7 +36,7 @@ import app.fedilab.fedilabtube.client.entities.PeertubeInformation;
|
|||||||
import app.fedilab.fedilabtube.helper.EmojiHelper;
|
import app.fedilab.fedilabtube.helper.EmojiHelper;
|
||||||
import app.fedilab.fedilabtube.helper.NetworkStateReceiver;
|
import app.fedilab.fedilabtube.helper.NetworkStateReceiver;
|
||||||
|
|
||||||
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
||||||
|
|
||||||
|
|
||||||
public class RetrieveInfoService extends Service implements NetworkStateReceiver.NetworkStateReceiverListener {
|
public class RetrieveInfoService extends Service implements NetworkStateReceiver.NetworkStateReceiverListener {
|
||||||
|
@ -41,9 +41,9 @@ public class CommentVM extends AndroidViewModel {
|
|||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getRepliesComment(String videoId, String commentId) {
|
public LiveData<APIResponse> getRepliesComment(String instance, String videoId, String commentId) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
getThreadRepliesComments(videoId, commentId);
|
getThreadRepliesComments(instance, videoId, commentId);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,12 +69,17 @@ public class CommentVM extends AndroidViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void getThreadRepliesComments(String videoId, String commentId) {
|
private void getThreadRepliesComments(String instance, String videoId, String commentId) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI api = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
APIResponse apiResponse = api.getComments(action.GET_REPLIES, videoId, commentId, null);
|
if (instance == null) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
} else {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
|
APIResponse apiResponse = retrofitPeertubeAPI.getComments(action.GET_REPLIES, videoId, commentId, null);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
mainHandler.post(myRunnable);
|
mainHandler.post(myRunnable);
|
||||||
|
@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.viewmodel;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
|
||||||
@ -24,8 +25,6 @@ import androidx.lifecycle.AndroidViewModel;
|
|||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.client.APIResponse;
|
import app.fedilab.fedilabtube.client.APIResponse;
|
||||||
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
||||||
import app.fedilab.fedilabtube.client.entities.VideoParams;
|
import app.fedilab.fedilabtube.client.entities.VideoParams;
|
||||||
@ -39,13 +38,13 @@ public class MyVideoVM extends AndroidViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public LiveData<APIResponse> updateVideo(String videoId, VideoParams videoParams, File thumbnail, File previewfile) {
|
public LiveData<APIResponse> updateVideo(String videoId, VideoParams videoParams, Uri thumbnail, Uri previewfile) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
update(videoId, videoParams, thumbnail, previewfile);
|
update(videoId, videoParams, thumbnail, previewfile);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update(String videoId, VideoParams videoParams, File thumbnail, File previewfile) {
|
private void update(String videoId, VideoParams videoParams, Uri thumbnail, Uri previewfile) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
|
@ -122,6 +122,11 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
|
|
||||||
private void getSingle(String instance, String videoId, boolean myVideo) {
|
private void getSingle(String instance, String videoId, boolean myVideo) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
|
boolean canUseToken = false;
|
||||||
|
if (instance == null || instance.compareTo(Helper.getLiveInstance(_mContext)) == 0) {
|
||||||
|
canUseToken = true;
|
||||||
|
}
|
||||||
|
boolean finalCanUseToken = canUseToken;
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
@ -130,8 +135,8 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
} else {
|
} else {
|
||||||
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
}
|
}
|
||||||
APIResponse apiResponse = retrofitPeertubeAPI.getVideos(videoId, myVideo);
|
APIResponse apiResponse = retrofitPeertubeAPI.getVideos(videoId, myVideo, finalCanUseToken);
|
||||||
if (Helper.isLoggedIn(_mContext) && !myVideo && instance == null) {
|
if (Helper.isLoggedIn(_mContext) && instance == null) {
|
||||||
if (apiResponse.getPeertubes() != null && apiResponse.getPeertubes().size() > 0 && apiResponse.getPeertubes().get(0) != null) {
|
if (apiResponse.getPeertubes() != null && apiResponse.getPeertubes().size() > 0 && apiResponse.getPeertubes().get(0) != null) {
|
||||||
APIResponse response = new RetrofitPeertubeAPI(_mContext).getRating(videoId);
|
APIResponse response = new RetrofitPeertubeAPI(_mContext).getRating(videoId);
|
||||||
if (response != null)
|
if (response != null)
|
||||||
|
10
app/src/main/res/drawable/ic_baseline_cancel_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_cancel_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM17,15.59L15.59,17 12,13.41 8.41,17 7,15.59 10.59,12 7,8.41 8.41,7 12,10.59 15.59,7 17,8.41 13.41,12 17,15.59z" />
|
||||||
|
</vector>
|
@ -1,8 +1,8 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:tint="?attr/colorControlNormal"
|
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:fillColor="@android:color/white"
|
android:fillColor="@android:color/white"
|
||||||
|
10
app/src/main/res/drawable/ic_baseline_error_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_error_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_baseline_speed_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_speed_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58L5.07,18A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44zM10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z" />
|
||||||
|
</vector>
|
@ -25,6 +25,10 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@ -40,6 +44,7 @@
|
|||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:background="#000000"
|
android:background="#000000"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
@ -47,6 +52,7 @@
|
|||||||
|
|
||||||
<com.github.vkay94.dtpv.DoubleTapPlayerView
|
<com.github.vkay94.dtpv.DoubleTapPlayerView
|
||||||
android:id="@+id/doubleTapPlayerView"
|
android:id="@+id/doubleTapPlayerView"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:use_controller="true"
|
app:use_controller="true"
|
||||||
@ -104,12 +110,18 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/peertube_title"
|
android:id="@+id/peertube_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -123,15 +135,15 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/pp_channel"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:id="@+id/pp_channel"
|
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:contentDescription="@string/profile_picture"
|
android:contentDescription="@string/profile_picture" />
|
||||||
/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/peertube_view_count"
|
android:id="@+id/peertube_view_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -206,6 +218,20 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:drawableTopCompat="@drawable/ic_baseline_list_24" />
|
app:drawableTopCompat="@drawable/ic_baseline_list_24" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/video_information"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text=""
|
||||||
|
app:drawableTopCompat="@drawable/ic_baseline_info_24" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -231,19 +257,22 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/peertube_description"
|
android:id="@+id/peertube_description"
|
||||||
android:textIsSelectable="true"
|
|
||||||
android:autoLink="web"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:textIsSelectable="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/peertube_description_more"
|
android:id="@+id/peertube_description_more"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
android:text="@string/show_more"
|
android:text="@string/show_more"
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="?attr/colorAccent"
|
android:textColor="?attr/colorAccent"
|
||||||
android:layout_marginTop="2dp" />
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
@ -253,6 +282,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/add_public_comment"/>
|
android:text="@string/add_public_comment"/>
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
android:id="@+id/peertube_comments"
|
android:id="@+id/peertube_comments"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
@ -287,17 +317,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginStart="20dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:id="@+id/main_container"
|
android:id="@+id/main_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:divider="?android:dividerHorizontal"
|
android:divider="?android:dividerHorizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:showDividers="end">
|
android:showDividers="end">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:id="@+id/close_reply"
|
android:id="@+id/close_reply"
|
||||||
@ -326,10 +352,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginStart="20dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:id="@+id/post_main_container"
|
android:id="@+id/post_main_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -487,4 +510,57 @@
|
|||||||
android:background="@android:color/black"
|
android:background="@android:color/black"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/video_params"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/backgroundView"
|
||||||
|
android:minHeight="100dp"
|
||||||
|
android:translationZ="2dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:id="@+id/main_options_video"
|
||||||
|
android:layout_margin="30dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/video_params_submenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/backgroundView"
|
||||||
|
android:minHeight="300dp"
|
||||||
|
android:translationZ="3dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subMenuTitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/subMenuRecycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_margin="30dp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -26,24 +26,21 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- Video title -->
|
<!-- Video title -->
|
||||||
<LinearLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:labelFor="@+id/p_video_title"
|
|
||||||
android:text="@string/title" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/p_video_title"
|
android:id="@+id/p_video_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/title"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text" />
|
android:inputType="text"
|
||||||
</LinearLayout>
|
android:paddingTop="2dp"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<!-- Video media -->
|
<!-- Video media -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -103,26 +100,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- video description -->
|
<!-- video description -->
|
||||||
<LinearLayout
|
<!-- Video title -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:labelFor="@+id/p_video_description"
|
|
||||||
android:text="@string/description" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/p_video_description"
|
android:id="@+id/p_video_description"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/description"
|
||||||
|
android:importantForAutofill="no"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:gravity="top"
|
||||||
android:lines="5"
|
android:lines="5"
|
||||||
android:maxLines="5"
|
android:maxLines="5"
|
||||||
android:scrollbars="vertical" />
|
android:singleLine="false" />
|
||||||
</LinearLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Videos channels -->
|
<!-- Videos channels -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -93,17 +93,23 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
<EditText
|
|
||||||
android:id="@+id/video_title"
|
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/video_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:hint="@string/title_video_peertube"
|
android:hint="@string/title_video_peertube"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:singleLine="true" />
|
android:singleLine="true" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<!-- Videos upload submit -->
|
<!-- Videos upload submit -->
|
||||||
<Button
|
<Button
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:theme="@style/ThemeOverlay.AppCompat.Light">
|
app:theme="@style/popupTheme">
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -35,8 +36,9 @@
|
|||||||
app:contentScrim="?attr/colorPrimary"
|
app:contentScrim="?attr/colorPrimary"
|
||||||
app:expandedTitleMarginEnd="64dp"
|
app:expandedTitleMarginEnd="64dp"
|
||||||
app:expandedTitleMarginStart="48dp"
|
app:expandedTitleMarginStart="48dp"
|
||||||
android:background="@color/white"
|
android:background="?android:colorBackground"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_marginStart="@dimen/fab_margin"
|
android:layout_marginStart="@dimen/fab_margin"
|
||||||
android:layout_marginEnd="@dimen/fab_margin"
|
android:layout_marginEnd="@dimen/fab_margin"
|
||||||
@ -50,8 +52,12 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
<com.mancj.materialsearchbar.MaterialSearchBar
|
<com.mancj.materialsearchbar.MaterialSearchBar
|
||||||
style="@style/MaterialSearchBarLight"
|
style="@style/searchBarSepia"
|
||||||
app:mt_speechMode="false"
|
app:mt_speechMode="false"
|
||||||
|
app:mt_backIconTint="?attr/colorAccent"
|
||||||
|
app:mt_clearIconTint="?attr/colorAccent"
|
||||||
|
app:mt_menuIconTint="?attr/colorAccent"
|
||||||
|
app:mt_searchIconTint="?attr/colorAccent"
|
||||||
app:mt_hint="@string/sepia_search_hint"
|
app:mt_hint="@string/sepia_search_hint"
|
||||||
app:mt_maxSuggestionsCount="10"
|
app:mt_maxSuggestionsCount="10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -24,6 +24,30 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="15dp">
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/profile_picture"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:contentDescription="@string/profile_picture" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/select_file"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/change_profile_picture"
|
||||||
|
android:textColor="?attr/colorAccent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -71,6 +95,8 @@
|
|||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="5" />
|
android:maxLines="5" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
34
app/src/main/res/layout/drawer_menu.xml
Normal file
34
app/src/main/res/layout/drawer_menu.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/item_menu_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/menu_icon"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/menu_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
34
app/src/main/res/layout/drawer_menu_item.xml
Normal file
34
app/src/main/res/layout/drawer_menu_item.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/item_menu_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radio"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:labelFor="@+id/radio"
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/radio"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -9,29 +9,36 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/mainMediaControllerContainer"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="#CC000000"
|
android:background="#CC000000"
|
||||||
android:layoutDirection="ltr"
|
android:layoutDirection="ltr"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@id/exo_settings"
|
||||||
|
style="@style/ExoStyledControls.Button.Bottom.Settings"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:paddingTop="4dp">
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@id/exo_prev"
|
android:id="@id/exo_prev"
|
||||||
style="@style/ExoMediaButton.Previous" />
|
style="@style/ExoMediaButton.Previous" />
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@id/exo_rew"
|
|
||||||
style="@style/ExoMediaButton.Rewind" />
|
|
||||||
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@id/exo_play"
|
android:id="@id/exo_play"
|
||||||
@ -41,9 +48,6 @@
|
|||||||
android:id="@id/exo_pause"
|
android:id="@id/exo_pause"
|
||||||
style="@style/ExoMediaButton.Pause" />
|
style="@style/ExoMediaButton.Pause" />
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@id/exo_ffwd"
|
|
||||||
style="@style/ExoMediaButton.FastForward" />
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@id/exo_next"
|
android:id="@id/exo_next"
|
||||||
@ -52,6 +56,10 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/seekbar_controller"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
@ -103,8 +111,8 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/exo_fullscreen_icon"
|
android:id="@+id/exo_fullscreen_icon"
|
||||||
android:layout_width="18dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@string/fullscreen"
|
android:contentDescription="@string/fullscreen"
|
||||||
@ -113,4 +121,4 @@
|
|||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Copyright 2020 Thomas Schneider
|
||||||
|
|
||||||
|
This file is a part of TubeLab
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Copyright 2020 Thomas Schneider
|
||||||
|
|
||||||
|
This file is a part of TubeLab
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
160
app/src/main/res/layout/popup_video_info.xml
Normal file
160
app/src/main/res/layout/popup_video_info.xml
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Copyright 2020 Thomas Schneider
|
||||||
|
|
||||||
|
This file is a part of TubeLab
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/popup_padding">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/action_privacy" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_privacy"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/originally_published" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_published_at"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/category" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_category"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/license" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_license"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/language" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_language"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/tags" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_tags"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/sepia_element_duration" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/info_duration"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -11,11 +11,6 @@
|
|||||||
android:icon="@drawable/ic_baseline_cloud_download_24"
|
android:icon="@drawable/ic_baseline_cloud_download_24"
|
||||||
android:title="@string/download"
|
android:title="@string/download"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
|
||||||
android:id="@+id/action_captions"
|
|
||||||
android:icon="@drawable/ic_baseline_subtitles_24"
|
|
||||||
android:title="@string/captions"
|
|
||||||
app:showAsAction="ifRoom" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_edit"
|
android:id="@+id/action_edit"
|
||||||
android:icon="@drawable/ic_baseline_edit_24"
|
android:icon="@drawable/ic_baseline_edit_24"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<attr name="backgroundView" format="color" />
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||||
|
<item name="backgroundView">@color/backgroundDark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
@ -16,13 +16,17 @@
|
|||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
<item name="backgroundView">@color/backgroundDark</item>
|
||||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="theme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
<style name="theme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
||||||
|
|
||||||
<style name="popupTheme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
<style name="popupTheme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
||||||
|
|
||||||
<style name="progress" parent="SpinKitView.Circle" />
|
<style name="progress" parent="SpinKitView.Circle" />
|
||||||
|
|
||||||
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
|
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
|
||||||
|
|
||||||
|
<style name="searchBarSepia" parent="MaterialSearchBarDark" />
|
||||||
</resources>
|
</resources>
|
@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
<attr name="backgroundView" format="color" />
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
@ -8,6 +8,7 @@
|
|||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||||
|
<item name="backgroundView">@color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
@ -15,13 +16,18 @@
|
|||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||||
|
<item name="backgroundView">@color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="theme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
<style name="theme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
||||||
|
|
||||||
<style name="popupTheme" parent="@style/ThemeOverlay.AppCompat.Light" />
|
<style name="popupTheme" parent="@style/ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
<style name="progress" parent="SpinKitView.Circle" />
|
<style name="progress" parent="SpinKitView.Circle" />
|
||||||
|
|
||||||
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
|
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
|
||||||
|
|
||||||
|
<style name="searchBarSepia" parent="MaterialSearchBarLight" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Reference in New Issue
Block a user