Android: Fix always hidden software keyboard from popping up

Task-number: QTBUG-58803
Change-Id: I256e59cee9d131f88b83367b26dbc11de87319af
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
Joni Poikelin 2017-02-10 20:51:19 +02:00
parent 440ccba0ab
commit b56c8a3b3d

View File

@ -276,6 +276,9 @@ public class QtActivityDelegate
if (m_softInputMode != 0) {
m_activity.getWindow().setSoftInputMode(m_softInputMode);
final boolean softInputIsHidden = (m_softInputMode & WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) != 0;
if (softInputIsHidden)
return;
} else {
if (height > visibleHeight)
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);