Skip to content

bug(YouTube - Overlay buttons): Fullscreen button is misaligned #2608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8 tasks done
MondayNitro opened this issue Dec 22, 2024 · 9 comments
Closed
8 tasks done

bug(YouTube - Overlay buttons): Fullscreen button is misaligned #2608

MondayNitro opened this issue Dec 22, 2024 · 9 comments
Labels
Bug report Something isn't working

Comments

@MondayNitro
Copy link

Type

Error at runtime

Tools used

CLI

Application

yt 19.16.39

Bug description

when including overlay buttons patch with bottom margin and wider buttons option on, the fullscreen button is misaligned compared to other overlay buttons. used latest stable patch 5.1.3

Error logs

No response

Solution

No response

Additional context

No response

Device Environment

android 14 moto stock

Acknowledgements

  • This issue does not reproduce on unpatched YouTube or YT Music.
  • This issue is not a duplicate of an existing bug report.
  • I did not use any settings marked as Experimental Flags.
  • I did not use pre-release (dev branch).
  • I have patched the APK according to the documentation.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • I have written the title and contents in English.
@MondayNitro MondayNitro added the Bug report Something isn't working label Dec 22, 2024
@inotia00
Copy link
Owner

inotia00 commented Dec 22, 2024

Is it also misaligned on YouTube 19.44.39?

Please attach screenshots from YouTube 19.16.39 and YouTube 19.44.39

if you changed any patch options, please list the patch options you changed

@inotia00 inotia00 added the Waiting on author OP's answer is needed label Dec 22, 2024
@MondayNitro
Copy link
Author

MondayNitro commented Dec 23, 2024

{
"patchName" : "Overlay buttons",
"options" : [ {
"key" : "iconType",
"value" : "thin"
}, {
"key" : "bottomMargin",
"value" : "5.0dip"
}, {
"key" : "widerButtonsSpace",
"value" : true
}, {
"key" : "changeTopButtons",
"value" : true
}

photo_6289287694806795693_x
photo_6289287694806795694_x

happens in both 19.16 and 19.44 youtube and doesnt on 4.16.1 patches

@MondayNitro
Copy link
Author

the changes to xmls are not being made in newer patches

Screenshot 2024-12-23 112813
Screenshot 2024-12-23 112658
Screenshot 2024-12-23 112534

@inotia00
Copy link
Owner

inotia00 commented Dec 23, 2024

If you apply margins the old way, this bug is reproducible on my device in 19.44.39

So the way margins are applied has changed

If it is reproducible in 19.16.39, I will try to add a patch option to revert it

(If the issue is not resolved, the option to change the bottom margin will be removed in 19.44.39)

@inotia00 inotia00 removed the Waiting on author OP's answer is needed label Dec 25, 2024
@inotia00 inotia00 changed the title bug: (overlay buttons) fullscreen button is misaligned bug(YouTube - Overlay buttons): Fullscreen button is misaligned Dec 31, 2024
@MondayNitro
Copy link
Author

MondayNitro commented Dec 31, 2024

😭
sir can you try this approach for bottom margin, its a heartbreak for many!

Response from chatgpt:
To add an empty space or margin-like resource below your "overlay buttons" you can create a simple View with the desired bottom margin as height. Here's how you can achieve it:

<View
    android:id="@id/empty_space"
    android:layout_width="0dp"
    android:layout_height="your-bottom-margin" 
    android:background="@android:color/transparent"
    yt:layout_constraintBottom_toTopOf="@id/quick_actions_container"
    yt:layout_constraintStart_toStartOf="parent"
    yt:layout_constraintEnd_toEndOf="parent" />

Explanation

  1. layout_width="0dp": This sets the width to match constraints, making it span the entire screen width when constrained to parent.

  2. layout_height="your-bottom-margin": Replace with your desired bottom margin.

  3. background="@android:color/transparent": Ensures it doesn't interfere visually; it's just an invisible spacer.

  4. layout_constraintBottom_toTopOf="@id/quick_actions_container": Places this View directly above the "quick actions container" (over which the overlay buttons were previously resting)

  5. layout_constraintStart_toStartOf="parent" and layout_constraintEnd_toEndOf="parent": Align the spacer to the parent's edges.

This approach gives you flexibility to adjust the size and placement of the empty space without hardcoding margins directly into other components.
+
and position all overlay buttons that were above "@id/quick_actions_container" to above "@id/empty_space" by replacing
yt:layout_constraintBottom_toTopOf="@id/quick_actions_container" with yt:layout_constraintBottom_toTopOf="@id/empty_space"

@MondayNitro
Copy link
Author

also, the widerspace option was still working on 19.16+, so please consider keeping it

@inotia00
Copy link
Owner

also, the widerspace option was still working on 19.16+, so please consider keeping it

On my device, this option did not work on YouTube 19.44.39

To make it work on all devices, it is better to regulate to a version that did not have the bug

@MondayNitro
Copy link
Author

following chatgpt's way, it is indeed possible to restore both bottom margin and widerspace on 19.44.39, i checked now. and this way also works for 19.16 and below, so maybe you could implement this in the patch please🙏
photo_6314602717380722857_y
photo_6314602717380722858_y
i will decompile the stock 19.44 apk and share changes comparisons from the xml in a few minutes

@MondayNitro
Copy link
Author

19.44-stock.zip
19.44-rvx.zip

with this, no adding bottom margin under each elements, just a space box above time_bar_reference_view(seekbar)
and widerbuttons implement same as 4.16.1 patches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants