progressDialog = ProgressDialog.show(MainActivity.this, "", "Loading...");
Thread thread = new Thread() {
public void run() {
latch.countDown();
try{
sleep(3000);
}
catch (Exception e) {
Log.e("tag", e.getMessage());
}
progressDialog.dismiss();
}
};
thread.start(); listView.setAdapter(adapter);
I want show loading in 3 seconds then show listview but list always show immediately. How can I want thread finished before showing listview?