GetData is a retrofit configuration
UpdateUserProfile is model
getUser is getter of another model
Personame is an edit box
GetData service = RetrofitClient.getClient().create(GetData.class);
Call<UpdateUserProfile> callProfile= service.fetchUserData();
callProfile.enqueue(new Callback<UpdateUserProfile>()
{ @Override public void onResponse(Call<UpdateUserProfile> call,
Response<UpdateUserProfile> response) {
String updateUserProfile= response.body().getUser().get(0).getId();
personName.setText(response.body().getUser().get(0).getName());
personDOB.setText(response.body().getUser().get(0).getDob());
personEmail.setText(response.body().getUser().get(0).getEmail());
personMobile.setText(response.body().getUser().get(0).getMobile_no());
Picasso.with(ProfileActivity.this)
.load(response.body().getUser().get(0).getImage()).into();
}