Android scaling


#1

Hi,
I’m trying to build a small app for Android. I’ve not really worked with Juce and Android. The problem I’m facing is different scaling. For my standalone code I set the size of my main component to 1080x1920. On my phone everything is scaled very wrong. I debugged the code and found out that in the Android the component always gets resized to 360x640 pixels.
Can somebody explain what is happening and what’s the best way of handling sizes when developing with standalone (because it compiles way faster) and Android?


#2

Funny, I just had to remove some scaling adjustment in an Android app (to reduce some sizes) since it was no longer necessary… not sure what changed or where but its now more in line with iOS.


#3

Ok, so I realized it’s probably mainly the font scaling. On android that fonts are way bigger. I included a custom font with the Projucer. It is the same font, but just way to big.


#4

You’re probably looking at (or simulating) a phone with a high resolution display. If the dpi scale factor is 3 then you would get 360x640 logical pixels on a 1080x1920 screen.