Skip to content
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

Bugfix/android fullscreen layout #495

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

tvanlaerhoven
Copy link
Member

The fullscreen behaviour needs some changes on Android

  • Recent Android versions include edgeToEdge screen layout; the current screen dimension calculation based om React Native's Dimension did not suffice. We now ask the rootView's usable screen dimensions.
  • When reparenting, the containerView should always be repositioned to {top:0, left:0}, ignoring any translation the React Native lay-out engine (specifically NewArch's Yoga engine) imposes.
  • Also works when reparenting is explicitly disabled with the THEOplayer_reparent_on_fullscreen=false.
  • Checked on API 35,34,33,28 with/wo edge2Edge.

@tvanlaerhoven
Copy link
Member Author

@kot331107 perhaps best if I wait with this PR until after your rework on reparenting has landed?

@kot331107
Copy link
Contributor

kot331107 commented Feb 14, 2025

@kot331107 perhaps best if I wait with this PR until after your rework on reparenting has landed?

yeah, would be great, thank you. Also I'm gonna test these changes as a patch in our apps

@kot331107
Copy link
Contributor

kot331107 commented Feb 17, 2025

@tvanlaerhoven looks good on our apps with my latest reparenting patch 👍 I have tested on both api 34 and 35. edge 2 edge is enabled in these apps by design.

@@ -240,9 +250,13 @@ class PresentationManager(
)
updatePresentationMode(PresentationMode.INLINE)

// Remove forced layout observer
fullScreenLayoutObserver.remove(reactPlayerGroup)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt to unsubscribe in destroy() function as well @tvanlaerhoven ?

@tvanlaerhoven tvanlaerhoven force-pushed the bugfix/android-fullscreen-layout branch from 0a8e6e4 to 1aa6558 Compare March 4, 2025 09:12
@tvanlaerhoven tvanlaerhoven force-pushed the bugfix/android-fullscreen-layout branch from 3e08d2d to b02e347 Compare March 10, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants