public void InitialData() { // 设置数据 user_name.setText(myUser.getUsername()); name_I.setText("Y"); user_tel.setText(myUser.getMobilePhoneNumber()); refreshAvatar(myUser.getAvatar()); }
private void updateUserAvatar(final String url) { MyUser myUser = BmobUser.getCurrentUser(this, MyUser.class); myUser.setAvatar(url); myUser.update( this, new UpdateListener() { @Override public void onSuccess() { // 更新头像 refreshAvatar(url); } @Override public void onFailure(int code, String msg) { System.out.println("code is : " + code); System.out.println("msg is : " + msg); } }); }