I know that no thread can access the current view unless it is the UI Thread. I am wondering why? Why does it matter which thread is changing the view? Is it a security reason? This is the work around I use:
public void doLayout()
{
Runnable run = new Runnable()
{
public void run()
{
ViewerActivity.setContentView(R.layout.main);
}
};
handler.post(run);
}
private Handler handler;'
It is kind of a pain to do that everytime i want to change the layout. Is there a different work around? I know about async task and i never found a good way to use it, is it better than what i'm doing? All relevent answers are appriciated!