udpate
This commit is contained in:
parent
96f21643b4
commit
5ed5b15737
@ -9,9 +9,9 @@ public class NewLevelModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("levemin")
|
||||
@SerializedName("levelmin")
|
||||
private String levemin;
|
||||
@SerializedName("levemax")
|
||||
@SerializedName("levelmax")
|
||||
private String levemax;
|
||||
@SerializedName("thumb")
|
||||
private String thumb;
|
||||
|
@ -5,6 +5,7 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/14.
|
||||
@ -56,6 +57,8 @@ public class UserBean implements Parcelable {
|
||||
private String mobile;
|
||||
private String front_task;
|
||||
private String is_admin;
|
||||
@SerializedName("user_love_num")
|
||||
private int praise;
|
||||
//是否隐藏
|
||||
private boolean isHide = false;
|
||||
|
||||
@ -363,6 +366,14 @@ public class UserBean implements Parcelable {
|
||||
return level;
|
||||
}
|
||||
|
||||
public int getPraise() {
|
||||
return praise;
|
||||
}
|
||||
|
||||
public void setPraise(int praise) {
|
||||
this.praise = praise;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
@ -115,8 +115,10 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
private ImageView mLiveIcon;
|
||||
private ImageView mLiveIcon2;
|
||||
private ImageView mNoble;
|
||||
private ImageView mNobleIcon;
|
||||
private ImageView mAvatar;
|
||||
private ImageView shawl;
|
||||
private ImageView honorIcon;
|
||||
private UserBean mUserBean;
|
||||
private LinearLayout mGuardLayout;
|
||||
private boolean mFollowing;
|
||||
@ -222,6 +224,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
mReport = mRootView.findViewById(R.id.btn_report);
|
||||
mGuardLayout = mRootView.findViewById(R.id.btn_guard);
|
||||
mGuard = mRootView.findViewById(R.id.guard_val);
|
||||
mNobleIcon = mRootView.findViewById(R.id.noble_icon);
|
||||
honorIcon = mRootView.findViewById(R.id.honor_icon);
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
@ -319,13 +323,54 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
mGuard.setText(String.format(mGuard.getText().toString(), guardNumber));
|
||||
mFansVal.setText(WordUtil.getString(R.string.fans) + ":" + mUserBean.getFans());
|
||||
mPraise.setText(WordUtil.getString(R.string.praise) + ":" + mUserBean.getPraise());
|
||||
mSignDesc.setText(mUserBean.getSignature());
|
||||
mNobleVal.setText(NobleUtil.nobleIdToStringName(Integer.parseInt(mUserBean.getNoble_id())));
|
||||
ImgLoader.displayAvatar(mContext, obj.getString("avatar"), mAvatar);
|
||||
JSONObject dress = obj.getJSONObject("dress");
|
||||
|
||||
if (obj.containsKey("level_thumb")) {
|
||||
ImgLoader.display(mContext, obj.getJSONObject("level_thumb").getString("icon"), mLiveIcon2);
|
||||
}else{
|
||||
mLiveIcon2.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (dress.containsKey("medal")) {
|
||||
JSONObject item = null;
|
||||
for (Object medal : dress.getJSONArray("medal")) {
|
||||
JSONObject _item = (JSONObject) medal;
|
||||
if (_item.getInteger("is_use") == 1) {
|
||||
item = _item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item != null) {
|
||||
String url = item.getString("display_src");
|
||||
if(url!=null) {
|
||||
url = url.replace("qny.shayucm.com", "downs.yaoulive.com");
|
||||
ImgLoader.display(mContext, url, mNobleIcon);
|
||||
}else{
|
||||
mNobleIcon.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
mNobleIcon.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (obj.containsKey("medal_no")) {
|
||||
JSONObject item = null;
|
||||
if (obj.getJSONArray("medal_no").size() > 0) {
|
||||
item = obj.getJSONArray("medal_no").getJSONObject(0);
|
||||
String url=item.getString("display_src");
|
||||
url = url.replace("qny.shayucm.com", "downs.yaoulive.com");
|
||||
ImgLoader.display(mContext, url, honorIcon);
|
||||
}
|
||||
}else{
|
||||
honorIcon.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
mFollowing = obj.getIntValue("isattention") == 1;
|
||||
updateFollow();
|
||||
//装扮相关
|
||||
JSONObject dress = obj.getJSONObject("dress");
|
||||
|
||||
if (dress.getJSONArray("wraps").size() >= 1) {
|
||||
JSONObject display = (JSONObject) dress.getJSONArray("wraps").get(0);
|
||||
ImgLoader.display(mContext, display.getString("display_src"), shawl);
|
||||
|
@ -354,9 +354,10 @@
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/noble_icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="invisible"
|
||||
android:visibility="visible"
|
||||
android:src="@mipmap/icon_chat_face" />
|
||||
|
||||
<LinearLayout
|
||||
@ -390,9 +391,10 @@
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/honor_icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="invisible"
|
||||
android:visibility="visible"
|
||||
android:src="@mipmap/icon_chat_face"/>
|
||||
|
||||
<LinearLayout
|
||||
|
Loading…
Reference in New Issue
Block a user