Ad
View Stuck On `commitText` Method Of InputConnection
I am committing text when user press key using the key code in InputConnection
but this method will hang the view and it will release after few milliseconds
if (getCurrentInputConnection() != null) {
getCurrentInputConnection().commitText(String.valueOf((char) charCode), 1);
}
Is am I doing something wrong, or any other solution?
Ad
Answer
Don't use commitText()
on each keypress.
Use
getCurrentInputConnection().setComposingText(mComposingText, 1);
for all keypress and commit composing text on space
press.
To commit composing text use
getCurrentInputConnection().finishComposingText();
It was solved my issue
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad