Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android on-screen keyboard hiding Python Kivy TextInputs

I am just beginning to learn how to develop in Kivy, but I have a problem with the keyboard on Android. When I have series of TextInputs running down to the bottom of the screen, I cannot see the fields hidden by the on-screen keyboard.

Here is the screen display with and without the keyboard:

without keyboard

With keyboard

Normally, I'd expect to be able to scroll the screen to display the relevant text input and select it but I cannot find out how to do so... :(

How can I handle this?

like image 440
Pierre Boulanger Avatar asked Nov 07 '14 10:11

Pierre Boulanger


2 Answers

You can use the softinput_mode property of Window to choose what happens when the keyboard is opened, and optionally use the keyboard_height to know how big the keyboard is and move your textinputs appropriately.

However, this is only available in kivy master (version 1.9). There will be another stable release including it soon.

like image 150
inclement Avatar answered Sep 27 '22 18:09

inclement


Use 'Window', not 'Windows', and place in main.py:

from kivy.core.window import Window
Window.softinput_mode = 'pan'
like image 32
mcastle Avatar answered Sep 27 '22 19:09

mcastle