Please go through the steps,
Created Actor class that inherited with Runnable
public abstract class Actor implements Runnable {
Actor(int queueSize){
}
@Override
public void run() {
onInit();
}
void onInit(){
// do stuff here
}}
Then I create MyRunner class using Actor
class MyRunner extends Actor{
MyRunner() {
super(10);
}}
Then in my Activity, I use runOnUiThread
as below
Actor runner = new MyRunner();
runOnUiThread(runner);
Then the Main thread freezing, the Whole screen is black and the app is frozen.
I used this thread to implement my code
Where I missed?