Comments (8)
Hi @grassydragon,
I'm happy to talk about Full Screen mode on Android with someone.
After more than 10 years of Android development, this part is still a complete mystery and every flag modification on the full screen mode is a roll dice upon the toobar and other layouts placement below the status bar depending on the current Android version.
Not related to Sceneform but my solution for other projects is a custom ConstraintLayout which looks for the fitsSystemWindows in every childs in all the hierarchy.
But it's not really applicable to the Sceneform module.
Anyway, here are my answers :
The previous fullscreen mode was hiding the action, status and navigation bars and making the activity content fullscreen.
Now only the navigation bar disappears but the activity content is still fullscreen (it's behind the action and status bars as can be seen in the examples in README.md)
For me, the difference between the View.SYSTEM_UI_FLAG_FULLSCREEN are:
- With = StatusBar hided but StatusBar insets/margin still here and we can't draw behind it (just change the colorPrimaryDark on it)
- Without = StatusBar visible but can be transparent and no StatusBar top margin
The solution could be to let the View.SYSTEM_UI_FLAG_FULLSCREEN flag present and use theViewCompat.setOnApplyWindowInsetsListener()
to remove status bar insets but this could generate wrong behaviors depending on how theBaseARFragment
is overridden.
As an improvement I can implement the selection of the mode in BaseARFragment. It will be possible to select between the normal and fullscreen modes. Also, it is possible to migrate to WindowInsetsController
It will be great if you can make a pull request and I will check that. Don't forget to check the minSDK > 30 before using the WindowInsetsController
Thanks for your feedback
from sceneform-android.
Here are examples from Google Pixel 3a with Android 11. In both cases it is possible to put a TextView behind the status bar.
With the View.SYSTEM_UI_FLAG_FULLSCREEN flag:
Without the View.SYSTEM_UI_FLAG_FULLSCREEN flag:
What version of Android should I check?
from sceneform-android.
Potentially, every API version should be checked since 24.
Are you using CoordinatorLayout
?
Here is the result on API 29 :
from sceneform-android.
Actually, I am using the glTF sample from the repository with FrameLayout
.
Thank you for providing the screenshots, I will try to reproduce the behavior. I think there is a problem with the cutout but there isn't one on the Google Pixel 4.
from sceneform-android.
Here are examples from Motorola G7 Play with Android 10. This phone has a cutout.
With the View.SYSTEM_UI_FLAG_FULLSCREEN flag:
Without the View.SYSTEM_UI_FLAG_FULLSCREEN flag the status bar is transparent and the TextView is behind the cutout.
Unfortunately, I have problems with running AR applications in the emulator on Ubuntu. I will try to do this on Windows.
from sceneform-android.
Hello, @ThomasGorisse!
I was able to reproduce the problem on the Google Pixel 4 emulator with Android 10. However, there is no such problem on the Google Pixel 3a emulator. As I said earlier it looks like a problem with the cutout. I think that the Google Pixel 4 emulator with Android 10 has a wrong configuration. My friend who has the Google Pixel 4 confirmed that this is not a right behavior.
Let's restore the View.SYSTEM_UI_FLAG_FULLSCREEN flag in order not to break the layout for phones with a real cutout. For cases there this fullscreen mode is not suitable for developers I can add an option for disabling the fullscreen mode so it is possible to set up the fullscreen mode manually.
from sceneform-android.
Hi @grassydragon,
You have contributor access.
Can you push the modification with the View.SYSTEM_UI_FLAG_FULLSCREEN
and the WindowInsetsController
for Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
?
Thanks
from sceneform-android.
Yes, I can. I will test how the window insets controller works.
from sceneform-android.
Related Issues (20)
- Issue with Face Model HOT 5
- Issue With Skybox HOT 1
- Issue with centered node HOT 2
- Shadow position is not correct, shadow appears at the middle of the object. HOT 2
- VideoNode Size Problem HOT 3
- Unauthorized Access Error for Sceneform Dependency Version 1.22.0 HOT 2
- What is Engine and how to use it? HOT 1
- How To Change Texture Images HOT 2
- Color of model on scene doesn't match color of texture (warm white instead of white) HOT 2
- Failed to create arsession HOT 4
- How to combine multiple node into one HOT 2
- java.lang.IllegalStateException: Calling method on destroyed View when i have scene inside horizontalpager
- Camera doesn't open and crashes when Proguard is enabled (R8) in Sceneform. HOT 1
- measure with camera HOT 2
- Scan Qr code using sceneform HOT 2
- Crash on App Start: NoSuchMethodError for acquireEnvironmentalHdrCubeMap HOT 3
- sceneform AugmentedFaceNode performance HOT 2
- Scan Human Skin HOT 1
- how to get a image in portrait mode HOT 1
- Support for Compose Multiplatform
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceneform-android.