fix(android): the window shrinks for the keyboard, so forms can scroll
Measured, after two fixes placed by reasoning changed nothing: focus: inner 719 visual 719 | box client 659 scroll 659 | body=on-detail Keyboard up, and both heights unchanged: the page has no way to learn the keyboard exists - visualViewport reports nothing here either. And the box shows 659 for 659 of content, so there is no overflow and nothing can scroll. The keyboard simply covers the bottom of a page that believes it still has the whole screen. So the remedy was never in the page. windowSoftInputMode="adjustResize" makes the window itself shrink; the scroll box then gets real overflow and the engine can bring the focused field into view on its own. The reserve added below the scroll area stays: it costs nothing when the window does resize (the measure is then zero), and it is the honest place for the value should a device ever report it.
This commit is contained in:
@@ -63,11 +63,21 @@
|
||||
<%services%>
|
||||
<!-- Our activity is a subclass of the built-in NativeActivity framework class.
|
||||
This will take care of integrating with our NDK code. -->
|
||||
<!-- windowSoftInputMode : LA FENETRE SE RETRECIT QUAND LE CLAVIER MONTE.
|
||||
Sans cela il RECOUVRE la page - le cadre garde sa hauteur, le
|
||||
contenu ne deborde de rien, et le bas du formulaire devient
|
||||
inatteignable : le champ mot de passe ne se voyait qu'en repliant
|
||||
le clavier. Mesure a l'appui, clavier leve : innerHeight et
|
||||
visualViewport.height restaient tous deux a 719, et la boite
|
||||
defilante montrait 659 pour 659 de contenu. La page n'avait aucun
|
||||
moyen d'apprendre que le clavier existait ; c'est la fenetre qui
|
||||
devait le dire. -->
|
||||
<activity
|
||||
android:name="com.embarcadero.firemonkey.FMXNativeActivity"
|
||||
android:exported="true"
|
||||
android:label="%activityLabel%"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:launchMode="singleTask">
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name="android.app.lib_name" android:value="%libNameValue%" />
|
||||
|
||||
Reference in New Issue
Block a user