private void populateTheFields() { firstNameEditText.setText(mCurrentUser.getFirstName()); lastNameEditText.setText(mCurrentUser.getLastName()); carEditText.setText(mCurrentUser.getCar()); phoneNumberEditText.setText(mCurrentUser.getPhoneNumber()); String profileImageUrl = TUMitfahrApplication.getApplication(this).getProfileService().getProfileImageURL(this); Picasso.with(this) .load(profileImageUrl) .placeholder(R.drawable.ic_account_dark) .error(R.drawable.ic_account_dark) .into(userImageView); }
@Override public void onDialogPositiveClick(DialogFragment dialog, String password) { // Start the edit process mProgressDialog.show(); if (detailsChanged) { mCurrentUser.setFirstName(firstNameEditText.getText().toString()); mCurrentUser.setLastName(lastNameEditText.getText().toString()); mCurrentUser.setPhoneNumber(phoneNumberEditText.getText().toString()); mCurrentUser.setCar(carEditText.getText().toString()); TUMitfahrApplication.getApplication(this) .getProfileService() .updateUser(mCurrentUser, mCurrentUser.getEmail(), password, password); } }