Commit d57b6aad3696db9a56f745358e4f3d5f9a44b902

Authored by JLo'w
1 parent 8ff199b1

Oups paramètres non initialisés ?

PremiereActivite/app/src/main/java/com/example/app_10p5/CarteActivite.java
@@ -31,8 +31,9 @@ public class CarteActivite extends Activity implements ASyncResponse { @@ -31,8 +31,9 @@ public class CarteActivite extends Activity implements ASyncResponse {
31 super.onCreate(savedInstanceState); 31 super.onCreate(savedInstanceState);
32 setContentView(R.layout.layout_carte); 32 setContentView(R.layout.layout_carte);
33 33
34 - switch (getIntent().getIntExtra("state", MainActivite.STATE_RIEN)) { 34 + mParam = new HashMap<String, String>();
35 35
  36 + switch (getIntent().getIntExtra("state", MainActivite.STATE_RIEN)) {
36 case MainActivite.STATE_COMMANDE: 37 case MainActivite.STATE_COMMANDE:
37 mParam.put("quantite", String.valueOf(getIntent().getIntExtra("quantite", -1))); 38 mParam.put("quantite", String.valueOf(getIntent().getIntExtra("quantite", -1)));
38 mParam.put("montant", String.valueOf(getIntent().getFloatExtra("montant", -1))); 39 mParam.put("montant", String.valueOf(getIntent().getFloatExtra("montant", -1)));