I have created an java class in android studio and I want to use runOnUiThread() in this class. Can I run runOnUiThread() thread without Activity.xml in Android? If Answer is yes? than how?
Yes. You just need to use Handler
.
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
}
});
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