0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-26 21:13:01 +00:00

crash fix by reverting changes

This commit is contained in:
X1nto 2020-05-06 01:33:40 +04:00
parent cebac3710b
commit 821479561e
19 changed files with 88 additions and 80 deletions

View file

@ -16,11 +16,11 @@ class SettingsFragment : PreferenceFragmentCompat() {
//Fuck Android 6 android 5 users! Because theme is not working
//we can't display preference for them.
//They should've upgraded to something newer
/*if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
val prefScreen: PreferenceScreen? = findPreference("prefScreen")
val prefCategory: PreferenceCategory? = findPreference("interface_category")
prefScreen?.removePreference(prefCategory)
}*/
}
activity?.title = getString(R.string.title_settings)
setHasOptionsMenu(true)

View file

@ -12,18 +12,27 @@
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/home_toolbar"
android:layout_below="@id/home_appbar"
app:defaultNavHost="true"
app:navGraph="@navigation/mobile_navigation"/>
<androidx.appcompat.widget.Toolbar
android:id="@+id/home_toolbar"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/home_appbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:titleTextColor="?attr/toolbarIconColor"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@android:color/transparent"/>
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/home_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:titleTextColor="?attr/toolbarIconColor"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@android:color/transparent"/>
</com.google.android.material.appbar.AppBarLayout>
</RelativeLayout>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -47,16 +47,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/update_center_dismiss"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:text="@string/close"
android:textAllCaps="false"/>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/update_center_recheck"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
@ -69,4 +69,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -62,7 +62,7 @@
</FrameLayout>
<Button
<com.google.android.material.button.MaterialButton
style="@style/Widget.AppCompat.Button.Borderless"
android:id="@+id/vanced_install_finish"
android:layout_width="wrap_content"

View file

@ -41,7 +41,7 @@
app:layout_constraintStart_toStartOf="parent"
android:checkedButton="@id/button_light_dark">
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/button_light_dark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -49,7 +49,7 @@
android:text="@string/install_light_dark"
android:fontFamily="@font/exo_semibold"/>
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/button_light_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -59,7 +59,7 @@
</RadioGroup>
<Button
<com.google.android.material.button.MaterialButton
style="@style/Widget.AppCompat.Button.Borderless"
android:id="@+id/vanced_next_to_variant"
android:layout_width="wrap_content"

View file

@ -41,7 +41,7 @@
app:layout_constraintTop_toBottomOf="@id/install_theme_title"
app:layout_constraintStart_toStartOf="parent">
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/button_nonroot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -49,7 +49,7 @@
android:text="@string/install_nonroot"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/button_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -59,7 +59,7 @@
</RadioGroup>
<Button
<com.google.android.material.button.MaterialButton
style="@style/Widget.AppCompat.Button.Borderless"
android:id="@+id/vanced_next_to_language"
android:layout_width="wrap_content"
@ -72,7 +72,6 @@
app:icon="@drawable/ic_keyboard_next"
app:iconGravity="end"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -66,4 +66,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -35,4 +35,4 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -28,7 +28,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/about_github_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -49,7 +49,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/about_github_button"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_gravity="start"
@ -66,7 +66,7 @@
app:iconGravity="textStart"
app:iconPadding="0dp"/>
<Button
<com.google.android.material.button.MaterialButton
tools:ignore="HardcodedText"
android:id="@+id/about_license_button"
style="@style/Widget.AppCompat.Button.Borderless"
@ -87,8 +87,8 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -67,4 +67,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -56,5 +56,5 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -17,7 +17,7 @@
android:layout_height="match_parent"
android:checkedButton="@id/English">
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/English"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -25,7 +25,7 @@
android:text="English (default)"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Bahasa_Indonesia"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -33,7 +33,7 @@
android:text="Bahasa Indonesia"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Catalian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -41,7 +41,7 @@
android:text="Català"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Deutsch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -49,7 +49,7 @@
android:text="Deutsch"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Spanish"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -57,7 +57,7 @@
android:text="Espanól"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/French"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -65,7 +65,7 @@
android:text="Français"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Hrvatski"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -73,7 +73,7 @@
android:text="Hrvatski"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Italian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -81,7 +81,7 @@
android:text="Italiano"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Magyar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -89,7 +89,7 @@
android:text="Magyar"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Nederlands"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -97,7 +97,7 @@
android:text="Nederlands"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Polish"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -105,7 +105,7 @@
android:text="Polski"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Portugees"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -113,7 +113,7 @@
android:text="Português (Brasil)"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Romanian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -121,7 +121,7 @@
android:text="Română"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Suomi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -129,7 +129,7 @@
android:text="Suomi"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Svenska"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -137,7 +137,7 @@
android:text="Svenska"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Tieng"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -145,7 +145,7 @@
android:text="Tiếng Việt"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Turkish"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -153,7 +153,7 @@
android:text="Türkçe"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Armenian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -161,7 +161,7 @@
android:text="Ελληνικά"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Bulgarian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -169,7 +169,7 @@
android:text="Български (България)"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Russian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -177,7 +177,7 @@
android:text="Русский"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Ukrainian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -185,7 +185,7 @@
android:text="Українська"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Arabic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -193,7 +193,7 @@
android:text="العربية"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Georgian"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -201,7 +201,7 @@
android:text="ქართული"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Japanese"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -209,7 +209,7 @@
android:text="日本語"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Chinese"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -217,7 +217,7 @@
android:text="繁體中文"
android:textSize="18sp" />
<RadioButton
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Korean"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -138,4 +138,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -31,4 +31,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -66,5 +66,5 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@ -135,5 +135,5 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/social_media_card"
@ -43,7 +43,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/discordbtn"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
@ -58,7 +58,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/tgbtn"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
@ -74,7 +74,7 @@
app:layout_constraintStart_toEndOf="@id/discordbtn"/>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/twitterbtn"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
@ -89,7 +89,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/tgbtn"/>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/redditbtn"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
@ -110,4 +110,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="DarkTheme.Blue" parent="Theme.AppCompat.NoActionBar">
<style name="DarkTheme.Blue" parent="Theme.MaterialComponents.NoActionBar">
<item name="colorPrimary">#1490D7</item>
<item name="colorPrimaryVariant">#804EAFF5</item>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LightTheme.Blue" parent="Theme.AppCompat.Light.NoActionBar">
<style name="LightTheme.Blue" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">#1490D7</item>
<item name="colorPrimaryVariant">#2C7EB9</item>