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

In-Game: [Android] android:windowLayoutInDisplayCutoutMode should be supported to allow edge-to-edge displays when there are cut-outs #8186

Open
shichen85 opened this issue Oct 30, 2024 — with GM Bug Reporter · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one) project This issue has a sample project attached
Milestone

Comments

@shichen85
Copy link

Description

We want to display the app from edge to edge on the screen even if there are cutouts. The windowLayoutInDisplayCutoutMode seemed to allow that if it is defined as always:

https://developer.android.com/reference/android/R.attr#windowLayoutInDisplayCutoutMode

However, by using an extension and using the YYAndroidManifestActivityAttributes tag, the app still ended up not drawing on the cutouts.

Steps To Reproduce

  1. Use the Android developer function to simulate cutout on the testing device: https://developer.android.com/develop/ui/views/layout/display-cutout#testing
  2. Run the sample, which is supposed to draw the entire display with white color
  3. See that the cutout regions does not render the app
  4. Change the extension's Android settings to modify the windowLayoutInDisplayCutoutMode settings to other constants such as always or shortEdges
  5. Rerun the sample and see no change

Which version of GameMaker are you reporting this issue for?

IDE v2024.1100.0.651 Runtime v2024.1100.0.686

Which operating system(s) are you seeing the problem on?

Windows 10.0.22000.0

Which platform(s) are you seeing the problem on?

Android

05fa2e9f-5d9c-4fd0-9cba-706952da22d9

@gm-bug-reporter gm-bug-reporter bot added runner-bug In-game bugs with the "GameMaker Studio 2" runtimes project This issue has a sample project attached labels Oct 30, 2024
@stuckie stuckie moved this from Triage to Backlog in Team Workload Oct 30, 2024
@jackerley
Copy link

The fix for this got a bit involved and led to adding quite a few new things.

Gradle version and gradle plugin version is now editable per project - new options in Game Options->Android->General

Option to enable Edge to Edge display is added in Game Options->Android->Graphics

Option to allow control of Display layout added to Game Options->Android->Graphics (https://developer.android.com/develop/ui/views/layout/display-cutout)

The minimum Android Compile SDK is now 34 (enforced at compile time)

A new async system message is sent when the display layout changes this has type "DisplayLayoutInfo" and contains safeinsettop, safeinsetbottom, safeinsetleft and safeinsetright these return the distance from the edge that it is safe to display in. (ie where no system ui will cover it) These values are returned on iOS and Android. On Android we also return a boundrects entry that contains information on rectangles within those areas that are non-functional (DisplayCutout If the display layout has a waterfall display this is also returned - waterfallinsetbottom/top/left/right

I've included a project that displays this info and shows how it can be read in the async event.

display_cutout.zip

@github-project-automation github-project-automation bot moved this from Backlog to Done in Team Workload Nov 21, 2024
@jackerley jackerley added this to the 2025.1 milestone Nov 21, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo added the documentation Improvements or additions to documentation are required by this issue label Nov 22, 2024
@YYBartT YYBartT self-assigned this Nov 25, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Nov 28, 2024
… not allow edge to edge display

YoYoGames/GameMaker-Bugs#8186

* Updated screenshots on Android Game Options page and added descriptions: Gradle versions, Enable Edge to Edge Display, Display Layout
* Added new display layout event under "Misc. Events"
* Changed minimum Android API level variable to 34
* Removed typo on iOS graphics options screenshot and page
@YYBartT
Copy link

YYBartT commented Nov 28, 2024

Added the newly added game options to the Android Game Options manual page. Also added the new event type "DisplayLayoutInfo" to the async System event page.

@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Nov 28, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Nov 28, 2024
@YYDan YYDan added feature request New feature (or a request for one) and removed runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Jan 16, 2025
@YYDan YYDan changed the title In-Game: [Android] android:windowLayoutInDisplayCutoutMode does not allow edge to edge display In-Game: [Android] android:windowLayoutInDisplayCutoutMode should be supported to allow edge-to-edge displays when there are cut-outs Jan 16, 2025
@cameron-home cameron-home removed their assignment Jan 17, 2025
@cameron-home cameron-home moved this from Ready for QA to Todo in Team Workload Jan 17, 2025
@cameron-home
Copy link

Bouncing back to @jackerley, as there appears to be issues where the edge to edge display is not improving when enabled.

@YYDan YYDan reopened this Jan 31, 2025
@github-project-automation github-project-automation bot moved this from Todo to Triage in Team Workload Jan 31, 2025
@stuckie stuckie moved this from Triage to Todo in Team Workload Feb 3, 2025
@YYDan YYDan modified the milestones: 2024.13, 2024.14 Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one) project This issue has a sample project attached
Projects
Status: Todo
Development

No branches or pull requests

6 participants