Top "Ui-thread" questions

In some frameworks there's a dedicated thread that exclusively manages all UI objects.

Can't create handler inside thread that has not called Looper.prepare()

What does the following exception mean; how can I fix it? This is the code: Toast toast = Toast.makeText(mContext, "…

android ui-thread android-toast
How do we use runOnUiThread in Android?

I'm new to Android and I'm trying to use the UI-Thread, so I've written a simple test activity. But I …

android ui-thread
What is the Android UiThread (UI thread)

Can someone explain to me what exactly the UI thread is? On developer.android.com it says about the runOnUiThread …

android ui-thread
Easy way to call method in new thread

I'm writing small app and now I discovered a problem. I need to call one(later maybe two) method (this …

java multithreading javafx ui-thread
Android ViewPager automatically change page

I want to schedule an action to change automatically my ViewPager pages. I've tried: @Override public void onCreate(Bundle savedInstanceState) { …

android timer android-viewpager ui-thread
android - calling ui thread from worker thread

Hi I want to make Toast available to me no-matter-what and available from any thread whenever I like within my …

android android-activity toast ui-thread
Is it possible to use AsyncTask in a Service class?

Everything is in the title. On the official documentations it is stated that Note that services, like other application objects, …

android multithreading android-asynctask ui-thread
Difference between Handler.post(Runnable r) and Activity.runOnUiThread(Runnable r)

Is there a difference between new Handler.post(Runnable r); and activity.runOnUiThread(Runnable r)

android handler ui-thread
Kotlin: How to delay code in Android without making the UI freeze

I am trying to delay code in Kotlin I have tried Thread.sleep(1000) But its freezes the UI. Does somebody …

kotlin ui-thread background-thread
How to detect if we're on a UI thread?

For the sake of argument, consider a UI thread as a thread that has had a call to Application.Run() …

c# winforms multithreading ui-thread