Reputation: 11
Is there a library or any way I can implement this feature which takes hiragana character and returns kanji suggestions in android.
Let me explain my situation here,
I have a textview, where i set it's text to whatever character of hiragana the user selects from a customized keyboard which appears on the screen and then it appends the letters in the textview and it should suggest kanji symbols for it. so for example: if user selects ぐ then it should suggest 具, 愚, 組, etc., Kanjis.
This suggested kanji can be displayed on another textview.
I just want to know if this is possible to achieve and any idea how to do it.
This is my customized soft keyboard (part of it)
Upvotes: 1
Views: 786
Reputation: 4209
To see Kanji Suggestion in the Japanese language you need to change the Japanese OS. Japanese OS have built-in Japanese keyboard.
Go there : Setting> System > Language and Input > Language > Add Japanese Language
If you don't want to change OS, then you can only change your keyboard by going
Setting> Keyboard > add Keyboard
If you want to custom library, You can use the static method UserDictionary.Words.addWord(....) but you need to add permission
Normally Works: In your EditText need to allow InputType="textCapSentences|textAutoCorrect|textAutoComplete"
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:imeOptions="actionNext"
android:inputType="textCapSentences|textAutoCorrect|textAutoComplete" />
Upvotes: 0