summaryrefslogtreecommitdiffstats
path: root/src/android/jar
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2014-05-14 14:38:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-14 20:10:03 +0200
commita968042f54aaa0155374f8a4140aaa1122f82949 (patch)
tree0b4dd101a89ed4405db518fc85931026c4211db9 /src/android/jar
parent08117eee009f06d77bba489bd9513b5671e3d604 (diff)
Restore fullscreen mode after keyboard is dismissed
Showing the onscreen keyboard will also show the navigation soft buttons. We need to tell Android to re-enable immersive mode after the keyboard is hidden. Since we now do this in two places, refactor the logic. Task-number: QTBUG-36916 Change-Id: Ic69c28f41f5e8cf324d81f9bada3cb148dfb5306 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/android/jar')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index b396dfdfa1..554c54d4a0 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -170,6 +170,13 @@ public class QtActivityDelegate
m_layout.requestLayout();
}
+ public void updateFullScreen()
+ {
+ if (m_fullScreen) {
+ m_fullScreen = false;
+ setFullScreen(true);
+ }
+ }
// input method hints - must be kept in sync with QTDIR/src/corelib/global/qnamespace.h
private final int ImhHiddenText = 0x1;
@@ -213,6 +220,10 @@ public class QtActivityDelegate
return false;
m_keyboardIsVisible = visibility;
QtNative.keyboardVisibilityChanged(m_keyboardIsVisible);
+
+ if (visibility == false)
+ updateFullScreen(); // Hiding the keyboard clears the immersive mode, so we need to set it again.
+
return true;
}
public void resetSoftwareKeyboard()
@@ -721,12 +732,7 @@ public class QtActivityDelegate
QtNative.updateApplicationState(ApplicationActive);
QtNative.clearLostActions();
QtNative.updateWindow();
-
- if (m_fullScreen) {
- // Suspending the app clears the immersive mode, so we need to set it again.
- m_fullScreen = false; // Force the setFullScreen() call below to actually do something
- setFullScreen(true);
- }
+ updateFullScreen(); // Suspending the app clears the immersive mode, so we need to set it again.
}
}
}