1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
urlTxt="http://www.easy-musique.com/EASY_MUSIQUE_WEB/FR/ENV_LISTE_PARTITION.awp";
chargePage maPage = new chargePage();
ListePartition=maPage.charge(urlTxt);
extraitTexte monTxt = new extraitTexte();
tabPartition=monTxt.extrait(ListePartition,"/");
final ProgressDialog monDialogue = new ProgressDialog(this);
monDialogue.setTitle("Chargement des partitions...");
monDialogue.setMessage("Avancement");
monDialogue.setMax(nbrPartitionParPage);
monDialogue.setProgressStyle(monDialogue.STYLE_HORIZONTAL);
monDialogue.show();
new Thread(new Runnable(){
public void run(){
numDepart=nbrPages*(pageEnCours-1);
numFin=numDepart+(nbrPartitionParPage-1);
for (int cont=numDepart;cont<=numFin;cont++){
idPartition=tabPartition.get(cont).toString();
urlTxt="http://www.easy-musique.com/EASY_MUSIQUE_WEB/FR/ENV_FICHE_PARTITION.awp?ID_PARTITION=";
chargePage mapage= new chargePage();
detaillePartition=mapage.charge(urlTxt+idPartition);
extraitTexte monTxt = new extraitTexte();
tabDetaillePartition=monTxt.extrait(detaillePartition,"|");
titre=tabDetaillePartition.get(0).toString();
detail=tabDetaillePartition.get(1).toString();
urlImage=tabDetaillePartition.get(2).toString();
niveau=tabDetaillePartition.get(3).toString();
type=tabDetaillePartition.get(3).toString();
//fichePartition maPartition = new fichePartition(idPartition, titre, detail, urlImage, niveau, type);
zrPartition.add(new fichePartition(idPartition, titre, detail, urlImage, niveau, type));
monDialogue.setProgress(cont);
}
monDialogue.dismiss();
try {
Log.i("INFO","OK");
afficheZrPartition();
} catch (NoSuchFieldException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.i("INFO","BAD");
}
}
}).start();
} |
Partager