Android: Fix the input type for date/time

The default variation of the DATETIME class is to show the layout for
date and time. If either date or time is requested, then only set one
of them.

Change-Id: I5178f5f80490b7b0d7e7011d11da402a316d164a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 86e10e1acd34ae4463bb2b0c24b8bdab71c6ade4)
This commit is contained in:
Christian Strømme 2021-01-14 10:58:52 +01:00
parent bd75dd929c
commit 03b3348af9

View File

@ -334,7 +334,7 @@ public class QtActivityDelegate
if ((inputHints & (ImhDate | ImhTime)) != (ImhDate | ImhTime)) {
if ((inputHints & ImhDate) != 0)
inputType |= android.text.InputType.TYPE_DATETIME_VARIATION_DATE;
if ((inputHints & ImhTime) != 0)
else
inputType |= android.text.InputType.TYPE_DATETIME_VARIATION_TIME;
} // else { TYPE_DATETIME_VARIATION_NORMAL(0) }
} else { // CLASS_TEXT