Skip to content

Conversation

@srdalai
Copy link
Contributor

@srdalai srdalai commented Aug 21, 2025

Commit Message

  • Added Jetpack WindowManager dependency
  • Changed Player Activity & Layout to support Tabletop

Feature Overview

In the player page, when the device goes to Tabletop/Flex Mode/Half Open, the player screen will only occupy the top half of the screen.

This can be achieved by implementing fold-aware logic in the activity.

https://developer.android.com/develop/ui/compose/layouts/adaptive/foldables/make-your-app-fold-aware#tabletop_posture

Code Changes

Added WindowManager dependency in the player module. In the activity_player.xml, the root view is moved inside a constraint layout so that it can be managed easily to fill the top half of the screen by setting the layout_constraintHeight_percent to 0.5.

In the PlayerActivity.kt, WindowInfoTracker & windowLayoutInfo changes are used to determine the fold mode and change the layout accordingly.

Screen Record

Screen_recording_20250821_222342.mp4

Additional Info

Screen Record in Samsung Z Fold in Samsung Remote Test Lab.

If anyone is interested, check out the Universal Signed APK

…lbeesetti#1313]

- Added Jetpack WindowManager dependency
- Changed Player Activity & Layout to support Tabletop
@asakahn
Copy link

asakahn commented Sep 4, 2025

Works perfectly on my Galaxy Fold 7. Thanks @srdalai!

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