Android On-Screen Keyboard hides Python Kivy TextInputs

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

Here is the screen with and without the keyboard:

without keyboard

With keyboard

I usually expect to be able to scroll the screen to display the appropriate text input and select it, but I can't seem to figure out how to do that ... :(

How can I handle this?

+3


source to share


4 answers


You can use a softinput_mode

window property to choose what happens when the keyboard is opened, and optionally use keyboard_height

to know how big the keyboard is and move your text files accordingly.



However, this is only available in kivy master (version 1.9). Another stable release coming soon.

+4


source


ok I have installed version 1.9.0. But where and how to put the code Window.softinput_mode

? when I put basically:

from kivy.core.windows import Windows
Windows.softinput_mode = 'pan'

      



he does not work...

+1


source


Use Window, not Windows, and put it in main.py:

from kivy.core.window import Window
Window.softinput_mode = 'pan'

      

+1


source


Actually what you are looking for should look like in (for example?) Main.py:

from kivy.core.window import Window
Window.softinput_mode = 'below_target'

      

0


source







All Articles