1
0
mirror of https://framagit.org/tom79/fedilab-tube synced 2025-06-05 21:09:11 +02:00

88 Commits

Author SHA1 Message Date
74e45b1820 Quick fix 2020-12-18 18:36:32 +01:00
0a1336f0e0 Release 1.10.2 2020-12-18 18:00:47 +01:00
d5a0dcb980 Fix issue #152 2020-12-18 16:49:18 +01:00
83e7c41ca0 Merge branch 'l10n_develop' into develop 2020-12-18 16:35:05 +01:00
1d1b0c11a9 fix CI 2020-12-18 14:41:48 +01:00
3b2c4e2ac6 New translations strings.xml (Chinese Traditional) 2020-12-18 14:41:27 +01:00
2d77fe580f New translations strings.xml (Chinese Simplified) 2020-12-18 14:41:23 +01:00
7ae20f43f8 New translations strings.xml (Swedish) 2020-12-18 14:41:19 +01:00
f03c1b206b New translations strings.xml (Russian) 2020-12-18 14:41:16 +01:00
d99a58f2cf New translations strings.xml (Portuguese) 2020-12-18 14:41:12 +01:00
5aeaf7f34b New translations strings.xml (Polish) 2020-12-18 14:41:09 +01:00
af0b484d16 New translations strings.xml (Dutch) 2020-12-18 14:41:06 +01:00
0a6791b752 New translations strings.xml (Korean) 2020-12-18 14:41:02 +01:00
e73e306d05 New translations strings.xml (Japanese) 2020-12-18 14:40:58 +01:00
52189abbff New translations strings.xml (Italian) 2020-12-18 14:40:53 +01:00
d721f12d74 New translations strings.xml (Greek) 2020-12-18 14:40:49 +01:00
69f28bb647 New translations strings.xml (German) 2020-12-18 14:40:45 +01:00
2b2295d831 New translations strings.xml (Arabic) 2020-12-18 14:40:41 +01:00
179586b8c4 New translations strings.xml (Spanish) 2020-12-18 14:40:38 +01:00
1afad9e06a New translations strings.xml (French) 2020-12-18 14:40:35 +01:00
59c73fd864 New translations strings.xml (Romanian) 2020-12-18 14:40:30 +01:00
6820344750 Fix #145 and #153 2020-12-18 14:31:36 +01:00
680504791c New translations strings.xml (Chinese Traditional) 2020-12-17 17:53:31 +01:00
41e500a8f8 New translations strings.xml (Chinese Simplified) 2020-12-17 17:53:28 +01:00
448af1ef9a New translations strings.xml (Swedish) 2020-12-17 17:53:23 +01:00
041e8c0bd6 New translations strings.xml (Russian) 2020-12-17 17:53:19 +01:00
0b7300e93a New translations strings.xml (Polish) 2020-12-17 17:53:16 +01:00
94c5f5a705 New translations strings.xml (Dutch) 2020-12-17 17:53:12 +01:00
fa2f8a7b05 New translations strings.xml (Korean) 2020-12-17 17:53:09 +01:00
aeb288142e New translations strings.xml (Japanese) 2020-12-17 17:53:06 +01:00
635c43f458 New translations strings.xml (Italian) 2020-12-17 17:53:03 +01:00
d36138431b New translations strings.xml (Greek) 2020-12-17 17:52:58 +01:00
9cdf857730 New translations strings.xml (German) 2020-12-17 17:52:55 +01:00
52a6152af6 New translations strings.xml (Arabic) 2020-12-17 17:52:52 +01:00
9d3312c081 New translations strings.xml (Spanish) 2020-12-17 17:52:48 +01:00
1146236f46 New translations strings.xml (Portuguese) 2020-12-17 17:52:44 +01:00
ec19ee1e55 New translations strings.xml (French) 2020-12-17 17:52:39 +01:00
cc37e40158 New translations strings.xml (Romanian) 2020-12-17 17:52:05 +01:00
bdd12de34d Fix issues #150 #149 #148 #147 2020-12-17 17:37:40 +01:00
e64692d0d3 Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!55
2020-12-17 14:37:10 +01:00
7da8c0f664 New Crowdin updates 2020-12-17 14:37:10 +01:00
fc41c077dc move fastlane 2020-12-17 14:16:49 +01:00
50800da4b9 move fastlane 2020-12-17 14:01:35 +01:00
a9219e8a91 move fastlane 2020-12-17 14:00:12 +01:00
5eedadef47 New instance acad + matomo (acad flavor only) 2020-12-16 17:24:23 +01:00
14cde8e625 Fixes 2020-12-16 10:14:46 +01:00
1f2ecd591d Matomo for acad flavor 2020-12-14 16:41:29 +01:00
9a2eb6cd49 Support openid 2020-12-14 14:42:28 +01:00
aa38514bcb Merge branch 'develop' of https://framagit.org/tom79/fedilab-tube into develop 2020-12-14 08:27:49 +01:00
f2fddfb16c typo 2020-12-13 15:41:26 +01:00
05300682c1 Fixes 2020-12-13 15:41:00 +01:00
a3714a4ecf Fix issue #143 2020-12-13 11:48:56 +01:00
500584b9ef Fix some issues 2020-12-13 09:32:33 +01:00
33ac822957 fix issue #142 2020-12-13 08:53:22 +01:00
1f6107e238 Truncate long descriptions for instances with a way to expand them. 2020-12-12 15:41:28 +01:00
2b7639599c Prepare release notes 2020-12-12 15:07:43 +01:00
dedf7b0163 Fix issue #125 2020-12-12 14:58:28 +01:00
88b5a83fb1 Fix issue #127 2020-12-12 14:47:59 +01:00
efd6b0088f Fix issue #119 2020-12-12 14:45:14 +01:00
ccb5cd20b1 Merge remote-tracking branch 'origin/develop' into develop 2020-12-12 14:39:29 +01:00
668e41bc9b Fix issue #122 2020-12-12 14:39:20 +01:00
46123fa7d6 Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!54
2020-12-12 14:34:48 +01:00
b079965de8 New Crowdin updates 2020-12-12 14:34:47 +01:00
842ab914a4 Reverse to Fastlane with Flavors 2020-12-12 14:17:29 +01:00
fcb93b7dc6 update details 2020-12-12 09:32:55 +01:00
f1420fe29e Create flavor 2020-12-11 18:37:35 +01:00
23f8674adc Fix #136 - crash with download button and lives 2020-12-11 17:59:24 +01:00
76a4aa5ae6 Fix #136 - crash with download button and lives 2020-12-11 17:16:29 +01:00
85ffb4064b clean 2020-12-09 18:26:52 +01:00
73c9e639b6 Some improvements with cast 2020-12-09 18:26:11 +01:00
5172695784 some fixes 2020-12-09 15:45:54 +01:00
fcc10f97b5 Fix issue #134 2020-12-06 17:15:04 +01:00
0a12020fd8 Fix issue #129 2020-12-06 11:24:36 +01:00
e9c10b17e0 Fix issue #124 - typo 2020-12-06 10:59:01 +01:00
f4698f1312 Issue #133 - history not working in URL 2020-12-06 10:46:18 +01:00
1690507a18 Issue #123 - a small fix 2020-12-05 18:48:41 +01:00
fbeb87e29e Issue #123 - improve player 2020-12-05 18:41:07 +01:00
de14e95e90 Issue #123 - Working cast 2020-12-05 17:28:25 +01:00
35c5713b0a #123 - some tests 2020-12-05 14:01:08 +01:00
413792087e #123 - some tests 2020-12-05 11:27:27 +01:00
21c53d2b4d Add cast support #123 - try 2020-12-02 18:37:54 +01:00
5757a8b1d8 Add cast support #123 2020-12-02 18:05:35 +01:00
680bdf7bd2 Split code 2020-12-01 18:35:54 +01:00
6911fbd124 Limits some actions 2020-12-01 16:09:14 +01:00
9fdffc9709 svg 2020-11-29 12:00:04 +01:00
0b722a5ecc Add flavors 2020-11-29 11:59:27 +01:00
d3ffc32d9b Merge branch 'develop' of https://framagit.org/tom79/fedilab-tube into develop
 Conflicts:
	app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java
	app/src/main/java/app/fedilab/fedilabtube/drawer/CommentListAdapter.java
	app/src/main/java/app/fedilab/fedilabtube/helper/CommentDecorationHelper.java
	app/src/main/res/layout/activity_peertube.xml
2020-11-16 08:24:35 +01:00
a6dfd842e3 improve comments 2020-11-09 15:49:29 +01:00
224 changed files with 5536 additions and 1943 deletions

View File

@ -68,7 +68,7 @@ assembleDebug:
cache:
key: "${CI_COMMIT_TAG}"
paths:
- app/build/outputs/apk/fdroid_acad/debug/app-fdroid_acad-debug.apk
- app/build/outputs/apk/fdroid_peertube_apps_educ/debug/app-fdroid_peertube_apps_educ-debug.apk
- app/build/outputs/apk/fdroid_full/debug/app-fdroid_full-debug.apk
policy: push
script:
@ -76,11 +76,11 @@ assembleDebug:
# Basic android and gradle stuff
# Check linting
lintFdroid_acadDebug:
lintfdroid_peertube_apps_educDebug:
interruptible: true
stage: build
script:
- ./gradlew -Pci --console=plain :app:lintFdroid_acadDebug -PbuildDir=lint
- ./gradlew -Pci --console=plain :app:lintfdroid_peertube_apps_educDebug -PbuildDir=lint
except:
- tags
@ -110,7 +110,7 @@ putApkOnTags:
cache:
key: "${CI_COMMIT_TAG}"
paths:
- app/build/outputs/apk/fdroid_acad/debug/app-fdroid_acad-debug.apk
- app/build/outputs/apk/fdroid_peertube_apps_educ/debug/app-fdroid_peertube_apps_educ-debug.apk
- app/build/outputs/apk/fdroid_full/debug/app-fdroid_full-debug.apk
policy: pull
script:
@ -120,11 +120,11 @@ putApkOnTags:
- export NC_UPLOAD_URL="${NC_REMOTE_DIR}/${CI_COMMIT_TAG}"
- export NC_DOWNLOAD_URL="${NC_SHARE_URL}/download?path=%2F${CI_COMMIT_TAG}%2F&files="
- 'export HEADER="Private-Token: ${GITLAB_API_TOKEN}"'
- export acadUrl="${NC_DOWNLOAD_URL}app-fdroid_acad-debug.apk"
- export acadUrl="${NC_DOWNLOAD_URL}app-fdroid_peertube_apps_educ-debug.apk"
- export fullUrl="${NC_DOWNLOAD_URL}app-fdroid_full-debug.apk"
- 'curl -s -u "${NC_USER}:${NC_PASSWORD}" -X MKCOL "${NC_UPLOAD_URL}"'
- 'curl -s -u "${NC_USER}:${NC_PASSWORD}" -T app/build/outputs/apk/fdroid_full/debug/app-fdroid_full-debug.apk "${NC_UPLOAD_URL}/app-fdroid_full-debug.apk"'
- 'curl -s -u "${NC_USER}:${NC_PASSWORD}" -T app/build/outputs/apk/fdroid_acad/debug/app-fdroid_acad-debug.apk "${NC_UPLOAD_URL}/app-fdroid_acad-debug.apk"'
- 'curl -s -u "${NC_USER}:${NC_PASSWORD}" -T app/build/outputs/apk/fdroid_peertube_apps_educ/debug/app-fdroid_peertube_apps_educ-debug.apk "${NC_UPLOAD_URL}/app-fdroid_peertube_apps_educ-debug.apk"'
- export description=$(curl -s --header "${HEADER}" "${DESCRIPTION_URL}" | jq .release.description | sed -e 's@"@@g')
- if [[ $description == 'null' ]]; then export METHOD="POST"; echo -e "[Get the acad version](${acadUrl})\n\n[Get the full version](${fullUrl})" > /tmp/text; fi
- if [[ $description != 'null' ]]; then export METHOD="PUT"; echo -e "${description}\n\n[Get the acad version](${acadUrl})\n\n[Get the full version](${fullUrl})" > /tmp/text; fi

View File

@ -1,18 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: "androidx.navigation.safeargs"
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 29
versionName "1.9.0"
versionCode 33
versionName "1.10.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@ -40,45 +38,101 @@ android {
checkReleaseBuilds false
abortOnError false
}
//boolean full_instances if set to false means TubeAcad
productFlavors {
fdroid_acad {
fdroid_peertube_apps_educ {
applicationId "app.fedilab.fedilabtube"
resValue "string", "app_name", "TubeAcad"
resValue "string", "app_id", "app.fedilab.fedilabtube"
buildConfigField "String", "version", "\"fdroid_acad\""
buildConfigField "boolean", "full_instances", "false"
buildConfigField "boolean", "google_restriction", "false"
buildConfigField "boolean", "surfing_mode", "false"
buildConfigField "boolean", "sepia_search", "false"
buildConfigField "boolean", "instance_switcher", "true"
}
google_acad {
google_peertube_apps_educ {
applicationId "app.fedilab.fedilabtube"
resValue "string", "app_name", "TubeAcad"
resValue "string", "app_id", "app.fedilab.fedilabtube"
buildConfigField "String", "version", "\"google_acad\""
buildConfigField "boolean", "full_instances", "false"
buildConfigField "boolean", "google_restriction", "true"
buildConfigField "boolean", "surfing_mode", "false"
buildConfigField "boolean", "sepia_search", "false"
buildConfigField "boolean", "instance_switcher", "true"
}
fdroid_full {
applicationId "app.fedilab.tubelab"
resValue "string", "app_name", "TubeLab"
resValue "string", "app_id", "app.fedilab.tubelab"
buildConfigField "String", "version", "\"fdroid_full\""
buildConfigField "boolean", "full_instances", "true"
buildConfigField "boolean", "google_restriction", "false"
buildConfigField "boolean", "surfing_mode", "true"
buildConfigField "boolean", "sepia_search", "true"
buildConfigField "boolean", "instance_switcher", "true"
}
google_full {
applicationId "app.fedilab.tubelab"
resValue "string", "app_name", "TubeLab"
resValue "string", "app_id", "app.fedilab.tubelab"
buildConfigField "String", "version", "\"google_full\""
buildConfigField "boolean", "full_instances", "true"
buildConfigField "boolean", "google_restriction", "true"
buildConfigField "boolean", "surfing_mode", "true"
buildConfigField "boolean", "sepia_search", "true"
buildConfigField "boolean", "instance_switcher", "true"
}
queermotion {
applicationId "org.queermotion.peertube"
resValue "string", "app_name", "QueerMotion"
resValue "string", "app_id", "org.queermotion.peertube"
buildConfigField "String", "version", "\"queermotion\""
buildConfigField "boolean", "full_instances", "true"
buildConfigField "boolean", "google_restriction", "false"
buildConfigField "boolean", "surfing_mode", "false"
buildConfigField "boolean", "sepia_search", "false"
buildConfigField "boolean", "instance_switcher", "false"
}
bittube {
applicationId "app.fedilab.bittube"
resValue "string", "app_name", "Bittube"
resValue "string", "app_id", "app.fedilab.bittube"
buildConfigField "String", "version", "\"bittube\""
buildConfigField "boolean", "full_instances", "true"
buildConfigField "boolean", "google_restriction", "true"
buildConfigField "boolean", "surfing_mode", "false"
buildConfigField "boolean", "sepia_search", "false"
buildConfigField "boolean", "instance_switcher", "true"
}
}
sourceSets {
fdroid_acad {
fdroid_peertube_apps_educ {
res.srcDirs = ['src/main/res', 'src/acad/res']
java.srcDirs = ['src/main/java', 'src/acad/java']
}
google_acad {
google_peertube_apps_educ {
res.srcDirs = ['src/main/res', 'src/acad/res']
java.srcDirs = ['src/main/java', 'src/acad/java']
}
fdroid_full {
res.srcDirs = ['src/main/res', 'src/full/res']
java.srcDirs = ['src/main/java', 'src/full/java']
}
google_full {
res.srcDirs = ['src/main/res', 'src/full/res']
java.srcDirs = ['src/main/java', 'src/full/java']
}
queermotion {
res.srcDirs = ['src/main/res', 'src/queermotion/res']
java.srcDirs = ['src/main/java', 'src/full/java']
}
bittube {
res.srcDirs = ['src/main/res', 'src/bittube/res']
java.srcDirs = ['src/main/java', 'src/full/java']
}
}
}
@ -99,14 +153,14 @@ dependencies {
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.navigation:navigation-fragment:2.3.1'
implementation 'androidx.navigation:navigation-fragment:2.3.2'
implementation "androidx.fragment:fragment:1.2.5"
implementation 'androidx.navigation:navigation-ui:2.3.1'
implementation ("androidx.navigation:navigation-dynamic-features-fragment:2.3.1")
implementation 'androidx.navigation:navigation-ui:2.3.2'
implementation ("androidx.navigation:navigation-dynamic-features-fragment:2.3.2")
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.browser:browser:1.3.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
@ -121,7 +175,7 @@ dependencies {
implementation "net.gotev:uploadservice:4.5.1"
implementation "net.gotev:uploadservice-okhttp:4.5.1"
implementation "com.google.code.gson:gson:2.8.6"
implementation 'androidx.media:media:1.2.0'
implementation 'androidx.media:media:1.2.1'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
@ -134,6 +188,16 @@ dependencies {
implementation "androidx.work:work-runtime:2.4.0"
implementation "androidx.work:work-runtime-ktx:2.4.0"
//custom cast feature
implementation 'jp.wasabeef:glide-transformations:4.0.0'
implementation 'su.litvak.chromecast:api-v2:0.11.3'
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.0'
implementation 'org.slf4j:slf4j-simple:1.7.30'
fdroid_peertube_apps_educImplementation 'org.matomo.sdk:tracker:4.1.2'
google_peertube_apps_educImplementation 'org.matomo.sdk:tracker:4.1.2'
}

View File

@ -0,0 +1,35 @@
package app.fedilab.fedilabtube;
/* 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 org.matomo.sdk.Matomo;
import org.matomo.sdk.Tracker;
import org.matomo.sdk.TrackerBuilder;
public class FedilabTube extends BaseFedilabTube {
private Tracker mMatomoTracker;
public synchronized Tracker getTracker() {
if (mMatomoTracker != null) return mMatomoTracker;
mMatomoTracker = TrackerBuilder.createDefault("https://wa.phm.education.gouv.fr/snp/matomo.php", 11).build(Matomo.getInstance(this));
return mMatomoTracker;
}
}

View File

@ -0,0 +1,47 @@
package app.fedilab.fedilabtube;
/* 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.app.Activity;
import android.content.Context;
import org.matomo.sdk.Tracker;
import org.matomo.sdk.extra.TrackHelper;
public class Matomo {
public static void sendScreen(Context _mcontext, String path, String title) {
Tracker tracker = ((FedilabTube) ((Activity) _mcontext).getApplication()).getTracker();
TrackHelper.track().screen(path).title(title).with(tracker);
}
public static void sendEvent(Context _mcontext, String category, String action, String label, float value) {
Tracker tracker = ((FedilabTube) ((Activity) _mcontext).getApplication()).getTracker();
TrackHelper.track().event(category, action).name(label).value(value).with(tracker);
}
public static void sendValue(Context _mcontext, String path, int index, String dimensionValue) {
Tracker tracker = ((FedilabTube) ((Activity) _mcontext).getApplication()).getTracker();
TrackHelper.track().screen(path).dimension(index, dimensionValue).with(tracker);
}
public static void trackInstall(Context _mcontext) {
Tracker tracker = ((FedilabTube) ((Activity) _mcontext).getApplication()).getTracker();
TrackHelper.track().download().with(tracker);
}
}

View File

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

View File

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 491 B

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,375 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name" translatable="false">TubeAcad</string>
<string name="app_id" translatable="false">app.fedilab.fedilabtube</string>
<string name="set_video_mode_choice" translatable="false">set_video_mode_choice</string>
<string name="set_video_minimize_choice" translatable="false">set_video_minimize_choice</string>
<string name="set_video_language_choice" translatable="false">set_video_language_choice</string>
<string name="set_video_quality_choice" translatable="false">set_video_quality_choice</string>
<string name="set_video_cache_choice" translatable="false">set_video_cache_choice</string>
<string name="set_autoplay_choice" translatable="false">set_autoplay_choice</string>
<string name="set_theme_choice" translatable="false">set_theme_choice</string>
<string name="set_fullscreen_choice" translatable="false">set_fullscreen_choice</string>
<string name="set_autoplay_next_video_choice" translatable="false">set_autoplay_next_video_choice</string>
<string name="set_store_in_history" translatable="false">set_store_in_history</string>
<string name="set_play_screen_lock_choice" translatable="false">set_play_screen_lock_choice</string>
<string name="set_video_in_list_choice" translatable="false">set_video_in_list_choice</string>
<string name="set_video_sensitive_choice" translatable="false">set_video_sensitive_choice</string>
<string name="set_video_in_list">Vidéos dans une liste</string>
<string name="set_video_in_list_description">Change la mise en page pour afficher les vidéos dans une liste</string>
<string name="_retry">Réessayer</string>
<string name="refresh_token_failed">Échec de rafraîchissement du jeton d\'accès</string>
<string name="refresh_token_failed_message">Vous pouvez réessayer de le rafraîchir ou simplement déconnecter le compte</string>
<string name="export_list">Exporter</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_confirm">Êtes vous sur de vouloir supprimer toutes les vidéos de votre historique ?</string>
<string name="export_notification_title">Exportation réussie !</string>
<string name="export_notification_content">Cliquer ici pour envoyer l\'exportation par mèl.</string>
<string name="export_notification_subjet">Nouvelle liste de lecture</string>
<string name="export_notification_body">Ouvrez la pièce jointe avec l\'application TubeAcad</string>
<string name="show_more">Montrer plus</string>
<string name="show_less">Montrer moins</string>
<string name="no_instances">Aucune instance !</string>
<string name="set_play_screen_lock">Verrouillage d\'écran</string>
<string name="set_play_screen_lock_description">Continuer à lire des vidéos lorsque l\'écran est verrouillé</string>
<string name="change_profile_picture">Modifier la photo de profil</string>
<string name="account_updated">Le compte a été mis à jour !</string>
<string name="new_video">Nouvelle vidéo</string>
<string name="new_blacklist">New blacklist info</string>
<string name="new_my_video_published">Your video is published</string>
<string name="new_my_video_error">Error when publishing your video</string>
<string name="new_comment">New comment</string>
<string name="new_follow">New follow</string>
<string name="notif_new_video">Nouvelle vidéo depuis vos souscriptions</string>
<string name="notif_new_comment">Nouveau commentaire sur votre vidéo</string>
<string name="notif_blocked">Une de vos vidéos est bloquée/débloquée</string>
<string name="notif_video_published">Vidéo publiée (après transcodage / mise à jour programmée)</string>
<string name="notif_video_imported">Import de vidéo terminé</string>
<string name="notif_new_followers">Vous ou votre chaîne avez/a un·e nouvel·le abonné·e</string>
<string name="notif_video_mention">Quelqu\'un vous a mentionné dans les commentaires d\'une vidéo</string>
<string name="notif_abuse_received">Un signalement d\'abus a reçu un nouveau message</string>
<string name="notif_abuse_accepted">Un de vos rapports d\'abus a été accepté ou rejeté par les modérateurs</string>
<string name="save">Enregistrer</string>
<string name="set_autoplay_next_video">Lire automatiquement la vidéo suivante</string>
<string name="set_autoplay_next_video_description">Quand une vidéo est terminée, lire la prochaine vidéo suggérée.</string>
<string name="enable_history">Activer l\'historique</string>
<string name="set_autoplay">Lecture automatique</string>
<string name="set_autoplay_description">Si activé, les vidéos seront lues automatiquement</string>
<string name="set_fullscreen">Plein écran</string>
<string name="set_fullscreen_description">Ouvre automatiquement les vidéos en plein écran</string>
<string name="delete_account_comment">Supprimer tous les commentaires</string>
<string name="delete_account_comment_confirm">Etes-vous sûr de vouloir supprimer tous les commentaires de ce compte pour vos vidéos ?</string>
<string-array name="settings_theme">
<item>Clair</item>
<item>Sombre</item>
<item>Automatique</item>
</string-array>
<string name="refresh_every">Mettre à jour toutes les :</string>
<string-array name="refresh_time">
<item>Jamais</item>
<item>15 minutes</item>
<item>30 minutes</item>
<item>1 heure</item>
<item>2 heures</item>
<item>6 heures</item>
<item>12 heures</item>
</string-array>
<plurals name="number_of_replies">
<item quantity="zero">%d réponse</item>
<item quantity="one">%d réponse</item>
<item quantity="other">%d réponses</item>
</plurals>
<string name="set_theme">Thème</string>
<string name="set_theme_description">Permet de changer le thème de l\'application</string>
<string name="federation_issue">La vidéo ne peut pas être fédérée !</string>
<string name="title_home">Locale</string>
<string name="title_local">Locale</string>
<string name="title_discover">Découvrir</string>
<string name="title_notifications">Notifications</string>
<string name="title_recently_added">Nouveautés</string>
<string name="title_trending">Tendances</string>
<string name="title_most_liked">Plus aimées</string>
<string name="toast_error">Une erreur s\'est produite !</string>
<string name="title_muted">Sourdine</string>
<string name="title_channel">Chaînes</string>
<string name="do_not_list">Ne pas lister</string>
<string name="blur">Estomper</string>
<string name="display">Afficher</string>
<string name="no_opinion">Pas d\'opinion</string>
<string name="instance_choice">Choisissez une instance</string>
<string name="not_valide_instance">Cette instance ne semble pas être valide !</string>
<string name="no_videos">Aucune vidéo !</string>
<string name="no_notifications">Aucune notification !</string>
<string name="favicon">Favicon</string>
<string name="open_with">Ouvrir avec</string>
<string name="action_playlist_edit">Modifier une liste de lecture</string>
<string name="close">Fermer</string>
<string name="upload_video">Téléverser</string>
<string name="image_preview">Aperçu de l\'image</string>
<string name="file_to_upload">Sélectionnez un fichier à transférer</string>
<string name="channel">Chaîne</string>
<string name="videos">Vidéos</string>
<string name="channels">Chaînes</string>
<string name="yes">Oui</string>
<string name="no">Non</string>
<string name="cancel">Annuler</string>
<string name="download">Télécharger</string>
<string name="profile_picture">Photo du profil</string>
<string name="update_video">Mettre à jour la vidéo</string>
<string name="remove_from_playlist">Supprimer de la liste de lecture</string>
<string name="date_seconds">%d s</string>
<string name="date_minutes">%d min</string>
<string name="date_hours">%d h</string>
<string name="date_day">%d j</string>
<string name="number_view_video">%s vues</string>
<string name="title_instance_login">Domaine de l\'instance</string>
<string name="uploading">Transfert en cours, veuillez patienter …</string>
<string name="upload_video_success">La vidéo a été transférée !</string>
<string name="toast_cancelled">Transfert annulé !</string>
<string name="video_uploaded_action">Cliquez ici pour éditer les données de la vidéo.</string>
<string name="toot_select_image_error">Une erreur sest produite lors de la sélection du média!</string>
<string name="download_file">Télécharger %1$s</string>
<string name="action_privacy">Confidentialité</string>
<string name="action_logout">Déconnexion</string>
<string name="login">Connexion</string>
<string name="password">Mot de passe</string>
<string name="email">Courriel</string>
<string name="tags">Étiquettes</string>
<string name="validate">Valider</string>
<string name="share_with">Partager avec</string>
<string name="shared_via">Partagé via TubeLab</string>
<string name="username">Nom dutilisateur</string>
<string name="settings">Paramètres</string>
<string name="logout_account_confirmation">Voulez-vous vraiment déconnecter le compte @%1$s@%2$s ?</string>
<string name="following">Suit</string>
<string name="followers">Abonné·e·s</string>
<string name="client_error">Impossible dobtenir lid du client!</string>
<string name="toast_error_loading_account">Une erreur sest produite pendant le chargement du compte!</string>
<string name="toast_error_search">Une erreur sest produite lors de la recherche!</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_mute">Mettre en sourdine</string>
<string name="search">Chercher</string>
<string name="delete">Supprimer</string>
<string name="action_lists_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette liste de lecture ?</string>
<string name="action_lists_delete">Supprimer la liste de lecture</string>
<string name="no_comments">Soyez le·a premier·ère à laisser un commentaire sur cette vidéo en utilisant le bouton supérieur droit !</string>
<string name="comment_no_allowed_peertube">Les commentaires sur cette vidéos ont été désactivés !</string>
<string name="pickup_resolution">Choisissez une résolution</string>
<string name="bookmark_add_peertube">La vidéo est rajoutée aux favoris !</string>
<string name="bookmark_remove_peertube">La vidéo a été retirée de vos favoris !</string>
<string name="information" tools:ignore="UnusedResources">Information</string>
<string name="app_logo">Logo de lapplication</string>
<!-- languages not translated -->
<string name="subscriptions">Abonnements</string>
<string name="delete_instance">Supprimer l\'instance</string>
<string name="delete_instance_confirm">Etes-vous sûr de vouloir supprimer cette instance ?</string>
<string name="delete_comment">Supprimer le commentaire</string>
<string name="delete_comment_confirm">Etes-vous sûr de vouloir supprimer ce commentaire ?</string>
<string name="set_video_mode">Mode pour les vidéos</string>
<string name="filter">Filtrer</string>
<string name="sepia_search">Recherche sépia</string>
<string name="sepia_element_nsfw">Afficher le contenu sensible</string>
<string name="sepia_element_published_date">Date de publication</string>
<string name="any">Toutes</string>
<string name="today">Aujourd\'hui</string>
<string name="last_7_days">Les 7 derniers jours</string>
<string name="last_30_days">Les 30 derniers jours</string>
<string name="last_365_days">Les 365 derniers jours</string>
<string name="sepia_element_duration">Durée</string>
<string name="duration_short"><![CDATA[Courte (<4 min)]]></string>
<string name="duration_medium"><![CDATA[Moyenne (4-10 min)]]></string>
<string name="duration_long"><![CDATA[Longue (> 10 min)]]></string>
<string name="display_all_categories">Afficher toutes les catégories</string>
<string name="display_all_licenses">Afficher toutes les licences</string>
<string name="display_all_languages">Afficher toutes les langues</string>
<string name="all_of_these_tags">Tous ces labels</string>
<string name="one_of_these_tags">Un de ces labels</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">
<item>Meilleurs résultats</item>
<item>Les plus récentes</item>
<item>Les moins récentes</item>
</string-array>
<string name="sort_by">Trier par</string>
<string name="sepia_search_hint">Mot-clé, chaîne, vidéo, etc.</string>
<string name="sepia_indication">La recherche Sepia affiche les vidéos et les chaînes qui correspondent à votre recherche mais qui n\'est pas l\'éditeur, ni le propriétaire. Si vous remarquez des problèmes avec une vidéo, signalez-la aux administrateurs sur le site Web de PeerTube où la vidéo est publiée.</string>
<string name="my_videos">Mes vidéos</string>
<string name="title">Titre</string>
<string name="license">Licence</string>
<string name="category">Catégorie</string>
<string name="language">Langue</string>
<string name="peertube_nsfw">Cette vidéo contient du contenu pour adultes</string>
<string name="peertube_enable_comments">Activer les commentaires</string>
<string name="description">Libellé</string>
<string name="toast_peertube_video_updated">La vidéo a été mise à jour !</string>
<string name="register_account">Créer un compte</string>
<string name="email_address">Adresse mèl</string>
<string name="preview">Aperçu</string>
<string name="change_preview">Modifier l\'aperçu</string>
<string name="name">Nom</string>
<string name="display_more">Afficher plus</string>
<string name="no_channels">Aucune chaîne !</string>
<string name="report_helper">Quelques explications concernant votre signalement…</string>
<string name="report_video">Signaler la vidéo</string>
<string name="report">Signaler</string>
<string name="change_instance">Changer d\'instance</string>
<string name="my_history">Historique</string>
<string name="edit">Modifier</string>
<string name="video_settings">Réglages des vidéos</string>
<string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (par défaut 100Mo)</string>
<string name="set_video_quality_description">Définir une qualité par défaut pour les vidéos</string>
<string name="set_quality_mode">Résolution pour les vidéos</string>
<string name="video_cache_value">Cache vidéo : %d Mo</string>
<string name="captions">Légendes</string>
<string name="pickup_captions">Options d\'envoi</string>
<string name="none">Aucune</string>
<string name="set_video_mode_description">Permet de changer le mode de lecture pour les vidéos (normal, streaming ou via un navigateur).</string>
<string name="delete_video">Supprimer la vidéo</string>
<string name="delete_video_confirmation">Êtes-vous sûr de vouloir supprimer cette vidéo ?</string>
<string name="no_video_to_display">Aucune vidéo nest disponible !</string>
<string name="share">Partager</string>
<string name="peertube_comment_on_video"><![CDATA[<b>%1$s</b> a commenté votre vidéo <b>%2$s</b>]]></string>
<string name="peertube_follow_channel"><![CDATA[<b>%1$s</b> suit votre chaîne <b>%2$s</b>]]></string>
<string name="peertube_follow_account"><![CDATA[<b>%1$s</b> suit votre compte]]></string>
<string name="peertube_video_published"><![CDATA[Votre vidéo <b>%1$s</b> a été publiée]]></string>
<string name="peertube_video_import_success"><![CDATA[Limportation de votre vidéo <b>%1$s</b> a réussi]]></string>
<string name="peertube_video_import_error"><![CDATA[Échec lors de limportation de votre vidéo <b>%1$s</b>]]></string>
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> a publié une nouvelle vidéo : <b>%2$s</b>]]></string>
<string name="peertube_video_blacklist"><![CDATA[Votre vidéo <b>%1$s</b> a été blacklisté]]></string>
<string name="peertube_video_unblacklist"><![CDATA[Votre vidéo <b>%1$s</b> nest plus blacklisté]]></string>
<string name="peertube_video_abuse"><![CDATA[Nouveau signalement pour la vidéo : <b>%1$s</b>]]></string>
<string name="add_public_comment">Ajouter un commentaire public</string>
<string name="add_public_reply">Répondre publiquement</string>
<string name="send_comment">Envoyer un commentaire</string>
<string name="all">Tout</string>
<string name="activity">Activité</string>
<string name="app">App</string>
<string name="fetch_notification_channel_name">Mise à jour des notifications</string>
<string name="peertube_video_report_success"><![CDATA[ Votre signalement <b>%1$s</b> a été accepté]]></string>
<string name="reply">Répondre</string>
<!-- end languages -->
<string name="playlists">Listes de lecture</string>
<string name="display_name">Nom d\'affichage</string>
<string name="action_playlist_add">Vous n\'avez aucune liste de lecture. Cliquez sur l\'icône « + » pour en ajouter une</string>
<string name="error_display_name">Vous devez fournir un nom d\'affichage !</string>
<string name="error_channel_mandatory">Une chaîne est requise lorsque la liste de lecture est publique.</string>
<string name="action_playlist_create">Créer une liste de lecture</string>
<string name="action_playlist_empty_content">Cette liste de lecture est vide.</string>
<string name="password_confirm">Confirmer le mot de passe</string>
<string name="agreement_check">J\'accepte les %1$s et les %2$s</string>
<string name="server_rules">règles du serveur</string>
<string name="tos">conditions de service</string>
<string name="sign_up">Sinscrire</string>
<string name="all_field_filled">Veuillez remplir tous les champs !</string>
<string name="password_error">Les mots de passe ne sont pas identiques !</string>
<string name="email_error">L\'e-mail ne semble pas être valide !</string>
<string name="email_indicator">Vous recevrez un e-mail de confirmation</string>
<string name="password_indicator">Utilisez au moins 8 caractères</string>
<string name="password_too_short">Le mot de passe doit contenir au moins 8 caractères</string>
<string name="username_error">Le nom d\'utilisateur·rice doit être en minuscule, contenir uniquement des lettres, des chiffres, des points et des caractères de soulignement</string>
<string name="account_created">Compte créé !</string>
<string name="account_created_message">Votre compte est créé !\n\nVous allez recevoir un email de confirmation à l\'adresse <b>%1$s</b>.\n\nCliquez sur le lien présent dans le mail pour valider votre compte.</string>
<string name="account">Compte</string>
<string name="report_account">Signaler le compte</string>
<string-array name="settings_video_mode">
<item>Normal</item>
<item>Navigateur</item>
<item>Magnet</item>
<item>Torrent</item>
</string-array>
<string-array name="settings_video_quality">
<item>Élevée</item>
<item>Moyenne</item>
<item>Faible</item>
</string-array>
<string name="unlimited">Illimité</string>
<string name="mb">Mo</string>
<string name="gb">Go</string>
<string name="total_video_quota">Total du quota vidéo</string>
<string name="daily_video_quota">Quota vidéo journalier</string>
<string name="nsfw_title_warning">Contenu explicite ou sensible</string>
<string name="nsfw_message_warning">Cette vidéo contient du contenu sensible. Êtes-vous sûr·e de vouloir la regarder ?</string>
<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="no_playlist">Aucune liste de lecture !</string>
<string name="title_video_peertube">Titre de la vidéo</string>
<string name="join_peertube">Rejoignez Peertube</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="make_an_action">Faire une action</string>
<string name="action_unfollow">Se désabonner</string>
<string name="display_nsfw_videos">Afficher les vidéos sensibles</string>
<string name="fullscreen">Vidéo plein écran</string>
<string name="bookmark_peertube_empty">Il ny a aucune vidéo Peertube dans vos favoris !</string>
<string name="delete_channel">Supprimer la chaîne</string>
<string name="action_channel_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette chaîne ?</string>
<string name="modify_playlists">Vidéo dans les listes de lecture</string>
<string name="no_muted">Aucun compte en sourdine !</string>
<string name="error_display_name_channel">Vous devez fournir un nom d\'affichage et un nom pour la chaîne!</string>
<string name="action_channel_create">Créer une chaîne</string>
<string name="action_channel_edit">Modifier une chaîne</string>
<string name="email_error_domain">Les adresses mails %1$s ne sont pas autorisées !</string>
<string name="report_comment_size">Veuillez préciser les raisons.</string>
<string name="not_logged_in">Vous devez être connecté.e pour effectuer cette action !</string>
<string name="successful_report">Le compte a été signalé !</string>
<string name="successful_report_comment">Le commentaire a été signalé !</string>
<string name="successful_video_report">La vidéo a été signalée !</string>
<string name="password_length_error">Le mot de passe doit contenir 6 caractères !</string>
<string name="muted_done">Le compte a été mis en sourdine !</string>
<string name="edit_video">Modifier une vidéo</string>
<string name="create_an_account">Créer un compte</string>
<string name="followers_count">%1$s Abonné·e·s</string>
<string name="developer">Développeur</string>
<string name="about_vesrion">Version %1$s</string>
<string name="about_the_app">À propos de lapplication</string>
<string name="Donate">Faire un don</string>
<string name="source_code">Code source</string>
<string name="issue_tracker">Suivi des tickets</string>
<string name="action_instance_empty_content">Aucune instance ne correspond à ces critères</string>
<string name="instances_picker">Sélecteur d\'instances</string>
<string name="pickup_instance">Choisissez une instance</string>
<string name="sensitive_video"> Vidéos sensibles</string>
<string name="sensitive_content">Contenu sensible : %1$s</string>
<string name="followers_instance">%1$s instances suiveuses</string>
<string name="help">Aide</string>
<string name="pickup_categories">Sélection des catégories</string>
<string name="pickup_languages">Sélection des langues</string>
<string name="notification_channel_name">Mise à jour des informations</string>
<string name="add_account">Ajouter un compte</string>
<string name="list_of_accounts">Liste des comptes</string>
<string name="pause">Pause</string>
<string name="play">Jouer</string>
<string name="minimize">Minimiser</string>
<string name="fast_rewind">Rembobinage rapide</string>
<string name="fast_forward">Avance rapide</string>
<string name="set_video_minimize">Minimiser la taille des vidéos</string>
<string name="set_video_minimize_description">Minimiser la taille des vidéos lorsque l\'application est en arrière-plan (Android N+)</string>
<string name="set_video_language">Filtre de langue</string>
<string name="set_video_language_description">Filtrer les vidéos avec différentes langues</string>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorAccent" android:state_checked="true" />
<item android:color="@android:color/tab_indicator_text" />
</selector>

View File

@ -0,0 +1,864 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="0.66"
android:scaleY="0.66"
android:translateX="21"
android:translateY="21">
<path android:pathData="M85.355,14.645C75.91,5.201 63.354,0 50,0C36.644,0 24.088,5.201 14.645,14.645S0,36.644 0,50c0,13.357 5.201,25.913 14.645,35.355C24.087,94.799 36.643,100 50,100c13.357,0 25.913,-5.201 35.355,-14.645C94.799,75.912 100,63.356 100,50C100,36.646 94.799,24.09 85.355,14.645z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="15.7699"
android:endY="86.8818"
android:startX="83.2562"
android:startY="14.1677"
android:type="linear">
<item
android:color="#FF28D1BC"
android:offset="0" />
<item
android:color="#FF00ABFF"
android:offset="0.6" />
<item
android:color="#FF2A5ED6"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M3.151,32.464L13.3,46.493L30.239,4.045c-5.75,2.474 -11.035,6.041 -15.595,10.6C9.504,19.786 5.623,25.851 3.151,32.464z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="24.2938"
android:endY="39.2239"
android:startX="-4.1098"
android:startY="-39.1612"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.5762" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M2.3,34.893c-1.5,4.8 -2.3,9.8 -2.3,15c0,2.8 0.2,5.5 0.7,8.2l7.8,10l36.878,-26.896L2.3,34.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="26.5038"
android:endY="54.332794"
android:startX="-2.655"
android:startY="33.41799"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M40.8,5.893l27.6,28.3l8.9,-26.2c-5.8,-3.8 -12.3,-6.3 -19.2,-7.4L40.8,5.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="62.8149"
android:endY="14.768093"
android:startX="84.794"
android:startY="0.65519285"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M42.79,46.347l25.8,0.6l-27.6,-28.3z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="45.013"
android:endY="42.08"
android:startX="59.9387"
android:startY="27.9081"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M96.88,67.451C98.928,61.941 100,56.054 100,50c0,-0.202 -0.005,-0.402 -0.007,-0.604L68.806,34.399L96.88,67.451z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="79.7008"
android:endY="33.716"
android:startX="107.2237"
android:startY="81.6425"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0029" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M27.8,15.893l17.4,11.8l3.7,-21.1z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8608"
android:endY="17.1429"
android:startX="27.8"
android:startY="17.1429"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="8.440641E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M97.976,35.848l-5.312,-1.255l3.7,24l3.329,-3.044C99.895,53.719 100,51.868 100,50C100,45.14 99.308,40.386 97.976,35.848z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="93.5393"
android:endY="46.7512"
android:startX="101.8224"
android:startY="45.4073"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0017" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.998,85.447l2.742,7.442c2.87,-1.729 5.579,-3.761 8.092,-6.075L72.998,85.447z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="77.1128"
android:endY="79.7658"
android:startX="81.8324"
android:startY="102.8394"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="0.9982" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M87.435,83.143c2.349,-2.646 4.393,-5.5 6.108,-8.522l-28.357,2.776L87.435,83.143z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="65.4945"
android:endY="79.3595"
android:startX="123.109"
android:startY="78.2586"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0022" />
<item
android:color="#00FFFFFF"
android:offset="0.9966" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.9,85.193l-56.3,-11.1l7.2,18.4c1.6,1 3.3,1.9 5.1,2.7L72.9,85.193z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="38.2047"
android:endY="89.4249"
android:startX="58.4365"
android:startY="59.1884"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0015" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M79.09,58.897l-21,1.5l10.3,18.9z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="61.745285"
android:endY="71.03565"
android:startX="78.23818"
android:startY="57.920563"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="0.9993" />
</gradient>
</aapt:attr>
</path>
<group>
<clip-path android:pathData="M50,50m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0" />
<path android:pathData="M31.304,22.589v0.7c0,0.1 0,0.1 -0.1,0.2l-1.9,0.8c0,0 0,0 -0.1,0s0,0 -0.1,0l-0.4,-0.2l19.7,27l2.4,-1.7L31.304,22.589z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.7969"
android:endY="36.839092"
android:startX="28.7808"
android:startY="36.839092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M65.409,20.005l-0.005,-1.116l-17,30.7l2.5,1.4l16.722,-30.026L65.409,20.005z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3499"
android:endY="34.939095"
android:startX="67.5984"
android:startY="34.939095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M79.625,18.344l-0.021,-1.254l-31.3,32.1l2.1,2l31.2,-32L79.625,18.344z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3039"
android:endY="34.138992"
android:startX="81.6039"
android:startY="34.138992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="7.851759E-5" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M90.104,35.389c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2l-41.1,15.7l1,2.7l41.3,-15.8L90.104,35.389z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8205"
android:endY="42.388992"
android:startX="91.2039"
android:startY="42.388992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0038" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M11.804,27.989v1.8c0,0.1 -0.1,0.2 -0.1,0.2l-1.2,0.5l38.5,20.9l1.4,-2.6L11.804,27.989z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3298"
android:endY="39.689095"
android:startX="10.4298"
android:startY="39.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M17.265,50.089c0.1,0 0.1,0.2 0.1,0.2v2.5c0,0.1 -0.1,0.2 -0.1,0.2l32.439,-1.3l-0.1,-2.9L17.265,50.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.6603"
android:endY="50.888992"
android:startX="17.2212"
android:startY="50.888992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="3.140703E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M7.668,60.675c0.036,0.014 0.234,0.056 0.236,0.214l0,0l0,0v1.9l42.1,-11.2l-0.9,-2.8l-42.8,11.4C6.304,60.189 7.632,60.661 7.668,60.675z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.0039"
android:endY="55.789093"
android:startX="6.304"
android:startY="55.789093"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0047" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M33.904,62.147v1.942l16.7,-11.95l-1.8,-2.3L32.611,61.406L33.904,62.147z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.5851"
android:endY="56.964092"
android:startX="32.571"
android:startY="56.964092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M35.804,35.789v1.2c0,0.1 -0.1,0.2 -0.1,0.2l-1.8,0.8l14.5,13.4l2,-2.1L35.804,35.789z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3668"
android:endY="43.589092"
android:startX="33.8669"
android:startY="43.589092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0048" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M55.804,33.089C55.804,33.089 55.704,33.089 55.804,33.089c-0.1,0 -0.1,0 -0.2,0l-1.9,-0.8l0,0l-5.4,17.5l2.8,0.9l5.5,-17.9L55.804,33.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.2319"
android:endY="41.489094"
android:startX="56.5588"
android:startY="41.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,45.489l-13.8,3.2l0.7,2.8l13.8,-3.2L64.804,45.489z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.9512"
android:endY="48.489094"
android:startX="65.4322"
android:startY="48.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0032" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M74.107,63.536L74.107,63.536L74.107,63.536c0,-0.098 0,-0.098 0.098,-0.195l0,0l0,0l0,0l1.172,-0.391L50.571,49.278l-1.367,2.441l24.903,13.77C74.107,65.489 74.107,63.536 74.107,63.536z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.2177"
android:endY="57.3833"
android:startX="75.4526"
android:startY="57.3833"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="5.496231E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M81.904,79.089L81.904,79.089L81.904,79.089L81.904,79.089l2,-0.6c0,0 0,0 0.1,0l-33.7,-29.4l-1.9,2.2l33.3,29v-1C81.704,79.289 81.694,79.141 81.904,79.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.4039"
android:endY="64.689095"
android:startX="84.0039"
android:startY="64.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0012" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M54.404,79.689l2,-0.6h0.1l0.7,0.2l-6.2,-29.7l-2.8,0.6L54.404,79.689L54.404,79.689z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.1377"
android:endY="64.63899"
android:startX="57.3221"
android:startY="64.63899"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,46.689l-15.6,2.1l0.4,2.9l30.2,-4.1l-0.4,-0.1c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2.5l0,0l0,0l0,0L64.804,46.689">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.1732"
android:endY="48.239094"
android:startX="79.7731"
android:startY="48.239094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</group>
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M51.639,0.029l-10.172,9.922l38.598,0.091"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.366,2.397L67.311,16.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.224,8.046L71.304,14.042"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.609,16.642L69.609,17.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M83.78,13.139L82.883,14.965"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.325,14.615c0.096,0.097 -3.374,29.468 -3.374,29.468"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.811,35.231L68.98,45.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.157,19.065L67.957,44.865"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.66,32.342l-48.193,-22.391l23.922,7.289"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M69.592,19.841L93.523,25.345"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M91.096,21.502L91.699,31.585"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M95.08,28.318L93.554,32.271"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M92.657,35.991L91.055,78.558"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M78.616,65.137L96.149,69.308"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.904,46.935L78.571,63.748"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.296,41.575c-0.585,0.17 -15.743,4.529 -15.743,4.529l16.414,5.629"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.766,54.87l-15.164,16.679l5.749,7.991"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.456,66.713L83.427,78.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M84.31,82.536L83.75,86.889"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.28,82.142L86.327,84.354"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.12,48.139l-4.73,14.382l-8.132,-14.106"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.18,45.887L68.951,46.291"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.305,47.596L17.837,88.283"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.335,79.846L33.835,64.846"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.137,48.23L16.967,87.533"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M75.145,66.556c-0.008,0.074 -16.683,13.266 -16.683,13.266"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M74.354,66.171L62.454,98.371"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M67.749,96.77L22.551,91.808"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.293,81.937L19.29,89.467"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.846,82.756l-18.767,15.187l48.523,-26.394"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M25.193,93.341L55.115,99.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.046,65.521L15.515,86.205"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.466,32.642L33.573,61.932"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M34.116,62.841L64.78,47.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.799,46.436L17.528,51.124"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M17.481,52.92L29.665,61.822"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M7.972,61.193L64.229,47.287"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M29.602,63.342L8.042,62.247"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M32.453,37.508L14.288,84.989"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M28.519,23.938L11.678,82.116"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M6.456,64.297L5.153,72.159"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M3.605,62.036L1.439,61.984"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.08,52.807L13.108,51.842"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M9.157,30.693L6.857,59.693"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.243,53.353L6.765,60.325"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M27.926,23.641L16.156,49.667"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.351,27.987L15.502,49.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.704,37.136L17.432,50.364"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M1.452,37.962L13.741,49.851"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M8.149,30.316L0.472,43.105"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.306,44.454L13.082,50.537"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.188,15.113L10.004,26.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M11.786,27.339L14.886,26.239"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.953,12.477L16.651,24.087"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M19.154,24.807L27.254,21.972"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M20.361,9.72L28.536,20.331"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.069,29.329L27.064,5.547"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.287,22.039L53.587,29.739"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M53.593,30.937L35.793,34.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.821,45.539L35.934,36.076"
android:strokeAlpha="0.6" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.802,15.419l-1.317,0.456l1.327,0.511l1.327,-0.511L81.802,15.419zM80.162,18.059l1.476,0.588v-1.92l-1.476,-0.588V18.059zM82.004,16.705v1.942l1.441,-0.584v-1.924L82.004,16.705z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M67.443,17.033l-1.317,0.456L67.453,18l1.327,-0.511L67.443,17.033zM65.804,19.673l1.476,0.588v-1.92l-1.476,-0.588V19.673zM67.646,18.319v1.942l1.441,-0.584v-1.924L67.646,18.319z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M55.737,29.211l-1.317,0.456l1.327,0.511l1.327,-0.511L55.737,29.211zM54.098,31.851l1.476,0.588v-1.92l-1.476,-0.588V31.851zM55.94,30.497v1.942l1.441,-0.584v-1.924L55.94,30.497z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M29.251,20.523l-1.317,0.456l1.327,0.511l1.327,-0.511L29.251,20.523zM27.611,23.164l1.476,0.588v-1.92l-1.476,-0.588V23.164zM29.453,21.81v1.942l1.441,-0.584v-1.924L29.453,21.81z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M15.227,49.775l-1.317,0.456l1.327,0.511l1.327,-0.511L15.227,49.775zM13.587,52.415l1.476,0.588v-1.92l-1.476,-0.588V52.415zM15.429,51.062v1.942l1.441,-0.584v-1.924L15.429,51.062z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M9.601,26.95l-1.317,0.456l1.327,0.511l1.327,-0.511L9.601,26.95zM7.962,29.59l1.476,0.588v-1.92L7.962,27.67V29.59zM9.804,28.236v1.942l1.441,-0.584V27.67L9.804,28.236z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M56.429,79.561l-1.317,0.456l1.327,0.511l1.327,-0.511L56.429,79.561zM54.79,82.201l1.476,0.588v-1.92l-1.476,-0.588V82.201zM56.632,80.847v1.942l1.441,-0.584v-1.924L56.632,80.847z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M33.602,34.175l-1.317,0.456l1.327,0.511l1.327,-0.511L33.602,34.175zM31.963,36.815l1.476,0.588v-1.92l-1.476,-0.588V36.815zM33.804,35.462v1.942l1.441,-0.584v-1.924L33.804,35.462z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M31.796,61.722l-1.317,0.456l1.327,0.511l1.327,-0.511L31.796,61.722zM30.156,64.362l1.476,0.588v-1.92l-1.476,-0.588V64.362zM31.998,63.009v1.942l1.441,-0.584v-1.924L31.998,63.009z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M83.96,79.141l-1.317,0.456l1.327,0.511l1.327,-0.511L83.96,79.141zM82.321,81.781l1.476,0.588v-1.92l-1.476,-0.588V81.781zM84.162,80.428v1.942l1.441,-0.584v-1.924L84.162,80.428z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M76.393,63.075l-1.317,0.456l1.327,0.511l1.327,-0.511L76.393,63.075zM74.754,65.715l1.476,0.588v-1.92l-1.476,-0.588V65.715zM76.596,64.362v1.942l1.441,-0.584v-1.924L76.596,64.362z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.202,44.475l-1.317,0.456l1.327,0.511l1.327,-0.511L81.202,44.475zM79.563,47.115l1.476,0.588v-1.92l-1.476,-0.588V47.115zM81.404,45.762v1.942l1.441,-0.584v-1.924L81.404,45.762z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M92.296,32.228l-1.317,0.456l1.327,0.511l1.327,-0.511L92.296,32.228zM90.656,34.868l1.476,0.588v-1.92l-1.476,-0.588V34.868zM92.498,33.515v1.942l1.441,-0.584v-1.924L92.498,33.515z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M5.806,60.518l-1.317,0.456l1.327,0.511l1.327,-0.511L5.806,60.518zM4.167,63.158l1.476,0.588v-1.92l-1.476,-0.588V63.158zM6.009,61.804v1.942l1.441,-0.584v-1.924L6.009,61.804z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M24.691,30.255c-0.615,0.788 -0.538,1.99 0.329,2.667c0.867,0.677 1.99,0.538 2.667,-0.329c6.397,-8.2 16.796,-12.263 27.125,-10.546c0.658,0.133 1.342,-0.095 1.773,-0.646c0.185,-0.237 0.29,-0.535 0.396,-0.833c0.088,-0.438 0.019,-1 -0.314,-1.386s-0.727,-0.694 -1.165,-0.782C43.638,16.373 31.949,20.952 24.691,30.255z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M71.1,47.4L41.3,29.2c-1,-0.5 -2.2,-0.5 -3.2,0.1s-1.6,1.6 -1.6,2.8v36.2c0,1.1 0.6,2.2 1.6,2.8c0.5,0.3 1.1,0.5 1.6,0.5s1.1,-0.1 1.6,-0.4L71.1,53c1,-0.6 1.6,-1.6 1.6,-2.8C72.7,49.1 72.1,48 71.1,47.4zM68.5,50.2L40.3,67.4V33L68.5,50.2z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M79.6,20.4C71.7,12.6 61.2,8.2 50,8.2s-21.7,4.3 -29.6,12.2C12.6,28.3 8.2,38.8 8.2,50s4.3,21.7 12.2,29.6S38.8,91.8 50,91.8s21.7,-4.3 29.6,-12.2S91.8,61.2 91.8,50S87.4,28.3 79.6,20.4zM88.1,50c0,10.2 -4,19.7 -11.2,26.9C69.7,84.1 60.2,88.1 50,88.1s-19.7,-4 -26.9,-11.2C15.9,69.7 11.9,60.2 11.9,50s4,-19.7 11.2,-26.9S39.9,11.9 50,11.9c10.2,0 19.7,4 26.9,11.2C84.1,30.3 88.1,39.8 88.1,50z" />
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,862 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="0.66"
android:scaleY="0.66"
android:translateX="21"
android:translateY="21">
<path android:pathData="M85.355,14.645C75.91,5.201 63.354,0 50,0C36.644,0 24.088,5.201 14.645,14.645S0,36.644 0,50c0,13.357 5.201,25.913 14.645,35.355C24.087,94.799 36.643,100 50,100c13.357,0 25.913,-5.201 35.355,-14.645C94.799,75.912 100,63.356 100,50C100,36.646 94.799,24.09 85.355,14.645z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="15.7699"
android:endY="86.8818"
android:startX="83.2562"
android:startY="14.1677"
android:type="linear">
<item
android:color="#FF28D1BC"
android:offset="0" />
<item
android:color="#FF00ABFF"
android:offset="0.6" />
<item
android:color="#FF2A5ED6"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M3.151,32.464L13.3,46.493L30.239,4.045c-5.75,2.474 -11.035,6.041 -15.595,10.6C9.504,19.786 5.623,25.851 3.151,32.464z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="24.2938"
android:endY="39.2239"
android:startX="-4.1098"
android:startY="-39.1612"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.5762" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M2.3,34.893c-1.5,4.8 -2.3,9.8 -2.3,15c0,2.8 0.2,5.5 0.7,8.2l7.8,10l36.878,-26.896L2.3,34.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="26.5038"
android:endY="54.332794"
android:startX="-2.655"
android:startY="33.41799"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M40.8,5.893l27.6,28.3l8.9,-26.2c-5.8,-3.8 -12.3,-6.3 -19.2,-7.4L40.8,5.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="62.8149"
android:endY="14.768093"
android:startX="84.794"
android:startY="0.65519285"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M42.79,46.347l25.8,0.6l-27.6,-28.3z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="45.013"
android:endY="42.08"
android:startX="59.9387"
android:startY="27.9081"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M96.88,67.451C98.928,61.941 100,56.054 100,50c0,-0.202 -0.005,-0.402 -0.007,-0.604L68.806,34.399L96.88,67.451z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="79.7008"
android:endY="33.716"
android:startX="107.2237"
android:startY="81.6425"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0029" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M27.8,15.893l17.4,11.8l3.7,-21.1z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8608"
android:endY="17.1429"
android:startX="27.8"
android:startY="17.1429"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="8.440641E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M97.976,35.848l-5.312,-1.255l3.7,24l3.329,-3.044C99.895,53.719 100,51.868 100,50C100,45.14 99.308,40.386 97.976,35.848z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="93.5393"
android:endY="46.7512"
android:startX="101.8224"
android:startY="45.4073"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0017" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.998,85.447l2.742,7.442c2.87,-1.729 5.579,-3.761 8.092,-6.075L72.998,85.447z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="77.1128"
android:endY="79.7658"
android:startX="81.8324"
android:startY="102.8394"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="0.9982" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M87.435,83.143c2.349,-2.646 4.393,-5.5 6.108,-8.522l-28.357,2.776L87.435,83.143z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="65.4945"
android:endY="79.3595"
android:startX="123.109"
android:startY="78.2586"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0022" />
<item
android:color="#00FFFFFF"
android:offset="0.9966" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.9,85.193l-56.3,-11.1l7.2,18.4c1.6,1 3.3,1.9 5.1,2.7L72.9,85.193z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="38.2047"
android:endY="89.4249"
android:startX="58.4365"
android:startY="59.1884"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0015" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M79.09,58.897l-21,1.5l10.3,18.9z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="61.745285"
android:endY="71.03565"
android:startX="78.23818"
android:startY="57.920563"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="0.9993" />
</gradient>
</aapt:attr>
</path>
<group>
<clip-path android:pathData="M50,50m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0" />
<path android:pathData="M31.304,22.589v0.7c0,0.1 0,0.1 -0.1,0.2l-1.9,0.8c0,0 0,0 -0.1,0s0,0 -0.1,0l-0.4,-0.2l19.7,27l2.4,-1.7L31.304,22.589z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.7969"
android:endY="36.839092"
android:startX="28.7808"
android:startY="36.839092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M65.409,20.005l-0.005,-1.116l-17,30.7l2.5,1.4l16.722,-30.026L65.409,20.005z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3499"
android:endY="34.939095"
android:startX="67.5984"
android:startY="34.939095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M79.625,18.344l-0.021,-1.254l-31.3,32.1l2.1,2l31.2,-32L79.625,18.344z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3039"
android:endY="34.138992"
android:startX="81.6039"
android:startY="34.138992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="7.851759E-5" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M90.104,35.389c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2l-41.1,15.7l1,2.7l41.3,-15.8L90.104,35.389z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8205"
android:endY="42.388992"
android:startX="91.2039"
android:startY="42.388992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0038" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M11.804,27.989v1.8c0,0.1 -0.1,0.2 -0.1,0.2l-1.2,0.5l38.5,20.9l1.4,-2.6L11.804,27.989z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3298"
android:endY="39.689095"
android:startX="10.4298"
android:startY="39.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M17.265,50.089c0.1,0 0.1,0.2 0.1,0.2v2.5c0,0.1 -0.1,0.2 -0.1,0.2l32.439,-1.3l-0.1,-2.9L17.265,50.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.6603"
android:endY="50.888992"
android:startX="17.2212"
android:startY="50.888992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="3.140703E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M7.668,60.675c0.036,0.014 0.234,0.056 0.236,0.214l0,0l0,0v1.9l42.1,-11.2l-0.9,-2.8l-42.8,11.4C6.304,60.189 7.632,60.661 7.668,60.675z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.0039"
android:endY="55.789093"
android:startX="6.304"
android:startY="55.789093"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0047" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M33.904,62.147v1.942l16.7,-11.95l-1.8,-2.3L32.611,61.406L33.904,62.147z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.5851"
android:endY="56.964092"
android:startX="32.571"
android:startY="56.964092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M35.804,35.789v1.2c0,0.1 -0.1,0.2 -0.1,0.2l-1.8,0.8l14.5,13.4l2,-2.1L35.804,35.789z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3668"
android:endY="43.589092"
android:startX="33.8669"
android:startY="43.589092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0048" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M55.804,33.089C55.804,33.089 55.704,33.089 55.804,33.089c-0.1,0 -0.1,0 -0.2,0l-1.9,-0.8l0,0l-5.4,17.5l2.8,0.9l5.5,-17.9L55.804,33.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.2319"
android:endY="41.489094"
android:startX="56.5588"
android:startY="41.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,45.489l-13.8,3.2l0.7,2.8l13.8,-3.2L64.804,45.489z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.9512"
android:endY="48.489094"
android:startX="65.4322"
android:startY="48.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0032" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M74.107,63.536L74.107,63.536L74.107,63.536c0,-0.098 0,-0.098 0.098,-0.195l0,0l0,0l0,0l1.172,-0.391L50.571,49.278l-1.367,2.441l24.903,13.77C74.107,65.489 74.107,63.536 74.107,63.536z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.2177"
android:endY="57.3833"
android:startX="75.4526"
android:startY="57.3833"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="5.496231E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M81.904,79.089L81.904,79.089L81.904,79.089L81.904,79.089l2,-0.6c0,0 0,0 0.1,0l-33.7,-29.4l-1.9,2.2l33.3,29v-1C81.704,79.289 81.694,79.141 81.904,79.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.4039"
android:endY="64.689095"
android:startX="84.0039"
android:startY="64.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0012" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M54.404,79.689l2,-0.6h0.1l0.7,0.2l-6.2,-29.7l-2.8,0.6L54.404,79.689L54.404,79.689z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.1377"
android:endY="64.63899"
android:startX="57.3221"
android:startY="64.63899"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,46.689l-15.6,2.1l0.4,2.9l30.2,-4.1l-0.4,-0.1c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2.5l0,0l0,0l0,0L64.804,46.689">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.1732"
android:endY="48.239094"
android:startX="79.7731"
android:startY="48.239094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</group>
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M51.639,0.029l-10.172,9.922l38.598,0.091"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.366,2.397L67.311,16.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.224,8.046L71.304,14.042"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.609,16.642L69.609,17.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M83.78,13.139L82.883,14.965"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.325,14.615c0.096,0.097 -3.374,29.468 -3.374,29.468"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.811,35.231L68.98,45.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.157,19.065L67.957,44.865"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.66,32.342l-48.193,-22.391l23.922,7.289"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M69.592,19.841L93.523,25.345"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M91.096,21.502L91.699,31.585"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M95.08,28.318L93.554,32.271"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M92.657,35.991L91.055,78.558"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M78.616,65.137L96.149,69.308"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.904,46.935L78.571,63.748"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.296,41.575c-0.585,0.17 -15.743,4.529 -15.743,4.529l16.414,5.629"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.766,54.87l-15.164,16.679l5.749,7.991"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.456,66.713L83.427,78.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M84.31,82.536L83.75,86.889"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.28,82.142L86.327,84.354"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.12,48.139l-4.73,14.382l-8.132,-14.106"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.18,45.887L68.951,46.291"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.305,47.596L17.837,88.283"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.335,79.846L33.835,64.846"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.137,48.23L16.967,87.533"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M75.145,66.556c-0.008,0.074 -16.683,13.266 -16.683,13.266"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M74.354,66.171L62.454,98.371"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M67.749,96.77L22.551,91.808"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.293,81.937L19.29,89.467"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.846,82.756l-18.767,15.187l48.523,-26.394"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M25.193,93.341L55.115,99.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.046,65.521L15.515,86.205"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.466,32.642L33.573,61.932"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M34.116,62.841L64.78,47.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.799,46.436L17.528,51.124"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M17.481,52.92L29.665,61.822"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M7.972,61.193L64.229,47.287"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M29.602,63.342L8.042,62.247"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M32.453,37.508L14.288,84.989"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M28.519,23.938L11.678,82.116"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M6.456,64.297L5.153,72.159"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M3.605,62.036L1.439,61.984"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.08,52.807L13.108,51.842"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M9.157,30.693L6.857,59.693"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.243,53.353L6.765,60.325"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M27.926,23.641L16.156,49.667"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.351,27.987L15.502,49.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.704,37.136L17.432,50.364"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M1.452,37.962L13.741,49.851"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M8.149,30.316L0.472,43.105"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.306,44.454L13.082,50.537"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.188,15.113L10.004,26.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M11.786,27.339L14.886,26.239"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.953,12.477L16.651,24.087"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M19.154,24.807L27.254,21.972"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M20.361,9.72L28.536,20.331"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.069,29.329L27.064,5.547"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.287,22.039L53.587,29.739"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M53.593,30.937L35.793,34.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.821,45.539L35.934,36.076"
android:strokeAlpha="0.6" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.802,15.419l-1.317,0.456l1.327,0.511l1.327,-0.511L81.802,15.419zM80.162,18.059l1.476,0.588v-1.92l-1.476,-0.588V18.059zM82.004,16.705v1.942l1.441,-0.584v-1.924L82.004,16.705z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M67.443,17.033l-1.317,0.456L67.453,18l1.327,-0.511L67.443,17.033zM65.804,19.673l1.476,0.588v-1.92l-1.476,-0.588V19.673zM67.646,18.319v1.942l1.441,-0.584v-1.924L67.646,18.319z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M55.737,29.211l-1.317,0.456l1.327,0.511l1.327,-0.511L55.737,29.211zM54.098,31.851l1.476,0.588v-1.92l-1.476,-0.588V31.851zM55.94,30.497v1.942l1.441,-0.584v-1.924L55.94,30.497z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M29.251,20.523l-1.317,0.456l1.327,0.511l1.327,-0.511L29.251,20.523zM27.611,23.164l1.476,0.588v-1.92l-1.476,-0.588V23.164zM29.453,21.81v1.942l1.441,-0.584v-1.924L29.453,21.81z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M15.227,49.775l-1.317,0.456l1.327,0.511l1.327,-0.511L15.227,49.775zM13.587,52.415l1.476,0.588v-1.92l-1.476,-0.588V52.415zM15.429,51.062v1.942l1.441,-0.584v-1.924L15.429,51.062z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M9.601,26.95l-1.317,0.456l1.327,0.511l1.327,-0.511L9.601,26.95zM7.962,29.59l1.476,0.588v-1.92L7.962,27.67V29.59zM9.804,28.236v1.942l1.441,-0.584V27.67L9.804,28.236z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M56.429,79.561l-1.317,0.456l1.327,0.511l1.327,-0.511L56.429,79.561zM54.79,82.201l1.476,0.588v-1.92l-1.476,-0.588V82.201zM56.632,80.847v1.942l1.441,-0.584v-1.924L56.632,80.847z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M33.602,34.175l-1.317,0.456l1.327,0.511l1.327,-0.511L33.602,34.175zM31.963,36.815l1.476,0.588v-1.92l-1.476,-0.588V36.815zM33.804,35.462v1.942l1.441,-0.584v-1.924L33.804,35.462z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M31.796,61.722l-1.317,0.456l1.327,0.511l1.327,-0.511L31.796,61.722zM30.156,64.362l1.476,0.588v-1.92l-1.476,-0.588V64.362zM31.998,63.009v1.942l1.441,-0.584v-1.924L31.998,63.009z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M83.96,79.141l-1.317,0.456l1.327,0.511l1.327,-0.511L83.96,79.141zM82.321,81.781l1.476,0.588v-1.92l-1.476,-0.588V81.781zM84.162,80.428v1.942l1.441,-0.584v-1.924L84.162,80.428z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M76.393,63.075l-1.317,0.456l1.327,0.511l1.327,-0.511L76.393,63.075zM74.754,65.715l1.476,0.588v-1.92l-1.476,-0.588V65.715zM76.596,64.362v1.942l1.441,-0.584v-1.924L76.596,64.362z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.202,44.475l-1.317,0.456l1.327,0.511l1.327,-0.511L81.202,44.475zM79.563,47.115l1.476,0.588v-1.92l-1.476,-0.588V47.115zM81.404,45.762v1.942l1.441,-0.584v-1.924L81.404,45.762z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M92.296,32.228l-1.317,0.456l1.327,0.511l1.327,-0.511L92.296,32.228zM90.656,34.868l1.476,0.588v-1.92l-1.476,-0.588V34.868zM92.498,33.515v1.942l1.441,-0.584v-1.924L92.498,33.515z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M5.806,60.518l-1.317,0.456l1.327,0.511l1.327,-0.511L5.806,60.518zM4.167,63.158l1.476,0.588v-1.92l-1.476,-0.588V63.158zM6.009,61.804v1.942l1.441,-0.584v-1.924L6.009,61.804z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M24.691,30.255c-0.615,0.788 -0.538,1.99 0.329,2.667c0.867,0.677 1.99,0.538 2.667,-0.329c6.397,-8.2 16.796,-12.263 27.125,-10.546c0.658,0.133 1.342,-0.095 1.773,-0.646c0.185,-0.237 0.29,-0.535 0.396,-0.833c0.088,-0.438 0.019,-1 -0.314,-1.386s-0.727,-0.694 -1.165,-0.782C43.638,16.373 31.949,20.952 24.691,30.255z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M71.1,47.4L41.3,29.2c-1,-0.5 -2.2,-0.5 -3.2,0.1s-1.6,1.6 -1.6,2.8v36.2c0,1.1 0.6,2.2 1.6,2.8c0.5,0.3 1.1,0.5 1.6,0.5s1.1,-0.1 1.6,-0.4L71.1,53c1,-0.6 1.6,-1.6 1.6,-2.8C72.7,49.1 72.1,48 71.1,47.4zM68.5,50.2L40.3,67.4V33L68.5,50.2z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M79.6,20.4C71.7,12.6 61.2,8.2 50,8.2s-21.7,4.3 -29.6,12.2C12.6,28.3 8.2,38.8 8.2,50s4.3,21.7 12.2,29.6S38.8,91.8 50,91.8s21.7,-4.3 29.6,-12.2S91.8,61.2 91.8,50S87.4,28.3 79.6,20.4zM88.1,50c0,10.2 -4,19.7 -11.2,26.9C69.7,84.1 60.2,88.1 50,88.1s-19.7,-4 -26.9,-11.2C15.9,69.7 11.9,60.2 11.9,50s4,-19.7 11.2,-26.9S39.9,11.9 50,11.9c10.2,0 19.7,4 26.9,11.2C84.1,30.3 88.1,39.8 88.1,50z" />
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,856 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="100dp"
android:height="100dp"
android:viewportWidth="100"
android:viewportHeight="100">
<path android:pathData="M85.355,14.645C75.91,5.201 63.354,0 50,0C36.644,0 24.088,5.201 14.645,14.645S0,36.644 0,50c0,13.357 5.201,25.913 14.645,35.355C24.087,94.799 36.643,100 50,100c13.357,0 25.913,-5.201 35.355,-14.645C94.799,75.912 100,63.356 100,50C100,36.646 94.799,24.09 85.355,14.645z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="15.7699"
android:endY="86.8818"
android:startX="83.2562"
android:startY="14.1677"
android:type="linear">
<item
android:color="#FF28D1BC"
android:offset="0" />
<item
android:color="#FF00ABFF"
android:offset="0.6" />
<item
android:color="#FF2A5ED6"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M3.151,32.464L13.3,46.493L30.239,4.045c-5.75,2.474 -11.035,6.041 -15.595,10.6C9.504,19.786 5.623,25.851 3.151,32.464z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="24.2938"
android:endY="39.2239"
android:startX="-4.1098"
android:startY="-39.1612"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.5762" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M2.3,34.893c-1.5,4.8 -2.3,9.8 -2.3,15c0,2.8 0.2,5.5 0.7,8.2l7.8,10l36.878,-26.896L2.3,34.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="26.5038"
android:endY="54.332794"
android:startX="-2.655"
android:startY="33.41799"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M40.8,5.893l27.6,28.3l8.9,-26.2c-5.8,-3.8 -12.3,-6.3 -19.2,-7.4L40.8,5.893z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="62.8149"
android:endY="14.768093"
android:startX="84.794"
android:startY="0.65519285"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M42.79,46.347l25.8,0.6l-27.6,-28.3z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="45.013"
android:endY="42.08"
android:startX="59.9387"
android:startY="27.9081"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M96.88,67.451C98.928,61.941 100,56.054 100,50c0,-0.202 -0.005,-0.402 -0.007,-0.604L68.806,34.399L96.88,67.451z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="79.7008"
android:endY="33.716"
android:startX="107.2237"
android:startY="81.6425"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0029" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M27.8,15.893l17.4,11.8l3.7,-21.1z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8608"
android:endY="17.1429"
android:startX="27.8"
android:startY="17.1429"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="8.440641E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M97.976,35.848l-5.312,-1.255l3.7,24l3.329,-3.044C99.895,53.719 100,51.868 100,50C100,45.14 99.308,40.386 97.976,35.848z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="93.5393"
android:endY="46.7512"
android:startX="101.8224"
android:startY="45.4073"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0017" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.998,85.447l2.742,7.442c2.87,-1.729 5.579,-3.761 8.092,-6.075L72.998,85.447z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="77.1128"
android:endY="79.7658"
android:startX="81.8324"
android:startY="102.8394"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="0.9982" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M87.435,83.143c2.349,-2.646 4.393,-5.5 6.108,-8.522l-28.357,2.776L87.435,83.143z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="65.4945"
android:endY="79.3595"
android:startX="123.109"
android:startY="78.2586"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0022" />
<item
android:color="#00FFFFFF"
android:offset="0.9966" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M72.9,85.193l-56.3,-11.1l7.2,18.4c1.6,1 3.3,1.9 5.1,2.7L72.9,85.193z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="38.2047"
android:endY="89.4249"
android:startX="58.4365"
android:startY="59.1884"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0015" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillAlpha="0.71"
android:pathData="M79.09,58.897l-21,1.5l10.3,18.9z"
android:strokeAlpha="0.71">
<aapt:attr name="android:fillColor">
<gradient
android:endX="61.745285"
android:endY="71.03565"
android:startX="78.23818"
android:startY="57.920563"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="0.9993" />
</gradient>
</aapt:attr>
</path>
<group>
<clip-path android:pathData="M50,50m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0" />
<path android:pathData="M31.304,22.589v0.7c0,0.1 0,0.1 -0.1,0.2l-1.9,0.8c0,0 0,0 -0.1,0s0,0 -0.1,0l-0.4,-0.2l19.7,27l2.4,-1.7L31.304,22.589z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.7969"
android:endY="36.839092"
android:startX="28.7808"
android:startY="36.839092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.006" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M65.409,20.005l-0.005,-1.116l-17,30.7l2.5,1.4l16.722,-30.026L65.409,20.005z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3499"
android:endY="34.939095"
android:startX="67.5984"
android:startY="34.939095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0013" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M79.625,18.344l-0.021,-1.254l-31.3,32.1l2.1,2l31.2,-32L79.625,18.344z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.3039"
android:endY="34.138992"
android:startX="81.6039"
android:startY="34.138992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="7.851759E-5" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M90.104,35.389c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2l-41.1,15.7l1,2.7l41.3,-15.8L90.104,35.389z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.8205"
android:endY="42.388992"
android:startX="91.2039"
android:startY="42.388992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0038" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M11.804,27.989v1.8c0,0.1 -0.1,0.2 -0.1,0.2l-1.2,0.5l38.5,20.9l1.4,-2.6L11.804,27.989z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3298"
android:endY="39.689095"
android:startX="10.4298"
android:startY="39.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M17.265,50.089c0.1,0 0.1,0.2 0.1,0.2v2.5c0,0.1 -0.1,0.2 -0.1,0.2l32.439,-1.3l-0.1,-2.9L17.265,50.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.6603"
android:endY="50.888992"
android:startX="17.2212"
android:startY="50.888992"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="3.140703E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M7.668,60.675c0.036,0.014 0.234,0.056 0.236,0.214l0,0l0,0v1.9l42.1,-11.2l-0.9,-2.8l-42.8,11.4C6.304,60.189 7.632,60.661 7.668,60.675z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.0039"
android:endY="55.789093"
android:startX="6.304"
android:startY="55.789093"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0047" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M33.904,62.147v1.942l16.7,-11.95l-1.8,-2.3L32.611,61.406L33.904,62.147z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.5851"
android:endY="56.964092"
android:startX="32.571"
android:startY="56.964092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M35.804,35.789v1.2c0,0.1 -0.1,0.2 -0.1,0.2l-1.8,0.8l14.5,13.4l2,-2.1L35.804,35.789z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.3668"
android:endY="43.589092"
android:startX="33.8669"
android:startY="43.589092"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0048" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M55.804,33.089C55.804,33.089 55.704,33.089 55.804,33.089c-0.1,0 -0.1,0 -0.2,0l-1.9,-0.8l0,0l-5.4,17.5l2.8,0.9l5.5,-17.9L55.804,33.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.2319"
android:endY="41.489094"
android:startX="56.5588"
android:startY="41.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,45.489l-13.8,3.2l0.7,2.8l13.8,-3.2L64.804,45.489z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="50.9512"
android:endY="48.489094"
android:startX="65.4322"
android:startY="48.489094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0032" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M74.107,63.536L74.107,63.536L74.107,63.536c0,-0.098 0,-0.098 0.098,-0.195l0,0l0,0l0,0l1.172,-0.391L50.571,49.278l-1.367,2.441l24.903,13.77C74.107,65.489 74.107,63.536 74.107,63.536z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.2177"
android:endY="57.3833"
android:startX="75.4526"
android:startY="57.3833"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="5.496231E-4" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M81.904,79.089L81.904,79.089L81.904,79.089L81.904,79.089l2,-0.6c0,0 0,0 0.1,0l-33.7,-29.4l-1.9,2.2l33.3,29v-1C81.704,79.289 81.694,79.141 81.904,79.089z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.4039"
android:endY="64.689095"
android:startX="84.0039"
android:startY="64.689095"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0012" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M54.404,79.689l2,-0.6h0.1l0.7,0.2l-6.2,-29.7l-2.8,0.6L54.404,79.689L54.404,79.689z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="48.1377"
android:endY="64.63899"
android:startX="57.3221"
android:startY="64.63899"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.0025" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M64.804,46.689l-15.6,2.1l0.4,2.9l30.2,-4.1l-0.4,-0.1c-0.1,0 -0.1,-0.1 -0.1,-0.2v-2.5l0,0l0,0l0,0L64.804,46.689">
<aapt:attr name="android:fillColor">
<gradient
android:endX="49.1732"
android:endY="48.239094"
android:startX="79.7731"
android:startY="48.239094"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0.003" />
<item
android:color="#00FFFFFF"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</group>
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M51.639,0.029l-10.172,9.922l38.598,0.091"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.366,2.397L67.311,16.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.224,8.046L71.304,14.042"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.609,16.642L69.609,17.642"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M83.78,13.139L82.883,14.965"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.325,14.615c0.096,0.097 -3.374,29.468 -3.374,29.468"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.811,35.231L68.98,45.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.157,19.065L67.957,44.865"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M89.66,32.342l-48.193,-22.391l23.922,7.289"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M69.592,19.841L93.523,25.345"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M91.096,21.502L91.699,31.585"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M95.08,28.318L93.554,32.271"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M92.657,35.991L91.055,78.558"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M78.616,65.137L96.149,69.308"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.904,46.935L78.571,63.748"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.296,41.575c-0.585,0.17 -15.743,4.529 -15.743,4.529l16.414,5.629"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M99.766,54.87l-15.164,16.679l5.749,7.991"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M77.456,66.713L83.427,78.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M84.31,82.536L83.75,86.889"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M85.28,82.142L86.327,84.354"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M81.12,48.139l-4.73,14.382l-8.132,-14.106"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.18,45.887L68.951,46.291"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M79.305,47.596L17.837,88.283"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.335,79.846L33.835,64.846"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M65.137,48.23L16.967,87.533"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M75.145,66.556c-0.008,0.074 -16.683,13.266 -16.683,13.266"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M74.354,66.171L62.454,98.371"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M67.749,96.77L22.551,91.808"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.293,81.937L19.29,89.467"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.846,82.756l-18.767,15.187l48.523,-26.394"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M25.193,93.341L55.115,99.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.046,65.521L15.515,86.205"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.466,32.642L33.573,61.932"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M34.116,62.841L64.78,47.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.799,46.436L17.528,51.124"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M17.481,52.92L29.665,61.822"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M7.972,61.193L64.229,47.287"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M29.602,63.342L8.042,62.247"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M32.453,37.508L14.288,84.989"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M28.519,23.938L11.678,82.116"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M6.456,64.297L5.153,72.159"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M3.605,62.036L1.439,61.984"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.08,52.807L13.108,51.842"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M9.157,30.693L6.857,59.693"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.243,53.353L6.765,60.325"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M27.926,23.641L16.156,49.667"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.351,27.987L15.502,49.442"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.704,37.136L17.432,50.364"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M1.452,37.962L13.741,49.851"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M8.149,30.316L0.472,43.105"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M0.306,44.454L13.082,50.537"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M14.188,15.113L10.004,26.542"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M11.786,27.339L14.886,26.239"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M16.953,12.477L16.651,24.087"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M19.154,24.807L27.254,21.972"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M20.361,9.72L28.536,20.331"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M54.069,29.329L27.064,5.547"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M31.287,22.039L53.587,29.739"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M53.593,30.937L35.793,34.637"
android:strokeAlpha="0.6" />
<path
android:fillAlpha="0.6"
android:fillColor="#FF000000"
android:pathData="M64.821,45.539L35.934,36.076"
android:strokeAlpha="0.6" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.802,15.419l-1.317,0.456l1.327,0.511l1.327,-0.511L81.802,15.419zM80.162,18.059l1.476,0.588v-1.92l-1.476,-0.588V18.059zM82.004,16.705v1.942l1.441,-0.584v-1.924L82.004,16.705z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M67.443,17.033l-1.317,0.456L67.453,18l1.327,-0.511L67.443,17.033zM65.804,19.673l1.476,0.588v-1.92l-1.476,-0.588V19.673zM67.646,18.319v1.942l1.441,-0.584v-1.924L67.646,18.319z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M55.737,29.211l-1.317,0.456l1.327,0.511l1.327,-0.511L55.737,29.211zM54.098,31.851l1.476,0.588v-1.92l-1.476,-0.588V31.851zM55.94,30.497v1.942l1.441,-0.584v-1.924L55.94,30.497z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M29.251,20.523l-1.317,0.456l1.327,0.511l1.327,-0.511L29.251,20.523zM27.611,23.164l1.476,0.588v-1.92l-1.476,-0.588V23.164zM29.453,21.81v1.942l1.441,-0.584v-1.924L29.453,21.81z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M15.227,49.775l-1.317,0.456l1.327,0.511l1.327,-0.511L15.227,49.775zM13.587,52.415l1.476,0.588v-1.92l-1.476,-0.588V52.415zM15.429,51.062v1.942l1.441,-0.584v-1.924L15.429,51.062z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M9.601,26.95l-1.317,0.456l1.327,0.511l1.327,-0.511L9.601,26.95zM7.962,29.59l1.476,0.588v-1.92L7.962,27.67V29.59zM9.804,28.236v1.942l1.441,-0.584V27.67L9.804,28.236z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M56.429,79.561l-1.317,0.456l1.327,0.511l1.327,-0.511L56.429,79.561zM54.79,82.201l1.476,0.588v-1.92l-1.476,-0.588V82.201zM56.632,80.847v1.942l1.441,-0.584v-1.924L56.632,80.847z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M33.602,34.175l-1.317,0.456l1.327,0.511l1.327,-0.511L33.602,34.175zM31.963,36.815l1.476,0.588v-1.92l-1.476,-0.588V36.815zM33.804,35.462v1.942l1.441,-0.584v-1.924L33.804,35.462z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M31.796,61.722l-1.317,0.456l1.327,0.511l1.327,-0.511L31.796,61.722zM30.156,64.362l1.476,0.588v-1.92l-1.476,-0.588V64.362zM31.998,63.009v1.942l1.441,-0.584v-1.924L31.998,63.009z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M83.96,79.141l-1.317,0.456l1.327,0.511l1.327,-0.511L83.96,79.141zM82.321,81.781l1.476,0.588v-1.92l-1.476,-0.588V81.781zM84.162,80.428v1.942l1.441,-0.584v-1.924L84.162,80.428z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M76.393,63.075l-1.317,0.456l1.327,0.511l1.327,-0.511L76.393,63.075zM74.754,65.715l1.476,0.588v-1.92l-1.476,-0.588V65.715zM76.596,64.362v1.942l1.441,-0.584v-1.924L76.596,64.362z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M81.202,44.475l-1.317,0.456l1.327,0.511l1.327,-0.511L81.202,44.475zM79.563,47.115l1.476,0.588v-1.92l-1.476,-0.588V47.115zM81.404,45.762v1.942l1.441,-0.584v-1.924L81.404,45.762z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M92.296,32.228l-1.317,0.456l1.327,0.511l1.327,-0.511L92.296,32.228zM90.656,34.868l1.476,0.588v-1.92l-1.476,-0.588V34.868zM92.498,33.515v1.942l1.441,-0.584v-1.924L92.498,33.515z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M5.806,60.518l-1.317,0.456l1.327,0.511l1.327,-0.511L5.806,60.518zM4.167,63.158l1.476,0.588v-1.92l-1.476,-0.588V63.158zM6.009,61.804v1.942l1.441,-0.584v-1.924L6.009,61.804z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M24.691,30.255c-0.615,0.788 -0.538,1.99 0.329,2.667c0.867,0.677 1.99,0.538 2.667,-0.329c6.397,-8.2 16.796,-12.263 27.125,-10.546c0.658,0.133 1.342,-0.095 1.773,-0.646c0.185,-0.237 0.29,-0.535 0.396,-0.833c0.088,-0.438 0.019,-1 -0.314,-1.386s-0.727,-0.694 -1.165,-0.782C43.638,16.373 31.949,20.952 24.691,30.255z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M71.1,47.4L41.3,29.2c-1,-0.5 -2.2,-0.5 -3.2,0.1s-1.6,1.6 -1.6,2.8v36.2c0,1.1 0.6,2.2 1.6,2.8c0.5,0.3 1.1,0.5 1.6,0.5s1.1,-0.1 1.6,-0.4L71.1,53c1,-0.6 1.6,-1.6 1.6,-2.8C72.7,49.1 72.1,48 71.1,47.4zM68.5,50.2L40.3,67.4V33L68.5,50.2z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M79.6,20.4C71.7,12.6 61.2,8.2 50,8.2s-21.7,4.3 -29.6,12.2C12.6,28.3 8.2,38.8 8.2,50s4.3,21.7 12.2,29.6S38.8,91.8 50,91.8s21.7,-4.3 29.6,-12.2S91.8,61.2 91.8,50S87.4,28.3 79.6,20.4zM88.1,50c0,10.2 -4,19.7 -11.2,26.9C69.7,84.1 60.2,88.1 50,88.1s-19.7,-4 -26.9,-11.2C15.9,69.7 11.9,60.2 11.9,50s4,-19.7 11.2,-26.9S39.9,11.9 50,11.9c10.2,0 19.7,4 26.9,11.2C84.1,30.3 88.1,39.8 88.1,50z" />
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#343434</color>
<color name="colorPrimaryDark">#343434</color>
<color name="colorAccent">#00abff</color>
<color name="tag_color">#bbF2690D</color>
<color name="tag_color_text">#FAFAFA</color>
<color name="positive_thumbs">#2b90d9</color>
<color name="negative_thumbs">#F44336</color>
<color name="backgroundDark">#DD000000</color>
<color name="red_1">#F44336</color>
<color name="gray_light">#80808080</color>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path
name="my_images"
path="/Bittube/" />
</paths>

View File

@ -1 +0,0 @@
https://fedilab.app

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,5 +0,0 @@
- Nouvelles options :
- Mode plein écran automatique
- Désactiver la lecture automatique des vidéos
- Quelques corrections de bugs

View File

@ -1 +0,0 @@
https://fedilab.app

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1 +0,0 @@
TubeLab est une application Peertube pour les instances académiques.

View File

@ -1,22 +0,0 @@
*Not authenticated mode*
It's a limited mode where you can do some actions:
- Switch instance,
- Share videos,
- Download videos.
*Authenticated mode*
Many features are available with this mode:
- Write/delete comments
- Upload/remove/edit videos
- Manage (create/edit/remove) channels and playlists
- Follow/unfollow channels
- Thumbs-up/down
- Check notifications
- Mute/unmute channels
- Report videos/accounts
- Check your history

View File

@ -1,15 +0,0 @@
Added:
- Allow to search channels
- Show storage quota
- Warning on Playing NSFW videos
- Swipe to change timelines
Changed:
- Improve comment threads
- Comment composer in full-screen
- Swipe to change timeline
Fixed:
- Status bar for fullscreen not removed
- Filter for subscriptions not working with remote accounts
- Some crashes

View File

@ -0,0 +1,20 @@
package app.fedilab.fedilabtube;
/* 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 FedilabTube extends BaseFedilabTube {
}

View File

@ -0,0 +1,41 @@
package app.fedilab.fedilabtube;
/* 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;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Matomo {
public static void sendScreen(Context _mcontext, String path, String title) {
//Do nothing
}
public static void sendEvent(Context _mcontext, String category, String action, String label, float value) {
//Do nothing
}
public static void sendValue(Context _mcontext, String path, int index, String dimensionValue) {
//Do nothing
}
public static void trackInstall(Context _mcontext) {
//Do nothing
}
}

View File

@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:viewportWidth="24"
android:viewportHeight="24">
<group
android:scaleX="1.104"
android:scaleY="1.104"
android:translateX="-1.248"
android:translateY="-1.248">
<path
android:fillColor="@android:color/white"
android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z" />
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -115,15 +115,27 @@ public class AboutActivity extends AppCompatActivity {
donation_container.setVisibility(View.GONE);
}
//Developer donation
Button donatePaypal = findViewById(R.id.donate_paypal);
donatePaypal.setOnClickListener(v -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.me/Mastalab"));
startActivity(browserIntent);
});
if (BuildConfig.FLAVOR.equals("queermotion")) {
donatePaypal.setVisibility(View.GONE);
LinearLayout dev_info = findViewById(R.id.dev_info);
dev_info.setVisibility(View.GONE);
}
Button donateLiberapay = findViewById(R.id.donate_liberapay);
donateLiberapay.setOnClickListener(v -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://liberapay.com/tom79"));
Intent browserIntent;
if (BuildConfig.FLAVOR.equals("queermotion")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://soutenir.queermotion.org"));
} else {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://liberapay.com/tom79"));
}
startActivity(browserIntent);
});

View File

@ -74,6 +74,7 @@ import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistAdapter.AllPlaylistRemoved {
private static final int PICK_AVATAR = 467;
PlaylistAdapter playlistAdapter;
private HashMap<Integer, String> privacyToSend;
private String idChannel;
@ -81,7 +82,6 @@ public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistA
private Playlist playlistToEdit;
private List<ChannelData.Channel> myChannels;
private ChannelData.Channel selectedChannel;
private static final int PICK_AVATAR = 467;
private AddPlaylistBinding bindingDialog;
private Uri inputData;
private ActivityAllPlaylistBinding binding;
@ -197,7 +197,7 @@ public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistA
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
startActivityForResult(intent, PICK_AVATAR);
});
Helper.loadGiF(AllPlaylistsActivity.this, playlistParam.getThumbnailPath(), bindingDialog.profilePicture);
Helper.loadGiF(AllPlaylistsActivity.this, playlistParam != null ? playlistParam.getThumbnailPath() : null, bindingDialog.profilePicture);
alertDialog.setOnShowListener(dialogInterface -> {
Button button = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);

View File

@ -35,7 +35,7 @@ import app.fedilab.fedilabtube.helper.ThemeHelper;
import app.fedilab.fedilabtube.services.GlobalUploadObserver;
import app.fedilab.fedilabtube.worker.WorkHelper;
public class FedilabTube extends MultiDexApplication {
public class BaseFedilabTube extends MultiDexApplication {
static String UPLOAD_CHANNEL_ID = "upload_info_peertube";
@ -48,12 +48,12 @@ public class FedilabTube extends MultiDexApplication {
Configuration myConfig = new Configuration.Builder()
.setMinimumLoggingLevel(android.util.Log.INFO)
.build();
WorkManager.initialize(FedilabTube.this, myConfig);
WorkManager.initialize(BaseFedilabTube.this, myConfig);
if (interval >= 15) {
WorkHelper.fetchNotifications(this, interval);
}
createNotificationChannel();
UploadServiceConfig.initialize(FedilabTube.this, UPLOAD_CHANNEL_ID, true);
UploadServiceConfig.initialize(BaseFedilabTube.this, UPLOAD_CHANNEL_ID, true);
new GlobalRequestObserver(this, new GlobalUploadObserver());
}
@ -63,7 +63,7 @@ public class FedilabTube extends MultiDexApplication {
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(FedilabTube.this);
MultiDex.install(BaseFedilabTube.this);
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int themePref = sharedpreferences.getInt(Helper.SET_THEME, Helper.DEFAULT_MODE);
ThemeHelper.switchTo(themePref);

View File

@ -26,6 +26,8 @@ import android.util.Patterns;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import android.widget.Toast;
@ -35,6 +37,9 @@ import androidx.core.content.ContextCompat;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.entities.Error;
@ -43,6 +48,8 @@ import app.fedilab.fedilabtube.client.entities.OauthParams;
import app.fedilab.fedilabtube.client.entities.Token;
import app.fedilab.fedilabtube.databinding.ActivityLoginBinding;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperAcadInstance;
import app.fedilab.fedilabtube.helper.HelperInstance;
import es.dmoral.toasty.Toasty;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.updateCredential;
@ -54,7 +61,9 @@ public class LoginActivity extends AppCompatActivity {
private static String client_id;
private static String client_secret;
private ActivityLoginBinding binding;
private String acadInstance;
@SuppressLint("SetTextI18n")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -66,7 +75,13 @@ public class LoginActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
SpannableString content_create = new SpannableString(getString(R.string.join_peertube));
SpannableString content_create;
if (BuildConfig.FLAVOR.compareTo("queermotion") == 0) {
content_create = new SpannableString(getString(R.string.register_account));
} else {
content_create = new SpannableString(getString(R.string.join_peertube));
}
content_create.setSpan(new UnderlineSpan(), 0, content_create.length(), 0);
content_create.setSpan(new ForegroundColorSpan(ContextCompat.getColor(LoginActivity.this, Helper.getColorAccent())), 0, content_create.length(),
Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
@ -80,10 +95,12 @@ public class LoginActivity extends AppCompatActivity {
});
if (BuildConfig.full_instances) {
if (BuildConfig.full_instances && BuildConfig.instance_switcher) {
binding.loginInstanceContainer.setVisibility(View.VISIBLE);
}
if (BuildConfig.FLAVOR.compareTo("queermotion") == 0) {
binding.loginInstance.setText("queermotion.org");
}
if (Helper.isTablet(LoginActivity.this)) {
@ -106,17 +123,89 @@ public class LoginActivity extends AppCompatActivity {
if (!hasFocus) {
if (binding.loginUid.getText() != null && android.util.Patterns.EMAIL_ADDRESS.matcher(binding.loginUid.getText().toString().trim()).matches()) {
String[] emailArray = binding.loginUid.getText().toString().split("@");
if (emailArray.length > 1 && Arrays.asList(Helper.openid).contains(emailArray[1])) {
if (emailArray.length > 1) {
binding.loginButton.callOnClick();
}
}
}
});
binding.loginUidContainer.setVisibility(View.GONE);
binding.loginPasswdContainer.setVisibility(View.GONE);
binding.loginInstanceContainer.setVisibility(View.GONE);
binding.createAnAccountPeertube.setVisibility(View.GONE);
binding.instancePickerTitle.setVisibility(View.VISIBLE);
binding.instancePicker.setVisibility(View.VISIBLE);
HashMap<String, String> instancesMap = new HashMap<>(HelperAcadInstance.instances_themes);
Iterator<Map.Entry<String, String>> it = instancesMap.entrySet().iterator();
String[] academiesKey = new String[HelperAcadInstance.instances_themes.size()];
String[] academiesValue = new String[HelperAcadInstance.instances_themes.size()];
String acad = HelperInstance.getLiveInstance(LoginActivity.this);
int position = 0;
int i = 0;
while (it.hasNext()) {
Map.Entry<String, String> pair = it.next();
academiesKey[i] = pair.getKey();
academiesValue[i] = pair.getValue();
if (pair.getValue().compareTo(acad) == 0) {
position = i;
}
it.remove();
i++;
}
binding.instancePicker.setSelection(position, true);
ArrayAdapter<String> adapterChannel = new ArrayAdapter<>(LoginActivity.this,
android.R.layout.simple_spinner_dropdown_item, academiesKey);
binding.instancePicker.setAdapter(adapterChannel);
binding.instancePicker.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
acadInstance = academiesValue[position];
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
binding.loginButton.setOnClickListener(v -> {
if (!BuildConfig.full_instances) {
new Thread(() -> {
try {
Oauth oauth = new RetrofitPeertubeAPI(LoginActivity.this, acadInstance, null).oauthClient(null, null, null, null);
if (oauth == null) {
runOnUiThread(() -> {
binding.loginButton.setEnabled(true);
Toasty.error(LoginActivity.this, getString(R.string.client_error), Toast.LENGTH_LONG).show();
});
return;
}
client_id = oauth.getClient_id();
client_secret = oauth.getClient_secret();
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.CLIENT_ID, client_id);
editor.putString(Helper.CLIENT_SECRET, client_secret);
editor.apply();
Intent intent = new Intent(LoginActivity.this, WebviewConnectActivity.class);
Bundle b = new Bundle();
b.putString("url", "https://" + acadInstance + "/plugins/auth-openid-connect/0.0.1/auth/openid-connect");
intent.putExtras(b);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
runOnUiThread(() -> {
binding.loginButton.setEnabled(true);
Toasty.error(LoginActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
});
}
}).start();
} else {
if (binding.loginUid.getText() != null && binding.loginUid.getText().toString().contains("@") && !android.util.Patterns.EMAIL_ADDRESS.matcher(binding.loginUid.getText().toString().trim()).matches()) {
Toasty.error(LoginActivity.this, getString(R.string.email_error)).show();
return;
@ -125,13 +214,14 @@ public class LoginActivity extends AppCompatActivity {
String instance, host;
if (!BuildConfig.full_instances) {
String[] emailArray = binding.loginUid.getText().toString().split("@");
if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) {
if (emailArray.length > 1 && !Arrays.asList(HelperAcadInstance.valideEmails).contains(emailArray[1])) {
Toasty.error(LoginActivity.this, getString(R.string.email_error_domain, emailArray[1])).show();
binding.loginButton.setEnabled(true);
return;
}
host = emailArray[1];
instance = Helper.getPeertubeUrl(host);
instance = HelperInstance.getLiveInstance(LoginActivity.this);
host = instance;
} else {
if (binding.loginInstance.getText() == null || binding.loginInstance.getText().toString().trim().length() == 0) {
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();
@ -165,40 +255,7 @@ public class LoginActivity extends AppCompatActivity {
}
String finalInstance = instance;
String finalHost = host;
if (Arrays.asList(Helper.openid).contains(host) && !BuildConfig.full_instances) {
new Thread(() -> {
try {
Oauth oauth = new RetrofitPeertubeAPI(LoginActivity.this, finalInstance, null).oauthClient(null, null, null, null);
if (oauth == null) {
runOnUiThread(() -> {
binding.loginButton.setEnabled(true);
Toasty.error(LoginActivity.this, getString(R.string.client_error), Toast.LENGTH_LONG).show();
});
return;
}
client_id = oauth.getClient_id();
client_secret = oauth.getClient_secret();
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.CLIENT_ID, client_id);
editor.putString(Helper.CLIENT_SECRET, client_secret);
editor.apply();
Intent intent = new Intent(LoginActivity.this, WebviewConnectActivity.class);
Bundle b = new Bundle();
b.putString("url", "https://" + Helper.getPeertubeUrl(finalHost) + "/plugins/auth-openid-connect/0.0.1/auth/openid-connect");
intent.putExtras(b);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
runOnUiThread(() -> {
binding.loginButton.setEnabled(true);
Toasty.error(LoginActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
});
}
}).start();
} else {
if (BuildConfig.full_instances) {
new Thread(() -> {
Oauth oauth = new RetrofitPeertubeAPI(LoginActivity.this, finalInstance, null).oauthClient(Helper.CLIENT_NAME_VALUE, Helper.WEBSITE_VALUE, Helper.OAUTH_SCOPES_PEERTUBE, Helper.WEBSITE_VALUE);
if (oauth == null) {
@ -242,7 +299,7 @@ public class LoginActivity extends AppCompatActivity {
}
}).start();
}
}
});
}

View File

@ -16,19 +16,21 @@ package app.fedilab.fedilabtube;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
@ -40,6 +42,7 @@ import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
@ -48,8 +51,18 @@ import com.kobakei.ratethisapp.RateThisApp;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Matcher;
@ -58,6 +71,7 @@ import java.util.regex.Pattern;
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.data.AccountData.Account;
import app.fedilab.fedilabtube.client.data.InstanceData;
import app.fedilab.fedilabtube.client.data.VideoData;
import app.fedilab.fedilabtube.client.entities.Error;
import app.fedilab.fedilabtube.client.entities.OauthParams;
import app.fedilab.fedilabtube.client.entities.PeertubeInformation;
@ -69,6 +83,8 @@ import app.fedilab.fedilabtube.databinding.ActivityMainBinding;
import app.fedilab.fedilabtube.fragment.DisplayOverviewFragment;
import app.fedilab.fedilabtube.fragment.DisplayVideosFragment;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperAcadInstance;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.helper.PlaylistExportHelper;
import app.fedilab.fedilabtube.helper.SwitchAccountHelper;
import app.fedilab.fedilabtube.services.RetrieveInfoService;
@ -77,13 +93,17 @@ import app.fedilab.fedilabtube.sqlite.Sqlite;
import app.fedilab.fedilabtube.sqlite.StoredInstanceDAO;
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
import es.dmoral.toasty.Toasty;
import su.litvak.chromecast.api.v2.ChromeCast;
import su.litvak.chromecast.api.v2.ChromeCasts;
import su.litvak.chromecast.api.v2.ChromeCastsListener;
import su.litvak.chromecast.api.v2.MediaStatus;
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.NORMAL;
import static app.fedilab.fedilabtube.MainActivity.TypeOfConnection.SURFING;
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 implements ChromeCastsListener {
public static int PICK_INSTANCE = 5641;
@ -91,16 +111,59 @@ public class MainActivity extends AppCompatActivity {
public static UserMe userMe;
public static InstanceData.InstanceConfig instanceConfig;
public static TypeOfConnection typeOfConnection;
public static List<ChromeCast> chromeCasts;
public static ChromeCast chromeCast;
public static boolean chromecastActivated = false;
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
private DisplayOverviewFragment overviewFragment;
private ActivityMainBinding binding;
private final BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= item -> {
int itemId = item.getItemId();
String type = null;
if (itemId == R.id.navigation_discover) {
setTitleCustom(R.string.title_discover);
binding.viewpager.setCurrentItem(0);
type = HelperAcadInstance.DISCOVER;
} else if (itemId == R.id.navigation_subscription) {
binding.viewpager.setCurrentItem(1);
setTitleCustom(R.string.subscriptions);
type = HelperAcadInstance.SUBSCRIPTIONS;
} else if (itemId == R.id.navigation_trending) {
setTitleCustom(R.string.title_trending);
if (Helper.isLoggedIn(MainActivity.this)) {
binding.viewpager.setCurrentItem(2);
} else {
binding.viewpager.setCurrentItem(1);
}
type = HelperAcadInstance.TRENDING;
} else if (itemId == R.id.navigation_most_liked) {
setTitleCustom(R.string.title_most_liked);
binding.viewpager.setCurrentItem(2);
type = HelperAcadInstance.MOSTLIKED;
} else if (itemId == R.id.navigation_recently_added) {
setTitleCustom(R.string.title_recently_added);
binding.viewpager.setCurrentItem(3);
type = HelperAcadInstance.RECENTLY_ADDED;
} else if (itemId == R.id.navigation_local) {
setTitleCustom(R.string.title_local);
binding.viewpager.setCurrentItem(4);
type = HelperAcadInstance.LOCAL;
}
if (type != null) {
Matomo.sendScreen(MainActivity.this, "TIMELINE", type);
}
return true;
};
private BroadcastReceiver manage_chromecast;
private VideoData.Video castedTube;
@SuppressLint("ApplySharedPref")
public static void showRadioButtonDialogFullInstances(Activity activity, boolean storeInDb) {
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
AlertDialog.Builder alt_bld = new AlertDialog.Builder(activity);
alt_bld.setTitle(R.string.instance_choice);
String instance = Helper.getLiveInstance(activity);
String instance = HelperInstance.getLiveInstance(activity);
final EditText input = new EditText(activity);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
@ -112,6 +175,12 @@ public class MainActivity extends AppCompatActivity {
(dialog, which) -> new Thread(() -> {
try {
String newInstance = input.getText().toString().trim();
if (!newInstance.startsWith("http")) {
newInstance = "http://" + newInstance;
}
URL url = new URL(newInstance);
newInstance = url.getHost();
WellKnownNodeinfo.NodeInfo instanceNodeInfo = new RetrofitPeertubeAPI(activity, newInstance, null).getNodeInfo();
if (instanceNodeInfo.getSoftware() != null && instanceNodeInfo.getSoftware().getName().trim().toLowerCase().compareTo("peertube") == 0) {
SharedPreferences.Editor editor = sharedpreferences.edit();
@ -162,34 +231,113 @@ public class MainActivity extends AppCompatActivity {
}
}
private final BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= item -> {
int itemId = item.getItemId();
if (itemId == R.id.navigation_discover) {
setTitleCustom(R.string.title_discover);
binding.viewpager.setCurrentItem(0);
} else if (itemId == R.id.navigation_subscription) {
binding.viewpager.setCurrentItem(1);
setTitleCustom(R.string.subscriptions);
} else if (itemId == R.id.navigation_trending) {
setTitleCustom(R.string.title_trending);
if (Helper.isLoggedIn(MainActivity.this)) {
binding.viewpager.setCurrentItem(2);
@Override
public void newChromeCastDiscovered(ChromeCast chromeCast) {
if (chromeCasts == null) {
chromeCasts = new ArrayList<>();
chromeCasts.add(chromeCast);
} else {
binding.viewpager.setCurrentItem(1);
boolean canBeAdded = true;
for (ChromeCast cast : chromeCasts) {
if (cast.getName().compareTo(chromeCast.getName()) == 0) {
canBeAdded = false;
break;
}
} else if (itemId == R.id.navigation_most_liked) {
setTitleCustom(R.string.title_most_liked);
binding.viewpager.setCurrentItem(2);
} else if (itemId == R.id.navigation_recently_added) {
setTitleCustom(R.string.title_recently_added);
binding.viewpager.setCurrentItem(3);
} else if (itemId == R.id.navigation_local) {
setTitleCustom(R.string.title_local);
binding.viewpager.setCurrentItem(4);
}
return true;
};
if (canBeAdded) {
chromeCasts.add(chromeCast);
}
}
try {
if (chromeCast.isAppRunning(Helper.CAST_ID) && chromeCast.getMediaStatus() != null && chromeCast.getMediaStatus().playerState != null) {
if (binding.castInfo.getVisibility() == View.GONE) {
binding.castInfo.setVisibility(View.VISIBLE);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void chromeCastRemoved(ChromeCast chromeCast) {
}
@Override
public void onDestroy() {
super.onDestroy();
binding = null;
ChromeCasts.unregisterListener(this);
if (manage_chromecast != null) {
LocalBroadcastManager.getInstance(MainActivity.this).unregisterReceiver(manage_chromecast);
new Thread(() -> {
if (chromeCasts != null && chromeCasts.size() > 0) {
for (ChromeCast cast : chromeCasts) {
try {
cast.stopApp();
cast.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}).start();
}
if (chromeCasts != null) {
chromeCasts = null;
}
if (chromeCast != null) {
chromeCast = null;
}
}
//Method for discovering cast devices
public void discoverCast() {
new Thread(() -> {
if (chromeCasts != null) {
for (ChromeCast cast : chromeCasts) {
try {
cast.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
chromeCasts = null;
}
chromeCasts = new ArrayList<>();
try {
List<NetworkInterface> interfaces;
interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
for (NetworkInterface ni : interfaces) {
if ((!ni.isLoopback()) && ni.isUp() && (ni.getName().equals("wlan0"))) {
Enumeration<InetAddress> inetAddressEnumeration = ni.getInetAddresses();
while (inetAddressEnumeration.hasMoreElements()) {
InetAddress inetAddress = inetAddressEnumeration.nextElement();
ChromeCasts.restartDiscovery(inetAddress);
int tryFind = 0;
while (ChromeCasts.get().isEmpty() && tryFind < 5) {
try {
Thread.sleep(1000);
tryFind++;
} catch (InterruptedException ignored) {
}
}
}
}
}
ChromeCasts.stopDiscovery();
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = this::invalidateOptionsMenu;
mainHandler.post(myRunnable);
} catch (IOException e) {
e.printStackTrace();
}
}).start();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -197,15 +345,16 @@ public class MainActivity extends AppCompatActivity {
binding = ActivityMainBinding.inflate(getLayoutInflater());
View view = binding.getRoot();
setContentView(view);
ChromeCastsListener chromeCastsListener = this;
ChromeCasts.registerListener(chromeCastsListener);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
typeOfConnection = TypeOfConnection.UNKNOWN;
BottomNavigationView navView = findViewById(R.id.nav_view);
navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
binding.navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowTitleEnabled(false);
@ -244,6 +393,8 @@ public class MainActivity extends AppCompatActivity {
}
binding.viewpager.setOffscreenPageLimit(5);
Matomo.sendEvent(MainActivity.this, "UTILISATEUR", "DEMARRAGE", HelperInstance.getLiveInstance(MainActivity.this), Helper.isLoggedIn(MainActivity.this) ? 1 : 0);
binding.viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
@ -265,6 +416,9 @@ public class MainActivity extends AppCompatActivity {
toolbar.setOnClickListener(v -> {
if (binding.viewpager.getAdapter() == null) {
return;
}
if (binding.viewpager.getAdapter().instantiateItem(binding.viewpager, binding.viewpager.getCurrentItem()) instanceof DisplayVideosFragment) {
((DisplayVideosFragment) binding.viewpager.getAdapter().instantiateItem(binding.viewpager, binding.viewpager.getCurrentItem())).scrollToTop();
} else if (binding.viewpager.getAdapter().instantiateItem(binding.viewpager, binding.viewpager.getCurrentItem()) instanceof DisplayOverviewFragment) {
@ -275,12 +429,11 @@ public class MainActivity extends AppCompatActivity {
setTitleCustom(R.string.title_discover);
if (Helper.isLoggedIn(MainActivity.this)) {
navView.inflateMenu(R.menu.bottom_nav_menu_connected);
binding.navView.inflateMenu(R.menu.bottom_nav_menu_connected);
refreshToken();
} else {
navView.inflateMenu(R.menu.bottom_nav_menu);
binding.navView.inflateMenu(R.menu.bottom_nav_menu);
}
peertubeInformation = new PeertubeInformation();
peertubeInformation.setCategories(new LinkedHashMap<>());
@ -298,6 +451,96 @@ public class MainActivity extends AppCompatActivity {
if (!BuildConfig.full_instances) {
PlaylistExportHelper.manageIntentUrl(MainActivity.this, getIntent());
}
binding.castClose.setOnClickListener(v -> {
Intent intentBC = new Intent(Helper.RECEIVE_CAST_SETTINGS);
Bundle b = new Bundle();
b.putInt("displayed", 0);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(MainActivity.this).sendBroadcast(intentBC);
});
binding.castTogglePlay.setOnClickListener(v -> {
if (chromeCast != null) {
new Thread(() -> {
try {
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> binding.castTogglePlay.setVisibility(View.GONE);
mainHandler.post(myRunnable);
int icon = -1;
if (chromeCast.getMediaStatus().playerState == MediaStatus.PlayerState.PLAYING) {
chromeCast.pause();
icon = R.drawable.ic_baseline_play_arrow_32;
} else if (chromeCast.getMediaStatus().playerState == MediaStatus.PlayerState.PAUSED) {
chromeCast.play();
icon = R.drawable.ic_baseline_pause_32;
}
if (icon != -1) {
int finalIcon = icon;
myRunnable = () -> binding.castTogglePlay.setImageResource(finalIcon);
mainHandler.post(myRunnable);
}
myRunnable = () -> binding.castTogglePlay.setVisibility(View.VISIBLE);
mainHandler.post(myRunnable);
} catch (IOException e) {
e.printStackTrace();
}
}).start();
}
});
manage_chromecast = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Bundle b = intent.getExtras();
assert b != null;
int state = b.getInt("state_asked", -1);
int displayed = b.getInt("displayed", -1);
castedTube = b.getParcelable("castedTube");
if (state == 1) {
discoverCast();
} else if (state == 0) {
new Thread(() -> {
try {
if (chromeCast != null) {
chromeCast.stopApp();
chromeCast.disconnect();
}
} catch (IOException e) {
e.printStackTrace();
}
}).start();
}
if (displayed == 1) {
chromecastActivated = true;
if (castedTube != null) {
binding.castInfo.setVisibility(View.VISIBLE);
Helper.loadGiF(MainActivity.this, castedTube.getThumbnailPath(), binding.castView);
binding.castTitle.setText(castedTube.getTitle());
binding.castDescription.setText(castedTube.getDescription());
}
} else if (displayed == 0) {
chromecastActivated = false;
binding.castInfo.setVisibility(View.GONE);
new Thread(() -> {
try {
if (chromeCast != null) {
chromeCast.stopApp();
}
} catch (IOException e) {
e.printStackTrace();
}
}).start();
}
}
};
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
LocalBroadcastManager.getInstance(MainActivity.this).registerReceiver(manage_chromecast, new IntentFilter(Helper.RECEIVE_CAST_SETTINGS));
int search_cast = sharedpreferences.getInt(getString(R.string.set_cast_choice), 0);
if (search_cast == 1) {
discoverCast();
}
}
public DisplayVideosFragment getSubscriptionFragment() {
@ -317,7 +560,7 @@ public class MainActivity extends AppCompatActivity {
new Thread(() -> {
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String tokenStr = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
String instance = Helper.getLiveInstance(MainActivity.this);
String instance = HelperInstance.getLiveInstance(MainActivity.this);
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
String instanceShar = sharedpreferences.getString(Helper.PREF_INSTANCE, null);
String userIdShar = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
@ -335,25 +578,7 @@ public class MainActivity extends AppCompatActivity {
oauthParams.setAccess_token(account.getToken());
try {
Token token = new RetrofitPeertubeAPI(MainActivity.this).manageToken(oauthParams);
if (token == null && Helper.instanceOnline(instance)) {
runOnUiThread(() -> {
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_bld.setTitle(R.string.refresh_token_failed);
alt_bld.setMessage(R.string.refresh_token_failed_message);
alt_bld.setNegativeButton(R.string.action_logout, (dialog, id) -> {
dialog.dismiss();
Helper.logoutCurrentUser(MainActivity.this, finalAccount);
});
alt_bld.setPositiveButton(R.string._retry, (dialog, id) -> {
dialog.dismiss();
refreshToken();
});
AlertDialog alert = alt_bld.create();
alert.show();
});
return;
} else if (token == null) {
if (token == null) {
return;
}
runOnUiThread(() -> {
@ -391,7 +616,22 @@ public class MainActivity extends AppCompatActivity {
}
instanceConfig = new RetrofitPeertubeAPI(MainActivity.this).getConfigInstance();
} catch (Error error) {
runOnUiThread(() -> Helper.logoutCurrentUser(MainActivity.this, finalAccount));
runOnUiThread(() -> {
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_bld.setTitle(R.string.refresh_token_failed);
alt_bld.setMessage(R.string.refresh_token_failed_message);
alt_bld.setNegativeButton(R.string.action_logout, (dialog, id) -> {
dialog.dismiss();
Helper.logoutCurrentUser(MainActivity.this, finalAccount);
});
alt_bld.setPositiveButton(R.string._retry, (dialog, id) -> {
dialog.dismiss();
refreshToken();
});
AlertDialog alert = alt_bld.create();
alert.show();
});
error.printStackTrace();
}
}
@ -407,7 +647,7 @@ public class MainActivity extends AppCompatActivity {
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
Pattern link = Pattern.compile("(https?://[\\da-z.-]+\\.[a-z.]{2,10})/videos/watch/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})$");
Pattern link = Pattern.compile("(https?://[\\da-z.-]+\\.[a-z.]{2,10})/videos/watch/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})(\\?start=(\\d+[hH])?(\\d+[mM])?(\\d+[sS])?)?$");
Matcher matcherLink = link.matcher(query.trim());
if (matcherLink.find()) {
Intent intent = new Intent(MainActivity.this, PeertubeActivity.class);
@ -446,18 +686,17 @@ public class MainActivity extends AppCompatActivity {
MenuItem instanceItem = menu.findItem(R.id.action_change_instance);
MenuItem accountItem = menu.findItem(R.id.action_account);
Toolbar toolbar = findViewById(R.id.toolbar);
ImageView instances = toolbar.findViewById(R.id.instances);
if (BuildConfig.full_instances && ((Helper.isLoggedIn(MainActivity.this) && typeOfConnection == NORMAL) || typeOfConnection == SURFING)) {
instances.setVisibility(View.VISIBLE);
instances.setOnClickListener(null);
instances.setOnClickListener(v -> {
if (BuildConfig.surfing_mode && ((Helper.isLoggedIn(MainActivity.this) && typeOfConnection == NORMAL) || typeOfConnection == SURFING)) {
binding.instances.setVisibility(View.VISIBLE);
binding.instances.setOnClickListener(null);
binding.instances.setOnClickListener(v -> {
Intent intent = new Intent(MainActivity.this, ManageInstancesActivity.class);
startActivity(intent);
overridePendingTransition(R.anim.slide_in_up, R.anim.slide_out_up);
});
} else {
instances.setVisibility(View.GONE);
binding.instances.setVisibility(View.GONE);
}
switch (typeOfConnection) {
case UNKNOWN:
@ -509,13 +748,17 @@ public class MainActivity extends AppCompatActivity {
break;
}
if (!BuildConfig.instance_switcher) {
instanceItem.setVisible(false);
}
if (!BuildConfig.full_instances) {
if (!BuildConfig.sepia_search) {
sepiaSearchItem.setVisible(false);
}
return true;
}
private void checkIfConnectedUsers() {
new Thread(() -> {
try {
@ -538,13 +781,16 @@ public class MainActivity extends AppCompatActivity {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
String type = null;
String action = "TIMELINE";
if (item.getItemId() == R.id.action_change_instance) {
if (BuildConfig.full_instances) {
showRadioButtonDialogFullInstances(MainActivity.this, false);
} else {
showRadioButtonDialog();
}
return true;
action = "CHANGE_INSTANCE";
type = "";
} else if (item.getItemId() == R.id.action_settings) {
Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
startActivity(intent);
@ -560,32 +806,30 @@ public class MainActivity extends AppCompatActivity {
}
startActivity(intent);
}
return true;
} else if (item.getItemId() == R.id.action_upload) {
Intent intent = new Intent(MainActivity.this, PeertubeUploadActivity.class);
startActivity(intent);
return true;
} else if (item.getItemId() == R.id.action_myvideos) {
Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.MY_VIDEOS);
intent.putExtras(bundle);
startActivity(intent);
return true;
type = HelperAcadInstance.MYVIDEOS;
} else if (item.getItemId() == R.id.action_history) {
Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.HISTORY);
intent.putExtras(bundle);
startActivity(intent);
return true;
type = HelperAcadInstance.HISTORY;
} else if (item.getItemId() == R.id.action_most_liked) {
Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.MOST_LIKED);
intent.putExtras(bundle);
startActivity(intent);
return true;
type = HelperAcadInstance.MOSTLIKED;
} else if (item.getItemId() == R.id.action_playlist) {
Intent intent;
if (Helper.isLoggedIn(MainActivity.this)) {
@ -594,15 +838,12 @@ public class MainActivity extends AppCompatActivity {
intent = new Intent(MainActivity.this, AllLocalPlaylistsActivity.class);
}
startActivity(intent);
return true;
} else if (item.getItemId() == R.id.action_sepia_search) {
Intent intent = new Intent(MainActivity.this, SepiaSearchActivity.class);
startActivity(intent);
return true;
} else if (item.getItemId() == R.id.action_about) {
Intent intent = new Intent(MainActivity.this, AboutActivity.class);
startActivity(intent);
return true;
} else if (item.getItemId() == R.id.action_incognito) {
item.setChecked(!item.isChecked());
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
@ -621,8 +862,10 @@ public class MainActivity extends AppCompatActivity {
}).start();
return false;
}
return super.onOptionsItemSelected(item);
if (type != null) {
Matomo.sendScreen(MainActivity.this, action, type);
}
return true;
}
@ -648,16 +891,25 @@ public class MainActivity extends AppCompatActivity {
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_bld.setTitle(R.string.instance_choice);
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String acad = Helper.getLiveInstance(MainActivity.this);
String acad = HelperInstance.getLiveInstance(MainActivity.this);
int i = 0;
for (String item : academies) {
if (Helper.getPeertubeUrl(item).compareTo(acad) == 0) {
break;
HashMap<String, String> instancesMap = new HashMap<>(HelperAcadInstance.instances_themes);
Iterator<Map.Entry<String, String>> it = instancesMap.entrySet().iterator();
String[] academiesKey = new String[HelperAcadInstance.instances_themes.size()];
String[] academiesValue = new String[HelperAcadInstance.instances_themes.size()];
int position = 0;
while (it.hasNext()) {
Map.Entry<String, String> pair = it.next();
academiesKey[i] = pair.getKey();
academiesValue[i] = pair.getValue();
if (pair.getValue().compareTo(acad) == 0) {
position = i;
}
it.remove();
i++;
}
alt_bld.setSingleChoiceItems(academies, i, (dialog, item) -> {
String newInstance = academies[item];
alt_bld.setSingleChoiceItems(academiesKey, position, (dialog, item) -> {
String newInstance = academiesValue[item];
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.PREF_INSTANCE, newInstance);
editor.commit();
@ -679,11 +931,17 @@ public class MainActivity extends AppCompatActivity {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.PREF_INSTANCE, String.valueOf(data.getData()));
editor.commit();
finish();
recreate();
}
}
}
public enum TypeOfConnection {
UNKNOWN,
NORMAL,
SURFING
}
private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
ScreenSlidePagerAdapter(FragmentManager fm) {
@ -720,7 +978,7 @@ public class MainActivity extends AppCompatActivity {
return locaFragment;
}
}
return null;
return overviewFragment;
}
@Override
@ -728,10 +986,4 @@ public class MainActivity extends AppCompatActivity {
return 5;
}
}
public enum TypeOfConnection {
UNKNOWN,
NORMAL,
SURFING
}
}

View File

@ -44,6 +44,7 @@ import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
@ -51,6 +52,7 @@ import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.webkit.MimeTypeMap;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
@ -68,6 +70,7 @@ import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.lifecycle.ViewModelProvider;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -93,6 +96,7 @@ import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.trackselection.TrackSelector;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.DefaultTimeBar;
import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
@ -100,9 +104,12 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.video.VideoListener;
import com.google.android.material.snackbar.Snackbar;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.HashMap;
@ -134,6 +141,7 @@ import app.fedilab.fedilabtube.drawer.MenuAdapter;
import app.fedilab.fedilabtube.drawer.MenuItemAdapter;
import app.fedilab.fedilabtube.helper.CacheDataSourceFactory;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.sqlite.AccountDAO;
import app.fedilab.fedilabtube.sqlite.Sqlite;
import app.fedilab.fedilabtube.viewmodel.CaptionsVM;
@ -146,14 +154,20 @@ import app.fedilab.fedilabtube.webview.CustomWebview;
import app.fedilab.fedilabtube.webview.MastalabWebChromeClient;
import app.fedilab.fedilabtube.webview.MastalabWebViewClient;
import es.dmoral.toasty.Toasty;
import su.litvak.chromecast.api.v2.ChromeCast;
import su.litvak.chromecast.api.v2.MediaStatus;
import su.litvak.chromecast.api.v2.Status;
import static app.fedilab.fedilabtube.MainActivity.chromeCast;
import static app.fedilab.fedilabtube.MainActivity.chromeCasts;
import static app.fedilab.fedilabtube.MainActivity.chromecastActivated;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.ADD_COMMENT;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.RATEVIDEO;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPLY;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPORT_ACCOUNT;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPORT_VIDEO;
import static app.fedilab.fedilabtube.helper.Helper.CAST_ID;
import static app.fedilab.fedilabtube.helper.Helper.getAttColor;
import static app.fedilab.fedilabtube.helper.Helper.getLiveInstance;
import static app.fedilab.fedilabtube.helper.Helper.isLoggedIn;
import static app.fedilab.fedilabtube.helper.Helper.loadGiF;
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
@ -194,6 +208,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
private String currentCaption;
private boolean isRemote;
private boolean willPlayFromIntent;
private String chromeCastVideoURL;
public static void hideKeyboard(Activity activity) {
if (activity != null && activity.getWindow() != null) {
@ -220,7 +235,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
@Override
public void onStreamStarted(Torrent torrent) {
startStream(torrent.getVideoFile().getAbsolutePath(), null, autoPlay, -1, null, null, true);
startStream(peertube, torrent.getVideoFile().getAbsolutePath(), null, autoPlay, -1, null, null, true);
}
@Override
@ -263,6 +278,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
.removeFilesAfterStop(true)
.build();
fullScreenMode = false;
torrentStream = TorrentStream.init(torrentOptions);
torrentStream.addListener(PeertubeActivity.this);
@ -295,13 +311,16 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
Bundle b = intent.getExtras();
if (b != null) {
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
peertubeInstance = b.getString("peertube_instance", HelperInstance.getLiveInstance(PeertubeActivity.this));
videoUuid = b.getString("video_uuid", null);
isMyVideo = b.getBoolean("isMyVideo", false);
sepiaSearch = b.getBoolean("sepia_search", false);
peertube = b.getParcelable("video");
}
new Thread(() -> {
String videoId = peertube != null ? peertube.getUuid() : videoUuid;
new RetrofitPeertubeAPI(PeertubeActivity.this).postView(videoId);
}).start();
willPlayFromIntent = manageIntentUrl(intent);
binding.peertubeDescriptionMore.setOnClickListener(v -> {
@ -391,7 +410,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.closeReply.setOnClickListener(v -> closeCommentThread());
binding.closePost.setOnClickListener(v -> closePostComment());
commentListAdapter = new CommentListAdapter(comments, isMyVideo || Helper.isVideoOwner(PeertubeActivity.this, peertube), false, peertubeInstance);
commentListAdapter = new CommentListAdapter(comments, isMyVideo || Helper.isVideoOwner(PeertubeActivity.this, peertube), false, peertubeInstance, sepiaSearch);
commentListAdapter.allCommentRemoved = PeertubeActivity.this;
LinearLayoutManager mLayoutManager = new LinearLayoutManager(PeertubeActivity.this);
binding.peertubeComments.setLayoutManager(mLayoutManager);
@ -435,6 +454,35 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
});
binding.castPlay.setOnClickListener(v -> {
binding.castLoader.setVisibility(View.VISIBLE);
if (chromeCast != null) {
new Thread(() -> {
try {
int icon = -1;
if (chromeCast.getMediaStatus().playerState == MediaStatus.PlayerState.PLAYING) {
chromeCast.pause();
icon = R.drawable.ic_baseline_play_arrow_32;
} else if (chromeCast.getMediaStatus().playerState == MediaStatus.PlayerState.PAUSED) {
chromeCast.play();
icon = R.drawable.ic_baseline_pause_32;
}
if (icon != -1) {
Handler mainHandler = new Handler(Looper.getMainLooper());
int finalIcon = icon;
Runnable myRunnable = () -> binding.castPlay.setImageResource(finalIcon);
mainHandler.post(myRunnable);
}
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> binding.castLoader.setVisibility(View.GONE);
mainHandler.post(myRunnable);
} catch (IOException e) {
e.printStackTrace();
}
}).start();
}
});
}
private void manageVIewVideos(APIResponse apiResponse) {
@ -443,6 +491,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
return;
}
peertube = apiResponse.getPeertubes().get(0);
Matomo.sendScreen(PeertubeActivity.this, "VIDEO_REGARDEE", peertube.getUuid());
if (peertube.isNsfw()) {
binding.videoSensitive.setVisibility(View.VISIBLE);
} else {
@ -491,7 +540,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
comment.setInReplyToCommentId(null);
comment.setTotalReplies(0);
commentsThread.add(0, comment);
commentReplyListAdapter = new CommentListAdapter(commentsThread, Helper.isVideoOwner(PeertubeActivity.this, peertube), true, peertubeInstance);
commentReplyListAdapter = new CommentListAdapter(commentsThread, Helper.isVideoOwner(PeertubeActivity.this, peertube), true, peertubeInstance, sepiaSearch);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(PeertubeActivity.this);
binding.peertubeReply.setLayoutManager(mLayoutManager);
binding.peertubeReply.setNestedScrollingEnabled(false);
@ -521,7 +570,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
Bundle b = intent.getExtras();
if (b != null) {
isRemote = false;
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
peertubeInstance = b.getString("peertube_instance", HelperInstance.getLiveInstance(PeertubeActivity.this));
videoUuid = b.getString("video_uuid", null);
setRequestedOrientationCustom(initialOrientation);
if (comments != null && comments.size() > 0) {
@ -569,7 +618,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube.setEmbedUrl(url);
if (totalSeconds > 0) {
VideoData.UserHistory userHistory = new VideoData.UserHistory();
userHistory.setCurrentTime(totalSeconds * 1000);
userHistory.setCurrentTime(totalSeconds);
peertube.setUserHistory(userHistory);
}
TimelineVM viewModelTimeline = new ViewModelProvider(PeertubeActivity.this).get(TimelineVM.class);
@ -661,6 +710,20 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}).start();
}
@Override
public boolean onCreateOptionsMenu(@NotNull Menu menu) {
getMenuInflater().inflate(R.menu.video_menu, menu);
MenuItem castItem = menu.findItem(R.id.action_cast);
if (chromeCasts != null && chromeCasts.size() > 0) {
castItem.setVisible(true);
if (chromeCast != null && chromeCast.isConnected()) {
castItem.setIcon(R.drawable.ic_baseline_cast_connected_24);
} else {
castItem.setIcon(R.drawable.ic_baseline_cast_24);
}
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
@ -670,6 +733,101 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
finish();
return true;
} else if (item.getItemId() == R.id.action_cast) {
if (chromeCasts != null && chromeCasts.size() > 0) {
String[] chromecast_choice = new String[chromeCasts.size()];
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_bld.setTitle(R.string.chromecast_choice);
int i = 0;
for (ChromeCast cc : chromeCasts) {
chromecast_choice[i] = cc.getTitle();
i++;
}
i = 0;
for (ChromeCast cc : chromeCasts) {
if (chromecastActivated && cc.isConnected()) {
break;
}
i++;
}
alt_bld.setSingleChoiceItems(chromecast_choice, i, (dialog, position) -> {
chromeCast = chromeCasts.get(position);
new Thread(() -> {
if (chromeCast != null) {
Intent intentBC = new Intent(Helper.RECEIVE_CAST_SETTINGS);
Bundle b = new Bundle();
if (chromecastActivated) {
b.putInt("displayed", 0);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(PeertubeActivity.this).sendBroadcast(intentBC);
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> {
binding.doubleTapPlayerView.setVisibility(View.VISIBLE);
binding.castController.setVisibility(View.GONE);
};
mainHandler.post(myRunnable);
} else {
b.putInt("displayed", 1);
b.putParcelable("castedTube", peertube);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(PeertubeActivity.this).sendBroadcast(intentBC);
try {
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> {
invalidateOptionsMenu();
binding.castLoader.setVisibility(View.VISIBLE);
player.setPlayWhenReady(false);
binding.doubleTapPlayerView.setVisibility(View.GONE);
binding.castController.setVisibility(View.VISIBLE);
dialog.dismiss();
if (chromeCastVideoURL != null) {
if (player != null && player.getCurrentPosition() > 0) {
chromeCastVideoURL += "?start=" + (player.getCurrentPosition() / 1000);
}
}
};
mainHandler.post(myRunnable);
if (!chromeCast.isConnected()) {
chromeCast.connect();
}
myRunnable = this::invalidateOptionsMenu;
mainHandler.post(myRunnable);
Status status = chromeCast.getStatus();
if (chromeCast.isAppAvailable(CAST_ID) && !status.isAppRunning(CAST_ID)) {
chromeCast.launchApp(CAST_ID);
}
if (chromeCastVideoURL != null) {
String mime = MimeTypeMap.getFileExtensionFromUrl(chromeCastVideoURL);
chromeCast.setRequestTimeout(60000);
chromeCast.load(peertube.getTitle(), null, chromeCastVideoURL, mime);
chromeCast.play();
binding.castPlay.setImageResource(R.drawable.ic_baseline_pause_32);
}
myRunnable = () -> binding.castLoader.setVisibility(View.GONE);
mainHandler.post(myRunnable);
} catch (IOException | GeneralSecurityException e) {
e.printStackTrace();
}
}
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> {
invalidateOptionsMenu();
dialog.dismiss();
};
mainHandler.post(myRunnable);
}
}).start();
});
alt_bld.setPositiveButton(R.string.close, (dialog, id) -> dialog.dismiss());
AlertDialog alert = alt_bld.create();
alert.show();
}
}
return super.onOptionsItemSelected(item);
}
@ -786,7 +944,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
isRemote = true;
if (totalSeconds > 0) {
VideoData.UserHistory userHistory = new VideoData.UserHistory();
userHistory.setCurrentTime(totalSeconds * 1000);
userHistory.setCurrentTime(totalSeconds);
peertube.setUserHistory(userHistory);
}
TimelineVM viewModelTimeline = new ViewModelProvider(PeertubeActivity.this).get(TimelineVM.class);
@ -795,6 +953,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
return;
}
if (apiResponse != null && apiResponse.getPeertubes() != null && apiResponse.getPeertubes().size() > 0 && apiResponse.getPeertubes().get(0).getErrorMessage() != null) {
Toasty.error(PeertubeActivity.this, apiResponse.getPeertubes().get(0).getErrorMessage(), Toast.LENGTH_LONG).show();
binding.loader.setVisibility(View.GONE);
@ -805,14 +964,38 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.loader.setVisibility(View.GONE);
return;
}
if (apiResponse.getPeertubes() == null || apiResponse.getPeertubes().get(0) == null || apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this) == null) {
if (apiResponse.getPeertubes() == null || apiResponse.getPeertubes().get(0) == null || (!apiResponse.getPeertubes().get(0).isLive() && apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this) == null)) {
Toasty.error(PeertubeActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
binding.loader.setVisibility(View.GONE);
return;
}
long position = -1;
long previousPositionHistory = 0;
if (peertube != null && peertube.getUserHistory() != null) {
previousPositionHistory = peertube.getUserHistory().getCurrentTime();
}
peertube = apiResponse.getPeertubes().get(0);
VideoData.UserHistory userHistory = new VideoData.UserHistory();
userHistory.setCurrentTime(previousPositionHistory);
peertube.setUserHistory(userHistory);
PlayerControlView controlView = binding.doubleTapPlayerView.findViewById(R.id.exo_controller);
DefaultTimeBar exo_progress = controlView.findViewById(R.id.exo_progress);
TextView exo_duration = controlView.findViewById(R.id.exo_duration);
TextView exo_live_badge = controlView.findViewById(R.id.exo_live_badge);
if (peertube.isLive()) {
exo_progress.setVisibility(View.INVISIBLE);
exo_duration.setVisibility(View.GONE);
exo_live_badge.setVisibility(View.VISIBLE);
exo_live_badge.setText(R.string.live);
exo_live_badge.setBackgroundResource(R.drawable.rounded_live);
} else {
exo_progress.setVisibility(View.VISIBLE);
exo_live_badge.setVisibility(View.GONE);
exo_duration.setBackground(null);
}
if (peertube.getUserHistory() != null) {
position = peertube.getUserHistory().getCurrentTime() * 1000;
@ -865,7 +1048,13 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
LinkedHashMap<Integer, String> categoryInit = new LinkedHashMap<>(peertubeInformation.getCategories());
info_category.setText(categoryInit.get(peertube.getCategory().getId()));
if (peertube.isLive()) {
info_duration.setText(R.string.live);
info_duration.setBackgroundResource(R.drawable.rounded_live);
} else {
info_duration.setText(Helper.secondsToString(peertube.getDuration()));
}
String format = DateFormat.getDateInstance(DateFormat.LONG).format(peertube.getPublishedAt());
info_published_at.setText(format);
List<String> tags = peertube.getTags();
@ -1009,8 +1198,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.doubleTapPlayerView.setPlayer(player);
binding.loader.setVisibility(View.GONE);
startStream(
apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this),
apiResponse.getPeertubes().get(0).getStreamingPlaylists().size() > 0 ? apiResponse.getPeertubes().get(0).getStreamingPlaylists().get(0).getPlaylistUrl() : null,
apiResponse.getPeertubes().get(0),
null,
null,
autoPlay, position, null, null, true);
player.prepare();
player.setPlayWhenReady(autoPlay);
@ -1099,7 +1289,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
private void stream(String videoURL, String streamingPlaylistsURLS, boolean autoPlay, long position, Uri subtitles, String lang) {
private void stream(VideoData.Video video, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) {
String videoURL = video.getFileUrl(resolution, PeertubeActivity.this);
if (videoURL != null && !videoURL.endsWith("m3u8")) {
if (videoURL.endsWith(".torrent")) {
torrentStream.startStream(videoURL);
@ -1138,10 +1329,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
}
} else {
if (streamingPlaylistsURLS == null && videoURL != null) {
streamingPlaylistsURLS = videoURL;
}
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(streamingPlaylistsURLS)).build();
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(videoURL)).build();
HlsMediaSource hlsMediaSource = new HlsMediaSource.Factory(new DefaultHttpDataSourceFactory(System.getProperty("http.agent")))
.createMediaSource(mediaItem);
player.setMediaSource(hlsMediaSource);
@ -1180,8 +1368,22 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
}
private void startStream(String videoURL, String streamingPlaylistsURLS, boolean autoPlay, long position, Uri subtitles, String lang, boolean promptNSFW) {
private void startStream(VideoData.Video video, String torrentLocal, String resolution, boolean autoPlay, long position, Uri subtitles, String lang, boolean promptNSFW) {
String videoURL;
if (torrentLocal != null) {
videoURL = torrentLocal;
} else {
videoURL = peertube.getFileUrl(resolution, PeertubeActivity.this);
}
if (peertube != null && peertube.isWaitTranscoding() && peertube.isLive()) {
View parentLayout = findViewById(android.R.id.content);
Snackbar snackbar = Snackbar.make(parentLayout, R.string.live_not_started, Snackbar.LENGTH_INDEFINITE);
snackbar.setAction(R.string.close, view -> finish());
snackbar.show();
return;
}
chromeCastVideoURL = videoURL;
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
String nsfwAction = sharedpreferences.getString(getString(R.string.set_video_sensitive_choice), Helper.BLUR);
if (promptNSFW && peertube != null && peertube.isNsfw() && (nsfwAction.compareTo(Helper.BLUR) == 0 || nsfwAction.compareTo(Helper.DO_NOT_LIST) == 0)) {
@ -1196,20 +1398,24 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
finish();
});
dialogBuilder.setPositiveButton(R.string.play, (dialog, id) -> {
stream(videoURL, streamingPlaylistsURLS, autoPlay, position, subtitles, lang);
stream(video, resolution, autoPlay, position, subtitles, lang);
dialog.dismiss();
});
alertDialog = dialogBuilder.create();
alertDialog.show();
} else {
stream(videoURL, streamingPlaylistsURLS, autoPlay, position, subtitles, lang);
stream(video, resolution, autoPlay, position, subtitles, lang);
}
}
@Override
public void onConfigurationChanged(@NotNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (binding.castController.getVisibility() == View.VISIBLE) {
return;
}
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
if (mode != Helper.VIDEO_MODE_WEBVIEW) {
openFullscreenDialog();
@ -1276,7 +1482,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
if (player != null && (!isPlayInMinimized || !playInMinimized)) {
player.setPlayWhenReady(false);
} else if (playInMinimized) {
} else if (playInMinimized && binding.castController.getVisibility() != View.VISIBLE) {
enterVideoMode();
}
}
@ -1388,10 +1594,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
if (getResources().getConfiguration().orientation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
setRequestedOrientationCustom(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
} else {
if (getResources().getConfiguration().orientation != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
setRequestedOrientationCustom(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
}
} else {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
@ -1430,6 +1632,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
binding.peertubeInformationContainer.setVisibility(View.GONE);
@ -1451,7 +1654,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
int height = displayMetrics.heightPixels;
binding.doubleTapPlayerView.hideController();
List<MenuItemVideo> menuItemVideos = new ArrayList<>();
if (peertube.getFiles() != null && peertube.getFiles().size() > 0) {
if (peertube.getAllFile(PeertubeActivity.this) != null && peertube.getAllFile(PeertubeActivity.this).size() > 0) {
MenuItemVideo resolutionItem = new MenuItemVideo();
resolutionItem.setIcon(R.drawable.ic_baseline_high_quality_24);
resolutionItem.setTitle(getString(R.string.pickup_resolution));
@ -1582,8 +1785,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.doubleTapPlayerView.setPlayer(player);
binding.loader.setVisibility(View.GONE);
startStream(
peertube.getFileUrl(res, PeertubeActivity.this),
peertube.getStreamingPlaylists().size() > 0 ? peertube.getStreamingPlaylists().get(0).getPlaylistUrl() : null,
peertube,
null,
res,
true, position, null, null, false);
}
break;
@ -1606,7 +1810,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
if (captionToUse != null) {
if (!sepiaSearch) {
uri = Uri.parse("https://" + getLiveInstance(PeertubeActivity.this) + captionToUse.getCaptionPath());
uri = Uri.parse("https://" + HelperInstance.getLiveInstance(PeertubeActivity.this) + captionToUse.getCaptionPath());
} else {
uri = Uri.parse("https://" + peertubeInstance + captionToUse.getCaptionPath());
}
@ -1622,7 +1826,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.mediaVideo.player(player);
binding.doubleTapPlayerView.setPlayer(player);
startStream(
peertube.getFileUrl(null, PeertubeActivity.this),
peertube,
null,
null,
true,
newPosition,
@ -1681,7 +1886,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
public void closeSubMenuMenuOptions() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
@ -1859,8 +2063,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
} else if (peertube.isCommentsEnabled() && statusAction == REPLY) {
if (apiResponse.getComments() != null && apiResponse.getComments().size() > 0) {
commentsThread.add(position, apiResponse.getComments().get(0));
commentReplyListAdapter.notifyItemInserted(position);
commentsThread.add(position + 1, apiResponse.getComments().get(0));
commentReplyListAdapter.notifyItemInserted(position + 1);
}
} else if (statusAction == RetrofitPeertubeAPI.ActionType.REPORT_ACCOUNT) {
Toasty.success(PeertubeActivity.this, getString(R.string.successful_report), Toasty.LENGTH_LONG).show();
@ -1902,6 +2106,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
openMainMenuOptions();
}
});
}
private void setRequestedOrientationCustom(int orientationCustom) {
@ -2111,8 +2316,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
enum videoOrientation {
LANDSCAPE,
PORTRAIT

View File

@ -38,7 +38,8 @@ import app.fedilab.fedilabtube.client.APIResponse;
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.entities.AccountCreation;
import app.fedilab.fedilabtube.databinding.ActivityRegisterPeertubeBinding;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperAcadInstance;
import app.fedilab.fedilabtube.helper.HelperInstance;
import es.dmoral.toasty.Toasty;
import static app.fedilab.fedilabtube.MainActivity.PICK_INSTANCE;
@ -49,6 +50,7 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
private String instance;
private ActivityRegisterPeertubeBinding binding;
@SuppressLint("SetTextI18n")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -61,7 +63,7 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (BuildConfig.full_instances) {
if (BuildConfig.full_instances && BuildConfig.instance_switcher) {
binding.loginInstanceContainer.setVisibility(View.VISIBLE);
binding.titleLoginInstance.setVisibility(View.VISIBLE);
} else {
@ -69,6 +71,10 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
binding.titleLoginInstance.setVisibility(View.GONE);
}
if (BuildConfig.FLAVOR.compareTo("queermotion") == 0) {
binding.loginInstance.setText("queermotion.org");
}
binding.username.setOnFocusChangeListener((view, focused) -> {
if (!focused && binding.username.getText() != null) {
Pattern patternUsername = Pattern.compile("^[a-z0-9._]{1,50}$");
@ -129,7 +135,7 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
}
String[] emailArray = binding.email.getText().toString().split("@");
if (!BuildConfig.full_instances) {
if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) {
if (emailArray.length > 1 && !Arrays.asList(HelperAcadInstance.valideEmails).contains(emailArray[1])) {
Toasty.error(PeertubeRegisterActivity.this, getString(R.string.email_error_domain, emailArray[1])).show();
return;
}
@ -157,8 +163,7 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
}
});
} else {
String host = emailArray[1];
instance = Helper.getPeertubeUrl(host);
instance = HelperInstance.getLiveInstance(PeertubeRegisterActivity.this);
}
if (instance != null) {
instance = instance.toLowerCase().trim();

View File

@ -37,7 +37,6 @@ import androidx.core.content.ContextCompat;
import androidx.documentfile.provider.DocumentFile;
import androidx.lifecycle.ViewModelProvider;
import net.gotev.uploadservice.data.UploadNotificationAction;
import net.gotev.uploadservice.data.UploadNotificationConfig;
import net.gotev.uploadservice.data.UploadNotificationStatusConfig;
@ -59,6 +58,7 @@ import app.fedilab.fedilabtube.client.data.ChannelData;
import app.fedilab.fedilabtube.client.entities.UserMe;
import app.fedilab.fedilabtube.databinding.ActivityPeertubeUploadBinding;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
import es.dmoral.toasty.Toasty;
@ -100,7 +100,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
long instanceVideoQuota = userMe.getVideoQuota();
long instanceDailyQuota = userMe.getVideoQuotaDaily();
if (instanceVideoQuota != -1) {
if (instanceVideoQuota != -1 && instanceVideoQuota != 0) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
binding.totalQuota.setProgress((int) (videoQuota * 100 / instanceVideoQuota), true);
} else {
@ -114,7 +114,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
binding.totalQuota.setProgress(progress);
}
}
if (instanceDailyQuota != -1) {
if (instanceDailyQuota != -1 && instanceDailyQuota != 0) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
binding.dailyQuota.setProgress((int) (dailyQuota * 100 / instanceDailyQuota), true);
} else {
@ -323,7 +323,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
new MultipartUploadRequest(PeertubeUploadActivity.this, "https://" + Helper.getLiveInstance(PeertubeUploadActivity.this) + "/api/v1/videos/upload")
new MultipartUploadRequest(PeertubeUploadActivity.this, "https://" + HelperInstance.getLiveInstance(PeertubeUploadActivity.this) + "/api/v1/videos/upload")
.setMethod("POST")
.setBearerAuth(token)
.addHeader("User-Agent", getString(R.string.app_name) + "/" + BuildConfig.VERSION_NAME)

View File

@ -157,18 +157,21 @@ public class ShowChannelActivity extends AppCompatActivity {
account_follow.setOnClickListener(v -> {
AlertDialog.Builder builderSingle = new AlertDialog.Builder(ShowChannelActivity.this);
builderSingle.setTitle(getString(R.string.list_of_accounts));
if (accounts != null) {
if (accounts != null && accounts.size() > 0) {
if (accounts.size() > 1) {
final OwnAccountsAdapter accountsListAdapter = new OwnAccountsAdapter(ShowChannelActivity.this, accounts);
builderSingle.setAdapter(accountsListAdapter, (dialog, which) -> {
new Thread(() -> {
builderSingle.setAdapter(accountsListAdapter, (dialog, which) -> new Thread(() -> {
try {
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(ShowChannelActivity.this, accounts.get(which).getHost(), accounts.get(which).getToken());
peertubeAPI.post(FOLLOW, channel.getAcct(), null);
} catch (Exception e) {
e.printStackTrace();
}
}).start();
});
}).start());
} else {
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(ShowChannelActivity.this, accounts.get(0).getHost(), accounts.get(0).getToken());
peertubeAPI.post(FOLLOW, channel.getAcct(), null);
}
}
builderSingle.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
builderSingle.show();
@ -357,7 +360,11 @@ public class ShowChannelActivity extends AppCompatActivity {
public void manageVIewRelationship(APIResponse apiResponse) {
if (apiResponse.getError() != null) {
if (apiResponse.getError().getError().length() > 500) {
Toasty.info(ShowChannelActivity.this, getString(R.string.remote_account), Toast.LENGTH_LONG).show();
} else {
Toasty.error(ShowChannelActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
}
return;
}
this.relationship = apiResponse.getRelationships();

View File

@ -122,8 +122,11 @@ public class WebviewConnectActivity extends AppCompatActivity {
oauthParams.setClient_id(sharedpreferences.getString(Helper.CLIENT_ID, null));
oauthParams.setClient_secret(sharedpreferences.getString(Helper.CLIENT_SECRET, null));
oauthParams.setGrant_type("password");
oauthParams.setScope("upload");
oauthParams.setResponse_type("code");
oauthParams.setUsername(username);
oauthParams.setExternalAuthToken(externalAuthToken);
oauthParams.setPassword(externalAuthToken);
String instance = new URL(url).getHost();
Token token = null;
try {

View File

@ -60,7 +60,11 @@ import retrofit2.http.QueryMap;
public interface PeertubeService {
@GET("instances")
Call<InstanceData> getInstances(@QueryMap Map<String, String> params, @Query("nsfwPolicy[]") String nsfwPolicy, @Query("categoriesOr[]") List<Integer> categories, @Query("languagesOr[]") List<String> languages);
Call<InstanceData> getInstances(
@QueryMap Map<String, String> params,
@Query("nsfwPolicy[]") String nsfwPolicy,
@Query("categoriesOr[]") List<Integer> categories,
@Query("languagesOr[]") List<String> languages);
//Server settings
@GET(".well-known/nodeinfo")
@ -99,6 +103,21 @@ public interface PeertubeService {
@GET("client/locales/{local}/server.json")
Call<Map<String, String>> getTranslations(@Path("local") String local);
//TOKEN
//Refresh
@FormUrlEncoded
@POST("users/token")
Call<Token> createOpenIdToken(
@Field("client_id") String client_id,
@Field("client_secret") String client_secret,
@Field("response_type") String response_type,
@Field("grant_type") String grant_type,
@Field("scope") String scope,
@Field("username") String username,
@Field("password") String password,
@Field("externalAuthToken") String externalAuthToken);
//TOKEN
//Refresh
@FormUrlEncoded
@ -165,27 +184,55 @@ public interface PeertubeService {
//Timelines Authenticated
//Subscriber timeline
@GET("users/me/subscriptions/videos?sort=-publishedAt")
Call<VideoData> getSubscriptionVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
Call<VideoData> getSubscriptionVideos(
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String coun,
@Query("languageOneOf") List<String> languageOneOf);
//Overview videos
@GET("overviews/videos")
Call<OverviewVideo> getOverviewVideos(@Header("Authorization") String credentials, @Query("page") String page, @Query("languageOneOf") List<String> languageOneOf);
Call<OverviewVideo> getOverviewVideos(
@Header("Authorization") String credentials,
@Query("page") String page,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> languageOneOf);
//Most liked videos
@GET("videos?sort=-likes")
Call<VideoData> getMostLikedVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
Call<VideoData> getMostLikedVideos(
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> languageOneOf);
//Trending videos
@GET("videos?sort=-trending")
Call<VideoData> getTrendingVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
Call<VideoData> getTrendingVideos(
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> languageOneOf);
//Recently added videos
@GET("videos?sort=-publishedAt")
Call<VideoData> getRecentlyAddedVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
Call<VideoData> getRecentlyAddedVideos(
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> languageOneOf);
//Local videos
@GET("videos?sort=-publishedAt&filter=local")
Call<VideoData> getLocalVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
Call<VideoData> getLocalVideos(
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> languageOneOf);
//History
@GET("users/me/history/videos")
@ -193,6 +240,7 @@ public interface PeertubeService {
@Header("Authorization") String credentials,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw,
@Query("startDate") String startDate,
@Query("endDate") String endDate
);
@ -207,7 +255,8 @@ public interface PeertubeService {
@Header("Authorization") String credentials,
@Query("search") String search,
@Query("start") String maxId,
@Query("count") String count);
@Query("count") String count,
@Query("nsfw") String nsfw);
//Search channels
@GET("search/video-channels")
@ -224,7 +273,8 @@ public interface PeertubeService {
@Header("Authorization") String credentials,
@Query("tagsOneOf") List<String> tagsOneOf,
@Query("start") String maxId,
@Query("count") String count);
@Query("count") String count,
@Query("nsfw") String nsfw);
//Get notifications
@GET("users/me/notifications")
@ -250,9 +300,17 @@ public interface PeertubeService {
@GET("users/me/videos?sort=-publishedAt")
Call<VideoData> getMyVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
//Get my video
//Get user videos
@GET("accounts/{name}/videos?sort=-publishedAt")
Call<VideoData> getVideosForAccount(@Path("name") String name, @Query("start") String maxId, @Query("count") String count);
Call<VideoData> getVideosForAccount(
@Path("name") String name,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw
);
@POST("videos/{id}/views")
Call<String> postView(@Path("id") String id);
@Multipart
@PUT("videos/{id}")
@ -299,7 +357,11 @@ public interface PeertubeService {
Call<ChannelData> getAllChannels();
@GET("video-channels/{channelHandle}/videos")
Call<VideoData> getChannelVideos(@Path("channelHandle") String channelHandle, @Query("start") String maxId, @Query("count") String count);
Call<VideoData> getChannelVideos(
@Path("channelHandle") String channelHandle,
@Query("start") String maxId,
@Query("count") String count,
@Query("nsfw") String nsfw);
@POST("video-channels")
Call<ChannelData.ChannelCreation> addChannel(@Header("Authorization") String credentials, @Body ChannelParams channelParams);

View File

@ -23,6 +23,7 @@ import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.webkit.MimeTypeMap;
import android.webkit.URLUtil;
import androidx.documentfile.provider.DocumentFile;
@ -74,6 +75,7 @@ import app.fedilab.fedilabtube.client.entities.UserSettings;
import app.fedilab.fedilabtube.client.entities.VideoParams;
import app.fedilab.fedilabtube.client.entities.WellKnownNodeinfo;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.sqlite.AccountDAO;
import app.fedilab.fedilabtube.sqlite.Sqlite;
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
@ -89,7 +91,7 @@ import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
@SuppressWarnings({"unused", "RedundantSuppression"})
@SuppressWarnings({"unused", "RedundantSuppression", "ConstantConditions"})
public class RetrofitPeertubeAPI {
private final String finalUrl;
@ -98,13 +100,22 @@ public class RetrofitPeertubeAPI {
private final String count;
private String token;
private Set<String> selection;
private String showNSFWVideos = "both";
public RetrofitPeertubeAPI(Context context) {
_context = context;
instance = Helper.getLiveInstance(context);
finalUrl = "https://" + Helper.getLiveInstance(context) + "/api/v1/";
instance = HelperInstance.getLiveInstance(context);
finalUrl = "https://" + HelperInstance.getLiveInstance(context) + "/api/v1/";
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE));
String currentSensitive = sharedpreferences.getString(_context.getString(R.string.set_video_sensitive_choice), Helper.BLUR);
if (currentSensitive.compareTo(Helper.DO_NOT_LIST) == 0) {
showNSFWVideos = "false";
} else if (currentSensitive.compareTo(Helper.BLUR) == 0) {
showNSFWVideos = "both";
} else {
showNSFWVideos = "true";
}
}
public RetrofitPeertubeAPI(Context context, String instance, String token) {
@ -114,18 +125,21 @@ public class RetrofitPeertubeAPI {
finalUrl = "https://" + instance + "/api/v1/";
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE));
String currentSensitive = sharedpreferences.getString(_context.getString(R.string.set_video_sensitive_choice), Helper.BLUR);
if (currentSensitive.compareTo(Helper.DO_NOT_LIST) == 0) {
showNSFWVideos = "false";
} else if (currentSensitive.compareTo(Helper.BLUR) == 0) {
showNSFWVideos = "both";
} else {
showNSFWVideos = "true";
}
}
public static void updateCredential(Activity activity, String token, String client_id, String client_secret, String refresh_token, String host) {
new Thread(() -> {
AccountData.Account account;
String instance;
if (host.startsWith("tube") || BuildConfig.full_instances) {
instance = host;
} else {
instance = Helper.getPeertubeUrl(host);
}
String instance = host;
try {
UserMe userMe = new RetrofitPeertubeAPI(activity, instance, token).verifyCredentials();
account = userMe.getAccount();
@ -193,6 +207,9 @@ public class RetrofitPeertubeAPI {
}
private PeertubeService initTranslation() {
if (!URLUtil.isValidUrl("https://" + instance)) {
return null;
}
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://" + instance)
.addConverterFactory(GsonConverterFactory.create())
@ -207,7 +224,9 @@ public class RetrofitPeertubeAPI {
public Token manageToken(OauthParams oauthParams) throws Error {
PeertubeService peertubeService = init();
Call<Token> refreshTokenCall = null;
if (oauthParams.getGrant_type().compareTo("password") == 0) {
if (oauthParams.getExternalAuthToken() != null) {
refreshTokenCall = peertubeService.createOpenIdToken(oauthParams.getClient_id(), oauthParams.getClient_secret(), oauthParams.getResponse_type(), oauthParams.getGrant_type(), oauthParams.getScope(), oauthParams.getUsername(), oauthParams.getPassword(), oauthParams.getExternalAuthToken());
} else if (oauthParams.getGrant_type().compareTo("password") == 0) {
refreshTokenCall = peertubeService.createToken(oauthParams.getClient_id(), oauthParams.getClient_secret(), oauthParams.getGrant_type(), oauthParams.getUsername(), oauthParams.getPassword());
} else if (oauthParams.getGrant_type().compareTo("refresh_token") == 0) {
refreshTokenCall = peertubeService.refreshToken(oauthParams.getClient_id(), oauthParams.getClient_secret(), oauthParams.getRefresh_token(), oauthParams.getGrant_type());
@ -244,6 +263,19 @@ public class RetrofitPeertubeAPI {
}
/**
* POST a view count for a video
*/
public void postView(String videoUuid) {
PeertubeService peertubeService = init();
Call<String> postViewCall = peertubeService.postView(videoUuid);
try {
Response<String> dd = postViewCall.execute();
} catch (IOException ignored) {
}
}
/**
* Retrieve notifications
*
@ -334,7 +366,7 @@ public class RetrofitPeertubeAPI {
public APIResponse getVideosForChannel(String channelId, String max_id) {
APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init();
Call<VideoData> videoCall = peertubeService.getChannelVideos(channelId, max_id, count);
Call<VideoData> videoCall = peertubeService.getChannelVideos(channelId, max_id, count, showNSFWVideos);
if (videoCall != null) {
try {
Response<VideoData> response = videoCall.execute();
@ -379,7 +411,7 @@ public class RetrofitPeertubeAPI {
public APIResponse getHistory(String max_id, String startDate, String endDate) {
APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init();
Call<VideoData> videoCall = peertubeService.getHistory(getToken(), max_id, count, startDate, endDate);
Call<VideoData> videoCall = peertubeService.getHistory(getToken(), max_id, count, showNSFWVideos, startDate, endDate);
if (videoCall != null) {
try {
Response<VideoData> response = videoCall.execute();
@ -408,29 +440,29 @@ public class RetrofitPeertubeAPI {
videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
break;
case ACCOUNT_VIDEOS:
videoCall = peertubeService.getVideosForAccount(forAccount, max_id, count);
videoCall = peertubeService.getVideosForAccount(forAccount, max_id, count, showNSFWVideos);
break;
case SUBSCRIBTIONS:
if (forAccount == null) {
videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter);
} else {
videoCall = peertubeService.getChannelVideos(forAccount, max_id, count);
videoCall = peertubeService.getChannelVideos(forAccount, max_id, count, showNSFWVideos);
}
break;
case MOST_LIKED:
videoCall = peertubeService.getMostLikedVideos(getToken(), max_id, count, filter);
videoCall = peertubeService.getMostLikedVideos(getToken(), max_id, count, showNSFWVideos, filter);
break;
case LOCAL:
videoCall = peertubeService.getLocalVideos(getToken(), max_id, count, filter);
videoCall = peertubeService.getLocalVideos(getToken(), max_id, count, showNSFWVideos, filter);
break;
case TRENDING:
videoCall = peertubeService.getTrendingVideos(getToken(), max_id, count, filter);
videoCall = peertubeService.getTrendingVideos(getToken(), max_id, count, showNSFWVideos, filter);
break;
case HISTORY:
videoCall = peertubeService.getHistory(getToken(), max_id, count, null, null);
videoCall = peertubeService.getHistory(getToken(), max_id, count, showNSFWVideos, null, null);
break;
case RECENT:
videoCall = peertubeService.getRecentlyAddedVideos(getToken(), max_id, count, filter);
videoCall = peertubeService.getRecentlyAddedVideos(getToken(), max_id, count, showNSFWVideos, filter);
break;
}
if (videoCall != null) {
@ -461,7 +493,7 @@ public class RetrofitPeertubeAPI {
APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init();
ArrayList<String> filter = selection != null ? new ArrayList<>(selection) : null;
Call<OverviewVideo> overviewVideoCall = peertubeService.getOverviewVideos(getToken(), page, filter);
Call<OverviewVideo> overviewVideoCall = peertubeService.getOverviewVideos(getToken(), page, showNSFWVideos, filter);
try {
Response<OverviewVideo> response = overviewVideoCall.execute();
if (response.isSuccessful() && response.body() != null) {
@ -870,7 +902,7 @@ public class RetrofitPeertubeAPI {
params.put("count", "250");
params.put("healthy", "true");
params.put("signup", "true");
params.put("minUserQuota", instanceParams.getMinUserQuota());
params.put("sort", "-totalUsers");
Call<InstanceData> instancesCall = peertubeService.getInstances(params, instanceParams.getNsfwPolicy(), instanceParams.getCategoriesOr(), instanceParams.getLanguagesOr());
APIResponse apiResponse = new APIResponse();
try {
@ -901,7 +933,7 @@ public class RetrofitPeertubeAPI {
*/
public APIResponse searchNextVideos(List<String> tags) {
PeertubeService peertubeService = init();
Call<VideoData> searchVideosCall = peertubeService.searchNextVideo(getToken(), tags, "0", "20");
Call<VideoData> searchVideosCall = peertubeService.searchNextVideo(getToken(), tags, "0", "20", showNSFWVideos);
APIResponse apiResponse = new APIResponse();
try {
Response<VideoData> response = searchVideosCall.execute();
@ -927,7 +959,7 @@ public class RetrofitPeertubeAPI {
*/
public APIResponse searchPeertube(String query, String max_id) {
PeertubeService peertubeService = init();
Call<VideoData> searchVideosCall = peertubeService.searchVideos(getToken(), query, max_id, count);
Call<VideoData> searchVideosCall = peertubeService.searchVideos(getToken(), query, max_id, count, showNSFWVideos);
APIResponse apiResponse = new APIResponse();
try {
Response<VideoData> response = searchVideosCall.execute();

View File

@ -64,6 +64,7 @@ public class InstanceData {
@SerializedName("isNSFW")
private boolean isNSFW;
private SpannableStringBuilder spannableStringBuilder;
private boolean truncatedDescription = true;
public boolean isAutoBlacklistUserVideosEnabled() {
return autoBlacklistUserVideosEnabled;
@ -240,6 +241,14 @@ public class InstanceData {
public void setCategories(List<Integer> categories) {
this.categories = categories;
}
public boolean isTruncatedDescription() {
return truncatedDescription;
}
public void setTruncatedDescription(boolean truncatedDescription) {
this.truncatedDescription = truncatedDescription;
}
}
public static class InstanceInfo {
@ -277,6 +286,7 @@ public class InstanceData {
@SerializedName("terms")
private String terms;
private String host;
private boolean truncatedDescription = true;
public AboutInstance() {
}
@ -329,6 +339,14 @@ public class InstanceData {
this.host = host;
}
public boolean isTruncatedDescription() {
return truncatedDescription;
}
public void setTruncatedDescription(boolean truncatedDescription) {
this.truncatedDescription = truncatedDescription;
}
@Override
public int describeContents() {
return 0;

View File

@ -88,6 +88,8 @@ public class VideoData {
private List<File> files;
@SerializedName("id")
private String id;
@SerializedName("isLive")
private boolean isLive = false;
@SerializedName("isLocal")
private boolean isLocal;
@SerializedName("language")
@ -163,6 +165,7 @@ public class VideoData {
this.files = new ArrayList<>();
in.readList(this.files, File.class.getClassLoader());
this.id = in.readString();
this.isLive = in.readByte() != 0;
this.isLocal = in.readByte() != 0;
this.language = in.readParcelable(ItemStr.class.getClassLoader());
this.licence = in.readParcelable(Item.class.getClassLoader());
@ -194,7 +197,30 @@ public class VideoData {
public String getFileUrl(String resolution, Context context) {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL);
List<File> files = getAllFile(context);
if (files != null && files.size() > 0) {
return getFile(context, files, resolution, mode);
}
return null;
}
public List<File> getAllFile(Context context) {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL);
if (files != null && files.size() > 0) {
return files;
} else if (streamingPlaylists != null) {
List<File> files = new ArrayList<>();
for (StreamingPlaylists streamingPlaylists : streamingPlaylists) {
files.addAll(streamingPlaylists.getFiles());
}
return files;
}
return files;
}
private String getFile(Context context, List<File> files, String resolution, int mode) {
if (resolution != null) {
for (File file : files) {
if (file.getResolutions().getLabel().compareTo(resolution) == 0) {
@ -220,10 +246,6 @@ public class VideoData {
} else {
return null;
}
} else if (streamingPlaylists != null && streamingPlaylists.size() > 0) {
return streamingPlaylists.get(0).getPlaylistUrl();
}
return null;
}
public String getTorrentUrl(String resolution, Context context) {
@ -254,7 +276,7 @@ public class VideoData {
}
}
}
return files.get(0).getFileDownloadUrl();
return files != null && files.size() > 0 ? files.get(0).getFileDownloadUrl() : null;
}
public Account getAccount() {
@ -385,6 +407,14 @@ public class VideoData {
this.id = id;
}
public boolean isLive() {
return isLive;
}
public void setLive(boolean live) {
isLive = live;
}
public boolean isLocal() {
return isLocal;
}
@ -640,6 +670,7 @@ public class VideoData {
dest.writeString(this.embedUrl);
dest.writeList(this.files);
dest.writeString(this.id);
dest.writeByte(this.isLive ? (byte) 1 : (byte) 0);
dest.writeByte(this.isLocal ? (byte) 1 : (byte) 0);
dest.writeParcelable(this.language, flags);
dest.writeParcelable(this.licence, flags);

View File

@ -23,7 +23,6 @@ import com.google.gson.annotations.SerializedName;
import java.util.List;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class VideoPlaylistData {

View File

@ -38,7 +38,8 @@ public class OauthParams {
private String refresh_token;
@SerializedName("access_token")
private String access_token;
@SerializedName("response_type")
private String response_type;
public String getClient_secret() {
return client_secret;
@ -111,4 +112,12 @@ public class OauthParams {
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getResponse_type() {
return response_type;
}
public void setResponse_type(String response_type) {
this.response_type = response_type;
}
}

View File

@ -26,7 +26,9 @@ import android.os.Handler;
import android.os.Looper;
import android.text.Html;
import android.text.SpannableString;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@ -89,6 +91,31 @@ public class AboutInstanceAdapter extends RecyclerView.Adapter<RecyclerView.View
holder.binding.aboutInstanceHost.setText(aboutInstance.getHost());
SpannableString spannableString;
if (aboutInstance.getShortDescription() != null && aboutInstance.getShortDescription().trim().length() > 0) {
if (aboutInstance.isTruncatedDescription()) {
holder.binding.aboutInstanceDescription.setMaxLines(3);
holder.binding.aboutInstanceDescription.setEllipsize(TextUtils.TruncateAt.END);
} else {
holder.binding.aboutInstanceDescription.setMaxLines(Integer.MAX_VALUE);
holder.binding.aboutInstanceDescription.setEllipsize(null);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
spannableString = new SpannableString(Html.fromHtml(aboutInstance.getShortDescription(), FROM_HTML_MODE_LEGACY));
else
spannableString = new SpannableString(Html.fromHtml(aboutInstance.getShortDescription()));
holder.binding.aboutInstanceDescription.setText(spannableString, TextView.BufferType.SPANNABLE);
holder.binding.aboutInstanceDescription.setOnClickListener(v -> {
aboutInstance.setTruncatedDescription(!aboutInstance.isTruncatedDescription());
notifyItemChanged(i);
});
holder.binding.aboutInstanceDescription.setVisibility(View.VISIBLE);
} else {
holder.binding.aboutInstanceDescription.setVisibility(View.GONE);
}
if (aboutInstance.getShortDescription() != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
spannableString = new SpannableString(Html.fromHtml(aboutInstance.getShortDescription(), FROM_HTML_MODE_LEGACY));

View File

@ -19,11 +19,14 @@ import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import app.fedilab.fedilabtube.client.data.ChannelData;
import app.fedilab.fedilabtube.databinding.DrawerHorizontalAccountBinding;
import app.fedilab.fedilabtube.helper.Helper;

View File

@ -66,6 +66,7 @@ import es.dmoral.toasty.Toasty;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.MUTE;
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPLY;
import static app.fedilab.fedilabtube.helper.Helper.isLoggedIn;
public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
@ -74,17 +75,19 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
private final List<Comment> comments;
private final CommentListAdapter commentListAdapter;
private final boolean isThread;
private final String instance;
private final boolean sepiaSearch;
public AllCommentRemoved allCommentRemoved;
boolean isVideoOwner;
private Context context;
private final String instance;
public CommentListAdapter(List<Comment> comments, boolean isVideoOwner, boolean isThread, String instance) {
public CommentListAdapter(List<Comment> comments, boolean isVideoOwner, boolean isThread, String instance, boolean sepiaSearch) {
this.comments = comments;
commentListAdapter = this;
this.isVideoOwner = isVideoOwner;
this.isThread = isThread;
this.instance = instance;
this.sepiaSearch = sepiaSearch;
}
@Override
@ -296,8 +299,25 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
} else {
holder.binding.postReplyButton.setVisibility(View.GONE);
}
holder.binding.postReplyButton.setOnClickListener(v -> ((PeertubeActivity) context).openPostComment(comment, i));
holder.binding.postReplyButton.setOnClickListener(v -> {
if (isLoggedIn(context) && !sepiaSearch) {
((PeertubeActivity) context).openPostComment(comment, i);
} else {
if (sepiaSearch) {
Toasty.info(context, context.getString(R.string.federation_issue), Toasty.LENGTH_SHORT).show();
} else {
Toasty.error(context, context.getString(R.string.not_logged_in), Toast.LENGTH_SHORT).show();
}
}
});
if (isLoggedIn(context) && !sepiaSearch) {
holder.binding.replyButton.setVisibility(View.VISIBLE);
holder.binding.replyButton.setOnClickListener(v -> ((PeertubeActivity) context).openPostComment(comment, i));
} else {
holder.binding.replyButton.setVisibility(View.GONE);
}
}
public void manageVIewPostActions(RetrofitPeertubeAPI.ActionType statusAction, int i, APIResponse apiResponse) {

View File

@ -19,12 +19,15 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.text.Html;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -35,9 +38,11 @@ import java.util.List;
import app.fedilab.fedilabtube.R;
import app.fedilab.fedilabtube.client.data.InstanceData.Instance;
import app.fedilab.fedilabtube.databinding.DrawerInstanceBinding;
import app.fedilab.fedilabtube.helper.RoundedBackgroundSpan;
import static android.app.Activity.RESULT_OK;
import static androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY;
import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
@ -56,8 +61,8 @@ public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
context = parent.getContext();
LayoutInflater layoutInflater = LayoutInflater.from(context);
return new ViewHolder(layoutInflater.inflate(R.layout.drawer_instance, parent, false));
DrawerInstanceBinding itemBinding = DrawerInstanceBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
return new ViewHolder(itemBinding);
}
@Override
@ -66,14 +71,33 @@ public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
final ViewHolder holder = (ViewHolder) viewHolder;
if (instance.getShortDescription() != null && instance.getShortDescription().trim().length() > 0) {
holder.description.setText(instance.getShortDescription());
holder.description.setVisibility(View.VISIBLE);
if (instance.isTruncatedDescription()) {
holder.binding.description.setText(instance.getShortDescription());
holder.binding.description.setMaxLines(3);
holder.binding.description.setEllipsize(TextUtils.TruncateAt.END);
} else {
holder.description.setVisibility(View.GONE);
holder.binding.description.setText(instance.getShortDescription());
holder.binding.description.setMaxLines(Integer.MAX_VALUE);
holder.binding.description.setEllipsize(null);
}
SpannableString spannableString;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
spannableString = new SpannableString(Html.fromHtml(instance.getShortDescription(), FROM_HTML_MODE_LEGACY));
else
spannableString = new SpannableString(Html.fromHtml(instance.getShortDescription()));
holder.binding.description.setText(spannableString, TextView.BufferType.SPANNABLE);
holder.binding.description.setOnClickListener(v -> {
instance.setTruncatedDescription(!instance.isTruncatedDescription());
notifyItemChanged(position);
});
holder.binding.description.setVisibility(View.VISIBLE);
} else {
holder.binding.description.setVisibility(View.GONE);
}
holder.name.setText(instance.getName());
holder.host.setText(instance.getHost());
holder.binding.name.setText(instance.getName());
holder.binding.host.setText(instance.getHost());
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
@ -95,7 +119,7 @@ public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
}
if (instance.getSpannableStringBuilder() != null) {
holder.tags.setText(instance.getSpannableStringBuilder());
holder.binding.tags.setText(instance.getSpannableStringBuilder());
}
if (peertubeInformation != null && peertubeInformation.getLanguages() != null) {
@ -107,21 +131,21 @@ public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
}
if (languages.toString().trim().length() == 0) {
holder.languages.setVisibility(View.GONE);
holder.binding.languages.setVisibility(View.GONE);
} else {
holder.languages.setText(languages);
holder.languages.setVisibility(View.VISIBLE);
holder.binding.languages.setText(languages);
holder.binding.languages.setVisibility(View.VISIBLE);
}
}
if (instance.getDefaultNSFWPolicy().compareTo("do_not_list") != 0) {
holder.sensitive_content.setText(context.getString(R.string.sensitive_content, instance.getDefaultNSFWPolicy()));
holder.sensitive_content.setVisibility(View.VISIBLE);
holder.binding.sensitiveContent.setText(context.getString(R.string.sensitive_content, instance.getDefaultNSFWPolicy()));
holder.binding.sensitiveContent.setVisibility(View.VISIBLE);
} else {
holder.sensitive_content.setVisibility(View.GONE);
holder.binding.sensitiveContent.setVisibility(View.GONE);
}
holder.followers_instance.setText(context.getString(R.string.followers_instance, String.valueOf(instance.getTotalInstanceFollowers())));
holder.binding.followersInstance.setText(context.getString(R.string.followers_instance, String.valueOf(instance.getTotalInstanceFollowers())));
holder.pickup.setOnClickListener(v -> {
holder.binding.pickup.setOnClickListener(v -> {
Intent data = new Intent();
String instanceHost = instance.getHost();
data.setData(Uri.parse(instanceHost));
@ -142,21 +166,12 @@ public class InstanceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
static class ViewHolder extends RecyclerView.ViewHolder {
DrawerInstanceBinding binding;
Button pickup;
TextView name, host, description;
TextView tags, followers_instance, languages, sensitive_content;
ViewHolder(DrawerInstanceBinding itemView) {
super(itemView.getRoot());
binding = itemView;
}
}
public ViewHolder(@NonNull View itemView) {
super(itemView);
pickup = itemView.findViewById(R.id.pickup);
name = itemView.findViewById(R.id.name);
host = itemView.findViewById(R.id.host);
description = itemView.findViewById(R.id.description);
followers_instance = itemView.findViewById(R.id.followers_instance);
tags = itemView.findViewById(R.id.tags);
languages = itemView.findViewById(R.id.languages);
sensitive_content = itemView.findViewById(R.id.sensitive_content);
}
}
}

View File

@ -55,12 +55,15 @@ import app.fedilab.fedilabtube.R;
import app.fedilab.fedilabtube.ShowChannelActivity;
import app.fedilab.fedilabtube.client.APIResponse;
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.data.AccountData;
import app.fedilab.fedilabtube.client.data.ChannelData;
import app.fedilab.fedilabtube.client.data.PlaylistData;
import app.fedilab.fedilabtube.client.data.VideoData;
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
import app.fedilab.fedilabtube.client.entities.Report;
import app.fedilab.fedilabtube.databinding.DrawerPeertubeBinding;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
import app.fedilab.fedilabtube.viewmodel.PostActionsVM;
import app.fedilab.fedilabtube.viewmodel.TimelineVM;
@ -81,12 +84,15 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private Context context;
private TimelineVM.TimelineType timelineType;
private boolean sepiaSearch;
private ChannelData.Channel forChannel;
private AccountData.Account forAccount;
public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch) {
public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch, ChannelData.Channel forChannel, AccountData.Account forAccount) {
this.videos = videos;
this.timelineType = timelineType;
this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH;
this.forChannel = forChannel;
this.forAccount = forAccount;
}
@ -126,16 +132,30 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
ownVideos = Helper.isVideoOwner(context, video);
}
String instance = null;
if (sepiaSearch) {
instance = video.getAccount().getHost();
} else if (forChannel != null) {
instance = forChannel.getHost();
} else if (forAccount != null) {
instance = forAccount.getHost();
}
holder.binding.peertubeAccountName.setText(video.getChannel().getAcct());
Helper.loadGiF(context, instance, video.getChannel().getAvatar() != null ? video.getChannel().getAvatar().getPath() : null, holder.binding.peertubeProfile);
holder.binding.peertubeTitle.setText(video.getName());
if (video.isLive()) {
holder.binding.peertubeDuration.setText(R.string.live);
holder.binding.peertubeDuration.setBackgroundResource(R.drawable.rounded_live);
} else {
holder.binding.peertubeDuration.setText(Helper.secondsToString(video.getDuration()));
holder.binding.peertubeDuration.setBackgroundResource(R.drawable.rounded_corner);
}
holder.binding.peertubeDate.setText(String.format(" - %s", Helper.dateDiff(context, video.getCreatedAt())));
holder.binding.peertubeViews.setText(context.getString(R.string.number_view_video, Helper.withSuffix(video.getViews())));
@ -171,8 +191,8 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
Intent intent = new Intent(context, ShowChannelActivity.class);
Bundle b = new Bundle();
b.putParcelable("channel", video.getChannel());
b.putBoolean("sepia_search", sepiaSearch);
if (sepiaSearch) {
b.putBoolean("sepia_search", sepiaSearch || forChannel != null);
if (sepiaSearch || forChannel != null) {
b.putString("peertube_instance", video.getAccount().getHost());
}
intent.putExtras(b);
@ -388,14 +408,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
}
public interface RelationShipListener {
Map<String, Boolean> getRelationShip();
}
public interface PlaylistListener {
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")) {
@ -405,8 +417,8 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
urlPreview = "https://" + instance + urlPreview;
thumbnail = "https://" + instance + thumbnail;
} else {
urlPreview = "https://" + Helper.getLiveInstance(context) + urlPreview;
thumbnail = "https://" + Helper.getLiveInstance(context) + thumbnail;
urlPreview = "https://" + HelperInstance.getLiveInstance(context) + urlPreview;
thumbnail = "https://" + HelperInstance.getLiveInstance(context) + thumbnail;
}
RequestBuilder<Drawable> requestBuilder = Glide.with(context)
.asDrawable();
@ -458,6 +470,14 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
public interface RelationShipListener {
Map<String, Boolean> getRelationShip();
}
public interface PlaylistListener {
Map<String, List<PlaylistExist>> getPlaylist();
}
static class ViewHolder extends RecyclerView.ViewHolder {
DrawerPeertubeBinding binding;

View File

@ -41,6 +41,7 @@ import app.fedilab.fedilabtube.client.data.NotificationData.Notification;
import app.fedilab.fedilabtube.client.entities.Actor;
import app.fedilab.fedilabtube.fragment.DisplayNotificationsFragment;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
@ -67,7 +68,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
ViewHolder holder = (ViewHolder) viewHolder;
Notification notification = notifications.get(position);
//Follow Notification
boolean clickableNotification = true;
holder.peertube_notif_pp.setVisibility(View.VISIBLE);
AccountData.Account accountAction = null;
ChannelData.Channel channelAction = null;
@ -148,7 +149,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
Intent intent = new Intent(context, PeertubeActivity.class);
Bundle b = new Bundle();
b.putParcelable("video", notification.getVideo());
b.putString("peertube_instance", Helper.getLiveInstance(context));
b.putString("peertube_instance", HelperInstance.getLiveInstance(context));
b.putBoolean("isMyVideo", finalMyVideo);
b.putString("video_id", notification.getVideo().getId());
b.putString("video_uuid", notification.getVideo().getUuid());
@ -157,11 +158,13 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
});
} else if (notification.getVideoAbuse() != null && notification.getVideoAbuse().getVideo() != null) {
message = context.getString(R.string.peertube_video_abuse, notification.getVideoAbuse().getVideo().getName());
clickableNotification = false;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
holder.peertube_notif_message.setText(Html.fromHtml(message, Html.FROM_HTML_MODE_LEGACY));
else
holder.peertube_notif_message.setText(Html.fromHtml(message));
} else if (notification.getAbuse() != null) {
clickableNotification = false;
if (notification.getType() == DisplayNotificationsFragment.MY_VIDEO_REPPORT_SUCCESS) {
message = context.getString(R.string.peertube_video_report_success, notification.getAbuse().getId());
}
@ -174,6 +177,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
holder.peertube_notif_date.setText(Helper.dateDiff(context, notification.getCreatedAt()));
AccountData.Account finalAccountAction = accountAction;
ChannelData.Channel finalChannelAction = channelAction;
if (clickableNotification) {
holder.peertube_notif_pp.setOnClickListener(v -> {
Bundle b = new Bundle();
Intent intent = null;
@ -191,6 +195,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
}
});
}
}
@Override

View File

@ -33,7 +33,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.PopupMenu;
import androidx.core.app.ActivityCompat;
@ -65,6 +64,7 @@ import app.fedilab.fedilabtube.client.data.PlaylistData.Playlist;
import app.fedilab.fedilabtube.client.data.VideoPlaylistData;
import app.fedilab.fedilabtube.databinding.DrawerPlaylistBinding;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.helper.NotificationHelper;
import app.fedilab.fedilabtube.helper.PlaylistExportHelper;
import app.fedilab.fedilabtube.sqlite.ManagePlaylistsDAO;
@ -241,7 +241,7 @@ public class PlaylistAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
String urlAvatar = playlist.getThumbnailPath() != null ? Helper.getLiveInstance(context) + playlist.getThumbnailPath() : null;
String urlAvatar = playlist.getThumbnailPath() != null ? HelperInstance.getLiveInstance(context) + playlist.getThumbnailPath() : null;
FutureTarget<Bitmap> futureBitmapChannel = Glide.with(context.getApplicationContext())
.asBitmap()
.load(urlAvatar != null ? urlAvatar : R.drawable.missing_peertube).submit();

View File

@ -58,6 +58,7 @@ import app.fedilab.fedilabtube.databinding.AddChannelBinding;
import app.fedilab.fedilabtube.databinding.FragmentRecyclerviewBinding;
import app.fedilab.fedilabtube.drawer.ChannelListAdapter;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.helper.HelperInstance;
import app.fedilab.fedilabtube.viewmodel.ChannelsVM;
import app.fedilab.fedilabtube.viewmodel.SearchVM;
import es.dmoral.toasty.Toasty;
@ -67,8 +68,8 @@ import static app.fedilab.fedilabtube.PeertubeUploadActivity.MY_PERMISSIONS_REQU
public class DisplayChannelsFragment extends Fragment implements ChannelListAdapter.AllChannelRemoved, ChannelListAdapter.EditAlertDialog {
private Context context;
private static final int PICK_AVATAR = 467;
private Context context;
private ChannelListAdapter channelListAdapter;
private List<ChannelData.Channel> channels;
private String name;
@ -303,7 +304,7 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap
if (oldChannelValues == null) {
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.CREATE_CHANNEL, null, channelCreation, inputData);
} else {
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.UPDATE_CHANNEL, channelCreation.getName() + "@" + Helper.getLiveInstance(context), channelCreation, inputData);
apiResponse = new RetrofitPeertubeAPI(context).createOrUpdateChannel(ChannelsVM.action.UPDATE_CHANNEL, channelCreation.getName() + "@" + HelperInstance.getLiveInstance(context), channelCreation, inputData);
}
Handler mainHandler = new Handler(Looper.getMainLooper());
Runnable myRunnable = () -> {

View File

@ -30,7 +30,6 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.Toast;

Some files were not shown because too many files have changed in this diff Show More