-
Notifications
You must be signed in to change notification settings - Fork 509
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
App Window Size on Android #1069
Comments
No idea tbh (Android is basically a "tier 3 platform" for sokol_app.h, basic support is there, but personally I'm not all that invested in the platform). In general, sokol_app.h on the mobile platforms and the web doesn't have the concept of windows, and specifically on iOS and Android it assumes that the canvas stretches the entire display. If it's just the "system chrome" that should be visible I would actually expect that this is a manifest file setting (but not sure). You could try adding the Line 8180 in b1221d1
Also, if SDL2 has a solution that doesn't require too many changes, we could probably do something similar in sokol_app.h. |
OK. Thanks for your reply. I think the default Android "full screen" should not overlay the system buttons but otherwise occupy the screen. I'll see if i can find out how. If i do, I'll let you know in case you want to make that the default. |
Hi, I failed to find out how to size to a client of the screen gadgets. But, more usefully, I now have full screen working properly by hiding the system UI. Here are my changes in case they are helpful to someone. in
Have some Java in
Despite Also, while I'm here. I finally managed to find out the approximate screen DPI. This is needed for sizing fonts, for example. You might want to put something like this into Sokol. This is quite useful.
|
Hi! I'm now on the latest Sokol;
having a go at getting my app working on Android. I have it built and running but I can't figure out how to control the main window size.
It appears that full-screen is automatic on Android, but the window created fills the whole phone area. Now actually, that's what i will eventually want, but also i have to find a way to hide/show the system UI.
But for now, I'd just like it to be the client area size. ie the phone size minus the top system area and the bottom button area. Because clicks don't work on the app in these areas, they seem to go to the system.
Any idea how i might do this? I had a go at messing with things like;
This didn't make any difference, but i wonder if I'm calling too late, or something. Or whether
ANativeWindow_getWidth(window)
does not consider this.Anyhow. if you know, or have ideas, that could help.
Or i can keep hacking!
Thanks.
The text was updated successfully, but these errors were encountered: