I've got an TabActivity implementing TabContentFactory, which starts an AsyncTask in onCreate() to fetch the data for the tabs. When the AsyncTask has finished, onPostExecute() could directly update the UI-elements, right? Meaning, since that method runs in the UI-Thread no further thread-synchronization would be required when accessing UI-elements?
Anyway, the problem I have is that my UI-Thread calls createTabContent() in the TabActivity while the AsyncTask is still busy. I have to add at least one tab, or I get a NullPointerException. But how do I only add tabs when my AsyncTask has finished and the ProgressDialog has been dismissed?
I'd be glad if someone could help...