feat(YouTube - Swipe controls): Add Swipe overlay alternative UI setting (Closes https://github.com/inotia00/ReVanced_Extended/issues/2828)

This commit is contained in:
inotia00 2025-03-26 18:58:02 +09:00
parent 99fa969857
commit 451a14a74d
22 changed files with 768 additions and 62 deletions

View File

@ -4,6 +4,7 @@ import android.view.View;
import java.lang.ref.WeakReference;
import app.revanced.extension.shared.settings.Setting;
import app.revanced.extension.youtube.settings.Settings;
@SuppressWarnings({"unused", "deprecation"})
@ -59,4 +60,20 @@ public class SwipeControlsPatch {
return engagementOverlayView != null && engagementOverlayView.getVisibility() == View.VISIBLE;
}
public static final class SwipeOverlayTextSizeAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {
return (Settings.ENABLE_SWIPE_BRIGHTNESS.get() || Settings.ENABLE_SWIPE_VOLUME.get()) &&
!Settings.SWIPE_OVERLAY_ALTERNATIVE_UI.get();
}
}
public static final class SwipeOverlayModernUIAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {
return (Settings.ENABLE_SWIPE_BRIGHTNESS.get() || Settings.ENABLE_SWIPE_VOLUME.get()) &&
Settings.SWIPE_OVERLAY_ALTERNATIVE_UI.get();
}
}
}

View File

@ -42,6 +42,7 @@ import app.revanced.extension.youtube.patches.player.ExitFullscreenPatch.Fullscr
import app.revanced.extension.youtube.patches.player.MiniplayerPatch;
import app.revanced.extension.youtube.patches.shorts.AnimationFeedbackPatch.AnimationType;
import app.revanced.extension.youtube.patches.shorts.ShortsRepeatStatePatch.ShortsLoopBehavior;
import app.revanced.extension.youtube.patches.swipe.SwipeControlsPatch;
import app.revanced.extension.youtube.patches.utils.PatchStatus;
import app.revanced.extension.youtube.shared.PlaylistIdPrefix;
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
@ -522,9 +523,15 @@ public class Settings extends BaseSettings {
public static final BooleanSetting ENABLE_SWIPE_PRESS_TO_ENGAGE = new BooleanSetting("revanced_enable_swipe_press_to_engage", FALSE, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final BooleanSetting ENABLE_SWIPE_HAPTIC_FEEDBACK = new BooleanSetting("revanced_enable_swipe_haptic_feedback", TRUE, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final BooleanSetting SWIPE_LOCK_MODE = new BooleanSetting("revanced_swipe_gestures_lock_mode", FALSE, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final BooleanSetting SWIPE_OVERLAY_ALTERNATIVE_UI = new BooleanSetting("revanced_swipe_overlay_alternative_ui", TRUE, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final BooleanSetting SWIPE_SHOW_CIRCULAR_OVERLAY = new BooleanSetting("revanced_swipe_show_circular_overlay", FALSE, true,
new SwipeControlsPatch.SwipeOverlayModernUIAvailability());
public static final BooleanSetting SWIPE_OVERLAY_MINIMAL_STYLE = new BooleanSetting("revanced_swipe_overlay_minimal_style", FALSE, true,
new SwipeControlsPatch.SwipeOverlayModernUIAvailability());
public static final IntegerSetting SWIPE_OVERLAY_BACKGROUND_OPACITY = new IntegerSetting("revanced_swipe_overlay_background_opacity", 60, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final IntegerSetting SWIPE_OVERLAY_TEXT_SIZE = new IntegerSetting("revanced_swipe_overlay_text_size", 20, true,
new SwipeControlsPatch.SwipeOverlayTextSizeAvailability());
public static final IntegerSetting SWIPE_MAGNITUDE_THRESHOLD = new IntegerSetting("revanced_swipe_magnitude_threshold", 0, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final IntegerSetting SWIPE_OVERLAY_BACKGROUND_ALPHA = new IntegerSetting("revanced_swipe_overlay_background_alpha", 127, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final IntegerSetting SWIPE_OVERLAY_TEXT_SIZE = new IntegerSetting("revanced_swipe_overlay_text_size", 20, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final IntegerSetting SWIPE_OVERLAY_RECT_SIZE = new IntegerSetting("revanced_swipe_overlay_rect_size", 20, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));
public static final LongSetting SWIPE_OVERLAY_TIMEOUT = new LongSetting("revanced_swipe_overlay_timeout", 500L, true, parentsAny(ENABLE_SWIPE_BRIGHTNESS, ENABLE_SWIPE_VOLUME));

View File

@ -125,7 +125,7 @@ class SwipeControlsConfigurationProvider(
* get the background color for text on the overlay, as a color int
*/
val overlayTextBackgroundColor: Int
get() = Color.argb(Settings.SWIPE_OVERLAY_BACKGROUND_ALPHA.get(), 0, 0, 0)
get() = overlayBackgroundOpacity
/**
* get the foreground color for text on the overlay, as a color int
@ -133,6 +133,59 @@ class SwipeControlsConfigurationProvider(
val overlayForegroundColor: Int
get() = Color.WHITE
/**
* Gets the opacity value (0-100%) is converted to an alpha value (0-255) for transparency.
* If the opacity value is out of range, it resets to the default and displays a warning message.
*/
val overlayBackgroundOpacity: Int
get() {
var opacity = validateValue(
Settings.SWIPE_OVERLAY_BACKGROUND_OPACITY,
0,
100,
"revanced_swipe_overlay_background_opacity_invalid_toast"
)
opacity = opacity * 255 / 100
return Color.argb(opacity, 0, 0, 0)
}
/**
* The color of the progress overlay.
*/
val overlayProgressColor: Int
get() = 0xBFFFFFFF.toInt()
/**
* The color used for the background of the progress overlay fill.
*/
val overlayFillBackgroundPaint: Int
get() = 0x80D3D3D3.toInt()
/**
* The color used for the text and icons in the overlay.
*/
val overlayTextColor: Int
get() = Color.WHITE
/**
* A flag that determines whether to use the alternate UI.
*/
val isAlternativeUI: Boolean
get() = Settings.SWIPE_OVERLAY_ALTERNATIVE_UI.get()
/**
* A flag that determines if the overlay should only show the icon.
*/
val overlayShowOverlayMinimalStyle: Boolean
get() = isAlternativeUI && Settings.SWIPE_OVERLAY_MINIMAL_STYLE.get()
/**
* A flag that determines if the progress bar should be circular.
*/
val isCircularProgressBar: Boolean
get() = isAlternativeUI && Settings.SWIPE_SHOW_CIRCULAR_OVERLAY.get()
// endregion
// region behaviour

View File

@ -24,7 +24,7 @@ import java.lang.ref.WeakReference
* The main controller for volume and brightness swipe controls.
* note that the superclass is overwritten to the superclass of the MainActivity at patch time
*
* @smali Lapp/revanced/integrations/youtube/swipecontrols/SwipeControlsHostActivity;
* @smali Lapp/revanced/extension/youtube/swipecontrols/SwipeControlsHostActivity;
*/
class SwipeControlsHostActivity : Activity() {
/**

View File

@ -1,14 +1,18 @@
package app.revanced.extension.youtube.swipecontrols.views
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.RectF
import android.graphics.drawable.Drawable
import android.graphics.drawable.GradientDrawable
import android.os.Handler
import android.os.Looper
import android.util.AttributeSet
import android.util.TypedValue
import android.view.HapticFeedbackConstants
import android.view.View
import android.view.ViewGroup
import android.widget.RelativeLayout
import android.widget.TextView
import app.revanced.extension.shared.utils.ResourceUtils.ResourceType
@ -17,6 +21,7 @@ import app.revanced.extension.shared.utils.StringRef.str
import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider
import app.revanced.extension.youtube.swipecontrols.misc.SwipeControlsOverlay
import app.revanced.extension.youtube.swipecontrols.misc.applyDimension
import kotlin.math.min
import kotlin.math.round
/**
@ -33,36 +38,82 @@ class SwipeControlsOverlayLayout(
*/
constructor(context: Context) : this(context, SwipeControlsConfigurationProvider(context))
private val feedbackTextView: TextView
private val autoBrightnessIcon: Drawable
private val lowBrightnessIcon: Drawable = getDrawable("revanced_ic_sc_brightness_low")
private val mediumBrightnessIcon: Drawable = getDrawable("revanced_ic_sc_brightness_medium")
private val highBrightnessIcon: Drawable = getDrawable("revanced_ic_sc_brightness_high")
private val fullBrightnessIcon: Drawable = getDrawable("revanced_ic_sc_brightness_full")
private val manualBrightnessIcon: Drawable
private val mutedVolumeIcon: Drawable
private val lowVolumeIcon: Drawable = getDrawable("revanced_ic_sc_volume_low")
private val normalVolumeIcon: Drawable
private val feedbackTextView: TextView
private val fullVolumeIcon: Drawable = getDrawable("revanced_ic_sc_volume_high")
private fun getDrawable(name: String, width: Int, height: Int): Drawable {
return resources.getDrawable(
private val circularProgressView: CircularProgressView = CircularProgressView(
context,
config.overlayBackgroundOpacity,
config.overlayShowOverlayMinimalStyle,
config.overlayProgressColor,
config.overlayFillBackgroundPaint,
config.overlayTextColor
).apply {
layoutParams = LayoutParams(300, 300).apply {
addRule(CENTER_IN_PARENT, TRUE)
}
visibility = GONE // Initially hidden
}
private val horizontalProgressView: HorizontalProgressView
private val isAlternativeUI: Boolean = config.isAlternativeUI
private fun getDrawable(name: String, width: Int? = null, height: Int? = null): Drawable {
val drawable = resources.getDrawable(
getIdentifier(name, ResourceType.DRAWABLE, context),
context.theme
).apply {
setTint(config.overlayForegroundColor)
setBounds(
context.theme,
)
if (width != null && height != null) {
drawable.setTint(config.overlayForegroundColor)
drawable.setBounds(
0,
0,
width,
height,
)
} else {
drawable.setTint(config.overlayTextColor)
}
return drawable
}
init {
// Initialize horizontal progress bar
val screenWidth = resources.displayMetrics.widthPixels
val layoutWidth = (screenWidth * 2 / 3).toInt() // 2/3 of screen width
horizontalProgressView = HorizontalProgressView(
context,
config.overlayBackgroundOpacity,
config.overlayShowOverlayMinimalStyle,
config.overlayProgressColor,
config.overlayFillBackgroundPaint,
config.overlayTextColor
).apply {
layoutParams = LayoutParams(layoutWidth, 100).apply {
addRule(CENTER_HORIZONTAL)
topMargin = 40 // Top margin
}
visibility = GONE // Initially hidden
}
// init views
val feedbackYTextViewPadding = 5.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP)
val feedbackXTextViewPadding = 12.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP)
val compoundIconPadding = 4.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP)
feedbackTextView = TextView(context).apply {
layoutParams = LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT,
).apply {
addRule(CENTER_IN_PARENT, TRUE)
setPadding(
@ -81,19 +132,34 @@ class SwipeControlsOverlayLayout(
compoundDrawablePadding = compoundIconPadding
visibility = GONE
}
addView(feedbackTextView)
// get icons scaled, assuming square icons
val iconHeight = round(feedbackTextView.lineHeight * .8).toInt()
autoBrightnessIcon = getDrawable("ic_sc_brightness_auto", iconHeight, iconHeight)
manualBrightnessIcon = getDrawable("ic_sc_brightness_manual", iconHeight, iconHeight)
mutedVolumeIcon = getDrawable("ic_sc_volume_mute", iconHeight, iconHeight)
normalVolumeIcon = getDrawable("ic_sc_volume_normal", iconHeight, iconHeight)
if (isAlternativeUI) {
addView(circularProgressView)
addView(horizontalProgressView)
autoBrightnessIcon = getDrawable("revanced_ic_sc_brightness_auto")
manualBrightnessIcon = getDrawable("revanced_ic_sc_brightness_manual")
mutedVolumeIcon = getDrawable("revanced_ic_sc_volume_mute")
normalVolumeIcon = getDrawable("revanced_ic_sc_volume_normal")
} else {
addView(feedbackTextView)
// get icons scaled, assuming square icons
val iconHeight = round(feedbackTextView.lineHeight * .8).toInt()
autoBrightnessIcon = getDrawable("revanced_ic_sc_brightness_auto", iconHeight, iconHeight)
manualBrightnessIcon = getDrawable("revanced_ic_sc_brightness_manual", iconHeight, iconHeight)
mutedVolumeIcon = getDrawable("revanced_ic_sc_volume_mute", iconHeight, iconHeight)
normalVolumeIcon = getDrawable("revanced_ic_sc_volume_normal", iconHeight, iconHeight)
}
}
private val feedbackHideHandler = Handler(Looper.getMainLooper())
private val feedbackHideCallback = Runnable {
feedbackTextView.visibility = View.GONE
if (isAlternativeUI) {
circularProgressView.visibility = GONE
horizontalProgressView.visibility = GONE
} else {
feedbackTextView.visibility = GONE
}
}
/**
@ -117,21 +183,68 @@ class SwipeControlsOverlayLayout(
}
}
/**
* Displays the progress bar with the appropriate value, icon, and type (brightness or volume).
*/
private fun showFeedbackView(value: String, progress: Int, max: Int, icon: Drawable, isBrightness: Boolean) {
feedbackHideHandler.removeCallbacks(feedbackHideCallback)
feedbackHideHandler.postDelayed(feedbackHideCallback, config.overlayShowTimeoutMillis)
val viewToShow = if (config.isCircularProgressBar) circularProgressView else horizontalProgressView
viewToShow.apply {
setProgress(progress, max, value, isBrightness)
this.icon = icon
visibility = VISIBLE
}
}
override fun onVolumeChanged(newVolume: Int, maximumVolume: Int) {
showFeedbackView(
"$newVolume",
if (newVolume > 0) normalVolumeIcon else mutedVolumeIcon,
)
if (isAlternativeUI) {
val volumePercentage = (newVolume.toFloat() / maximumVolume) * 100
val icon = when {
newVolume == 0 -> mutedVolumeIcon
volumePercentage < 33 -> lowVolumeIcon
volumePercentage < 66 -> normalVolumeIcon
else -> fullVolumeIcon
}
showFeedbackView("$newVolume", newVolume, maximumVolume, icon, isBrightness = false)
} else {
showFeedbackView(
"$newVolume",
if (newVolume > 0) normalVolumeIcon else mutedVolumeIcon,
)
}
}
override fun onBrightnessChanged(brightness: Double) {
if (config.shouldLowestValueEnableAutoBrightness && brightness <= 0) {
showFeedbackView(
str("revanced_swipe_lowest_value_auto_brightness_overlay_text"),
autoBrightnessIcon,
)
if (isAlternativeUI) {
showFeedbackView(
str("revanced_swipe_lowest_value_auto_brightness_overlay_text"),
0,
100,
autoBrightnessIcon,
isBrightness = true,
)
} else {
showFeedbackView(
str("revanced_swipe_lowest_value_auto_brightness_overlay_text"),
autoBrightnessIcon,
)
}
} else if (brightness >= 0) {
showFeedbackView("${round(brightness).toInt()}%", manualBrightnessIcon)
if (isAlternativeUI) {
val brightnessValue = round(brightness).toInt()
val icon = when {
brightnessValue < 25 -> lowBrightnessIcon
brightnessValue < 50 -> mediumBrightnessIcon
brightnessValue < 75 -> highBrightnessIcon
else -> fullBrightnessIcon
}
showFeedbackView("$brightnessValue%", brightnessValue, 100, icon, isBrightness = true)
} else {
showFeedbackView("${round(brightness).toInt()}%", manualBrightnessIcon)
}
}
}
@ -145,3 +258,227 @@ class SwipeControlsOverlayLayout(
}
}
}
/**
* Abstract base class for progress views.
*/
abstract class AbstractProgressView(
context: Context,
overlayBackgroundOpacity: Int,
protected val overlayShowOverlayMinimalStyle: Boolean,
overlayProgressColor: Int,
overlayFillBackgroundPaint: Int,
protected val overlayTextColor: Int,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr) {
// Combined paint creation function for both fill and stroke styles
private fun createPaint(color: Int, style: Paint.Style = Paint.Style.FILL, strokeCap: Paint.Cap = Paint.Cap.BUTT, strokeWidth: Float = 0f) = Paint(Paint.ANTI_ALIAS_FLAG).apply {
this.style = style
this.color = color
this.strokeCap = strokeCap
this.strokeWidth = strokeWidth
}
// Initialize paints
val backgroundPaint = createPaint(overlayBackgroundOpacity, style = Paint.Style.FILL)
val progressPaint = createPaint(overlayProgressColor, style = Paint.Style.STROKE, strokeCap = Paint.Cap.ROUND, strokeWidth = 20f)
val fillBackgroundPaint = createPaint(overlayFillBackgroundPaint, style = Paint.Style.FILL)
val textPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
color = overlayTextColor
textAlign = Paint.Align.CENTER
textSize = 40f // Can adjust based on need
}
protected var progress = 0
protected var maxProgress = 100
protected var displayText: String = "0"
protected var isBrightness = true
var icon: Drawable? = null
fun setProgress(value: Int, max: Int, text: String, isBrightnessMode: Boolean) {
progress = value
maxProgress = max
displayText = text
isBrightness = isBrightnessMode
invalidate()
}
override fun onDraw(canvas: Canvas) {
// Base class implementation can be empty
}
}
/**
* Custom view for rendering a circular progress indicator with icons and text.
*/
@SuppressLint("ViewConstructor")
class CircularProgressView(
context: Context,
overlayBackgroundOpacity: Int,
overlayShowOverlayMinimalStyle: Boolean,
overlayProgressColor: Int,
overlayFillBackgroundPaint: Int,
overlayTextColor: Int,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : AbstractProgressView(
context,
overlayBackgroundOpacity,
overlayShowOverlayMinimalStyle,
overlayProgressColor,
overlayFillBackgroundPaint,
overlayTextColor,
attrs,
defStyleAttr
) {
private val rectF = RectF()
init {
textPaint.textSize = 40f // Override default text size for circular view
progressPaint.strokeWidth = 20f
fillBackgroundPaint.strokeWidth = 20f
progressPaint.strokeCap = Paint.Cap.ROUND
fillBackgroundPaint.strokeCap = Paint.Cap.BUTT
progressPaint.style = Paint.Style.STROKE
fillBackgroundPaint.style = Paint.Style.STROKE
}
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
val size = min(width, height).toFloat()
rectF.set(20f, 20f, size - 20f, size - 20f)
canvas.drawOval(rectF, fillBackgroundPaint) // Draw the outer ring.
canvas.drawCircle(width / 2f, height / 2f, size / 3, backgroundPaint) // Draw the inner circle.
// Select the paint for drawing based on whether it's brightness or volume.
val sweepAngle = (progress.toFloat() / maxProgress) * 360
canvas.drawArc(rectF, -90f, sweepAngle, false, progressPaint) // Draw the progress arc.
// Draw the icon in the center.
icon?.let {
val iconSize = if (overlayShowOverlayMinimalStyle) 100 else 80
val iconX = (width - iconSize) / 2
val iconY = (height / 2) - if (overlayShowOverlayMinimalStyle) 50 else 80
it.setBounds(iconX, iconY, iconX + iconSize, iconY + iconSize)
it.draw(canvas)
}
// If not a minimal style mode, draw the text inside the ring.
if (!overlayShowOverlayMinimalStyle) {
canvas.drawText(displayText, width / 2f, height / 2f + 60f, textPaint)
}
}
}
/**
* Custom view for rendering a rectangular progress bar with icons and text.
*/
@SuppressLint("ViewConstructor")
class HorizontalProgressView(
context: Context,
overlayBackgroundOpacity: Int,
overlayShowOverlayMinimalStyle: Boolean,
overlayProgressColor: Int,
overlayFillBackgroundPaint: Int,
overlayTextColor: Int,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : AbstractProgressView(
context,
overlayBackgroundOpacity,
overlayShowOverlayMinimalStyle,
overlayProgressColor,
overlayFillBackgroundPaint,
overlayTextColor,
attrs,
defStyleAttr
) {
private val iconSize = 60f
private val padding = 40f
init {
textPaint.textSize = 36f // Override default text size for horizontal view
progressPaint.strokeWidth = 0f
progressPaint.strokeCap = Paint.Cap.BUTT
progressPaint.style = Paint.Style.FILL
fillBackgroundPaint.style = Paint.Style.FILL
}
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
val width = width.toFloat()
val height = height.toFloat()
// Radius for rounded corners
val cornerRadius = min(width, height) / 2
// Calculate the total width for the elements
val minimalElementWidth = 5 * padding + iconSize
// Calculate the starting point (X) to center the elements
val minimalStartX = (width - minimalElementWidth) / 2
// Draw the background
if (!overlayShowOverlayMinimalStyle) {
canvas.drawRoundRect(0f, 0f, width, height, cornerRadius, cornerRadius, backgroundPaint)
} else {
canvas.drawRoundRect(minimalStartX, 0f, minimalStartX + minimalElementWidth, height, cornerRadius, cornerRadius, backgroundPaint)
}
if (!overlayShowOverlayMinimalStyle) {
// Draw the fill background
val startX = 2 * padding + iconSize
val endX = width - 4 * padding
val fillWidth = endX - startX
canvas.drawRoundRect(
startX,
height / 2 - 5f,
endX,
height / 2 + 5f,
10f, 10f,
fillBackgroundPaint
)
// Draw the progress
val progressWidth = (progress.toFloat() / maxProgress) * fillWidth
canvas.drawRoundRect(
startX,
height / 2 - 5f,
startX + progressWidth,
height / 2 + 5f,
10f, 10f,
progressPaint
)
}
// Draw the icon
icon?.let {
val iconX = if (!overlayShowOverlayMinimalStyle) {
padding
} else {
padding + minimalStartX
}
val iconY = height / 2 - iconSize / 2
it.setBounds(iconX.toInt(), iconY.toInt(), (iconX + iconSize).toInt(), (iconY + iconSize).toInt())
it.draw(canvas)
}
// Draw the text on the right
val textX = if (!overlayShowOverlayMinimalStyle) {
width - 2 * padding
} else {
minimalStartX + minimalElementWidth - 2 * padding
}
val textY = height / 2 + textPaint.textSize / 3
// Draw the text
canvas.drawText(displayText, textX, textY, textPaint)
}
}

View File

@ -160,13 +160,13 @@ val swipeControlsPatch = bytecodePatch(
val reference = getReference<MethodReference>()
opcode == Opcode.INVOKE_VIRTUAL &&
reference?.returnType == "V" &&
reference.parameterTypes.size == 0
reference.parameterTypes.isEmpty()
}
val targetIndex = indexOfFirstInstructionOrThrow(middleIndex + 1) {
val reference = getReference<MethodReference>()
opcode == Opcode.INVOKE_VIRTUAL &&
reference?.returnType == "V" &&
reference.parameterTypes.size == 0
reference.parameterTypes.isEmpty()
}
if (getInstruction(targetIndex - 1).opcode != Opcode.IGET_OBJECT) {
throw PatchException(
@ -242,10 +242,16 @@ val swipeControlsPatch = bytecodePatch(
"youtube/swipecontrols",
ResourceGroup(
"drawable",
"ic_sc_brightness_auto.xml",
"ic_sc_brightness_manual.xml",
"ic_sc_volume_mute.xml",
"ic_sc_volume_normal.xml"
"revanced_ic_sc_brightness_auto.xml",
"revanced_ic_sc_brightness_full.xml",
"revanced_ic_sc_brightness_high.xml",
"revanced_ic_sc_brightness_low.xml",
"revanced_ic_sc_brightness_manual.xml",
"revanced_ic_sc_brightness_medium.xml",
"revanced_ic_sc_volume_high.xml",
"revanced_ic_sc_volume_low.xml",
"revanced_ic_sc_volume_mute.xml",
"revanced_ic_sc_volume_normal.xml",
)
)

View File

@ -1693,10 +1693,14 @@ No margins on top and bottom of player."</string>
<string name="revanced_enable_swipe_lowest_value_auto_brightness_summary_on">Lowest value of the brightness gesture activates auto-brightness.</string>
<string name="revanced_enable_swipe_lowest_value_auto_brightness_summary_off">Lowest value of the brightness gesture does not activate auto-brightness.</string>
<string name="revanced_enable_swipe_brightness_title">Enable brightness gesture</string>
<string name="revanced_enable_swipe_brightness_summary_on">Brightness swipe is enabled.</string>
<string name="revanced_enable_swipe_brightness_summary_on">"Fullscreen brightness swipe is enabled.
Adjust brightness by swiping vertically on the left side of the screen."</string>
<string name="revanced_enable_swipe_brightness_summary_off">Brightness swipe is disabled.</string>
<string name="revanced_enable_swipe_volume_title">Enable volume gesture</string>
<string name="revanced_enable_swipe_volume_summary_on">Volume swipe is enabled.</string>
<string name="revanced_enable_swipe_volume_summary_on">"Fullscreen volume swipe is enabled.
Adjust volume by swiping vertically on the right side of the screen."</string>
<string name="revanced_enable_swipe_volume_summary_off">Volume swipe is disabled.</string>
<string name="revanced_enable_save_and_restore_brightness_title">Enable save and restore brightness</string>
<string name="revanced_enable_save_and_restore_brightness_summary_on">Save and restore brightness when exiting or entering fullscreen.</string>
@ -1710,10 +1714,20 @@ No margins on top and bottom of player."</string>
<string name="revanced_swipe_gestures_lock_mode_title">Swipe gestures in Lock screen mode</string>
<string name="revanced_swipe_gestures_lock_mode_summary_on">Swipe gestures are enabled in Lock screen mode.</string>
<string name="revanced_swipe_gestures_lock_mode_summary_off">Swipe gestures are disabled in Lock screen mode.</string>
<string name="revanced_swipe_overlay_background_alpha_title">Swipe background visibility</string>
<string name="revanced_swipe_overlay_background_alpha_summary">The visibility of the swipe overlay background.</string>
<string name="revanced_swipe_magnitude_threshold_title">Swipe magnitude threshold</string>
<string name="revanced_swipe_magnitude_threshold_summary">The threshold for a swipe to occur.</string>
<string name="revanced_swipe_overlay_alternative_ui_title">Swipe overlay alternative UI</string>
<string name="revanced_swipe_overlay_alternative_ui_summary_on">Alternative UI is used.</string>
<string name="revanced_swipe_overlay_alternative_ui_summary_off">Legacy UI is used.</string>
<string name="revanced_swipe_overlay_minimal_style_title">Enable minimal style</string>
<string name="revanced_swipe_overlay_minimal_style_summary_on">Minimal overlay style is enabled.</string>
<string name="revanced_swipe_overlay_minimal_style_summary_off">Minimal overlay style is disabled.</string>
<string name="revanced_swipe_show_circular_overlay_title">Show circular overlay</string>
<string name="revanced_swipe_show_circular_overlay_summary_on">Circular overlay is shown.</string>
<string name="revanced_swipe_show_circular_overlay_summary_off">Horizontal overlay is shown.</string>
<string name="revanced_swipe_overlay_background_opacity_title">Swipe overlay background opacity</string>
<string name="revanced_swipe_overlay_background_opacity_summary">Opacity value between 0-100.</string>
<string name="revanced_swipe_overlay_background_opacity_invalid_toast">Swipe opacity must be between 0-100.</string>
<string name="revanced_swipe_overlay_text_size_title">Swipe overlay text size</string>
<string name="revanced_swipe_overlay_text_size_summary">The text size in the swipe overlay.</string>
<string name="revanced_swipe_overlay_rect_size_title">Swipe overlay screen size</string>
@ -1721,6 +1735,7 @@ No margins on top and bottom of player."</string>
<string name="revanced_swipe_overlay_rect_size_invalid_toast">Swipeable area size cannot be more than 50.</string>
<string name="revanced_swipe_overlay_timeout_title">Swipe overlay timeout</string>
<string name="revanced_swipe_overlay_timeout_summary">The amount of milliseconds the overlay is visible.</string>
<string name="revanced_swipe_brightness_sensitivity_title">Brightness swipe sensitivity</string>
<string name="revanced_swipe_brightness_sensitivity_summary">Configure the minimum distance for brightness swiping between 1 and 1000 (%).\nThe shorter the minimum distance, the faster the brightness level changes.</string>
<string name="revanced_swipe_brightness_sensitivity_invalid_toast">Brightness swipe sensitivity must be between 1-1000 (%).</string>

View File

@ -700,8 +700,11 @@
<SwitchPreference android:title="@string/revanced_enable_swipe_press_to_engage_title" android:key="revanced_enable_swipe_press_to_engage" android:summaryOn="@string/revanced_enable_swipe_press_to_engage_summary_on" android:summaryOff="@string/revanced_enable_swipe_press_to_engage_summary_off" />
<SwitchPreference android:title="@string/revanced_enable_swipe_haptic_feedback_title" android:key="revanced_enable_swipe_haptic_feedback" android:summaryOn="@string/revanced_enable_swipe_haptic_feedback_summary_on" android:summaryOff="@string/revanced_enable_swipe_haptic_feedback_summary_off" android:dependency="revanced_enable_swipe_press_to_engage" />
<SwitchPreference android:title="@string/revanced_swipe_gestures_lock_mode_title" android:key="revanced_swipe_gestures_lock_mode" android:summaryOn="@string/revanced_swipe_gestures_lock_mode_summary_on" android:summaryOff="@string/revanced_swipe_gestures_lock_mode_summary_off" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_background_alpha_title" android:key="revanced_swipe_overlay_background_alpha" android:summary="@string/revanced_swipe_overlay_background_alpha_summary" android:inputType="number" />
<SwitchPreference android:title="@string/revanced_swipe_overlay_alternative_ui_title" android:key="revanced_swipe_overlay_alternative_ui" android:summaryOn="@string/revanced_swipe_overlay_alternative_ui_summary_on" android:summaryOff="@string/revanced_swipe_overlay_alternative_ui_summary_off" />
<SwitchPreference android:title="@string/revanced_swipe_overlay_minimal_style_title" android:key="revanced_swipe_overlay_minimal_style" android:summaryOn="@string/revanced_swipe_overlay_minimal_style_summary_on" android:summaryOff="@string/revanced_swipe_overlay_minimal_style_summary_off" />
<SwitchPreference android:title="@string/revanced_swipe_show_circular_overlay_title" android:key="revanced_swipe_show_circular_overlay" android:summaryOn="@string/revanced_swipe_show_circular_overlay_summary_on" android:summaryOff="@string/revanced_swipe_show_circular_overlay_summary_off" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_magnitude_threshold_title" android:key="revanced_swipe_magnitude_threshold" android:summary="@string/revanced_swipe_magnitude_threshold_summary" android:inputType="number" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_background_opacity_title" android:key="revanced_swipe_overlay_background_opacity" android:summary="@string/revanced_swipe_overlay_background_opacity_summary" android:inputType="number" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_text_size_title" android:key="revanced_swipe_overlay_text_size" android:summary="@string/revanced_swipe_overlay_text_size_summary" android:inputType="number" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_rect_size_title" android:key="revanced_swipe_overlay_rect_size" android:summary="@string/revanced_swipe_overlay_rect_size_summary" android:inputType="number" />
<app.revanced.extension.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_swipe_overlay_timeout_title" android:key="revanced_swipe_overlay_timeout" android:summary="@string/revanced_swipe_overlay_timeout_summary" android:inputType="number" />

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="48" android:viewportWidth="48"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M22.45,14.25 L16.15,31Q15.9,31.65 16.25,32.2Q16.6,32.75 17.3,32.75Q17.7,32.75 18.05,32.5Q18.4,32.25 18.55,31.85L20.1,27.3H28.05L29.65,31.9Q29.8,32.3 30.1,32.525Q30.4,32.75 30.8,32.75Q31.45,32.75 31.825,32.2Q32.2,31.65 31.95,31.05L25.65,14.25Q25.45,13.75 25.025,13.45Q24.6,13.15 24.05,13.15Q23.5,13.15 23.075,13.45Q22.65,13.75 22.45,14.25ZM20.85,24.9 L23.9,16.75H24.15L27.25,24.9ZM17.3,40H11Q9.75,40 8.875,39.125Q8,38.25 8,37V30.7L3.4,26.1Q2.55,25.25 2.55,24Q2.55,22.75 3.4,21.9L8,17.3V11Q8,9.75 8.875,8.875Q9.75,8 11,8H17.3L21.9,3.4Q22.75,2.55 24,2.55Q25.25,2.55 26.15,3.45L30.7,8H37Q38.25,8 39.125,8.875Q40,9.75 40,11V17.3L44.6,21.9Q45.45,22.75 45.45,24Q45.45,25.25 44.6,26.1L40,30.7V37Q40,38.25 39.125,39.125Q38.25,40 37,40H30.7L26.15,44.5Q25.3,45.35 24.05,45.35Q22.8,45.35 21.95,44.5ZM24.05,23.95ZM24.05,42.35 L29.45,37H37V29.45L42.45,24L37,18.55V11H29.45L24.05,5.55L18.55,11H11V18.55L5.55,24L11,29.45V37H18.5Z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="48" android:viewportWidth="48"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17.3,40H11Q9.75,40 8.875,39.125Q8,38.25 8,37V30.7L3.4,26.1Q2.55,25.25 2.55,24Q2.55,22.75 3.4,21.9L8,17.3V11Q8,9.75 8.875,8.875Q9.75,8 11,8H17.3L21.9,3.4Q22.75,2.5 24,2.55Q25.25,2.6 26.15,3.45L30.7,8H37Q38.25,8 39.125,8.875Q40,9.75 40,11V17.3L44.6,21.9Q45.45,22.75 45.45,24Q45.45,25.25 44.6,26.1L40,30.7V37Q40,38.25 39.125,39.125Q38.25,40 37,40H30.7L26.15,44.5Q25.3,45.35 24.05,45.35Q22.8,45.35 21.95,44.5ZM24.05,23.95ZM24.05,33.7Q28.15,33.7 30.975,30.9Q33.8,28.1 33.8,23.95Q33.8,19.85 30.975,17.025Q28.15,14.2 24.05,14.2ZM24.05,42.35 L29.45,37H37V29.45L42.45,24L37,18.55V11H29.45L24.05,5.55L18.55,11H11V18.55L5.55,24L11,29.45V37H18.5Z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3.63,3.63c-0.39,0.39 -0.39,1.02 0,1.41L7.29,8.7 7,9L4,9c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71v-4.17l4.18,4.18c-0.49,0.37 -1.02,0.68 -1.6,0.91 -0.36,0.15 -0.58,0.53 -0.58,0.92 0,0.72 0.73,1.18 1.39,0.91 0.8,-0.33 1.55,-0.77 2.22,-1.31l1.34,1.34c0.39,0.39 1.02,0.39 1.41,0 0.39,-0.39 0.39,-1.02 0,-1.41L5.05,3.63c-0.39,-0.39 -1.02,-0.39 -1.42,0zM19,12c0,0.82 -0.15,1.61 -0.41,2.34l1.53,1.53c0.56,-1.17 0.88,-2.48 0.88,-3.87 0,-3.83 -2.4,-7.11 -5.78,-8.4 -0.59,-0.23 -1.22,0.23 -1.22,0.86v0.19c0,0.38 0.25,0.71 0.61,0.85C17.18,6.54 19,9.06 19,12zM10.29,5.71l-0.17,0.17L12,7.76L12,6.41c0,-0.89 -1.08,-1.33 -1.71,-0.7zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v1.79l2.48,2.48c0.01,-0.08 0.02,-0.16 0.02,-0.24z"/>
</vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3,10v4c0,0.55 0.45,1 1,1h3l3.29,3.29c0.63,0.63 1.71,0.18 1.71,-0.71L12,6.41c0,-0.89 -1.08,-1.34 -1.71,-0.71L7,9L4,9c-0.55,0 -1,0.45 -1,1zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,4.45v0.2c0,0.38 0.25,0.71 0.6,0.85C17.18,6.53 19,9.06 19,12s-1.82,5.47 -4.4,6.5c-0.36,0.14 -0.6,0.47 -0.6,0.85v0.2c0,0.63 0.63,1.07 1.21,0.85C18.6,19.11 21,15.84 21,12s-2.4,-7.11 -5.79,-8.4c-0.58,-0.23 -1.21,0.22 -1.21,0.85z"/>
</vector>

View File

@ -0,0 +1,28 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_auto/materialsymbolsoutlined/brightness_auto_wght300_24px.xml
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M8,16H9.275L10.175,13.55H13.875L14.775,16H16.05L12.575,7H11.45ZM10.55,12.5 L11.95,8.6H12.05L13.475,12.5ZM12,22.6 L8.85,19.5H4.5V15.15L1.4,12L4.5,8.85V4.5H8.85L12,1.4L15.15,4.5H19.5V8.85L22.6,12L19.5,15.15V19.5H15.15ZM12,12ZM12,20.5 L14.5,18H18V14.5L20.5,12L18,9.5V6H14.5L12,3.5L9.5,6H6V9.5L3.5,12L6,14.5V18H9.5Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_high/materialsymbolsoutlined/brightness_high_wght300_24px.xml
Changes made: The center circle of the icon has been edited.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,22.6 L8.85,19.5 L4.5,19.5 L4.5,15.15 L1.4,12 L4.5,8.85 L4.5,4.5 L8.85,4.5 L12,1.4 L15.15,4.5 L19.5,4.5 L19.5,8.85 L22.6,12 L19.5,15.15 L19.5,19.5 L15.15,19.5 Z M12,18 C13.6667,18,15.0833,17.4167,16.25,16.25 C17.4167,15.0833,18,13.6667,18,12 C18,10.3333,17.4167,8.91667,16.25,7.75 C15.0833,6.58333,13.6667,6,12,6 C10.3333,6,8.91667,6.58333,7.75,7.75 C6.58333,8.91667,6,10.3333,6,12 C6,13.6667,6.58333,15.0833,7.75,16.25 C8.91667,17.4167,10.3333,18,12,18 Z M12,20.5 L14.5,18 L18,18 L18,14.5 L20.5,12 L18,9.5 L18,6 L14.5,6 L12,3.5 L9.5,6 L6,6 L6,9.5 L3.5,12 L6,14.5 L6,18 L9.5,18 Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_high/materialsymbolsoutlined/brightness_high_wght300_24px.xml
Changes made: The center circle of the icon has been edited.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,1.40039 L8.84961,4.5 L4.5,4.5 L4.5,8.84961 L1.40039,12 L4.5,15.1504 L4.5,19.5 L8.84961,19.5 L12,22.5996 L15.1504,19.5 L19.5,19.5 L19.5,15.1504 L22.5996,12 L19.5,8.84961 L19.5,4.5 L15.1504,4.5 L12,1.40039 Z M12,3.5 L14.5,6 L18,6 L18,9.5 L20.5,12 L18,14.5 L18,18 L14.5,18 L12,20.5 L9.5,18 L6,18 L6,14.5 L3.5,12 L6,9.5 L6,6 L9.5,6 L12,3.5 Z M12,6 L12,12 L6,12 C6,13.6667,6.58334,15.0833,7.75,16.25 C8.91666,17.4167,10.3333,18,12,18 C13.6667,18,15.0833,17.4167,16.25,16.25 C17.4167,15.0833,18,13.6667,18,12 C18,10.3333,17.4167,8.91667,16.25,7.75 C15.0833,6.58333,13.6667,6,12,6 Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_medium/materialsymbolsoutlined/brightness_medium_wght300_24px.xml
Changes made: The center circle of the icon has been edited.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,1.40039 L8.84961,4.5 L4.5,4.5 L4.5,8.84961 L1.40039,12 L4.5,15.1504 L4.5,19.5 L8.84961,19.5 L12,22.5996 L15.1504,19.5 L19.5,19.5 L19.5,15.1504 L22.5996,12 L19.5,8.84961 L19.5,4.5 L15.1504,4.5 L12,1.40039 Z M12,3.5 L14.5,6 L18,6 L18,9.5 L20.5,12 L18,14.5 L18,18 L14.5,18 L12,20.5 L9.5,18 L6,18 L6,14.5 L3.5,12 L6,9.5 L6,6 L9.5,6 L12,3.5 Z M12,6 L12,12 L18,12 C18,10.3333,17.4167,8.91667,16.25,7.75 C15.0833,6.58333,13.6667,6,12,6 Z"/>
</vector>

View File

@ -0,0 +1,30 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_6/materialsymbolsoutlined/brightness_6_wght300_24px.xml
Changes made: Icon has been resized.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="#000000"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M 12,24 8.4471678,20.484415 H 3.5155855 V 15.552832 L 0,12 3.5155855,8.4471678 V 3.5155855 H 8.4471678 L 12,0 15.552832,3.5155855 h 4.931583 V 8.4471678 L 24,12 20.484415,15.552832 v 4.931583 h -4.931583 z m 0,-6.778844 q 2.16243,0 3.691807,-1.527171 1.529349,-1.5272 1.529349,-3.693985 0,-2.1667853 -1.527171,-3.693985 Q 14.166785,6.7788436 12,6.7788436 Z m 0,4.394546 2.828148,-2.828148 h 3.959406 V 14.828148 L 21.615702,12 18.787554,9.1718524 V 5.2124457 H 14.828148 L 12,2.3842981 9.1718524,5.2124457 H 5.2124457 V 9.1718524 L 2.3842981,12 5.2124457,14.828148 v 3.959406 H 9.1718524 Z M 12,12 Z"/>
</vector>

View File

@ -0,0 +1,28 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/brightness_medium/materialsymbolsoutlined/brightness_medium_wght300_24px.xml
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,22.6 L8.85,19.5H4.5V15.15L1.4,12L4.5,8.85V4.5H8.85L12,1.4L15.15,4.5H19.5V8.85L22.6,12L19.5,15.15V19.5H15.15ZM12,18Q14.5,18 16.25,16.25Q18,14.5 18,12Q18,9.5 16.25,7.75Q14.5,6 12,6ZM12,20.5 L14.5,18H18V14.5L20.5,12L18,9.5V6H14.5L12,3.5L9.5,6H6V9.5L3.5,12L6,14.5V18H9.5ZM12,12Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/volume_up/materialsymbolsoutlined/volume_up_wght300_24px.xml
Changes made: The icon has been moved to the left relative to the center.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M14.2,20.1 L14.2,18.55 Q16.35,17.875,17.675,16.062 Q19,14.25,19,11.975 Q19,9.7,17.675,7.887 Q16.35,6.075,14.2,5.4 L14.2,3.85 Q16.975,4.6,18.737,6.85 Q20.5,9.1,20.5,11.975 Q20.5,14.85,18.737,17.1 Q16.975,19.35,14.2,20.1 Z M3.8,14.5 L3.8,9.5 L7.525,9.5 L11.8,5.2 L11.8,18.8 L7.525,14.5 Z M14.2,15.65 L14.2,8.3 Q15.15,8.825,15.725,9.825 Q16.3,10.825,16.3,12 Q16.3,13.175,15.725,14.15 Q15.15,15.125,14.2,15.65 Z M10.3,8.85 L8.15,11 L5.3,11 L5.3,13 L8.15,13 L10.3,15.15 Z M7.8,12 Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/volume_mute/materialsymbolsoutlined/volume_mute_wght300_24px.xml
Changes made: The icon has been moved to the left relative to the center.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M3.8,14.5 L3.8,9.5 L7.5,9.5 L11.8,5.2 L11.8,18.8 L7.5,14.5 Z M5.3,13 L8.15,13 L10.3,15.15 L10.3,8.85 L8.15,11 L5.3,11 Z M7.8,12 Z"/>
</vector>

View File

@ -0,0 +1,28 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/volume_off/materialsymbolsoutlined/volume_off_wght300_24px.xml
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19.475,22.15 L16.45,19.125Q15.95,19.45 15.375,19.7Q14.8,19.95 14.175,20.1V18.55Q14.5,18.45 14.8,18.325Q15.1,18.2 15.375,18.05L11.8,14.45V18.8L7.5,14.5H3.8V9.5H6.825L2,4.65L3.05,3.6L20.525,21.075ZM18.975,16.725 L17.9,15.65Q18.425,14.85 18.7,13.912Q18.975,12.975 18.975,11.975Q18.975,9.7 17.65,7.887Q16.325,6.075 14.175,5.4V3.85Q16.975,4.6 18.725,6.85Q20.475,9.1 20.475,11.975Q20.475,13.3 20.088,14.5Q19.7,15.7 18.975,16.725ZM9.3,11.975ZM15.925,13.675 L14.175,11.925V8.3Q15.175,8.85 15.738,9.85Q16.3,10.85 16.3,12Q16.3,12.45 16.2,12.862Q16.1,13.275 15.925,13.675ZM11.8,9.525 L9.625,7.375 11.8,5.2ZM10.3,15.15V12.95L8.325,11H5.3V13H8.15Z"/>
</vector>

View File

@ -0,0 +1,29 @@
<!--
https://github.com/google/material-design-icons/blob/9beae745bb758f3ad56654fb377ea5cf62be4915/symbols/android/volume_down/materialsymbolsoutlined/volume_down_wght300_24px.xml
Changes made: The icon has been moved to the left relative to the center.
Copyright 2022 Google
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M3.8,14.5 L3.8,9.5 L7.5,9.5 L11.8,5.2 L11.8,18.8 L7.5,14.5 Z M14.175,15.65 L14.175,8.3 Q15.15,8.825,15.725,9.825 Q16.3,10.825,16.3,12 Q16.3,13.175,15.725,14.15 Q15.15,15.125,14.175,15.65 Z M10.3,8.85 L8.15,11 L5.3,11 L5.3,13 L8.15,13 L10.3,15.15 Z M7.8,12 Z"/>
</vector>