mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 13:41:03 +00:00
fix(YouTube - Settings): Use an overlay to show search results (#5806)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package app.revanced.patches.music.misc.settings
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patches.all.misc.packagename.setOrGetFallbackPackageName
|
||||
@@ -10,20 +9,19 @@ import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.BasePreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.BasePreferenceScreen
|
||||
import app.revanced.patches.shared.misc.settings.preference.InputType
|
||||
import app.revanced.patches.shared.misc.settings.preference.IntentPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.TextPreference
|
||||
import app.revanced.patches.shared.misc.settings.settingsPatch
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.copyResources
|
||||
import app.revanced.patches.youtube.misc.settings.modifyActivityForSettingsInjection
|
||||
import app.revanced.util.copyXmlNode
|
||||
import app.revanced.util.inputStreamFromBundledResource
|
||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||
|
||||
private const val BASE_ACTIVITY_HOOK_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/shared/settings/BaseActivityHook;"
|
||||
private const val GOOGLE_API_ACTIVITY_HOOK_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/music/settings/GoogleApiActivityHook;"
|
||||
"Lapp/revanced/extension/music/settings/MusicActivityHook;"
|
||||
|
||||
private val preferences = mutableSetOf<BasePreference>()
|
||||
|
||||
@@ -31,26 +29,19 @@ private val settingsResourcePatch = resourcePatch {
|
||||
dependsOn(
|
||||
resourceMappingPatch,
|
||||
settingsPatch(
|
||||
IntentPreference(
|
||||
titleKey = "revanced_settings_title",
|
||||
summaryKey = null,
|
||||
intent = newIntent("revanced_settings_intent"),
|
||||
) to "settings_headers",
|
||||
listOf(
|
||||
IntentPreference(
|
||||
titleKey = "revanced_settings_title",
|
||||
summaryKey = null,
|
||||
intent = newIntent("revanced_settings_intent"),
|
||||
) to "settings_headers",
|
||||
),
|
||||
preferences
|
||||
)
|
||||
)
|
||||
|
||||
execute {
|
||||
|
||||
// TODO: Remove this when search will be abstract.
|
||||
copyResources(
|
||||
"settings",
|
||||
ResourceGroup(
|
||||
"layout",
|
||||
"revanced_music_settings_with_toolbar.xml"
|
||||
)
|
||||
)
|
||||
|
||||
val targetResource = "values/styles.xml"
|
||||
inputStreamFromBundledResource(
|
||||
"settings/music",
|
||||
@@ -98,24 +89,25 @@ val settingsPatch = bytecodePatch(
|
||||
selectable = true,
|
||||
)
|
||||
|
||||
// Modify GoogleApiActivity and remove all existing layout code.
|
||||
// Must modify an existing activity and cannot add a new activity to the manifest,
|
||||
// as that fails for root installations.
|
||||
|
||||
googleApiActivityFingerprint.method.addInstructions(
|
||||
1,
|
||||
"""
|
||||
invoke-static { }, $GOOGLE_API_ACTIVITY_HOOK_CLASS_DESCRIPTOR->createInstance()Lapp/revanced/extension/music/settings/GoogleApiActivityHook;
|
||||
move-result-object v0
|
||||
invoke-static { v0, p0 }, $BASE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->initialize(Lapp/revanced/extension/shared/settings/BaseActivityHook;Landroid/app/Activity;)V
|
||||
return-void
|
||||
"""
|
||||
PreferenceScreen.GENERAL.addPreferences(
|
||||
SwitchPreference("revanced_settings_search_history")
|
||||
)
|
||||
|
||||
// Remove other methods as they will break as the onCreate method is modified above.
|
||||
googleApiActivityFingerprint.classDef.apply {
|
||||
methods.removeIf { it.name != "onCreate" && !MethodUtil.isConstructor(it) }
|
||||
}
|
||||
PreferenceScreen.MISC.addPreferences(
|
||||
TextPreference(
|
||||
key = null,
|
||||
titleKey = "revanced_pref_import_export_title",
|
||||
summaryKey = "revanced_pref_import_export_summary",
|
||||
inputType = InputType.TEXT_MULTI_LINE,
|
||||
tag = "app.revanced.extension.shared.settings.preference.ImportExportPreference",
|
||||
)
|
||||
)
|
||||
|
||||
modifyActivityForSettingsInjection(
|
||||
googleApiActivityFingerprint.classDef,
|
||||
googleApiActivityFingerprint.method,
|
||||
GOOGLE_API_ACTIVITY_HOOK_CLASS_DESCRIPTOR
|
||||
)
|
||||
}
|
||||
|
||||
finalize {
|
||||
|
||||
@@ -65,14 +65,15 @@ fun settingsPatch (
|
||||
copyResources(
|
||||
"settings",
|
||||
ResourceGroup("xml", "revanced_prefs.xml", "revanced_prefs_icons.xml"),
|
||||
ResourceGroup("menu", "revanced_search_menu.xml"),
|
||||
ResourceGroup("drawable",
|
||||
// CustomListPreference resources.
|
||||
"revanced_ic_dialog_alert.xml",
|
||||
"revanced_settings_arrow_time.xml",
|
||||
"revanced_settings_circle_background.xml",
|
||||
"revanced_settings_cursor.xml",
|
||||
"revanced_settings_custom_checkmark.xml",
|
||||
"revanced_settings_search_icon.xml",
|
||||
"revanced_settings_search_remove.xml",
|
||||
"revanced_settings_toolbar_arrow_left.xml",
|
||||
),
|
||||
ResourceGroup("layout",
|
||||
@@ -80,6 +81,16 @@ fun settingsPatch (
|
||||
// Color picker.
|
||||
"revanced_color_dot_widget.xml",
|
||||
"revanced_color_picker.xml",
|
||||
// Search.
|
||||
"revanced_preference_search_history_item.xml",
|
||||
"revanced_preference_search_history_screen.xml",
|
||||
"revanced_preference_search_no_result.xml",
|
||||
"revanced_preference_search_result_color.xml",
|
||||
"revanced_preference_search_result_group_header.xml",
|
||||
"revanced_preference_search_result_list.xml",
|
||||
"revanced_preference_search_result_regular.xml",
|
||||
"revanced_preference_search_result_switch.xml",
|
||||
"revanced_settings_with_toolbar.xml"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
|
||||
private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/tiktok/settings/AdPersonalizationActivityHook;"
|
||||
"Lapp/revanced/extension/tiktok/settings/TikTokActivityHook;"
|
||||
|
||||
val settingsPatch = bytecodePatch(
|
||||
name = "Settings",
|
||||
|
||||
@@ -29,7 +29,7 @@ private const val MENU_DISMISS_EVENT_CLASS_DESCRIPTOR =
|
||||
"Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
|
||||
|
||||
private const val EXTENSION_PACKAGE = "app/revanced/extension/twitch"
|
||||
private const val ACTIVITY_HOOKS_CLASS_DESCRIPTOR = "L$EXTENSION_PACKAGE/settings/AppCompatActivityHook;"
|
||||
private const val ACTIVITY_HOOKS_CLASS_DESCRIPTOR = "L$EXTENSION_PACKAGE/settings/TwitchActivityHook;"
|
||||
private const val UTILS_CLASS_DESCRIPTOR = "L$EXTENSION_PACKAGE/Utils;"
|
||||
|
||||
private val preferences = mutableSetOf<BasePreference>()
|
||||
|
||||
@@ -46,10 +46,10 @@ private val swipeControlsResourcePatch = resourcePatch {
|
||||
ListPreference("revanced_swipe_overlay_style"),
|
||||
TextPreference("revanced_swipe_overlay_background_opacity", inputType = InputType.NUMBER),
|
||||
TextPreference("revanced_swipe_overlay_progress_brightness_color",
|
||||
tag = "app.revanced.extension.shared.settings.preference.ColorPickerPreference",
|
||||
tag = "app.revanced.extension.shared.settings.preference.ColorPickerWithOpacitySliderPreference",
|
||||
inputType = InputType.TEXT_CAP_CHARACTERS),
|
||||
TextPreference("revanced_swipe_overlay_progress_volume_color",
|
||||
tag = "app.revanced.extension.shared.settings.preference.ColorPickerPreference",
|
||||
tag = "app.revanced.extension.shared.settings.preference.ColorPickerWithOpacitySliderPreference",
|
||||
inputType = InputType.TEXT_CAP_CHARACTERS),
|
||||
TextPreference("revanced_swipe_text_overlay_size", inputType = InputType.NUMBER),
|
||||
TextPreference("revanced_swipe_overlay_timeout", inputType = InputType.NUMBER),
|
||||
|
||||
@@ -189,7 +189,10 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
SwitchPreference("revanced_hide_keyword_content_subscriptions"),
|
||||
SwitchPreference("revanced_hide_keyword_content_search"),
|
||||
TextPreference("revanced_hide_keyword_content_phrases", inputType = InputType.TEXT_MULTI_LINE),
|
||||
NonInteractivePreference("revanced_hide_keyword_content_about"),
|
||||
NonInteractivePreference(
|
||||
key = "revanced_hide_keyword_content_about",
|
||||
tag = "app.revanced.extension.shared.settings.preference.BulletPointPreference"
|
||||
),
|
||||
NonInteractivePreference(
|
||||
key = "revanced_hide_keyword_content_about_whole_words",
|
||||
tag = "app.revanced.extension.youtube.settings.preference.HtmlPreference",
|
||||
@@ -223,7 +226,10 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
SwitchPreference("revanced_hide_chips_shelf"),
|
||||
SwitchPreference("revanced_hide_expandable_card"),
|
||||
SwitchPreference("revanced_hide_floating_microphone_button"),
|
||||
SwitchPreference("revanced_hide_horizontal_shelves"),
|
||||
SwitchPreference(
|
||||
key = "revanced_hide_horizontal_shelves",
|
||||
tag = "app.revanced.extension.shared.settings.preference.BulletPointSwitchPreference"
|
||||
),
|
||||
SwitchPreference("revanced_hide_image_shelf"),
|
||||
SwitchPreference("revanced_hide_latest_posts"),
|
||||
SwitchPreference("revanced_hide_mix_playlists"),
|
||||
|
||||
@@ -4,6 +4,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.all.misc.packagename.setOrGetFallbackPackageName
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
@@ -31,8 +33,8 @@ import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||
|
||||
private const val BASE_ACTIVITY_HOOK_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/shared/settings/BaseActivityHook;"
|
||||
private const val LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/youtube/settings/LicenseActivityHook;"
|
||||
private const val YOUTUBE_ACTIVITY_HOOK_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/extension/youtube/settings/YouTubeActivityHook;"
|
||||
|
||||
internal var appearanceStringId = -1L
|
||||
private set
|
||||
@@ -73,7 +75,8 @@ private val settingsResourcePatch = resourcePatch {
|
||||
// Use same colors as stock YouTube.
|
||||
overrideThemeColors("@color/yt_white1", "@color/yt_black3")
|
||||
|
||||
arrayOf(
|
||||
copyResources(
|
||||
"settings",
|
||||
ResourceGroup("drawable",
|
||||
"revanced_settings_icon.xml",
|
||||
"revanced_settings_screen_00_about.xml",
|
||||
@@ -89,23 +92,15 @@ private val settingsResourcePatch = resourcePatch {
|
||||
"revanced_settings_screen_10_sponsorblock.xml",
|
||||
"revanced_settings_screen_11_misc.xml",
|
||||
"revanced_settings_screen_12_video.xml",
|
||||
),
|
||||
ResourceGroup("layout",
|
||||
"revanced_preference_with_icon_no_search_result.xml",
|
||||
"revanced_search_suggestion_item.xml",
|
||||
"revanced_settings_with_toolbar.xml"
|
||||
),
|
||||
ResourceGroup("menu", "revanced_search_menu.xml")
|
||||
).forEach { resourceGroup ->
|
||||
copyResources("settings", resourceGroup)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
// Copy style properties used to fix over-sized copy menu that appear in EditTextPreference.
|
||||
// For a full explanation of how this fixes the issue, see the comments in this style file
|
||||
// and the comments in the extension code.
|
||||
val targetResource = "values/styles.xml"
|
||||
inputStreamFromBundledResource(
|
||||
"settings/host",
|
||||
"settings/youtube",
|
||||
targetResource,
|
||||
)!!.let { inputStream ->
|
||||
"resources".copyXmlNode(
|
||||
@@ -215,92 +210,6 @@ val settingsPatch = bytecodePatch(
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
// Modify the license activity and remove all existing layout code.
|
||||
// Must modify an existing activity and cannot add a new activity to the manifest,
|
||||
// as that fails for root installations.
|
||||
|
||||
licenseActivityOnCreateFingerprint.method.addInstructions(
|
||||
1,
|
||||
"""
|
||||
invoke-static {}, $LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->createInstance()Lapp/revanced/extension/youtube/settings/LicenseActivityHook;
|
||||
move-result-object v0
|
||||
invoke-static { v0, p0 }, $BASE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->initialize(Lapp/revanced/extension/shared/settings/BaseActivityHook;Landroid/app/Activity;)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
|
||||
// Remove other methods as they will break as the onCreate method is modified above.
|
||||
licenseActivityOnCreateFingerprint.classDef.apply {
|
||||
methods.removeIf { it.name != "onCreate" && !MethodUtil.isConstructor(it) }
|
||||
}
|
||||
|
||||
licenseActivityOnCreateFingerprint.classDef.apply {
|
||||
// Add attachBaseContext method to override the context for setting a specific language.
|
||||
ImmutableMethod(
|
||||
type,
|
||||
"attachBaseContext",
|
||||
listOf(ImmutableMethodParameter("Landroid/content/Context;", null, null)),
|
||||
"V",
|
||||
AccessFlags.PROTECTED.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(3),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-static { p1 }, $LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->getAttachBaseContext(Landroid/content/Context;)Landroid/content/Context;
|
||||
move-result-object p1
|
||||
invoke-super { p0, p1 }, $superclass->attachBaseContext(Landroid/content/Context;)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}.let(methods::add)
|
||||
|
||||
// Add onBackPressed method to handle back button presses, delegating to SearchViewController.
|
||||
ImmutableMethod(
|
||||
type,
|
||||
"onBackPressed",
|
||||
emptyList(),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(3),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/extension/youtube/settings/SearchViewController;->handleBackPress()Z
|
||||
move-result v0
|
||||
if-nez v0, :search_handled
|
||||
invoke-virtual { p0 }, Landroid/app/Activity;->finish()V
|
||||
:search_handled
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}.let(methods::add)
|
||||
|
||||
// Add onConfigurationChanged method to handle configuration changes (e.g., screen orientation).
|
||||
ImmutableMethod(
|
||||
type,
|
||||
"onConfigurationChanged",
|
||||
listOf(ImmutableMethodParameter("Landroid/content/res/Configuration;", null, null)),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(3)
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-super { p0, p1 }, Landroid/app/Activity;->onConfigurationChanged(Landroid/content/res/Configuration;)V
|
||||
invoke-static { p0, p1 }, $LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->handleConfigurationChanged(Landroid/app/Activity;Landroid/content/res/Configuration;)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}.let(methods::add)
|
||||
}
|
||||
|
||||
// Update shared dark mode status based on YT theme.
|
||||
// This is needed because YT allows forcing light/dark mode
|
||||
// which then differs from the system dark mode status.
|
||||
@@ -309,7 +218,7 @@ val settingsPatch = bytecodePatch(
|
||||
val register = getInstruction<OneRegisterInstruction>(index).registerA
|
||||
addInstructionsAtControlFlowLabel(
|
||||
index,
|
||||
"invoke-static { v$register }, ${LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR}->updateLightDarkModeStatus(Ljava/lang/Enum;)V",
|
||||
"invoke-static { v$register }, ${YOUTUBE_ACTIVITY_HOOK_CLASS_DESCRIPTOR}->updateLightDarkModeStatus(Ljava/lang/Enum;)V",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -317,7 +226,13 @@ val settingsPatch = bytecodePatch(
|
||||
// Add setting to force Cairo settings fragment on/off.
|
||||
cairoFragmentConfigFingerprint.method.insertLiteralOverride(
|
||||
CAIRO_CONFIG_LITERAL_VALUE,
|
||||
"$LICENSE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->useCairoSettingsFragment(Z)Z"
|
||||
"$YOUTUBE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->useCairoSettingsFragment(Z)Z"
|
||||
)
|
||||
|
||||
modifyActivityForSettingsInjection(
|
||||
licenseActivityOnCreateFingerprint.classDef,
|
||||
licenseActivityOnCreateFingerprint.method,
|
||||
YOUTUBE_ACTIVITY_HOOK_CLASS_DESCRIPTOR
|
||||
)
|
||||
}
|
||||
|
||||
@@ -326,6 +241,76 @@ val settingsPatch = bytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modifies the activity to show ReVanced settings instead of it's original purpose.
|
||||
*/
|
||||
internal fun modifyActivityForSettingsInjection(
|
||||
activityOnCreateClass: MutableClass,
|
||||
activityOnCreateMethod: MutableMethod,
|
||||
extensionClassType: String
|
||||
) {
|
||||
// Modify Activity and remove all existing layout code.
|
||||
// Must modify an existing activity and cannot add a new activity to the manifest,
|
||||
// as that fails for root installations.
|
||||
activityOnCreateMethod.addInstructions(
|
||||
1,
|
||||
"""
|
||||
invoke-static { p0 }, $extensionClassType->initialize(Landroid/app/Activity;)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
|
||||
// Remove other methods as they will break as the onCreate method is modified above.
|
||||
activityOnCreateClass.apply {
|
||||
methods.removeIf { it != activityOnCreateMethod && !MethodUtil.isConstructor(it) }
|
||||
}
|
||||
|
||||
// Override base context to allow using ReVanced specific settings.
|
||||
ImmutableMethod(
|
||||
activityOnCreateClass.type,
|
||||
"attachBaseContext",
|
||||
listOf(ImmutableMethodParameter("Landroid/content/Context;", null, null)),
|
||||
"V",
|
||||
AccessFlags.PROTECTED.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(3),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-static { p1 }, $BASE_ACTIVITY_HOOK_CLASS_DESCRIPTOR->getAttachBaseContext(Landroid/content/Context;)Landroid/content/Context;
|
||||
move-result-object p1
|
||||
invoke-super { p0, p1 }, ${activityOnCreateClass.superclass}->attachBaseContext(Landroid/content/Context;)V
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}.let(activityOnCreateClass.methods::add)
|
||||
|
||||
// Override finish() to intercept back gesture.
|
||||
ImmutableMethod(
|
||||
activityOnCreateClass.type,
|
||||
"finish",
|
||||
emptyList(),
|
||||
"V",
|
||||
AccessFlags.PUBLIC.value,
|
||||
null,
|
||||
null,
|
||||
MutableMethodImplementation(3),
|
||||
).toMutable().apply {
|
||||
addInstructions(
|
||||
"""
|
||||
invoke-static {}, $extensionClassType->handleFinish()Z
|
||||
move-result v0
|
||||
if-nez v0, :search_handled
|
||||
invoke-super { p0 }, Landroid/app/Activity;->finish()V
|
||||
return-void
|
||||
:search_handled
|
||||
return-void
|
||||
"""
|
||||
)
|
||||
}.let(activityOnCreateClass.methods::add)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an intent to open ReVanced settings.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@ internal val settingsMenuVideoSpeedGroup = mutableSetOf<BasePreference>()
|
||||
@Suppress("unused")
|
||||
val playbackSpeedPatch = bytecodePatch(
|
||||
name = "Playback speed",
|
||||
description = "Adds options to customize available playback speeds, set default a playback speed, " +
|
||||
description = "Adds options to customize available playback speeds, set a default playback speed, " +
|
||||
"and show a speed dialog button in the video player.",
|
||||
) {
|
||||
dependsOn(
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
</string-array>
|
||||
</patch>
|
||||
<patch id="layout.sponsorblock.sponsorBlockResourcePatch">
|
||||
<string-array name="revanced_sb_duration_entries">
|
||||
<string-array name="revanced_sb_auto_hide_skip_button_duration_entries">
|
||||
<item>@string/revanced_sb_duration_1s</item>
|
||||
<item>@string/revanced_sb_duration_2s</item>
|
||||
<item>@string/revanced_sb_duration_3s</item>
|
||||
@@ -394,7 +394,7 @@
|
||||
<item>@string/revanced_sb_duration_9s</item>
|
||||
<item>@string/revanced_sb_duration_10s</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_sb_duration_entry_values">
|
||||
<string-array name="revanced_sb_auto_hide_skip_button_duration_entry_values">
|
||||
<item>ONE_SECOND</item>
|
||||
<item>TWO_SECONDS</item>
|
||||
<item>THREE_SECONDS</item>
|
||||
@@ -406,6 +406,32 @@
|
||||
<item>NINE_SECONDS</item>
|
||||
<item>TEN_SECONDS</item>
|
||||
</string-array>
|
||||
<!-- No easy way to make an alias to another array declaration, so copy it again here. -->
|
||||
<string-array name="revanced_sb_toast_on_skip_duration_entries">
|
||||
<item>@string/revanced_sb_duration_1s</item>
|
||||
<item>@string/revanced_sb_duration_2s</item>
|
||||
<item>@string/revanced_sb_duration_3s</item>
|
||||
<item>@string/revanced_sb_duration_4s</item>
|
||||
<item>@string/revanced_sb_duration_5s</item>
|
||||
<item>@string/revanced_sb_duration_6s</item>
|
||||
<item>@string/revanced_sb_duration_7s</item>
|
||||
<item>@string/revanced_sb_duration_8s</item>
|
||||
<item>@string/revanced_sb_duration_9s</item>
|
||||
<item>@string/revanced_sb_duration_10s</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_sb_toast_on_skip_duration_entry_values">
|
||||
<item>ONE_SECOND</item>
|
||||
<item>TWO_SECONDS</item>
|
||||
<item>THREE_SECONDS</item>
|
||||
<item>FOUR_SECONDS</item>
|
||||
<item>FIVE_SECONDS</item>
|
||||
<item>SIX_SECONDS</item>
|
||||
<item>SEVEN_SECONDS</item>
|
||||
<item>EIGHT_SECONDS</item>
|
||||
<item>NINE_SECONDS</item>
|
||||
<item>TEN_SECONDS</item>
|
||||
</string-array>
|
||||
|
||||
</patch>
|
||||
<patch id="layout.shortsplayer.shortsPlayerTypePatch">
|
||||
<string-array name="revanced_shorts_player_type_legacy_entries">
|
||||
|
||||
@@ -48,14 +48,28 @@ Second \"item\" text"</string>
|
||||
<string name="revanced_settings_search_hint">Search settings</string>
|
||||
<string name="revanced_settings_search_no_results_title">No results found for \'%s\'</string>
|
||||
<string name="revanced_settings_search_no_results_summary">Try another keyword</string>
|
||||
<string name="revanced_settings_search_recent_searches">Recent searches</string>
|
||||
<string name="revanced_settings_search_remove_message">Remove from search history?</string>
|
||||
<string name="revanced_settings_search_clear_history">Clear search history</string>
|
||||
<string name="revanced_settings_search_clear_history_message">Are you sure you want to clear all search history?</string>
|
||||
<string name="revanced_settings_search_tips_title">Search Tips</string>
|
||||
<string name="revanced_settings_search_tips_summary">"• Tap a path to navigate to it
|
||||
• Long-press a setting to navigate to it
|
||||
• Press Enter to save a search query to history
|
||||
• Search ignores casing and punctuation
|
||||
• Parent settings appear above disabled child settings"</string>
|
||||
<string name="revanced_settings_search_empty_history_title">Search history is empty</string>
|
||||
<string name="revanced_settings_search_empty_history_summary">To save search history, type a search query and press Enter</string>
|
||||
<string name="revanced_settings_search_history_title">Show settings search history</string>
|
||||
<string name="revanced_settings_search_history_summary_on">Settings search history is shown</string>
|
||||
<string name="revanced_settings_search_history_summary_off">Settings search history is not shown</string>
|
||||
<string name="revanced_show_menu_icons_title">Show ReVanced setting icons</string>
|
||||
<string name="revanced_show_menu_icons_summary_on">Setting icons are shown</string>
|
||||
<string name="revanced_show_menu_icons_summary_off">Setting icons are not shown</string>
|
||||
<string name="revanced_language_title">ReVanced language</string>
|
||||
<string name="revanced_language_user_dialog_message">"Translations for some languages may be missing or incomplete.
|
||||
|
||||
To translate new languages visit translate.revanced.app"</string>
|
||||
To translate new languages or improve the existing translations, visit translate.revanced.app"</string>
|
||||
<string name="revanced_language_DEFAULT">App language</string>
|
||||
<string name="revanced_language_AM" translatable="false">አማርኛ</string>
|
||||
<string name="revanced_language_AR" translatable="false">العربية</string>
|
||||
@@ -200,9 +214,6 @@ You will not be notified of any unexpected events."</string>
|
||||
<string name="revanced_restore_old_settings_menus_title">Restore old settings menus</string>
|
||||
<string name="revanced_restore_old_settings_menus_summary_on">Old settings menus are shown</string>
|
||||
<string name="revanced_restore_old_settings_menus_summary_off">Old settings menus are not shown</string>
|
||||
<string name="revanced_settings_search_history_title">Show settings search history</string>
|
||||
<string name="revanced_settings_search_history_summary_on">Settings search history is shown</string>
|
||||
<string name="revanced_settings_search_history_summary_off">Settings search history is not shown</string>
|
||||
</patch>
|
||||
<patch id="misc.backgroundplayback.backgroundPlaybackPatch">
|
||||
<string name="revanced_shorts_disable_background_playback_title">Disable Shorts background play</string>
|
||||
@@ -246,6 +257,7 @@ However, enabling this will also log some user data such as your IP address."</s
|
||||
<string name="revanced_hide_floating_microphone_button_summary_off">Floating microphone button in search is shown</string>
|
||||
<string name="revanced_hide_horizontal_shelves_title">Hide horizontal shelves</string>
|
||||
<string name="revanced_hide_horizontal_shelves_summary_on">"Horizontal shelves are hidden, such as:
|
||||
|
||||
• Breaking news
|
||||
• Continue watching
|
||||
• Explore more channels
|
||||
@@ -1128,9 +1140,9 @@ This feature works best with a video quality of 720p or lower and when using a v
|
||||
<string name="revanced_sb_guidelines_popup_already_read">Already read</string>
|
||||
<string name="revanced_sb_guidelines_popup_open">Show me</string>
|
||||
<string name="revanced_sb_general">General</string>
|
||||
<string name="revanced_sb_toast_on_connection_error_title">Show a toast if API is not available</string>
|
||||
<string name="revanced_sb_toast_on_connection_error_summary_on">Toast is shown if SponsorBlock is not available</string>
|
||||
<string name="revanced_sb_toast_on_connection_error_summary_off">Toast is not shown if SponsorBlock is not available</string>
|
||||
<string name="revanced_sb_toast_on_connection_error">Show a toast if API is not available</string>
|
||||
<string name="revanced_sb_toast_on_connection_error_sum_on">Toast is shown if SponsorBlock is not available</string>
|
||||
<string name="revanced_sb_toast_on_connection_error_sum_off">Toast is not shown if SponsorBlock is not available</string>
|
||||
<string name="revanced_sb_general_skipcount">Enable skip count tracking</string>
|
||||
<string name="revanced_sb_general_skipcount_sum_on">Lets the SponsorBlock leaderboard know how much time is saved. A message is sent to the leaderboard each time a segment is skipped</string>
|
||||
<string name="revanced_sb_general_skipcount_sum_off">Skip count tracking is not enabled</string>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FF0000" />
|
||||
<size
|
||||
android:width="20dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
||||
@@ -5,5 +5,5 @@
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?android:attr/textColorPrimary"
|
||||
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
|
||||
android:pathData="M9.29446,19 L3.4,12.708 L4.24339,11.8029 L9.29446,17.1896 L20.1565,5.6 L21,6.50026 Z M9.29446,19" />
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?android:attr/textColorPrimary"
|
||||
android:pathData="M7.61719,20 C7.16797,20,6.78516,19.8438,6.47266,19.5273 C6.15625,19.2148,6,18.832,6,18.3828 L6,6 L5,6 L5,5 L9,5 L9,4.23047 L15,4.23047 L15,5 L19,5 L19,6 L18,6 L18,18.3828 C18,18.8438,17.8477,19.2305,17.5391,19.5391 C17.2305,19.8477,16.8438,20,16.3828,20 Z M17,6 L7,6 L7,18.3828 C7,18.5625,7.05859,18.7109,7.17188,18.8281 C7.28906,18.9414,7.4375,19,7.61719,19 L16.3828,19 C16.5391,19,16.6797,18.9375,16.8086,18.8086 C16.9375,18.6797,17,18.5391,17,18.3828 Z M9.80859,17 L10.8086,17 L10.8086,8 L9.80859,8 Z M13.1914,17 L14.1914,17 L14.1914,8 L13.1914,8 Z M7,6 L7,19 Z M7,6" />
|
||||
</vector>
|
||||
@@ -8,13 +8,9 @@
|
||||
android:clipToPadding="false">
|
||||
|
||||
<View
|
||||
android:id="@+id/revanced_color_dot_widget"
|
||||
android:id="@+id/preference_color_dot"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/revanced_settings_circle_background"
|
||||
android:elevation="2dp"
|
||||
android:translationZ="2dp"
|
||||
android:outlineProvider="background" />
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
android:id="@+id/revanced_check_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:src="@drawable/revanced_settings_custom_checkmark"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@null" />
|
||||
@@ -23,7 +23,7 @@
|
||||
android:id="@+id/revanced_check_icon_placeholder"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<!-- Parent container for Toolbar -->
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_toolbar_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/action_bar_height"
|
||||
android:background="@color/ytm_color_black"
|
||||
android:elevation="0dp">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/revanced_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/action_bar_height"
|
||||
android:background="@color/ytm_color_black"
|
||||
app:titleTextColor="?attr/colorOnSurface"
|
||||
app:navigationIcon="@drawable/revanced_settings_toolbar_arrow_left"
|
||||
app:title="@string/revanced_settings_title" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Preference content container -->
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_settings_fragments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/ytm_color_black" />
|
||||
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<!-- History icon -->
|
||||
<ImageView
|
||||
android:id="@+id/history_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/revanced_settings_arrow_time"
|
||||
android:tint="?android:attr/textColorSecondary" />
|
||||
|
||||
<!-- Search history text -->
|
||||
<TextView
|
||||
android:id="@+id/history_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<!-- Delete icon -->
|
||||
<ImageView
|
||||
android:id="@+id/delete_icon"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/revanced_settings_search_remove"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:padding="4dp"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?android:attr/textColorSecondary"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Scrollable content -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Empty history message (hidden by default) -->
|
||||
<TextView
|
||||
android:id="@+id/empty_history_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revanced_settings_search_empty_history_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:visibility="gone"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_history_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revanced_settings_search_empty_history_summary"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:visibility="gone"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- History header -->
|
||||
<TextView
|
||||
android:id="@+id/search_history_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revanced_settings_search_recent_searches"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
||||
<!-- History list -->
|
||||
<LinearLayout
|
||||
android:id="@+id/search_history_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<!-- Clear history button -->
|
||||
<TextView
|
||||
android:id="@+id/clear_history_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/revanced_settings_search_clear_history"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:attr/colorAccent"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<!-- Search Tips -->
|
||||
<LinearLayout
|
||||
android:id="@+id/search_tips_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="false"
|
||||
android:focusable="false">
|
||||
|
||||
<!-- Content -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revanced_settings_search_tips_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/revanced_settings_search_tips_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:minHeight="48dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginHorizontal="18dp"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="10"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
android:minHeight="48dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="10"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Include color dot layout -->
|
||||
<include
|
||||
layout="@layout/revanced_color_dot_widget"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/preference_path"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textStyle="italic"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
android:minHeight="48dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="10"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
android:minHeight="48dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preference_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="10"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,44 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="54dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="18dp"
|
||||
android:contentDescription="@null" />
|
||||
android:orientation="horizontal"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
android:minHeight="48dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingVertical="8dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:id="@+id/preference_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAlignment="viewStart" />
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:id="@+id/preference_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textAlignment="viewStart"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="10"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/preference_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- History icon -->
|
||||
<ImageView
|
||||
android:id="@+id/history_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:contentDescription="History icon"
|
||||
android:src="@drawable/revanced_settings_arrow_time" />
|
||||
|
||||
<!-- Suggestion text -->
|
||||
<TextView
|
||||
android:id="@+id/suggestion_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.ReVanced.YouTubeMusic.Settings" parent="@style/Theme.YouTubeMusic">
|
||||
<item name="android:actionBarSize">@dimen/action_bar_height</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/item_extra_extra_large_spacing</item>
|
||||
<item name="android:listDivider">@null</item>
|
||||
</style>
|
||||
<style name="revanced_searchbar_cursor">
|
||||
<item name="android:textCursorDrawable">@drawable/revanced_settings_cursor</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user