J'ai ce code dans android. Mais quand le Fil supplie le chargement en gelant. Comment je peux empêcher le gel. Voici le code:Android Chargement Dialog Freez
privé reload vide (critères de chaîne finale) {try { myProgressDialog = ProgressDialog.show (myfiles.this, "S'il vous plaît patienter ...", "Chargement vos photos ... S'il vous plaît attendre" , faux);
new Thread() { public void run() {try {
Thread.sleep(2000);
} catch (Exception e) {
}
runOnUiThread(new Runnable() {
@Override
public void run() {
// Fetch the fact
try {
/* here my code */
} catch (Exception e) {
myProgressDialog.dismiss();
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
// Dismiss the Dialog
myProgressDialog.dismiss();
}
} .start(); } catch (Exception e) { // TODO Bloc de saisie généré automatiquement e.printStackTrace(); }
}