作者 liming

修改ui

... ... @@ -167,16 +167,19 @@ public class InfromationActivity extends BaseMvpActivity<CommonPresenter, Person
public void getData(Object o, int api, int intent) {
if (api == 3 && intent == 1) {
UserBean bean = (UserBean) o;
if (bean.getUserName() != null)
if (bean.getUserName() != null) {
level += 1;
tvName.setText(bean.getUserName());
tvUser.setText(bean.getUserName());
if (bean.getCompany() != null)
tvName.setText(bean.getUserName());
tvUser.setText(bean.getUserName());
}
if (!TextUtils.isEmpty(bean.getCompany())) {
level += 1;
tvCompany.setText(bean.getCompany());
if (bean.getWebSite() != null && bean.getWebSite() != "")
tvCompany.setText(bean.getCompany());
}
if (bean.getWebSite() != null && bean.getWebSite() != "") {
level += 1;
tvWeb.setText(bean.getWebSite());
tvWeb.setText(bean.getWebSite());
}
if (bean.getSex() == 0) {
tvSex.setText("男");
level += 1;
... ... @@ -199,7 +202,7 @@ public class InfromationActivity extends BaseMvpActivity<CommonPresenter, Person
@Override
public void onError(Throwable e, int api) {
Log.e("Throwableaa",e.getMessage());
Log.e("Throwableaa", e.getMessage());
}
@Override
... ...
... ... @@ -100,14 +100,26 @@ public class MessageActivity extends BaseMvpActivity<CommonPresenter, PersonalMo
tvUser.setText(bean.getUserName());
}
Log.e("zhangtao:name", bean.getLoginName());
if (!TextUtils.isEmpty(bean.getHeadPic())) {
String headPic = SharedPrefrenceUtils.getString(this, "HeadPic");
if (!TextUtils.isEmpty(headPic))
Glide.with(this).load(headPic).into(imgUser);
} else {
Glide.with(this).load(bean.getHeadPic()).into(imgUser);
String reallHeader = SharedPrefrenceUtils.getString(MessageActivity.this, "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(MessageActivity.this, "HeadPic");
if (!TextUtils.isEmpty(headPic)) {
Glide.with(this).load(headPic).into(imgUser);
} else if (!TextUtils.isEmpty(reallHeader)) {
Glide.with(this).load(reallHeader).into(imgUser);
}else if(bean.getHeadPic() != null && !bean.getHeadPic().equals("")){
Glide.with(MessageActivity.this).load(bean.getHeadPic()).into(imgUser);
}
// if (!TextUtils.isEmpty(bean.getHeadPic())) {
// String headPic = SharedPrefrenceUtils.getString(this, "HeadPic");
// if (!TextUtils.isEmpty(headPic))
// Glide.with(this).load(headPic).into(imgUser);
//
// } else {
// Glide.with(this).load(bean.getHeadPic()).into(imgUser);
// }
}
if (api == 5 && intent == 1) {
MsgListBean bean = (MsgListBean) o;
... ...
package com.hh.xuetubao.activity.personal;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
... ... @@ -133,15 +134,27 @@ public class ResumeActivity extends BaseMvpActivity<CommonPresenter, PersonalMod
if (api == 7 && intent == 1) {
ResumeDetailBean bean = (ResumeDetailBean) o;
Log.e("ResumeDetailBean", bean.toString());
String reallHeader = SharedPrefrenceUtils.getString(this, "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(this, "HeadPic");
if (bean.getHeadPicUrl() != null) {
if (!TextUtils.isEmpty(headPic)) {
Glide.with(this).load(headPic).into(imgUser);
} else if (!TextUtils.isEmpty(reallHeader)) {
Glide.with(this).load(reallHeader).into(imgUser);
} else if (bean.getHeadPicUrl() != null) {
Log.e("getHeadPicUrl", bean.getHeadPicUrl());
Glide.with(this).load(bean.getHeadPicUrl()).into(imgUser);
} else {
Log.e("headPic", headPic);
if (headPic != null)
Glide.with(this).load(headPic).into(imgUser);
}
// if (bean.getHeadPicUrl() != null) {
// Log.e("getHeadPicUrl", bean.getHeadPicUrl());
// Glide.with(this).load(bean.getHeadPicUrl()).into(imgUser);
// } else {
// Log.e("headPic", headPic);
// if (headPic != null)
// Glide.with(this).load(headPic).into(imgUser);
// }
if (bean.getName() != null && !bean.getName().equals(""))
tvName.setText(bean.getName());
else tvName.setText("暂无");
... ...
... ... @@ -102,7 +102,6 @@ public class IntroduceFragment extends BaseMvpFragment<CommonPresenter, LearnMod
Event event = new Event(2, null, null, null, null, bean.getLessonCoverUrl());
EventBus.getDefault().postSticky(event);
}
}
}
... ...
... ... @@ -5,6 +5,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
... ... @@ -133,14 +134,26 @@ public class MineFragment extends BaseMvpFragment<CommonPresenter, PersonalModel
Log.e("getUserName", bean.getUserName().trim());
if (bean.getLoginName() != null)
SharedPrefrenceUtils.saveString(getActivity(), "LoginName", bean.getLoginName());
if (bean.getHeadPic() != null && !bean.getHeadPic().equals("")) {
String headPic = SharedPrefrenceUtils.getString(getActivity(), "HeadPic");
Glide.with(getActivity()).load(headPic).into(imgUser);
} else {
SharedPrefrenceUtils.saveString(getActivity(), "ReallHeader", bean.getHeadPic());
String reallHeader = SharedPrefrenceUtils.getString(getContext(), "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(getContext(), "HeadPic");
if (!TextUtils.isEmpty(headPic)) {
Glide.with(this).load(headPic).into(imgUser);
} else if (!TextUtils.isEmpty(reallHeader)) {
Glide.with(this).load(reallHeader).into(imgUser);
}else if(bean.getHeadPic() != null && !bean.getHeadPic().equals("")){
Glide.with(getActivity()).load(bean.getHeadPic()).into(imgUser);
}
// if (bean.getHeadPic() != null && !bean.getHeadPic().equals("")) {
// String headPic = SharedPrefrenceUtils.getString(getActivity(), "HeadPic");
// Glide.with(getActivity()).load(headPic).into(imgUser);
// } else {
// SharedPrefrenceUtils.saveString(getActivity(), "ReallHeader", bean.getHeadPic());
// Glide.with(getActivity()).load(bean.getHeadPic()).into(imgUser);
// }
}
}
... ...