Affichage de deux résultats de deux services différents

yassinosh Messages postés 10 Date d'inscription mardi 4 mars 2014 Statut Membre Dernière intervention 17 novembre 2014 - 2 avril 2014 à 01:23
yassinosh Messages postés 10 Date d'inscription mardi 4 mars 2014 Statut Membre Dernière intervention 17 novembre 2014 - 2 avril 2014 à 11:23
Bonjour,
je doit afficher le resultat de deux web service dans une meme activite android mais a chaque fois il affiche un des deux resultat uniquement

2 réponses

cs_Julien39 Messages postés 6414 Date d'inscription mardi 8 mars 2005 Statut Modérateur Dernière intervention 29 juillet 2020 371
2 avril 2014 à 08:18
Salut,

Peux tu nous montrer ton code stp ?
1
yassinosh Messages postés 10 Date d'inscription mardi 4 mars 2014 Statut Membre Dernière intervention 17 novembre 2014 1
Modifié par cs_Julien39 le 2/04/2014 à 13:35
public class RestaurantActivity extends Activity {
     String rest;
     restaurantmodel r;
     NoteModel n;
     Bundle myValues;

     Button valider;
     restaurantWS restaurantws = new restaurantWS();

     @Override
     protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_restaurant);
          final int id;
          final GlobalMainActivity gl=new GlobalMainActivity(); 
          myValues = getIntent().getExtras();
          id=myValues.getInt("pos");?
          final TextView gout = (TextView) findViewById(R.id.txt_tastnote);
          final TextView confort = (TextView) findViewById(R.id.txt_conforenote);
          final TextView hygiene = (TextView) findViewById(R.id.txt_hygienenote);
          final TextView service = (TextView) findViewById(R.id.txt_servicenote);
          TextView adr = (TextView) findViewById(R.id.adressresto);
          TextView tel = (TextView) findViewById(R.id.telephoneresto);
          TextView pay = (TextView) findViewById(R.id.payementresto);
          TextView cuis = (TextView) findViewById(R.id.cuisineresto);
          TextView heur = (TextView) findViewById(R.id.hourresto);
          TextView exp = (TextView) findViewById(R.id.expenseresto);
          r = restaurantws.afficher(id);
          adr.setText(r.getAdr());
          exp.setText(r.getExpense());
          tel.setText(r.getPhone());
          pay.setText(r.getPayment());
          cuis.setText(r.getCuisine());
          heur.setText(r.getHour());?
          NoteModel n;
          affichernoteWS affichernotews = new affichernoteWS();
          n = affichernotews.afficher(id);
          confort.setText(Integer.toString(n.getConfort()));
          hygiene.setText(Integer.toString(n.getHygiene()));
          service.setText(Integer.toString(gl.getSERVICE()));
          gout.setText(Integer.toString(n.getGout()));
     }
}
1
Rejoignez-nous