开发者

android: InputConnection from different thread.

开发者 https://www.devze.com 2023-01-20 07:55 出处:网络
Does the commitText开发者_StackOverflow() method of the android.view.inputmethod.InputConnection allowed to be called from different thread than UI thread?This is not really a straight answer for your

Does the commitText开发者_StackOverflow() method of the android.view.inputmethod.InputConnection allowed to be called from different thread than UI thread?


This is not really a straight answer for your question but if you want to access the UI thread through another thread you can always use AsyncTask. Override doInBackground with your normal thread task and override onProgressUpdate with the tasks that will need access to the UI thread. Whenever you need to do your tasks inside onProgressUpdate you call publishProgress from doInBackground.

0

精彩评论

暂无评论...
验证码 换一张
取 消