我的,编辑资料 userInfo 优化
This commit is contained in:
parent
c4473f2b16
commit
56bc86b936
@ -36,30 +36,26 @@ import com.shayu.onetoone.activity.setting.SettingActivity;
|
||||
import com.shayu.onetoone.adapter.MainMeAdapter;
|
||||
import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.PeopleNum;
|
||||
import com.shayu.onetoone.bean.SlideBean;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.bean.UserItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.CustomMyViewHolder;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.GoogleBean;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.SlideModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -70,7 +66,6 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 我的主页面
|
||||
@ -105,6 +100,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
private TextView idLevel;//用户 等级
|
||||
private ImageView iconLevel; //等級图标
|
||||
|
||||
UserBean userBean;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_my, container, false);
|
||||
@ -112,6 +109,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
userBean = UserManager.getUserBean();
|
||||
|
||||
yanLevel = findViewById(R.id.yanLevel);
|
||||
wealthLevel = findViewById(R.id.wealthLevel);
|
||||
idLevel = findViewById(R.id.idLevel);
|
||||
@ -250,8 +249,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<com.shayu.onetoone.bean.UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(com.shayu.onetoone.bean.UserBean data) {
|
||||
showData(data.getUser());
|
||||
public void onSuccess(UserBean data) {
|
||||
showData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -260,7 +259,6 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
OTONetManager.getInstance(mContext).getAuthInfo(new com.yunbao.common.http.base.HttpCallback<AuthBean>() {
|
||||
@Override
|
||||
public void onSuccess(AuthBean data) {
|
||||
@ -372,56 +370,53 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
|
||||
private List<SlideModel> mBannerListNew = new ArrayList<>();
|
||||
|
||||
IMLoginModel userInfo;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void showData(IMLoginModel u) {
|
||||
userInfo = u;
|
||||
private void showData(UserBean u) {
|
||||
mBannerList.clear();
|
||||
mBannerListNew.clear();
|
||||
if (userInfo == null) {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
if (userInfo.getSlide() != null) {
|
||||
mBannerListNew.addAll(userInfo.getSlide());
|
||||
if (u.getUser().getSlide() != null) {
|
||||
mBannerListNew.addAll(u.getUser().getSlide());
|
||||
for (SlideModel bean : mBannerListNew) {
|
||||
if (bean.getSlideStatus() == 1) {
|
||||
mBannerList.add(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (userInfo.getSex() == 1) {
|
||||
if (u.getUser().getSex() == 1) {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
|
||||
showBanner();
|
||||
if (!userInfo.getAvatar().contains("http")) {
|
||||
ImgLoader.displayAvatar(mContext, CommonAppConfig.HOST + userInfo.getAvatar(), mAvatar);
|
||||
if (!u.getUser().getAvatar().contains("http")) {
|
||||
ImgLoader.displayAvatar(mContext, CommonAppConfig.HOST + u.getUser().getAvatar(), mAvatar);
|
||||
} else {
|
||||
ImgLoader.displayAvatar(mContext, userInfo.getAvatar(), mAvatar);
|
||||
ImgLoader.displayAvatar(mContext, u.getUser().getAvatar(), mAvatar);
|
||||
}
|
||||
mName.setText(userInfo.getUserNicename());
|
||||
if (!"0".endsWith(String.valueOf(userInfo.getNobleId()))) {
|
||||
user_noble_text.setText(mContext.getResources().getString(R.string.now_noble) + userInfo.getNobleName());
|
||||
user_noble_time.setText(mContext.getResources().getString(R.string.now_noble_time) + userInfo.getNobleEndTime());
|
||||
mName.setText(u.getUser().getUserNicename());
|
||||
if (!"0".endsWith(String.valueOf(u.getUser().getNobleId()))) {
|
||||
user_noble_text.setText(mContext.getResources().getString(R.string.now_noble) + u.getUser().getNobleName());
|
||||
user_noble_time.setText(mContext.getResources().getString(R.string.now_noble_time) + u.getUser().getNobleEndTime());
|
||||
} else {
|
||||
user_noble_text.setText(userInfo.getNobleName());
|
||||
user_noble_text.setText(u.getUser().getNobleName());
|
||||
user_noble_time.setText(mContext.getResources().getString(R.string.open_noble_text));
|
||||
}
|
||||
String singnature = userInfo.getSignature();
|
||||
String singnature = u.getUser().getSignature();
|
||||
if (TextUtils.equals(singnature, "這個人很懶,什麼也沒留下") || TextUtils.equals(singnature, "这家伙很懒,什么都没留下") || TextUtils.isEmpty(singnature)) {
|
||||
singnature = WordUtil.isNewZh() ? "這個人很懶,什麼也沒留下" : "The guy was lazy and didn't write anything.";
|
||||
}
|
||||
signature.setText(getResources().getString(R.string.user_sign) + ":" + singnature);
|
||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||
LevelBean anchorLevelBean = appConfig.getAnchorLevel(Integer.parseInt(userInfo.getLevelAnchor()));
|
||||
LevelBean anchorLevelBean = appConfig.getAnchorLevel(Integer.parseInt(u.getUser().getLevelAnchor()));
|
||||
|
||||
if (userInfo.getDress().getAvatarFrame() != null) {
|
||||
if (userInfo.getDress().getAvatarFrame().contains("svga")) {
|
||||
if (u.getUser().getDress().getAvatarFrame() != null) {
|
||||
if (u.getUser().getDress().getAvatarFrame().contains("svga")) {
|
||||
try {
|
||||
new SVGAParser(mContext).parse(new URL(userInfo.getDress().getAvatarFrame()), new SVGAParser.ParseCompletion() {
|
||||
new SVGAParser(mContext).parse(new URL(u.getUser().getDress().getAvatarFrame()), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
@ -437,13 +432,13 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
ImgLoader.display(mContext, userInfo.getDress().getAvatarFrame(), gift_svga);
|
||||
ImgLoader.display(mContext, u.getUser().getDress().getAvatarFrame(), gift_svga);
|
||||
}
|
||||
}
|
||||
|
||||
if (userInfo.getDress().getMedal() != null) {
|
||||
Log.e("tag", userInfo.getDress().getMedal());
|
||||
ImgLoader.display(mContext, userInfo.getDress().getMedal(), user_noble_ico);
|
||||
if (u.getUser().getDress().getMedal() != null) {
|
||||
Log.e("tag", u.getUser().getDress().getMedal());
|
||||
ImgLoader.display(mContext, u.getUser().getDress().getMedal(), user_noble_ico);
|
||||
} else {
|
||||
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
|
||||
}
|
||||
@ -480,9 +475,9 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
}
|
||||
}*/
|
||||
//修改靓号图标 个人中心
|
||||
if (userInfo.getGoodnum() != null && !userInfo.getGoodnum().equals("")) {
|
||||
if (u.getUser().getGoodnum() != null && !u.getUser().getGoodnum().equals("")) {
|
||||
good_nub_ico.setVisibility(View.VISIBLE);
|
||||
mID.setText("ID:" + userInfo.getGoodnum());
|
||||
mID.setText("ID:" + u.getUser().getGoodnum());
|
||||
} else {
|
||||
//good_nub_ico.setVisibility(View.GONE);
|
||||
//mID.setText(userInfo.getLiangNameTip());
|
||||
@ -494,8 +489,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
ImgLoader.display(mContext, beanStetting.getThumb(), img_setting);
|
||||
tv_setting.setText(beanStetting.getName());
|
||||
}
|
||||
Constants.myUid = userInfo.getGoodnum();
|
||||
Constants.myAvatar = userInfo.getAvatar();
|
||||
Constants.myUid = u.getUser().getGoodnum();
|
||||
Constants.myAvatar = u.getUser().getAvatar();
|
||||
// if (u.getUserInfoComplete() == 1) {
|
||||
// findViewById(R.id.complete_information_radius).setVisibility(View.INVISIBLE);
|
||||
// findViewById(R.id.complete_information).setVisibility(View.INVISIBLE);
|
||||
@ -513,7 +508,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else {
|
||||
switch (bean.getId()) {
|
||||
case 2:
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext,false,HtmlUrlUtils.URL_PAY_COIN));
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
break;
|
||||
case 13:
|
||||
forwardSetting();
|
||||
@ -535,13 +530,13 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else if (i == R.id.signature) {
|
||||
// mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
} else if (i == R.id.lt_star_coin) {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext,false,HtmlUrlUtils.URL_PAY_GOLD));
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_GOLD));
|
||||
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString("type", "yuanbao");
|
||||
// RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||
} else if (i == R.id.btn_coin) {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext,false,HtmlUrlUtils.URL_PAY_COIN));
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
} else if (i == R.id.btn_gold) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("type", "coin");
|
||||
@ -554,8 +549,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
forwardSetting();
|
||||
} else if (i == R.id.lt_noble) {
|
||||
Constants.isTitle = true;
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + userBean.getUser().getUserNicename() + "&usernobId=" + userBean.getUser().getNobleId() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
// ZhuangBanActivity.forward(mContext, url, false);
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import com.shayu.onetoone.activity.login.ChooseLabelActivity;
|
||||
import com.shayu.onetoone.activity.setting.BindUserActivity;
|
||||
import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
@ -36,37 +37,22 @@ import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.event.UpdateFieldEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ActivityResultCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.CityUtil;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.CompleteInformationPopup;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import cn.qqtheme.framework.entity.City;
|
||||
import cn.qqtheme.framework.entity.County;
|
||||
import cn.qqtheme.framework.entity.Province;
|
||||
import cn.qqtheme.framework.picker.AddressPicker;
|
||||
|
||||
/**
|
||||
* 我的 编辑资料
|
||||
*/
|
||||
@ -97,9 +83,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
AuthBean authBean;
|
||||
|
||||
IMLoginModel userInfo;
|
||||
|
||||
com.shayu.onetoone.bean.UserBean.UserInfo info;
|
||||
UserBean userInfo;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -124,11 +108,11 @@ public class EditProfileActivity extends AbsActivity {
|
||||
RouteManager.forwardAuthActivity();
|
||||
}
|
||||
});
|
||||
userInfo = UserManager.getUserBean().getUser();
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<com.shayu.onetoone.bean.UserBean>() {
|
||||
userInfo = UserManager.getUserBean();
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(com.shayu.onetoone.bean.UserBean data) {
|
||||
showData(data.getUser(), data.getInfo());
|
||||
public void onSuccess(UserBean data) {
|
||||
showData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -268,10 +252,10 @@ public class EditProfileActivity extends AbsActivity {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
if (userInfo != null) {
|
||||
userInfo.setLocation(country.name);
|
||||
userInfo.getUser().setLocation(country.name);
|
||||
}
|
||||
if (userInfo != null) {
|
||||
userInfo.setArea(country.name);
|
||||
userInfo.getUser().setArea(country.name);
|
||||
}
|
||||
mCity.setText(country.name);
|
||||
//showData(userInfo);
|
||||
@ -294,12 +278,11 @@ public class EditProfileActivity extends AbsActivity {
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String phoneNum = String.valueOf(intent.getStringExtra("phoneNum"));
|
||||
userInfo.setMobile(phoneNum);
|
||||
userInfo.getUser().setMobile(phoneNum);
|
||||
tv_bind_phone.setText(phoneNum);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} else if (i == R.id.auth) {
|
||||
RouteManager.forwardAuthActivity();
|
||||
}
|
||||
@ -313,7 +296,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String label = intent.getStringExtra("label");
|
||||
info.setCn_label(label);
|
||||
userInfo.getInfo().setCn_label(label);
|
||||
tag.setText(label);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
@ -323,13 +306,13 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
private void editName() {
|
||||
Intent intent = new Intent(mContext, EditNameActivity.class);
|
||||
intent.putExtra(Constants.NICK_NAME, userInfo.getUserNicename());
|
||||
intent.putExtra(Constants.NICK_NAME, userInfo.getUser().getUserNicename());
|
||||
cameraUtil.startActivityForResult(intent, new ActivityResultCallback() {
|
||||
@Override
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String nickName = intent.getStringExtra(Constants.NICK_NAME);
|
||||
userInfo.setSignature(nickName);
|
||||
userInfo.getUser().setSignature(nickName);
|
||||
mName.setText(nickName);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
@ -405,13 +388,13 @@ public class EditProfileActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent(mContext, EditSignActivity.class);
|
||||
intent.putExtra(Constants.SIGN, userInfo.getSignature());
|
||||
intent.putExtra(Constants.SIGN, userInfo.getUser().getSignature());
|
||||
cameraUtil.startActivityForResult(intent, new ActivityResultCallback() {
|
||||
@Override
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String sign = intent.getStringExtra(Constants.SIGN);
|
||||
userInfo.setSignature(sign);
|
||||
userInfo.getUser().setSignature(sign);
|
||||
mSign.setText(sign);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
@ -430,7 +413,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
String[] times = userInfo.getBirthday().split("-");
|
||||
String[] times = userInfo.getUser().getBirthday().split("-");
|
||||
year = Integer.parseInt(times[0]);
|
||||
month = Integer.parseInt(times[1]) - 1;
|
||||
day = Integer.parseInt(times[2]);
|
||||
@ -463,11 +446,11 @@ public class EditProfileActivity extends AbsActivity {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
userInfo.setBirthday(strbir);
|
||||
userInfo.getUser().setBirthday(strbir);
|
||||
mBirthday.setText(strbir);
|
||||
|
||||
if (userInfo != null) {
|
||||
userInfo.setBirthday(strbir);
|
||||
userInfo.getUser().setBirthday(strbir);
|
||||
}
|
||||
|
||||
//showData(userInfo);
|
||||
@ -496,17 +479,15 @@ public class EditProfileActivity extends AbsActivity {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private void showData(IMLoginModel u, com.shayu.onetoone.bean.UserBean.UserInfo inf) {
|
||||
userInfo = u;
|
||||
info = inf;
|
||||
private void showData(UserBean u) {
|
||||
int index = 0;
|
||||
String birthday = userInfo.getBirthday();
|
||||
String location = userInfo.getLocation();
|
||||
String bindPhone = userInfo.getMobile();
|
||||
String birthday = userInfo.getUser().getBirthday();
|
||||
String location = userInfo.getUser().getLocation();
|
||||
String bindPhone = userInfo.getUser().getMobile();
|
||||
String sex = "";
|
||||
if (userInfo.getSex() == 1) {
|
||||
if (userInfo.getUser().getSex() == 1) {
|
||||
sex = mContext.getString(R.string.sex_male);
|
||||
} else if (userInfo.getSex() == 2) {
|
||||
} else if (userInfo.getUser().getSex() == 2) {
|
||||
sex = mContext.getString(R.string.sex_female);
|
||||
}
|
||||
if (!TextUtils.isEmpty(bindPhone)) {
|
||||
@ -521,25 +502,25 @@ public class EditProfileActivity extends AbsActivity {
|
||||
if (!TextUtils.isEmpty(sex)) {
|
||||
index = index + 1;
|
||||
}
|
||||
if (!userInfo.getAvatar().contains("http")) {
|
||||
ImgLoader.displayAvatar(mContext, CommonAppConfig.HOST + userInfo.getAvatar(), mAvatar);
|
||||
if (!userInfo.getUser().getAvatar().contains("http")) {
|
||||
ImgLoader.displayAvatar(mContext, CommonAppConfig.HOST + userInfo.getUser().getAvatar(), mAvatar);
|
||||
} else {
|
||||
ImgLoader.displayAvatar(mContext, userInfo.getAvatar(), mAvatar);
|
||||
ImgLoader.displayAvatar(mContext, userInfo.getUser().getAvatar(), mAvatar);
|
||||
}
|
||||
mName.setText(userInfo.getUserNicename());
|
||||
mSign.setText(userInfo.getSignature());
|
||||
mBirthday.setText(userInfo.getBirthday());
|
||||
if (userInfo.getSex() == 0) {
|
||||
mName.setText(userInfo.getUser().getUserNicename());
|
||||
mSign.setText(userInfo.getUser().getSignature());
|
||||
mBirthday.setText(userInfo.getUser().getBirthday());
|
||||
if (userInfo.getUser().getSex() == 0) {
|
||||
mSex.setText("");
|
||||
} else if (userInfo.getSex() == 1) {
|
||||
} else if (userInfo.getUser().getSex() == 1) {
|
||||
mSex.setText(R.string.sex_male);
|
||||
} else if (userInfo.getSex() == 2) {
|
||||
} else if (userInfo.getUser().getSex() == 2) {
|
||||
mSex.setText(R.string.sex_female);
|
||||
}
|
||||
tag.setText(info.getCn_label());
|
||||
mCity.setText(info.getArea());
|
||||
if (1 == userInfo.getIsBind()) {
|
||||
mobile = userInfo.getMobile();
|
||||
tag.setText(userInfo.getInfo().getCn_label());
|
||||
mCity.setText(userInfo.getInfo().getArea());
|
||||
if (1 == userInfo.getUser().getIsBind()) {
|
||||
mobile = userInfo.getUser().getMobile();
|
||||
tv_bind_phone.setText(mobile);
|
||||
isBind = "1";
|
||||
} else {
|
||||
@ -580,8 +561,8 @@ public class EditProfileActivity extends AbsActivity {
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
if (userInfo.getLoginType().equals("phone")) {
|
||||
mobile = userInfo.getMobile();
|
||||
if (userInfo.getUser().getLoginType().equals("phone")) {
|
||||
mobile = userInfo.getUser().getMobile();
|
||||
tv_bind_phone.setText(mobile);
|
||||
isBind = "1";
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user