Top "Runnable" questions

The Runnable interface defines a single method, run, meant to contain the code executed in the thread.

Android Asynctask vs Runnable vs timertask vs Service

What are the differences between these methods (classes)? I want to run a app that runs every 5 seconds, clear the …

android service android-asynctask runnable timertask
SurfaceView shows black screen - Android

Basically I want to use SurfaceView for animation. Therefore the class implements Runnable. To experiment, I want to draw a …

android android-canvas surfaceview runnable
Check if Android handler has callbacks

I have some code which sets a timer, but if a user sets the timer while it is in use …

android handler runnable
How do I change the rate or period of a repeating task using ScheduledExecutorService?

I have a modified version of the bluetooth chat sample app. I have set up a ScheduledExecutorService which sends a …

java android runnable recurring scheduledexecutorservice
Update JProgressBar

I can't update my progressbar... this is my code Thread t=new Thread(new Runnable(){ public void run(){ int i=1; …

java swing multithreading jprogressbar runnable
LiveData and ViewModel does not update textview

I am having a small issue, when i comment out the binding.setData(dataContainer); in onChanged while observing Livedata in …

android runnable android-databinding android-livedata
Updating GUI: Runnables vs Messages

To update the GUI from other threads, there are basically two main approaches: Use java.lang.Runnable with any of …

android user-interface message runnable
Access Thread from inside Runnable

How can I access Thread object that is executing given Runnable? What I'd like to do is to call sleep() …

java multithreading runnable thread-sleep
Java: How do I catch InterruptedException on a thread, when interrupted by another thread?

I'm developing a multithreaded application to make connections to external servers - each on separate threads - and will be …

java multithreading runnable
How to implement a queue of runnables

I am trying to implement a queue of runnables to be executed one after another(meaning the next in the …

java android queue runnable