private void initUser() { if (user == null) { return; } ImageLoader.getInstance().displayImage(user.getUserAvatar(), avatar, getDisplayImageOptions()); nickname.setText(user.getNickName()); if (user.getSex() == 1) { sex.setImageResource(R.drawable.male); } else { sex.setImageResource(R.drawable.female); } if (user.getSignature().equals("") || user.getSignature() == null) { signature.setText("这个同学他很懒,还没有发表个性签名~"); } else { signature.setText(user.getSignature()); } place.setText(user.getUserArea()); birthday.setText(user.getBirthday()); }
private void initUser() { User spUser = Account.getUserInfo(); ImageLoader.getInstance() .displayImage(spUser.getUserAvatar(), editAvatar, getDisplayImageOptions()); editNickname.setText(spUser.getNickName()); if (spUser.getSex() == 0) { editSex.setText("女"); } else { editSex.setText("男"); } if (spUser.getUserArea() == null || spUser.getUserArea().equals("")) { editArea.setText("北京市 北京市"); } else { editArea.setText(spUser.getUserArea()); } if (spUser.getBirthday() == null || spUser.getBirthday().equals("")) { editBirthday.setText("2000-01-01"); } else { editBirthday.setText(spUser.getBirthday()); } if (spUser.getSignature() != null && !spUser.getSignature().equals("")) { editSignature.setText(spUser.getSignature()); } }