1、新版 我的 界面

This commit is contained in:
老皮 2024-09-10 16:08:07 +08:00
parent abfb8e74be
commit 25a926e507
19 changed files with 1243 additions and 104 deletions

View File

@ -87,4 +87,7 @@
<color name="gray_F4F4F4">#F4F4F4</color>
<color name="color_555555">#555555</color>
<color name="color_525252">#525252</color>
<color name="color_FF8D8D">#FF8D8D</color>
<color name="color_FF7CB6">#FF7CB6</color>
</resources>

View File

@ -17,6 +17,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -93,29 +94,18 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
private ImageView mAvatar;
private TextView mName, tv_level;
private ImageView mSex;
private ImageView mLevelAnchor;
private ImageView mLevel, img_setting;
private TextView mID;
private TextView mFollow;
private TextView mFans;
private boolean mPaused;
private RecyclerView mRecyclerView;
private MainMeAdapter mAdapter;
private TextView signature;
private TextView coin, gold, star_coin;//金豆,钻石,星币
private TextView btnCopy;
private SVGAImageView gift_svga;
private View v_noble;
private FrameLayout lt_noble;
// private LinearLayout btnUserNoble;
private ImageView user_noble_ico, good_nub_ico, img_lv_pic;
private TextView user_noble_text, user_noble_time, tv_setting;
private ImageView user_noble_ico;
private TextView user_noble_text, user_noble_time;
private UserItemBean beanStetting = null, beanKefu = null;
private boolean firstInto = true;
private Banner banner_me;
private LinearLayout lt_advertisement;
private View redPoint;
private CardView lt_advertisement;
public MainMeViewHolder(Context context, ViewGroup parentView) {
super(context, parentView);
@ -123,14 +113,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
@Override
protected int getLayoutId() {
return R.layout.view_main_me;
return R.layout.view_new_main_me;
}
@SuppressLint("WrongViewCast")
@Override
public void init() {
mAvatar = (ImageView) findViewById(R.id.avatar);
redPoint = findViewById(R.id.red_point);
ViewClicksAntiShake.clicksAntiShake(mAvatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
@ -141,69 +130,52 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
mName = (TextView) findViewById(R.id.name);
gift_svga = (SVGAImageView) findViewById(com.yunbao.live.R.id.gift_svga);
ViewClicksAntiShake.clicksAntiShake(gift_svga, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
MobclickAgent.onEvent(mContext, "my_avatar", "个人头像按钮");
RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
}
});
user_noble_ico = (ImageView) findViewById(R.id.user_noble_ico);
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
mLevel = (ImageView) findViewById(R.id.level);
tv_level = (TextView) findViewById(R.id.tv_level);
good_nub_ico = (ImageView) findViewById(R.id.good_nub_ico);
mID = (TextView) findViewById(R.id.id_val);
signature = (TextView) findViewById(R.id.signature);
coin = (TextView) findViewById(R.id.coin);
star_coin = (TextView) findViewById(R.id.star_coin);
gold = (TextView) findViewById(R.id.gold);
btnCopy = (TextView) findViewById(R.id.btn_copy);
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
img_setting = (ImageView) findViewById(R.id.img_setting);
v_noble = (View) findViewById(R.id.v_noble);
lt_noble = (FrameLayout) findViewById(R.id.lt_noble);
user_noble_time = (TextView) findViewById(R.id.user_noble_time);
banner_me = (Banner) findViewById(R.id.banner_me);
lt_advertisement = (LinearLayout) findViewById(R.id.lt_advertisement);
img_lv_pic = (ImageView) findViewById(R.id.img_lv_pic);
tv_setting = (TextView) findViewById(R.id.tv_setting);
lt_advertisement = (CardView) findViewById(R.id.lt_advertisement);
findViewById(R.id.lt_star_coin).setOnClickListener(this);
findViewById(R.id.btn_coin).setOnClickListener(this);
findViewById(R.id.btn_gold).setOnClickListener(this);
findViewById(R.id.rt_kefu).setOnClickListener(this);
findViewById(R.id.rt_setting).setOnClickListener(this);
findViewById(R.id.lt_noble).setOnClickListener(this);
findViewById(R.id.lt_name).setOnClickListener(this);
findViewById(R.id.signature).setOnClickListener(this);
findViewById(R.id.lt_guard).setOnClickListener(this);
btnCopy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
cm.setText(mID.getText() + "");
Toast.makeText(mContext, "複製成功", Toast.LENGTH_SHORT).show();
}
});
findViewById(R.id.name).setOnClickListener(this);
findViewById(R.id.btn_edit).setOnClickListener(this);
//贵族中心 guizu_center_tv,user_noble_ico,user_noble_text,user_noble_time
findViewById(R.id.guizu_center_tv).setOnClickListener(this);
findViewById(R.id.user_noble_ico).setOnClickListener(this);
findViewById(R.id.user_noble_text).setOnClickListener(this);
findViewById(R.id.user_noble_time).setOnClickListener(this);
// 守护 shouhu_center,shouhu_center_iv,shouhu_center_tv,shouhu_center_tv2
findViewById(R.id.shouhu_center).setOnClickListener(this);
findViewById(R.id.shouhu_center_iv).setOnClickListener(this);
findViewById(R.id.shouhu_center_tv).setOnClickListener(this);
findViewById(R.id.shouhu_center_tv2).setOnClickListener(this);
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false));
banner_me.setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
}
});
redPoint.setVisibility(APKManager.get().getApkVerNew() ? View.GONE : View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.complete_information), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
}
});
}
@Override
@ -307,6 +279,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
}
}
showBanner();
ImgLoader.displayAvatar(mContext, u.getAvatar(), mAvatar);
mName.setText(u.getUserNiceName());
if (!"0".endsWith(u.getNoble_id())) {
@ -325,44 +298,18 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
}
}
signature.setText(singnature);
CommonAppConfig appConfig = CommonAppConfig.getInstance();
if (u.getDress().getAvatar_frame() != null) {
if (u.getDress().getAvatar_frame().contains("svga")) {
try {
new SVGAParser(mContext).parse(new URL(u.getDress().getAvatar_frame()), new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
SVGADrawable drawable = new SVGADrawable(videoItem);
gift_svga.setImageDrawable(drawable);
SVGAViewUtils.playEndClear(gift_svga, false);
}
@Override
public void onError() {
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}
} else {
ImgLoader.display(mContext, u.getDress().getAvatar_frame(), gift_svga);
}
}
if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal());
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.icon_vip_gold);
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.gui);
} else {
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
user_noble_ico.setImageResource(R.mipmap.gui);
}
if ("C".equals(u.getUsers_type())) {
Constants.isAnchor = true;
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
//主播等级
tv_level.setOnClickListener(new View.OnClickListener() {
@Override
@ -372,14 +319,14 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
ZhuangBanActivity.forward(mContext, url);
}
});
tv_level.setText(u.getLevel() + "");
tv_level.setText("LV " + u.getLevel() );
} else {
Constants.isAnchor = false;
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
@Override
public void onLoadSuccess(Drawable drawable) {
ImgLoader.display2(mContext, drawable, mLevel);
// ImgLoader.display2(mContext, drawable, mLevel);
}
@Override
@ -396,15 +343,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
ZhuangBanActivity.forward(mContext, url);
}
});
tv_level.setText(u.getLevel() + "");
tv_level.setText("LV " + u.getLevel() );
}
//修改靓号图标 个人中心
if (u.getGoodnum() != null && !u.getGoodnum().equals("")) {
good_nub_ico.setVisibility(View.VISIBLE);
mID.setText(" " + u.getGoodnum());
} else {
good_nub_ico.setVisibility(View.GONE);
mID.setText(u.getLiangNameTip());
}
if (list != null && list.size() > 0) {
@ -428,20 +373,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
}
if (beanKefu != null) {
}
if (beanStetting != null) {
ImgLoader.display(mContext, beanStetting.getThumb(), img_setting);
tv_setting.setText(beanStetting.getName());
}
Constants.myUid = u.getGoodnum();
Constants.myAvatar = u.getAvatar();
if (u.getUserInfoComplete() == 1) {
findViewById(R.id.complete_information_radius).setVisibility(View.INVISIBLE);
findViewById(R.id.complete_information).setVisibility(View.INVISIBLE);
} else {
findViewById(R.id.complete_information_radius).setVisibility(View.VISIBLE);
findViewById(R.id.complete_information).setVisibility(View.VISIBLE);
}
EventBus.getDefault().post(new CompleteInformationEvent().setCompleteInformation(findViewById(R.id.complete_information).getVisibility() == View.VISIBLE));
}
@Override
@ -523,7 +456,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
public void onClick(View v) {
int i = v.getId();
if (i == R.id.lt_name) {
if (i == R.id.btn_edit || i == R.id.name) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
} else if (i == R.id.signature) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
@ -546,13 +479,15 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
WebViewActivity.forward(mContext, beanKefu.getHref(), false);
} else if (i == R.id.rt_setting) {
forwardSetting();
} else if (i == R.id.lt_noble) {
} else if (i == R.id.guizu_center_tv || i == R.id.user_noble_ico || i == R.id.user_noble_text || i == R.id.user_noble_time) {
//贵族中心 guizu_center_tv,user_noble_ico,user_noble_text,user_noble_time
MobclickAgent.onEvent(mContext, "my_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() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url, false);
} else if (i == R.id.lt_guard) {
} else if (i == R.id.shouhu_center || i == R.id.shouhu_center_iv || i == R.id.shouhu_center_tv || i == R.id.shouhu_center_tv2) {
// 守护 shouhu_center,shouhu_center_iv,shouhu_center_tv,shouhu_center_tv2
MobclickAgent.onEvent(mContext, "my_guard_btn", "我的-守护点击次数及人数");
Constants.isTitle = true;
UserBean u = CommonAppConfig.getInstance().getUserBean();

View File

@ -0,0 +1,701 @@
package com.yunbao.main.views;
import android.annotation.SuppressLint;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Outline;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ms.banner.Banner;
import com.ms.banner.BannerConfig;
import com.ms.banner.listener.OnBannerClickListener;
import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.GoogleBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.UserItemBean;
import com.yunbao.common.event.CompleteInformationEvent;
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.utils.MobclickAgent;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.LiveRecordActivity;
import com.yunbao.live.activity.RoomManageActivity;
import com.yunbao.live.activity.WebViewActivityMedal;
import com.yunbao.live.bean.SlideBean;
import com.yunbao.live.utils.LiveTextRender;
import com.yunbao.live.views.CustomMyViewHolder;
import com.yunbao.main.R;
import com.yunbao.main.activity.EditProfileActivity;
import com.yunbao.main.activity.FansActivity;
import com.yunbao.main.activity.FollowActivity;
import com.yunbao.main.activity.MyProfitActivity;
import com.yunbao.main.activity.MyVideoActivity;
import com.yunbao.main.activity.MyWalletActivity;
import com.yunbao.main.activity.RewardActivity;
import com.yunbao.main.activity.SettingActivity;
import com.yunbao.main.activity.ThreeDistributActivity;
import com.yunbao.main.activity.ZhuangBanActivity;
import com.yunbao.main.adapter.MainMeAdapter;
import com.yunbao.main.http.MainHttpConsts;
import com.yunbao.main.http.MainHttpUtil;
import org.greenrobot.eventbus.EventBus;
import java.math.BigDecimal;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
/**
* Created by cxf on 2018/9/22.
* 我的
*/
public class MainMeViewHolder_PD extends AbsMainViewHolder implements OnItemClickListener<UserItemBean>, View.OnClickListener {
private ImageView mAvatar;
private TextView mName, tv_level;
private ImageView mSex;
private ImageView mLevelAnchor;
private ImageView mLevel, img_setting;
private TextView mID;
private TextView mFollow;
private TextView mFans;
private boolean mPaused;
private RecyclerView mRecyclerView;
private MainMeAdapter mAdapter;
private TextView signature;
private TextView coin, gold, star_coin;//金豆,钻石,星币
private TextView btnCopy;
private SVGAImageView gift_svga;
private View v_noble;
private FrameLayout lt_noble;
// private LinearLayout btnUserNoble;
private ImageView user_noble_ico, good_nub_ico, img_lv_pic;
private TextView user_noble_text, user_noble_time, tv_setting;
private UserItemBean beanStetting = null, beanKefu = null;
private boolean firstInto = true;
private Banner banner_me;
private LinearLayout lt_advertisement;
private View redPoint;
public MainMeViewHolder_PD(Context context, ViewGroup parentView) {
super(context, parentView);
}
@Override
protected int getLayoutId() {
return R.layout.view_main_me;
}
@SuppressLint("WrongViewCast")
@Override
public void init() {
mAvatar = (ImageView) findViewById(R.id.avatar);
redPoint = findViewById(R.id.red_point);
ViewClicksAntiShake.clicksAntiShake(mAvatar, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
MobclickAgent.onEvent(mContext, "my_avatar", "个人头像按钮");
RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
}
});
mName = (TextView) findViewById(R.id.name);
gift_svga = (SVGAImageView) findViewById(com.yunbao.live.R.id.gift_svga);
ViewClicksAntiShake.clicksAntiShake(gift_svga, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
MobclickAgent.onEvent(mContext, "my_avatar", "个人头像按钮");
RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
}
});
user_noble_ico = (ImageView) findViewById(R.id.user_noble_ico);
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
mLevel = (ImageView) findViewById(R.id.level);
tv_level = (TextView) findViewById(R.id.tv_level);
good_nub_ico = (ImageView) findViewById(R.id.good_nub_ico);
mID = (TextView) findViewById(R.id.id_val);
signature = (TextView) findViewById(R.id.signature);
coin = (TextView) findViewById(R.id.coin);
star_coin = (TextView) findViewById(R.id.star_coin);
gold = (TextView) findViewById(R.id.gold);
btnCopy = (TextView) findViewById(R.id.btn_copy);
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
img_setting = (ImageView) findViewById(R.id.img_setting);
v_noble = (View) findViewById(R.id.v_noble);
lt_noble = (FrameLayout) findViewById(R.id.lt_noble);
user_noble_time = (TextView) findViewById(R.id.user_noble_time);
banner_me = (Banner) findViewById(R.id.banner_me);
lt_advertisement = (LinearLayout) findViewById(R.id.lt_advertisement);
img_lv_pic = (ImageView) findViewById(R.id.img_lv_pic);
tv_setting = (TextView) findViewById(R.id.tv_setting);
findViewById(R.id.lt_star_coin).setOnClickListener(this);
findViewById(R.id.btn_coin).setOnClickListener(this);
findViewById(R.id.btn_gold).setOnClickListener(this);
findViewById(R.id.rt_kefu).setOnClickListener(this);
findViewById(R.id.rt_setting).setOnClickListener(this);
findViewById(R.id.lt_noble).setOnClickListener(this);
findViewById(R.id.lt_name).setOnClickListener(this);
findViewById(R.id.signature).setOnClickListener(this);
findViewById(R.id.lt_guard).setOnClickListener(this);
btnCopy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
cm.setText(mID.getText() + "");
Toast.makeText(mContext, "複製成功", Toast.LENGTH_SHORT).show();
}
});
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false));
banner_me.setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
}
});
redPoint.setVisibility(APKManager.get().getApkVerNew() ? View.GONE : View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.complete_information), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
}
});
}
@Override
public void onPause() {
super.onPause();
mPaused = true;
}
@Override
public void onResume() {
super.onResume();
if (isShowed() && mPaused) {
loadData();
}
mPaused = false;
}
@Override
public void onDestroy() {
super.onDestroy();
MainHttpUtil.cancel(MainHttpConsts.GET_BASE_INFO);
}
@Override
public void loadData() {
MainHttpUtil.getGoogle(mCallback1);
MainHttpUtil.getBaseInfo(mCallback);
MainHttpUtil.getBalance(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
JSONObject obj = JSONObject.parseObject(info[0]);
String golds = obj.getString("gold");
String coins = obj.getString("coin");
String yuanbaos = obj.getString("yuanbao");
if (golds.length() > 8) {
gold.setText(golds.substring(0, golds.length() - 6) + "M");
} else if (golds.length() > 6) {
gold.setText(golds.substring(0, golds.length() - 3) + "K");
} else {
gold.setText(golds);
}
if (coins.length() > 8) {
coin.setText(coins.substring(0, coins.length() - 6) + "M");
} else if (coins.length() > 6) {
coin.setText(coins.substring(0, coins.length() - 3) + "K");
} else {
coin.setText(coins);
}
BigDecimal yuanbao = new BigDecimal(yuanbaos);
String yuanbaoStr = String.valueOf(yuanbao.intValue());
if (yuanbaoStr.length() > 9) {
star_coin.setText(yuanbaoStr.substring(0, yuanbaoStr.length() - 6) + "M");
} else if (yuanbaoStr.length() > 7) {
star_coin.setText(yuanbaoStr.substring(0, yuanbaoStr.length() - 3) + "K");
} else {
star_coin.setText(yuanbaos);
}
} else {
ToastUtil.show(msg);
}
}
});
}
//获取谷歌
//谷歌支付是否打开 1是打开 0 关闭
String Is_hide = "1";
private CommonCallback<GoogleBean> mCallback1 = new CommonCallback<GoogleBean>() {
@Override
public void callback(GoogleBean bean) {
if (bean != null) {
Is_hide = bean.getIs_hide();
}
}
};
private CommonCallback<UserBean> mCallback = new CommonCallback<UserBean>() {
@Override
public void callback(UserBean bean) {
List<UserItemBean> list = CommonAppConfig.getInstance().getUserItemList();
if (bean != null) {
showData(bean, list);
}
}
};
private List<SlideBean> mBannerListNew = new ArrayList<>();
private void showData(UserBean u, List<UserItemBean> list) {
mBannerList.clear();
mBannerListNew.clear();
if (!StringUtil.isEmpty(u.getSlide())) {
mBannerListNew.addAll(JSON.parseArray(u.getSlide(), SlideBean.class));
for (SlideBean bean : mBannerListNew) {
if (bean.getSlide_status().equals("1")) {
mBannerList.add(bean);
}
}
}
showBanner();
ImgLoader.displayAvatar(mContext, u.getAvatar(), mAvatar);
mName.setText(u.getUserNiceName());
if (!"0".endsWith(u.getNoble_id())) {
user_noble_text.setText(u.getNoble_name());
user_noble_time.setText(u.getNoble_end_time());
} else {
user_noble_text.setText(WordUtil.isNewZh() ? "貴族中心" : "VIP Center");
user_noble_time.setText(mContext.getResources().getString(R.string.open_noble_text));
}
String singnature = u.getSignature();
if (TextUtils.equals(singnature, "這個人很懶,什麼也沒留下") || TextUtils.equals(singnature, "这家伙很懒,什么都没留下") || TextUtils.isEmpty(singnature)) {
if (WordUtil.isNewZh()) {
singnature = "這個人很懶,什麼也沒留下";
} else {
singnature = "The guy was lazy and didn't write anything.";
}
}
signature.setText(singnature);
CommonAppConfig appConfig = CommonAppConfig.getInstance();
if (u.getDress().getAvatar_frame() != null) {
if (u.getDress().getAvatar_frame().contains("svga")) {
try {
new SVGAParser(mContext).parse(new URL(u.getDress().getAvatar_frame()), new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
SVGADrawable drawable = new SVGADrawable(videoItem);
gift_svga.setImageDrawable(drawable);
SVGAViewUtils.playEndClear(gift_svga, false);
}
@Override
public void onError() {
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}
} else {
ImgLoader.display(mContext, u.getDress().getAvatar_frame(), gift_svga);
}
}
if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal());
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.icon_vip_gold);
} else {
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
}
if ("C".equals(u.getUsers_type())) {
Constants.isAnchor = true;
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
//主播等级
tv_level.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MobclickAgent.onEvent(mContext, "my_top_level", "个人中心最上面的等级");
String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&for";
ZhuangBanActivity.forward(mContext, url);
}
});
tv_level.setText(u.getLevel() + "");
} else {
Constants.isAnchor = false;
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
@Override
public void onLoadSuccess(Drawable drawable) {
ImgLoader.display2(mContext, drawable, mLevel);
}
@Override
public void onLoadFailed() {
}
});
//用户等级
tv_level.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MobclickAgent.onEvent(mContext, "my_top_level", "个人中心最上面的等级");
String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
ZhuangBanActivity.forward(mContext, url);
}
});
tv_level.setText(u.getLevel() + "");
}
//修改靓号图标 个人中心
if (u.getGoodnum() != null && !u.getGoodnum().equals("")) {
good_nub_ico.setVisibility(View.VISIBLE);
mID.setText(" " + u.getGoodnum());
} else {
good_nub_ico.setVisibility(View.GONE);
mID.setText(u.getLiangNameTip());
}
if (list != null && list.size() > 0) {
List<UserItemBean> listNow = new ArrayList<>();
for (UserItemBean userItemBean : list) {
if (userItemBean.getId() != 21 && userItemBean.getId() != 13) {
listNow.add(userItemBean);
} else if (userItemBean.getId() == 21) {
beanKefu = userItemBean;
} else if (userItemBean.getId() == 13) {
beanStetting = userItemBean;
}
}
if (mAdapter == null) {
mAdapter = new MainMeAdapter(mContext, listNow);
mAdapter.setOnItemClickListener(this);
mRecyclerView.setAdapter(mAdapter);
} else {
mAdapter.setList(listNow);
}
}
if (beanKefu != null) {
}
if (beanStetting != null) {
ImgLoader.display(mContext, beanStetting.getThumb(), img_setting);
tv_setting.setText(beanStetting.getName());
}
Constants.myUid = u.getGoodnum();
Constants.myAvatar = u.getAvatar();
if (u.getUserInfoComplete() == 1) {
findViewById(R.id.complete_information_radius).setVisibility(View.INVISIBLE);
findViewById(R.id.complete_information).setVisibility(View.INVISIBLE);
} else {
findViewById(R.id.complete_information_radius).setVisibility(View.VISIBLE);
findViewById(R.id.complete_information).setVisibility(View.VISIBLE);
}
EventBus.getDefault().post(new CompleteInformationEvent().setCompleteInformation(findViewById(R.id.complete_information).getVisibility() == View.VISIBLE));
}
@Override
public void onItemClick(UserItemBean bean, int position) {
String url = bean.getHref();
if (TextUtils.isEmpty(url)) {
switch (bean.getId()) {
case 1:
forwardProfit();
break;
case 2:
MobclickAgent.onEvent(mContext, "my_wallet", "个人中心点钱包");
forwardCoin();
break;
case 13:
// forwardSetting();
break;
case 19:
forwardMyVideo();
break;
case 20:
MobclickAgent.onEvent(mContext, "my_room", "个人中心点房间管理");
forwardRoomManage();
break;
case 26:
case 17:
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
break;
}
} else {
//21 在线客服
Log.i("tag", bean.getId() + "");
if (bean.getId() == 8) {//三级分销
ThreeDistributActivity.forward(mContext, bean.getName(), url);
} else {
if (bean.getId() == 31) {
MobclickAgent.onEvent(mContext, "my_medal", "个人中心点勋章");
//跳转网页版粉丝徽章
WebViewActivityMedal.forward(mContext, url);
} else if (bean.getId() == 5) {
MobclickAgent.onEvent(mContext, "my_decorate", "个人中心点装扮");
Constants.isTitle = true;
ZhuangBanActivity.forward(mContext, CommonAppConfig.HOST + "/h5/Personality.html");
} else if (bean.getId() == 23) { //獎勵中心
MobclickAgent.onEvent(mContext, "my_award", "獎勵中心");
Log.i("tsa", url);
RewardActivity.forward(mContext, url);
} else if (bean.getId() == 4) {
url = HtmlConfig.SHOP + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
WebViewActivity.forward(mContext, url, false);
} else if (bean.getId() == 3) {//我的等级
MobclickAgent.onEvent(mContext, "my_level", "个人中心点我的等级");
Constants.myIntoIndex = 2;
Constants.isTitle = false;
ZhuangBanActivity.forward(mContext, url);
} else {
if (bean.getId() == 11) {
MobclickAgent.onEvent(mContext, "my_anchor", "个人中心点主播中心");
}
if (bean.getId() == 25) {
MobclickAgent.onEvent(mContext, "my_friend_invitation", "个人中心点好友邀请");
}
if (bean.getId() == 24) {
MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹");
}
if (bean.getId() == 17 || bean.getId() == 26) {
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
} else
WebViewActivity.forward(mContext, url, false);
}
}
}
}
@Override
public void onClick(View v) {
int i = v.getId();
if (i == R.id.lt_name) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
} else if (i == R.id.signature) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
} else if (i == R.id.lt_star_coin) {
Map<String, String> map_ekv = new HashMap<String, String>();
map_ekv.put("from", "xb");
MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
} else if (i == R.id.btn_coin) {
Map<String, String> map_ekv = new HashMap<String, String>();
map_ekv.put("from", "zs");
MobclickAgent.onEvent(mContext, "my_recharge", map_ekv);
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
} else if (i == R.id.btn_gold) {
MobclickAgent.onEvent(mContext, "my_receive", "充值旁边领取金豆的按钮");
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index";
RewardActivity.forward(mContext, url);
} else if (i == R.id.rt_kefu) {
WebViewActivity.forward(mContext, beanKefu.getHref(), false);
} else if (i == R.id.rt_setting) {
forwardSetting();
} else if (i == R.id.lt_noble) {
MobclickAgent.onEvent(mContext, "my_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() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url, false);
} else if (i == R.id.lt_guard) {
MobclickAgent.onEvent(mContext, "my_guard_btn", "我的-守护点击次数及人数");
Constants.isTitle = true;
UserBean u = CommonAppConfig.getInstance().getUserBean();
String url = CommonAppConfig.HOST + "/h5/Guard/index.html?token=" + CommonAppConfig.getInstance().getToken()
+ "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url, false);
}
}
/**
* 编辑个人资料
*/
private void forwardEditProfile() {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
}
/**
* 我的关注
*/
private void forwardFollow() {
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
}
/**
* 我的粉丝
*/
private void forwardFans() {
FansActivity.forward(mContext, CommonAppConfig.getInstance().getUid());
}
/**
* 直播记录
*/
private void forwardLiveRecord() {
LiveRecordActivity.forward(mContext, CommonAppConfig.getInstance().getUserBean());
}
/**
* 我的收益
*/
private void forwardProfit() {
mContext.startActivity(new Intent(mContext, MyProfitActivity.class));
}
/**
* 我的钻石
*/
private void forwardCoin() {
RouteUtil.forwardMyCoin(mContext);
}
/**
* 设置
*/
private void forwardSetting() {
mContext.startActivity(new Intent(mContext, SettingActivity.class));
}
/**
* 我的视频
*/
private void forwardMyVideo() {
mContext.startActivity(new Intent(mContext, MyVideoActivity.class));
}
/**
* 房间管理
*/
private void forwardRoomManage() {
mContext.startActivity(new Intent(mContext, RoomManageActivity.class));
}
public static List<SlideBean> mBannerList = new ArrayList<>();
private void showBanner() {
if (mBannerList == null || mBannerList.size() <= 0 || banner_me == null) {
lt_advertisement.setVisibility(View.GONE);
return;
}
lt_advertisement.setVisibility(View.VISIBLE);
if (mBannerList.size() == 1) {
banner_me.setAutoPlay(false)
.setPages(mBannerList, new CustomMyViewHolder())
.setDelayTime(3000)
.setBannerStyle(BannerConfig.NOT_INDICATOR)
.setOnBannerClickListener(new OnBannerClickListener() {
@Override
public void onBannerClick(List datas, int p) {
if (mBannerList != null) {
if (p >= 0 && p < mBannerList.size()) {
SlideBean bean = mBannerList.get(p);
if (!bean.getSlide_url().equals("")) {
Constants.isTitle = true;
String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
WebViewActivity.forward(mContext, url, false, false);
Map<String, String> map_ekv = new HashMap<String, String>();
map_ekv.put("link", url);
MobclickAgent.onEvent(mContext, "my_banner", map_ekv);
}
}
}
}
})
.start();
} else {
banner_me.setAutoPlay(true)
.setPages(mBannerList, new CustomMyViewHolder())
.setDelayTime(3000)
.setBannerStyle(BannerConfig.NOT_INDICATOR)
.setOnBannerClickListener(new OnBannerClickListener() {
@Override
public void onBannerClick(List datas, int p) {
if (mBannerList != null) {
if (p >= 0 && p < mBannerList.size()) {
SlideBean bean = mBannerList.get(p);
if (!bean.getSlide_url().equals("")) {
Constants.isTitle = true;
String url = bean.getSlide_url() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
RouteUtil.forwardCustomerService(url);
Map<String, String> map_ekv = new HashMap<String, String>();
map_ekv.put("link", url);
MobclickAgent.onEvent(mContext, "my_banner", map_ekv);
/*if(bean.getSlide_id().equals("95")){
RouteUtil.forwardCustomerService(url);
}else {
ZhuangBanActivity.forward(mContext, url, false);
}*/
}
}
}
}
})
.start();
}
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/white"/>
<corners android:topLeftRadius="29dp" android:topRightRadius="29dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="0dp"/>
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#fffff8ef" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#fffff4fd"/>
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="0.5dp" android:color="#ffb4b4b4" />
<solid android:color="#ffffffff" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>

View File

@ -0,0 +1,477 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/backgroup_iv"
android:layout_width="match_parent"
android:layout_height="240dp"
android:scaleType="fitXY"
android:src="@mipmap/bg1"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/rt_setting"
android:layout_width="29dp"
android:layout_height="29dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="15dp"
android:src="@mipmap/shezhi"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<androidx.cardview.widget.CardView
android:id="@+id/btn_coin"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginStart="16dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="15dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@id/rt_setting"
app:layout_constraintEnd_toStartOf="@id/lt_star_coin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/rt_setting">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv1"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="6dp"
android:src="@mipmap/image_3120"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<ImageView
android:id="@+id/btn_coin"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/jiahao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<TextView
android:id="@+id/coin"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:gravity="center"
android:textColor="@color/black2"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btn_coin"
app:layout_constraintStart_toEndOf="@id/iv1"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/lt_star_coin"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginStart="5dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="15dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@id/rt_setting"
app:layout_constraintEnd_toStartOf="@id/btn_gold"
app:layout_constraintStart_toEndOf="@id/btn_coin"
app:layout_constraintTop_toTopOf="@id/rt_setting">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv1"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="6dp"
android:src="@mipmap/subtract"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<ImageView
android:id="@+id/lt_star_coin"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/jiahao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<TextView
android:id="@+id/star_coin"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:gravity="center"
android:textColor="@color/black2"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/lt_star_coin"
app:layout_constraintStart_toEndOf="@id/iv1"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/btn_gold"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="17dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="15dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@id/rt_setting"
app:layout_constraintEnd_toStartOf="@id/rt_setting"
app:layout_constraintStart_toEndOf="@id/lt_star_coin"
app:layout_constraintTop_toTopOf="@id/rt_setting">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv1"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="6dp"
android:src="@mipmap/image"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<ImageView
android:id="@+id/btn_gold"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="8dp"
android:src="@mipmap/jiahao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,DuplicateIds" />
<TextView
android:id="@+id/gold"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:gravity="center"
android:textColor="@color/black2"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btn_gold"
app:layout_constraintStart_toEndOf="@id/iv1"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:scrollbars="none"
app:layout_constraintTop_toBottomOf="@id/rt_setting">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="30dp"
>
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="86dp"
android:layout_height="86dp"
android:layout_marginStart="18dp"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:riv_border_color="#FFFFFF"
app:riv_border_width="2dp"
app:riv_oval="true" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="10dp"
android:text="用戶名稱"
android:textColor="@color/black2"
android:textSize="19sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/avatar"
app:layout_constraintTop_toTopOf="@id/avatar" />
/>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="8dp"
android:src="@mipmap/xiugai"
android:id="@+id/btn_edit"
app:layout_constraintBottom_toBottomOf="@id/name"
app:layout_constraintStart_toEndOf="@id/name"
app:layout_constraintTop_toTopOf="@id/name"
tools:ignore="ContentDescription" />
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="17dp"
app:layout_constraintBottom_toBottomOf="@id/avatar"
app:layout_constraintStart_toStartOf="@id/name"
android:layout_marginBottom="16dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/color_FF8D8D"
app:cardCornerRadius="10dp"
android:id="@+id/user_card_id"
android:minWidth="51dp"
>
<TextView
android:id="@+id/id_val"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:gravity="center"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="11sp" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="17dp"
app:layout_constraintBottom_toBottomOf="@id/user_card_id"
app:layout_constraintStart_toEndOf="@id/user_card_id"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/color_FF7CB6"
android:layout_marginStart="6dp"
app:cardCornerRadius="10dp"
android:id="@+id/user_card_level"
android:minWidth="36dp"
>
<TextView
android:id="@+id/tv_level"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:gravity="center"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="11sp" />
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/new_me_shape"
app:layout_constraintTop_toBottomOf="@id/avatar"
android:layout_marginTop="16dp"
app:layout_constraintBottom_toBottomOf="@id/lt_advertisement"
android:id="@+id/background_tv"
/>
<TextView
android:layout_width="0dp"
android:layout_height="78dp"
android:background="@drawable/new_me_shape_1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/background_tv"
app:layout_constraintEnd_toStartOf="@id/shouhu_center"
android:id="@+id/guizu_center_tv"
android:layout_marginStart="16dp"
android:layout_marginEnd="5dp"
android:layout_marginTop="15dp"
/>
<ImageView
android:layout_width="43dp"
android:layout_height="43dp"
android:src="@mipmap/gui"
app:layout_constraintTop_toTopOf="@id/guizu_center_tv"
app:layout_constraintBottom_toBottomOf="@id/guizu_center_tv"
app:layout_constraintStart_toStartOf="@id/guizu_center_tv"
android:layout_marginStart="14dp"
android:id="@+id/user_noble_ico"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="貴族中心"
android:id="@+id/user_noble_text"
android:textColor="#ff000000"
android:textSize="15sp"
app:layout_constraintTop_toTopOf="@id/user_noble_ico"
app:layout_constraintStart_toEndOf="@id/user_noble_ico"
android:layout_marginStart="10dp"
/>
<TextView
android:id="@+id/user_noble_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/open_noble_text"
android:textColor="#000000"
android:textSize="10sp"
app:layout_constraintStart_toEndOf="@id/user_noble_ico"
android:layout_marginStart="10dp"
android:layout_marginBottom="5dp"
app:layout_constraintEnd_toEndOf="@id/guizu_center_tv"
app:layout_constraintTop_toBottomOf="@id/user_noble_text"
android:layout_marginEnd="5dp"
android:layout_marginTop="5dp"
/>
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lt_guard"
app:constraint_referenced_ids="shouhu_center,shouhu_center_iv,shouhu_center_tv,shouhu_center_tv2"
/>
<TextView
android:layout_width="0dp"
android:layout_height="78dp"
android:background="@drawable/new_me_shape_2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/guizu_center_tv"
app:layout_constraintStart_toEndOf="@id/guizu_center_tv"
android:id="@+id/shouhu_center"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
/>
<ImageView
android:layout_width="43dp"
android:layout_height="43dp"
android:src="@mipmap/shouhu"
app:layout_constraintTop_toTopOf="@id/shouhu_center"
app:layout_constraintBottom_toBottomOf="@id/shouhu_center"
app:layout_constraintStart_toStartOf="@id/shouhu_center"
android:layout_marginStart="14dp"
android:id="@+id/shouhu_center_iv"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/live_guard"
android:textColor="#ff000000"
android:textSize="15sp"
app:layout_constraintTop_toTopOf="@id/shouhu_center_iv"
app:layout_constraintStart_toEndOf="@id/shouhu_center_iv"
android:layout_marginStart="10dp"
android:id="@+id/shouhu_center_tv"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/guard_for_your_beloved_one"
android:textColor="#000000"
android:textSize="10sp"
app:layout_constraintStart_toEndOf="@id/shouhu_center_iv"
android:layout_marginStart="10dp"
android:id="@+id/shouhu_center_tv2"
app:layout_constraintEnd_toEndOf="@id/shouhu_center"
app:layout_constraintTop_toBottomOf="@id/shouhu_center_tv"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
app:layout_constraintTop_toBottomOf="@id/guizu_center_tv"
android:focusable="false"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/new_me_shape_line"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<androidx.cardview.widget.CardView
android:id="@+id/lt_advertisement"
android:layout_width="match_parent"
android:layout_height="107dp"
app:layout_constraintTop_toBottomOf="@id/recyclerView"
android:layout_marginTop="14dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
app:cardBackgroundColor="@color/transparent"
app:cardCornerRadius="10dp"
app:cardElevation="0dp">
<com.ms.banner.Banner
android:id="@+id/banner_me"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:delay_time="5000"
app:indicator_height="8dp"
app:indicator_width="8dp" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B