0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-27 05:23:00 +00:00

huge changes

This commit is contained in:
X1nto 2020-06-25 13:45:39 +04:00
parent 96842dc245
commit f71d2d5e4c
9 changed files with 114 additions and 65 deletions

View file

@ -13,13 +13,14 @@ import com.downloader.OnStartOrResumeListener
import com.downloader.PRDownloader
import com.vanced.manager.ui.fragments.HomeFragment
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
import java.lang.IllegalStateException
class MicrogDownloadService: Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
try {
downloadMicrog()
} catch (e: Exception) {
} catch (e: IllegalStateException) {
Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show()
}
stopSelf()

View file

@ -15,13 +15,14 @@ import com.vanced.manager.core.installer.RootSplitInstallerService
import com.vanced.manager.core.installer.SplitInstaller
import com.vanced.manager.ui.fragments.HomeFragment
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
import java.lang.IllegalStateException
class VancedDownloadService: Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
try {
downloadSplits()
} catch (e: Exception) {
} catch (e: IllegalStateException) {
Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show()
}
stopSelf()

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,12 @@
<vector android:height="18dp" android:viewportHeight="18"
android:viewportWidth="18" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M9,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"/>
<path android:fillColor="#1490D7" android:pathData="M9,1.5C4.86,1.5 1.5,4.86 1.5,9c0,4.141 3.36,7.5 7.5,7.5c4.141,0 7.5,-3.359 7.5,-7.5C16.5,4.86 13.141,1.5 9,1.5zM9.75,12.75h-1.5v-4.5h1.5V12.75zM9.75,6.75h-1.5v-1.5h1.5V6.75z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M9,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M9,2.728c-3.462,0 -6.272,2.81 -6.272,6.272c0,3.463 2.81,6.272 6.272,6.272c3.463,0 6.272,-2.81 6.272,-6.272C15.272,5.538 12.464,2.728 9,2.728zM9.628,12.137H8.374V8.373h1.254V12.137zM9.628,7.119H8.374V5.864h1.254V7.119z"
android:fillColor="#1490D7"/>
</vector>

View file

@ -1,5 +1,12 @@
<vector android:height="18dp" android:viewportHeight="18"
android:viewportWidth="18" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M9,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"/>
<path android:fillColor="#1490D7" android:pathData="M14.355,9.705C14.385,9.48 14.4,9.248 14.4,9c0,-0.24 -0.016,-0.48 -0.053,-0.705L15.87,7.11c0.135,-0.105 0.173,-0.307 0.09,-0.458l-1.44,-2.49c-0.09,-0.165 -0.277,-0.218 -0.441,-0.165l-1.793,0.72c-0.375,-0.285 -0.772,-0.525 -1.215,-0.705L10.8,2.107c-0.03,-0.18 -0.18,-0.308 -0.36,-0.308H7.56c-0.18,0 -0.323,0.128 -0.353,0.308l-0.27,1.905C6.495,4.192 6.09,4.44 5.723,4.718L3.93,3.998c-0.165,-0.06 -0.353,0 -0.443,0.165l-1.432,2.49c-0.09,0.158 -0.06,0.353 0.09,0.458l1.522,1.185C3.63,8.52 3.6,8.768 3.6,9s0.015,0.48 0.052,0.705L2.13,10.891c-0.135,0.104 -0.172,0.307 -0.09,0.457l1.44,2.49c0.09,0.164 0.277,0.217 0.442,0.164l1.792,-0.72c0.375,0.285 0.772,0.525 1.215,0.705l0.27,1.905c0.037,0.18 0.18,0.308 0.36,0.308h2.879c0.181,0 0.33,-0.128 0.354,-0.308l0.27,-1.905c0.442,-0.18 0.848,-0.42 1.215,-0.705l1.793,0.72c0.164,0.061 0.352,0 0.442,-0.164l1.44,-2.49c0.09,-0.165 0.052,-0.353 -0.091,-0.457L14.355,9.705zM9,11.7c-1.485,0 -2.7,-1.216 -2.7,-2.7c0,-1.485 1.215,-2.7 2.7,-2.7c1.484,0 2.7,1.215 2.7,2.7C11.7,10.484 10.484,11.7 9,11.7z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M9,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M13.358,9.574C13.383,9.391 13.396,9.202 13.396,9c0,-0.195 -0.014,-0.391 -0.043,-0.573l1.238,-0.965c0.11,-0.085 0.142,-0.25 0.073,-0.373l-1.172,-2.026c-0.073,-0.134 -0.225,-0.177 -0.358,-0.134l-1.459,0.586c-0.306,-0.232 -0.63,-0.427 -0.99,-0.573l-0.22,-1.551c-0.025,-0.147 -0.146,-0.251 -0.293,-0.251H7.828c-0.146,0 -0.263,0.104 -0.287,0.251l-0.22,1.551c-0.36,0.146 -0.689,0.348 -0.988,0.574L4.874,4.929c-0.134,-0.049 -0.287,0 -0.361,0.134L3.348,7.09C3.274,7.219 3.299,7.377 3.42,7.463l1.239,0.964C4.629,8.609 4.605,8.812 4.605,9s0.012,0.391 0.042,0.574l-1.239,0.965c-0.109,0.085 -0.14,0.25 -0.073,0.372l1.172,2.026c0.073,0.134 0.225,0.177 0.359,0.134l1.458,-0.586c0.305,0.231 0.628,0.427 0.989,0.573l0.22,1.552c0.03,0.146 0.146,0.25 0.293,0.25h2.343c0.147,0 0.269,-0.104 0.288,-0.25l0.22,-1.552c0.359,-0.146 0.69,-0.342 0.989,-0.573l1.459,0.586c0.134,0.049 0.286,0 0.359,-0.134l1.173,-2.026c0.073,-0.134 0.042,-0.287 -0.074,-0.372L13.358,9.574zM9,11.198c-1.208,0 -2.198,-0.99 -2.198,-2.198c0,-1.208 0.989,-2.197 2.198,-2.197c1.208,0 2.197,0.989 2.197,2.197C11.197,10.208 10.208,11.198 9,11.198z"
android:fillColor="#1490D7"/>
</vector>

View file

@ -0,0 +1,6 @@
<vector android:height="35dp" android:viewportHeight="560"
android:viewportWidth="960" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M723.062,157.08c-7.661,-28.84 -30.24,-51.548 -58.94,-59.265c-6.213,-1.68 -25.124,-6.773 -108.001,-9.24c-39.811,-1.19 -75.763,-1.204 -76.121,-1.204s-36.311,0.014 -76.124,1.204c-82.879,2.478 -101.785,7.577 -107.981,9.24c-28.694,7.719 -51.299,30.425 -58.954,59.265c-10.08,37.867 -10.374,114.072 -10.374,122.64c0,8.624 0.28,85.364 10.36,123.216c7.658,28.84 30.24,51.546 58.94,59.263c6.213,1.68 25.125,6.775 107.999,9.239c39.824,1.201 75.776,1.201 76.135,1.201s36.311,0 76.121,-1.204c82.88,-2.478 101.788,-7.576 107.987,-9.239c28.703,-7.723 51.296,-30.431 58.951,-59.251c10.08,-37.87 10.36,-114.609 10.36,-123.234C733.434,271.138 733.143,194.933 723.062,157.08zM697.28,396.068c-5.217,19.637 -20.583,35.098 -40.094,40.348c-35.363,9.537 -177.173,9.537 -177.173,9.537s-141.809,0 -177.172,-9.537c-19.51,-5.25 -34.877,-20.72 -40.093,-40.348c-9.475,-35.588 -9.475,-116.365 -9.475,-116.365s0,-80.184 9.475,-115.771c5.216,-19.636 20.583,-35.101 40.093,-40.348c35.35,-9.537 177.159,-9.537 177.159,-9.537s141.809,0 177.173,9.537c19.511,5.248 34.877,20.72 40.093,40.348c9.476,35.588 9.476,115.771 9.476,115.771S706.741,360.48 697.28,396.068z"/>
<path android:fillColor="#FF000000" android:pathData="M554.665,262.298l-107.602,-69.423c-4.667,-2.723 -10.657,-1.147 -13.38,3.52c-0.002,0.002 -0.003,0.004 -0.004,0.006l-0.21,0.355c-2.715,4.67 -1.138,10.657 3.525,13.384l102.896,61.911c6.695,4.026 6.656,13.745 -0.069,17.721L436.449,350.84c-4.687,2.688 -6.314,8.66 -3.641,13.354l0.207,0.358c2.688,4.687 8.66,6.314 13.354,3.64l108.147,-68.553C568.181,290.979 568.259,271.071 554.665,262.298z"/>
<path android:fillColor="#FF000000" android:pathData="M499.726,271.04l-52.981,-29.845c-6.859,-3.864 -15.338,1.089 -15.338,8.96v59.69c0,7.871 8.479,12.824 15.338,8.961l52.981,-29.846C506.709,285.04 506.709,274.96 499.726,271.04z"/>
</vector>

View file

@ -8,5 +8,5 @@
app:contentPaddingTop="2dp"
app:expandOnClick="true"
app:inner_view="@layout/include_changelog_pages"
android:background="?colorSurface"/>
android:background="?colorSurfaceVariant"/>

View file

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:bind="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
@ -14,71 +13,90 @@
<com.google.android.material.card.MaterialCardView
style="@style/InnerMaterialCard"
app:cardBackgroundColor="#6958D0">
app:cardBackgroundColor="?colorAccent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp"
android:fontFamily="@font/exo_semibold"
android:text="@string/vanced_medias"
android:textColor="#ffffff"
android:textSize="18sp" />
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/websitebtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_vanced_nobg"
android:text="@string/website_text"
android:textAlignment="textEnd"
android:textAllCaps="false"
android:fontFamily="@font/exo_semibold"
android:textSize="17sp"
app:layout_constraintEnd_toStartOf="@id/bravebtn"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:onClick='@{()-> viewModel.openUrl("https://reddit.com/r/vanced")}'/>
<com.google.android.material.button.MaterialButton
android:id="@+id/discordbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/discord"
app:layout_constraintEnd_toStartOf="@id/tgbtn"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:onClick='@{()-> viewModel.openUrl("https://discord.gg/TUVd7rd")}'/>
<com.google.android.material.button.MaterialButton
android:id="@+id/bravebtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_brave_logo"
android:text="@string/support_us"
android:textAllCaps="false"
android:fontFamily="@font/exo_semibold"
app:iconPadding="15dp"
android:textSize="17sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/websitebtn"
app:layout_constraintBottom_toBottomOf="parent"
android:onClick='@{()-> viewModel.openUrl("https://reddit.com/r/vanced")}'/>
<com.google.android.material.button.MaterialButton
android:id="@+id/tgbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/telegram"
app:layout_constraintEnd_toStartOf="@id/twitterbtn"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/discordbtn"
android:onClick='@{()-> viewModel.openUrl("https://t.me/joinchat/AAAAAEHf-pi4jH1SDlAL4w")}'/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/twitterbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/twitter"
app:layout_constraintEnd_toStartOf="@id/redditbtn"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/tgbtn"
android:onClick='@{()-> viewModel.openUrl("https://twitter.com/YTVanced")}'/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/redditbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_reddit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/twitterbtn"
android:onClick='@{()-> viewModel.openUrl("https://reddit.com/r/vanced")}'/>
<com.google.android.material.button.MaterialButton
android:id="@+id/discordbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/discord"
app:layout_constraintEnd_toStartOf="@id/tgbtn"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:onClick='@{()-> viewModel.openUrl("https://discord.gg/TUVd7rd")}'/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/tgbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/telegram"
app:layout_constraintEnd_toStartOf="@id/twitterbtn"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/discordbtn"
android:onClick='@{()-> viewModel.openUrl("https://t.me/joinchat/AAAAAEHf-pi4jH1SDlAL4w")}'/>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/twitterbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/twitter"
app:layout_constraintEnd_toStartOf="@id/redditbtn"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/tgbtn"
android:onClick='@{()-> viewModel.openUrl("https://twitter.com/YTVanced")}'/>
<com.google.android.material.button.MaterialButton
android:id="@+id/redditbtn"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_reddit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/twitterbtn"
android:onClick='@{()-> viewModel.openUrl("https://reddit.com/r/vanced")}'/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View file

@ -33,14 +33,14 @@
<string name="update">Update</string>
<string name="useful_links">Useful Links</string>
<string name="vanced_medias">Vanced on Social Media</string>
<string name="website_text">The official website of Vanced</string>
<string name="website_text">Vanced Website</string>
<string name="signature_disable">Disable Sig.</string>
<string name="signature_disabled">Disabled</string>
<string name="signature_enabled">Enabled</string>
<string name="signature_status">status:</string>
<string name="signature_verification">Sig. Verification</string>
<string name="signature_not_checked">Check signature</string>
<string name="support_us">Support us by downloading Brave</string>
<string name="support_us">Support us!</string>
<!-- Settings -->
<string name="accent_color">Accent Color</string>