I’ve been investigating Android use of UI Scale Factor, which doesn’t work properly for me.
General symptoms:
the UI scales as expected, but the app window doesn’t fill the screen and can be offset [expected behaviour: fill the screen as on iOS]
touch events are scaled correctly (but can be offset), but only work in an increasingly small area of window (the bottom and right areas become unresponsive as the scaling factor increases!) [expected behaviour: respond accurately in the full app display area]
Why I would like this fixed:
this affects the usability of my Android app for visually impaired users, who would like to be able use my app on Android with a scaled UI
Test methodology:
I’m changing the scaling factor from a UI component in my app, to track how the UI scales as I change the scaling factor in real-time
to toggle OpenGL / not Open GL, I change some code and restart my app
===
Summary of Findings
What actually happens, depends on whether or not OpenGL is enabled in the app:
With OpenGL enabled:
the app has an ugly black display area at the top, and displays anchored on the left, with the black display area above it; the height of this black area increases as the UI Scaling Factor is increased; the bottom part of the app is truncated by the height of the black area at the top
the app fills only part of the screen; the amount of space on top/right/bottom not filled by the app, increases as the UI Scaling Factor is increased above 1
touch events are interpreted as being at a lower position on the screen than where the user taps; so if you tap at x,y = 10,20; that might be interpreted by the app as happening at 10,120; where the Y offset is equal to the height of the black bar at the top
touch events are increasingly ignored in the X dimension as the scaling factor increases above 1; the ignored area on the right seems roughly equal to that of the missing UI area on the right
touch events are increasingly ignored in the Y dimension as the scaling factor increases above 1; the ignored area at the bottom seems roughly equal to that of the missing UI area at the bottom
other than that, touch events are scaled properly to the scaled UI
the UI is anchored to the top left, but fills only part of the screen; the amount of space on right/bottom not filled by the app, increases as the UI Scaling Factor is increased above 1
touch events are increasingly ignored in the X dimension as the scaling factor increases above 1; the ignored area on the right seems roughly equal to that of the missing UI area on the right
touch events are increasingly ignored in the Y dimension as the scaling factor increases above 1; the ignored area at the bottom seems roughly equal to that of the missing UI area at the bottom
other than that, touch events are scaled properly to the scaled UI
Hi there, have you tested against the develop tip? There have been quite a few changes recently to juce_Windowing_android.cpp and to that function in particular.