mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-20 17:43:56 +00:00
fix fullscreen button vertical alignment
This commit is contained in:
@@ -72,6 +72,18 @@ internal val playerControlsResourcePatch = resourcePatch {
|
||||
bottomLastLeftOf,
|
||||
)
|
||||
|
||||
// Modify the fullscreen button stub attributes for correct positioning.
|
||||
// The fullscreen button is lower than the ReVanced buttons (unpatched app bug).
|
||||
// Issue is only present in later app targets, but this change seems to
|
||||
// do no harm to earlier releases.
|
||||
bottomTargetDocumentChildNodes.findElementByAttributeValueOrThrow(
|
||||
"android:id",
|
||||
"@id/youtube_controls_fullscreen_button_stub"
|
||||
).apply {
|
||||
setAttribute("android:layout_marginBottom", "6.0dip")
|
||||
setAttribute("android:layout_width", "48.0dip")
|
||||
}
|
||||
|
||||
addTopControl = { resourceDirectoryName ->
|
||||
val resourceFileName = "host/layout/youtube_controls_layout.xml"
|
||||
val hostingResourceStream = inputStreamFromBundledResource(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
style="@style/YouTubePlayerButton"
|
||||
android:layout_width="48.0dip"
|
||||
android:layout_height="60.0dip"
|
||||
android:paddingTop="6.5dp"
|
||||
android:paddingTop="6.0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:longClickable="false"
|
||||
android:scaleType="center"
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:yt="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/youtube_controls_bottom_ui_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="ltr">
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:yt="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/youtube_controls_bottom_ui_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView
|
||||
android:id="@+id/revanced_loop_video_button"
|
||||
style="@style/YouTubePlayerButton"
|
||||
android:layout_width="48.0dip"
|
||||
android:layout_height="60.0dip"
|
||||
android:paddingTop="6.0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/revanced_loop_video_button_off"
|
||||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container"
|
||||
yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" />
|
||||
|
||||
android:id="@+id/revanced_loop_video_button"
|
||||
style="@style/YouTubePlayerButton"
|
||||
android:layout_width="48.0dip"
|
||||
android:layout_height="60.0dip"
|
||||
android:longClickable="false"
|
||||
android:paddingTop="6.0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/revanced_loop_video_button_off"
|
||||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container"
|
||||
yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" />
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
Reference in New Issue
Block a user