- Description
Didn't really mean to write this extension, I just fell down the rabbit hole, and its creation was the only way out!
The extension should make your app display in full screen, even into the cutout, and the system bars become available via a swipe. Cutouts and notches came into being in 2018 on Android Pie (9) devices. There are probably only a few devices with both a cutout/notch and Android 9 that miss out. For earlier devices, and possibly for Android 10 devices, there are other extensions that should provide the full screen appearance.
**The extension uses the latest API from Android, hence it will only work for < API 30 **
- Latest version : 1.0
- Tested : tested on App Inventor 2 (n198), in companion (2.72u) and compiled on Android 13 and 14.
- Released : 2024-09-27T23:00:00Z
- Last updated : 2024-09-27T23:00:00Z
- Built : using the RUSH Extension Builder by @shreyash
- Blocks
- Usage
- Video
- Files
Resources
http://docs.52im.net/extend/docs/api/android-50/training/system-ui/immersive.html
https://stackoverflow.com/questions/23276847/what-is-an-android-decorview
https://stackoverflow.com/questions/39257362/how-to-get-activity-of-a-decorview-getcontext-on-decorview-getting-a-decorco
https://stackoverflow.com/questions/38366982/what-is-phone-window-decor-view
https://developer.android.com/reference/android/view/Window.html
https://stackoverflow.com/questions/22103862/immersive-mode-in-android-only-transparency
https://stackoverflow.com/questions/48620569/how-to-make-my-activity-as-full-screen-mode-in-android
https://stackoverflow.com/questions/62577645/android-view-view-systemuivisibility-deprecated-what-is-the-replacement
https://www.youtube.com/watch?v=acC7SR1EXsI
https://developer.android.com/reference/android/view/WindowInsetsController#BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
https://developer.android.com/reference/android/view/WindowInsets.Type?_gl=1*1yj79p*_up*MQ..*_ga*MTM3NTQyNDgwNi4xNzI3NDU1MDMw*_ga_6HH9YJMN9M*MTcyNzQ1NTAzMC4xLjAuMTcyNzQ1NTAzMC4wLjAuMjAxNTc1ODQyNQ..
https://developer.android.com/reference/android/view/DisplayCutout?_gl=1*1a8tt4v*_up*MQ..*_ga*MTM3NTQyNDgwNi4xNzI3NDU1MDMw*_ga_6HH9YJMN9M*MTcyNzQ1NTAzMC4xLjAuMTcyNzQ1NTE5Ni4wLjAuMjAxNTc1ODQyNQ..#DisplayCutout(android.graphics.Insets,%20android.graphics.Rect,%20android.graphics.Rect,%20android.graphics.Rect,%20android.graphics.Rect)
https://developer.android.com/develop/ui/views/layout/display-cutout
https://developer.android.com/reference/android/view/WindowManager.LayoutParams?_gl=1*1gqgwuv*_up*MQ..*_ga*MTA5MTkzODEzOS4xNzI3NDU1ODE4*_ga_6HH9YJMN9M*MTcyNzQ1NTgxNy4xLjAuMTcyNzQ1NTgxNy4wLjAuMjExOTgxMTUwNw..#LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
https://stackoverflow.com/questions/49190381/fullscreen-app-with-displaycutout
https://stackoverflow.com/questions/64481841/android-api-level-30-setsystembarsappearance-doesnt-overwrite-theme-data
https://stackoverflow.com/questions/64826506/programmatically-change-status-bar-text-color-in-android-11-api-30
https://stackoverflow.com/questions/38703225/android-windowmanger-remove-flags
Enjoy , and all feedback and comments welcome.
Available for use in any MIT AppInventor projects or competitions
#####################################################################
This work by TIMAI2 is licensed under a
Creative Commons Attribution-ShareAlike 4.0 Unported License with attribution.
Please use name = TIMAI2 and link to this source page when giving credit.
#####################################################################