fix(YouTube/Settings): matches the initialization process with the official ReVanced

This commit is contained in:
inotia00 2023-11-28 15:06:48 +09:00
parent 1e3481ff6a
commit 66dd981654
5 changed files with 33 additions and 14 deletions

View File

@ -49,6 +49,7 @@ object SettingsBytecodePatch : BytecodePatch(
context.injectInit("InitializationPatch", "initializeReVancedSettings", true)
}
internal lateinit var contexts: BytecodeContext
private const val SET_THEME =

View File

@ -120,9 +120,7 @@ object SettingsPatch : AbstractSettingsResourcePatch(
arrayOf(
ResourceUtils.ResourceGroup(
"layout",
"revanced_settings_toolbar.xml",
"revanced_settings_with_toolbar.xml",
"revanced_settings_with_toolbar_layout.xml"
"revanced_settings_with_toolbar.xml"
),
ResourceUtils.ResourceGroup(
"values-v21",

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@color/yt_white1" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="0dp">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:background="?attr/ytBrandBackgroundSolid" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:navigationIcon="@drawable/yt_outline_arrow_left_white_24" app:title="@string/revanced_extended_settings_title"/>
</FrameLayout>

View File

@ -1,4 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<merge>
<include layout="@layout/revanced_settings_with_toolbar_layout"/>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:transitionGroup="true">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/yt_white1"
android:elevation="0dp">
<android.support.v7.widget.Toolbar
android:id="@+id/revanced_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/ytBrandBackgroundSolid"
app:navigationIcon="@drawable/yt_outline_arrow_left_black_24"
app:title="@string/revanced_extended_settings_title" />
</FrameLayout>
<FrameLayout
android:id="@+id/revanced_settings_fragments"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</merge>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="match_parent" android:transitionGroup="true">
<include layout="@layout/revanced_settings_toolbar"/>
<FrameLayout android:id="@+id/revanced_settings_fragments" android:layout_width="match_parent" android:layout_height="match_parent"/>
</LinearLayout>