androidpythonkivy

Kivy softinput mode below_target does not work


I am writing a Kivy App for Android, originally when a textbox was selected, the keyboard would appear and cover up the text box.

So I found this parameter:

Window.softinput_mode = "below_target"

When ‘below_target’, the window pans so that the current target TextInput widget requesting the keyboard is presented just above the soft Keyboard.

From

Window - Kivy 1.9.1 Documentation

When I try to run this on my Windows machine and on the Android device, I get an error saying:

ValueError:  WindowSDL.softinput_mode is set to an invalid option 'below_target'

Am I missing something?

Thanks in advance, Cooper


Solution

  • The below_target option was added more recently than the last stable release, which is Kivy 1.9. If you're running this version, you don't have it available yet.

    You can use the master branch on android by just changing kivy to kivy==master in the buildozer requirements line.