
AYUDA! NO ENCUENTRO EL ERROR
Publicado por chiha2o (1 intervención) el 03/11/2016 11:40:43
Tengo el siguiente bucle for pero no recorre todas distribuciones que tengo, solo una no se donde me he equivocado.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if(error == false){
Log.e("Aqui", "MSG");
Log.e("jsb", String.valueOf(jsb.length()));
for (int i = 0; i < jsb.length(); i++){
jsonResponse = new JSONObject(jsb.get(i).toString());
String id = jsonResponse.getString("idDistribution");
disList=mDistributionManager.getAllDistributions();
Log.e("disList", String.valueOf(disList.size()));
for (int j = 0; j < disList.size(); j++) {
Log.e("Aqui", "7."+j);
Log.e("comparativa" , "."+disList.get(j).getCodDistribution() + "==" + id+".");
//if (disList.get(j).getCodDistribution() == id) {
if (Integer.parseInt(disList.get(j).getCodDistribution()) == Integer.parseInt(id)) {
// antes--- mDistributionManager.deleteDistributionById(id);
mDistributionManager.updateDelete(id);
mRoutesDailyFragment.updateJourney();
}
}
}
Valora esta pregunta


0