setGlobalScaleFactor not working in Android?


#1

When we add the following line in the initialise method of Main.cpp in the Juce Demo:

    Desktop::getInstance().setGlobalScaleFactor(f);

any value other than 1.0f for f will put the window on the top left of the screen with a "random" size.

This works as expected on the Mac


#2

Nobody else sees this problem ?

Note that it also works as expected on iOS.


#3

I see the same problem.  I gave up on it and used a technique similar to that described in here to do size/scaling:

   http://www.juce.com/forum/topic/density-independent-pixels

I can't use menus or other popup windows because of this, so I may try to figure out how to fix it for real.

 

 


#4

This is the technique I still use. Doesn't work for popups but I ended up changing popups for Fonts and things into regular Popovers that was adjusted to look like a regular popup. The Font style popups do not function overly well on mobile devices anyway. 

 

The technique works for all devices and still works properly on iOS.