kivy / python-for-android

Turn your Python application into an Android APK
https://python-for-android.readthedocs.io
MIT License
8.33k stars 1.84k forks source link

Keyboard suggestion does not work #2734

Open Neizvestnyj opened 1 year ago

Neizvestnyj commented 1 year ago

Versions

from kivy.app import App
from kivy.lang import Builder

kv = """
Screen:
    TextInput:
        size_hint_y: None
        height: dp(45)
        hint_text: "keyboard_suggestions: False"
        write_tab: False
        keyboard_suggestions: False
        input_type: 'text'
        pos_hint: {"top": 0.9}

    TextInput:
        size_hint_y: None
        height: dp(45)
        hint_text: "keyboard_suggestions: True"
        write_tab: False
        keyboard_suggestions: True
        input_type: 'text'
        pos_hint: {"top": 0.7}
"""

class Test(App):
    def build(self):
        return Builder.load_string(kv)

Test().run()

buildozer.spec

[app]

title = My Application

package.name = myapp

package.domain = org.test

source.dir = .

source.include_exts = py,png,jpg,kv,atlas

version = 0.1

requirements = kivy==master

orientation = all

osx.python_version = 3

osx.kivy_version = 2.1.0

fullscreen = 0

android.api = 33

android.minapi = 21

android.ndk = 25b

android.accept_sdk_license = True

android.enable_androidx = True

android.logcat_filters = *:S python:D

android.archs = arm64-v8a, armeabi-v7a

android.allow_backup = True

p4a.branch = develop

p4a.bootstrap = sdl2

[buildozer]

log_level = 2

warn_on_root = 1

https://user-images.githubusercontent.com/40869738/211172799-ce0929e3-fea3-4a78-96df-7d27865fce63.mp4

brvier commented 1 year ago

I confirm also ... And that s pretty strange as it was working in december 22, and i didn t see what changes bring this regression.

brvier commented 1 year ago

OK, so it didn't works anymore with GBoards (Google), but still works with openboard fork with Swype :

https://github.com/erkserkserks/openboard/releases

kuzeyron commented 2 months ago

With my own tests by setting keyboard_suggestions: True to keyboard_suggestions: False seems to be working with my Gboard. I guess SDL2 is receiving double events when it's True.

EDIT: Gboard is forcing backspaces while the bug is hit. Doesn't look like it can be fixed on Kivys end..