Menu

#6 How to properly use Android API

v1.0 (example)
open
nobody
None
5
2014-05-31
2014-05-31
Tom
No

I am using the Android API and I am confused on how to use the API properly. Presently I just feed the entire text the user is working on into OpenAdaptxt's buffer, using the function public List<KPTSuggestion> insertTextAndGetSuggestions(String text). So sometimes a whole bunch of text is going in there. (I am trying to limit it to no more than a sentence, as I imagine a whole page of text would be completely out of the question). Every time my user presses a key, adding a new character, I pass the whole sentence in. Is that how one is supposed to do it? There is also the List<KPTSuggestion> insertChar(char chr) function, which adds a single character, but it must have a bug b/c the first line of that function clears the buffer, so it only ever thinks a single character is entered. I commented out that first line and it seems to work. But does it make any appreciable difference in performance to enter one character at a time vs re-inserting the whole sentence every time?

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.