1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Android: screen size fix.

This commit is contained in:
jules 2012-02-28 22:18:28 +00:00
parent bcffc2c94a
commit e78147dd06
2 changed files with 10 additions and 2 deletions

View file

@ -231,6 +231,14 @@ public:
view.callIntMethod (ComponentPeerView.getHeight));
}
void handleScreenSizeChange()
{
ComponentPeer::handleScreenSizeChange();
if (isFullScreen())
setFullScreen (true);
}
Point<int> getScreenPosition() const
{
return Point<int> (view.callIntMethod (ComponentPeerView.getLeft),
@ -706,7 +714,7 @@ void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDis
//==============================================================================
void Desktop::getCurrentMonitorPositions (Array <Rectangle<int> >& monitorCoords, const bool clipToWorkArea)
{
monitorCoords.add (Rectangle<int> (0, 0, android.screenWidth, android.screenHeight));
monitorCoords.add (Rectangle<int> (android.screenWidth, android.screenHeight));
}
JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, setScreenSize, void, (JNIEnv* env, jobject activity,

View file

@ -224,7 +224,7 @@ public:
A peer implementation must call this if the monitor arrangement changes or the available
screen size changes.
*/
void handleScreenSizeChange();
virtual void handleScreenSizeChange();
//==============================================================================
/** This is called to repaint the component into the given context. */