I am very new to android. Hope this is not a stupid question.
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new Thread(new Runnable() { public void run() { Intent intent = new Intent(MainActivity.this, SecondActivity.class); startActivity(intent); } }).start(); }
Question: why does it work? Is it normal that startActivity can be called from a secondary thread?
I thought that all UI-related stuff should be done in the user interface thread.
source share