Hydr8O
Hydr8O

Reputation: 21

Kivy Text Input: Chinese characters

When I select input language as Chinese(pinyin) and try to type only English letters is displayed and no suggestions about transforming them into Chinese characters is showed.

Is there any way to overcome this problem?

Upvotes: 2

Views: 1344

Answers (1)

jackhoo
jackhoo

Reputation: 21

Try this: first download a font, here I use DroidSansFallback.ttf, and asign to font_name attribute of Textinput, and package to a apk file using buildozer.

test.kv:

AddLocationForm:
<AddLocationForm@BoxLayout>:
    orientation: 'vertical'
    BoxLayout:
        height: "40dp"
        size_hint_y: None
        TextInput:
            font_name: "DroidSansFallback.ttf"
            size_hint_x: 50
        Button:
            text: "Search"
            size_hint_x: 25
        Button:
            text: "Current Location"
            size_hint_x: 25

main.py:

from kivy.app import App


class TestAPP(App):
    pass

if __name__ == '__main__':
    TestAPP().run()

image here

Upvotes: 2

Related Questions