public String nbEdmsUser() { String nbEdmUser = "******"; if (PreferenceHelper.getListUserEdm() != null) { nbEdmUser = String.valueOf(PreferenceHelper.getCountEdmsUser()); } return nbEdmUser; }
@Override public void onRequestSuccess(ListUsers result) { // TODO Auto-generated method stub User user = new User(); user = result.getListUsers().get(0); String photoUser = user.getPhoto(); Log.d("tete", "photo url" + user.getPhoto()); if (user.getPhoto() != null) { // Bitmap bitmap = ImageLoader.DownloadImage(user.getPhoto()); // imageUser.setImageBitmap(bitmap); ImageLoader imageLoader = new ImageLoader(getApplicationContext()); imageLoader.DisplayImage(photoUser, R.id.imgv_user_photo, imageUser); EdmApplication.unShowWaitingDialog(); } Log.d("tete", "ville " + user.getVille()); if (PreferenceHelper.getUserInPreferences().getVille() == null) { tvResidenceResult.setText("Aucun(e)"); } else { tvResidenceResult.setText(user.getVille()); } tvCiviliteResult.setText(user.getCivilite()); Log.d("tete", "date de naissance :" + user.getDateNaissance()); if (user.getDateNaissance() == null) { tvDateDeNaissanceResult.setText("Aucun(e)"); } else { tvDateDeNaissanceResult.setText(user.getDateNaissance()); } tvVisitesProfilResult.setText(""); tvNbCommentairesResult.setText(""); tvNbEdmsResults.setText(nbEdmsUser()); nbEdmsUser(); PreferenceHelper.setUserInPreferences(user); PreferenceHelper.setPseudo(user.getPseudo()); PreferenceHelper.setMdp(user.getMdp()); }
public void populateInfosUser() { User user = new User(); user = PreferenceHelper.getUserInPreferences(); /*spice request for all edm in accueil activity*/ loginUserRequest = new LoginUserRequest(ApplicationConstants.LOGIN_USER, user.getPseudo(), user.getMdp()); ((EdmFragmentActivity) getActivity()) .getSpiceManager() .execute( loginUserRequest, loginUserRequest.getCacheKey(), ApplicationConstants.NEVER_EXPIRE_CACHE_DATA, new LoginRequestListener()); }