I'm creating a map using the google api lib. Because the mapwidget takes a long time to load I'm trying to add a loading notification, but it isn't shown. I can show the progressDialog in regular threads though. How come this dialog isn't shown?
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progressDialog = ProgressDialog.show(this, "Please Wait", "Map = loading",false,true);
//setContentView(R.layout.map);
runOnUiThread(new Runnable(){
public void run() {
try{
Log.d("debug", "before setContentView"); //13:36:25
setContentView(R.layout.map);
Log.d("debug", "after setContentView"); //13:36:39
} catch (Exception e) { }
progressDialog.dismiss();
}});
initMap();
initGps();
}