Can I use runOnUiThread() inside a thread to update the user interface while running the thread, or handler is more efficient ? .
Yes you can use runOnUiThread() from a non UI thread to update the UI. That method uses a handler internally if you are not currently on the UI thread so using your own handler will not be more efficient. If you are already on the UI thread then the runnable will be executed immediately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With