This commit is contained in:
zlzw 2022-11-01 18:18:58 +08:00
parent b8ee197e52
commit a2de293e10
11 changed files with 728 additions and 148 deletions

View File

@ -95,7 +95,7 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
return position;
}
protected boolean canClick() {
protected static boolean canClick() {
return ClickUtil.canClick();
}

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape>
<corners android:radius="10dp"/>
<stroke android:width="1dp" android:color="#b6b6b6"/>
<shape android:shape="rectangle">
<solid android:color="#ffffffff" />
<corners android:radius="18dp" />
</shape>
</item>
<item android:state_checked="false">

View File

@ -27,6 +27,6 @@ ext {
// true表示谷歌支付 false
isGooglePlay : true,
//
isUploadLog : true
isUploadLog : false
]
}

View File

@ -7,23 +7,37 @@ import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.viewpager.widget.ViewPager;
import com.alibaba.fastjson.JSON;
import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.adapter.ViewPagerAdapter;
import com.yunbao.common.adapter.RefreshAdapter;
import com.yunbao.common.bean.NobleRankHideUserListModel;
import com.yunbao.common.custom.CommonRefreshView;
import com.yunbao.common.custom.MyRadioButton;
import com.yunbao.common.event.FollowEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.CommonIconUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.main.R;
import com.yunbao.main.adapter.MainListAdapter;
import com.yunbao.main.bean.ListBean;
import com.yunbao.main.http.MainHttpUtil;
import com.yunbao.main.views.AbsMainListChildViewHolder;
import com.yunbao.main.views.MainListContributeViewHolder;
import com.yunbao.main.views.MainListProfitViewHolder;
import net.lucode.hackware.magicindicator.MagicIndicator;
import net.lucode.hackware.magicindicator.ViewPagerHelper;
import net.lucode.hackware.magicindicator.buildins.UIUtil;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
@ -36,18 +50,31 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class MainListActivity extends AbsActivity {
import pl.droidsonroids.gif.GifImageView;
public class MainListActivity extends AbsActivity implements OnItemClickListener<ListBean> {
private static final int PAGE_COUNT = 2;
public static final String DAY = "day";
public static final String WEEK = "week";
public static final String MONTH = "month";
public static final String TOTAL = "total";
protected String mType;
private List<FrameLayout> mViewList;
private AbsMainListChildViewHolder[] mViewHolders;
private MainListProfitViewHolder mProfitViewHolder;//收益榜
private MainListContributeViewHolder mContributeViewHolder;//贡献榜
private MagicIndicator mIndicator;
private ViewPager mViewPager;
private List<String> outRankHide = new ArrayList<>();
protected CommonRefreshView mRefreshView;
public MainListAdapter mAdapter;
private HeadView hv;
public static void forward(Context context, int p) {
context.startActivity(new Intent(context, MainListActivity.class).putExtra("p", p));
@ -57,12 +84,7 @@ public class MainListActivity extends AbsActivity {
@Override
protected void onResume() {
super.onResume();
if (mProfitViewHolder != null && mProfitViewHolder.mAdapter != null) {
mProfitViewHolder.mAdapter.notifyDataSetChanged();
}
if (mContributeViewHolder != null && mContributeViewHolder.mAdapter != null) {
mContributeViewHolder.mAdapter.notifyDataSetChanged();
}
}
@Override
@ -72,6 +94,7 @@ public class MainListActivity extends AbsActivity {
@Override
protected void main() {
initView();
mViewList = new ArrayList<>();
for (int i = 0; i < PAGE_COUNT; i++) {
FrameLayout frameLayout = new FrameLayout(mContext);
@ -79,25 +102,7 @@ public class MainListActivity extends AbsActivity {
mViewList.add(frameLayout);
}
mViewHolders = new AbsMainListChildViewHolder[PAGE_COUNT];
mViewPager = (ViewPager) findViewById(R.id.viewPager);
mViewPager.setOffscreenPageLimit(PAGE_COUNT - 1);
mViewPager.setAdapter(new ViewPagerAdapter(mViewList));
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
loadPageData(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
mIndicator = (MagicIndicator) findViewById(R.id.indicator);
final String[] titles = new String[]{
(WordUtil.getString(R.string.glamour_list)),
@ -121,7 +126,7 @@ public class MainListActivity extends AbsActivity {
clipPagerTitleView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mViewPager.setCurrentItem(index);
}
});
@ -143,10 +148,8 @@ public class MainListActivity extends AbsActivity {
}
});
mIndicator.setNavigator(commonNavigator);
ViewPagerHelper.bind(mIndicator, mViewPager);
//默认选择第几个
mIndicator.onPageSelected(getIntent().getIntExtra("p", 0));
mViewPager.setCurrentItem(getIntent().getIntExtra("p", 0));
//加载数据
loadData();
EventBus.getDefault().register(MainListActivity.this);
@ -156,9 +159,7 @@ public class MainListActivity extends AbsActivity {
@Override
public void onSuccess(NobleRankHideUserListModel data) {
outRankHide = data.getOutRankHide();
if (mContributeViewHolder != null) {
mContributeViewHolder.setHide(outRankHide);
}
}
@Override
@ -168,44 +169,71 @@ public class MainListActivity extends AbsActivity {
});
}
private void initView() {
mType = DAY;
mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView);
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list);
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
hv = new HeadView(findViewById(R.id.rootView));
initData();
}
private void loadPageData(int position) {
if (mViewHolders == null) {
return;
}
AbsMainListChildViewHolder vh = mViewHolders[position];
if (vh == null) {
if (mViewList != null && position < mViewList.size()) {
FrameLayout parent = mViewList.get(position);
if (parent == null) {
return;
private void initData() {
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<ListBean>() {
@Override
public RefreshAdapter<ListBean> getAdapter() {
if (mAdapter == null) {
mAdapter = new MainListAdapter(mContext, MainListAdapter.TYPE_PROFIT);
mAdapter.setOnItemClickListener(MainListActivity.this);
}
if (position == 0) {
mProfitViewHolder = new MainListProfitViewHolder(mContext, parent);
vh = mProfitViewHolder;
} else if (position == 1) {
mContributeViewHolder = new MainListContributeViewHolder(mContext, parent);
mContributeViewHolder.setHide(outRankHide);
vh = mContributeViewHolder;
return mAdapter;
}
if (vh == null) {
return;
}
mViewHolders[position] = vh;
vh.addToParent();
vh.subscribeActivityLifeCycle();
}
}
if (vh != null) {
vh.loadData();
@Override
public void loadData(int p, com.yunbao.common.http.HttpCallback callback) {
if (mType != null && !mType.isEmpty()) {
MainHttpUtil.profitList(mType, p, callback);
}
}
@Override
public List<ListBean> processData(String[] info) {
List<ListBean> list = JSON.parseArray(Arrays.toString(info), ListBean.class);
hv.setData(list.get(0), 0);
hv.setData(list.get(1), 1);
hv.setData(list.get(2), 2);
return list;
}
@Override
public void onRefreshSuccess(List<ListBean> list, int listCount) {
}
@Override
public void onRefreshFailure() {
}
@Override
public void onLoadMoreSuccess(List<ListBean> loadItemList, int loadItemCount) {
}
@Override
public void onLoadMoreFailure() {
}
});
mRefreshView.initData();
}
// @Override
public void loadData() {
if (mViewPager != null) {
loadPageData(mViewPager.getCurrentItem());
}
}
@ -217,12 +245,146 @@ public class MainListActivity extends AbsActivity {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onFollowEvent(FollowEvent e) {
if (mViewHolders != null) {
for (AbsMainListChildViewHolder vh : mViewHolders) {
if (vh != null) {
vh.onFollowEvent(e.getToUid(), e.getIsAttention());
}
@Override
public void onItemClick(ListBean bean, int position) {
}
class HeadView {
View mItem1;
View mItem2;
View mItem3;
GifImageView liveing1;
GifImageView liveing2;
GifImageView liveing3;
ImageView mAvatar1;
ImageView mAvatar2;
ImageView mAvatar3;
TextView mName1;
TextView mName2;
TextView mName3;
TextView mVotes1;
TextView mVotes2;
TextView mVotes3;
ImageView mSex1;
ImageView mSex2;
ImageView mSex3;
ImageView mLevel1;
ImageView mLevel2;
ImageView mLevel3;
MyRadioButton mBtnFollow1;
MyRadioButton mBtnFollow2;
MyRadioButton mBtnFollow3;
SVGAImageView svga1;
SVGAImageView svga2;
SVGAImageView svga3;
public HeadView(View itemView) {
mItem1 = itemView.findViewById(R.id.item_1);
mItem2 = itemView.findViewById(R.id.item_2);
mItem3 = itemView.findViewById(R.id.item_3);
liveing1 = itemView.findViewById(R.id.liveing1);
liveing2 = itemView.findViewById(R.id.liveing2);
liveing3 = itemView.findViewById(R.id.liveing3);
mAvatar1 = (ImageView) itemView.findViewById(R.id.avatar_1);
mAvatar2 = (ImageView) itemView.findViewById(R.id.avatar_2);
mAvatar3 = (ImageView) itemView.findViewById(R.id.avatar_3);
mName1 = (TextView) itemView.findViewById(R.id.name_1);
mName2 = (TextView) itemView.findViewById(R.id.name_2);
mName3 = (TextView) itemView.findViewById(R.id.name_3);
mVotes1 = (TextView) itemView.findViewById(R.id.votes_1);
mVotes2 = (TextView) itemView.findViewById(R.id.votes_2);
mVotes3 = (TextView) itemView.findViewById(R.id.votes_3);
mSex1 = (ImageView) itemView.findViewById(R.id.sex_1);
mSex2 = (ImageView) itemView.findViewById(R.id.sex_2);
mSex3 = (ImageView) itemView.findViewById(R.id.sex_3);
mLevel1 = (ImageView) itemView.findViewById(R.id.level_1);
mLevel2 = (ImageView) itemView.findViewById(R.id.level_2);
mLevel3 = (ImageView) itemView.findViewById(R.id.level_3);
mBtnFollow1 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_1);
mBtnFollow2 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_2);
mBtnFollow3 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_3);
svga1 = (SVGAImageView) itemView.findViewById(R.id.svga1);
svga2 = (SVGAImageView) itemView.findViewById(R.id.svga2);
svga3 = (SVGAImageView) itemView.findViewById(R.id.svga3);
}
public void setData(ListBean bean, int position) {
if (bean == null) {
return;
}
Log.i("排行榜", bean.toString() + " | position = " + position);
setVisibility(View.GONE, -1, svga1, svga2, svga3);
if (bean.getDress_head() != null) {
if (bean.getDress_head().contains("svga")) {
setVisibility(View.VISIBLE, position, svga1, svga2, svga3);
try {
new SVGAParser(mContext).parse(new URL(bean.getDress_head()), new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
SVGADrawable drawable = new SVGADrawable(videoItem);
getItem(position, svga1, svga2, svga3).setImageDrawable(drawable);
SVGAViewUtils.playEndClear(getItem(position, svga1, svga2, svga3), false);
}
@Override
public void onError() {
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}
} else {
Log.e("eee", bean.getDress_head());
ImgLoader.display(mContext, bean.getDress_head(), getItem(position, svga1, svga2, svga3));
}
}
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTag(bean);
setVisibility(View.INVISIBLE, position, liveing1, liveing2, liveing3);
if (bean.getIslive() == 1) {
setVisibility(View.VISIBLE, position, liveing1, liveing2, liveing3);
}
setVisibility(bean.isHide() ? View.GONE : View.VISIBLE, position, mBtnFollow1, mBtnFollow2, mBtnFollow3);
if (bean.getAttention() != 1) {
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).doChecked(true);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setText("+" + WordUtil.getString(R.string.follow));
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setBackgroundResource(R.drawable.background_ffff79c2);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF"));
} else {
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setVisibility(View.INVISIBLE);
}
getItem(position, mVotes1, mVotes2, mVotes3).setText(bean.getTotalCoinFormat());
if (bean.isHide()) {
getItem(position, mName1, mName2, mName3).setText(R.string.mystery_man);
ImgLoader.display(mContext, R.mipmap.hide, getItem(position, mAvatar1, mAvatar2, mAvatar3));
getItem(position, mSex1, mSex2, mSex3).setVisibility(View.GONE);
getItem(position, mVotes1, mVotes2, mVotes3).setVisibility(View.GONE);
} else {
ImgLoader.display(mContext, bean.getAvatarThumb(), getItem(position, mAvatar1, mAvatar2, mAvatar3));
getItem(position, mName1, mName2, mName3).setText(bean.getUserNiceName());
getItem(position, mSex1, mSex2, mSex3).setVisibility(View.VISIBLE);
getItem(position, svga1, svga2, svga3).setVisibility(View.VISIBLE);
}
getItem(position, mSex1, mSex2, mSex3).setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
}
private <T> T getItem(int position, T... views) {
return views[position];
}
private void setVisibility(int type, int position, View... views) {
if (position == -1) {
for (View view : views) {
view.setVisibility(type);
}
} else {
views[position].setVisibility(type);
}
}
}
}

View File

@ -123,7 +123,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
@Override
public int getItemCount() {
if (mList != null && mTopList.size() > 0) {
return mList.size() + 1;
return mList.size() ;
}
return 0;
}
@ -180,15 +180,8 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == HEAD) {
if (mHeadVh == null) {
mHeadVh = new HeadVh(mInflater.inflate(R.layout.item_main_list_head, parent, false));
}
return mHeadVh;
} else {
return new Vh(mInflater.inflate(R.layout.item_main_list, parent, false));
}
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
@ -198,11 +191,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
Object payload = payloads.size() > 0 ? payloads.get(0) : null;
if (vh instanceof Vh) {
((Vh) vh).setData(mList.get(position - 1), position - 1, payload);
} else {
((HeadVh) vh).setData(payload);
}
((Vh) vh).setData(mList.get(position), position , payload);
}
class HeadVh extends RecyclerView.ViewHolder {

View File

@ -128,4 +128,21 @@ public class ListBean {
public void setSex(int sex) {
this.sex = sex;
}
@Override
public String toString() {
return "ListBean{" +
"totalCoin=" + totalCoin +
", uid='" + uid + '\'' +
", userNiceName='" + userNiceName + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", sex=" + sex +
", levelAnchor=" + levelAnchor +
", level=" + level +
", attention=" + attention +
", islive=" + islive +
", dress_head='" + dress_head + '\'' +
", isHide=" + isHide +
'}';
}
}

View File

@ -180,7 +180,7 @@ public class MainHttpUtil {
}
//排行榜 收益
//排行榜 魅力
public static void profitList(String type, int p, HttpCallback callback) {
HttpClient.getInstance().get("Home.profitList", MainHttpConsts.PROFIT_LIST)
.params("type", type)
@ -188,7 +188,7 @@ public class MainHttpUtil {
.execute(callback);
}
//排行榜 贡献
//排行榜 豪气
public static void consumeList(String type, int p, HttpCallback callback) {
HttpClient.getInstance().get("Home.consumeList", MainHttpConsts.CONSUME_LIST)
.params("type", type)

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="25dp" />
<solid android:color="#33FFFFFF" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="62dp" android:height="26dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffffffff" />
<solid android:color="#ffff79c2" />
<corners android:radius="14dp" />
</shape>
</item>
</selector>

View File

@ -1,73 +1,466 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="110dp"
>
<com.yunbao.common.custom.RatioImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
app:ri_ratio="1.13067"
/>
</FrameLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="32dp"
>
<ImageView
android:id="@+id/btn_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:onClick="backClick"
android:padding="9dp"
android:src="@mipmap/top_back"
/>
android:layout_height="421dp"
android:background="@mipmap/bg_glamour_top">
<net.lucode.hackware.magicindicator.MagicIndicator
android:id="@+id/indicator"
android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:layout_marginBottom="50dp"
android:background="@drawable/background_f8f8f8"
app:layout_constraintBottom_toTopOf="@+id/item_1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp"
android:background="@drawable/background_33ffffff"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/indicator">
<RadioButton
android:id="@+id/btn_day"
android:layout_width="60dp"
android:layout_height="26dp"
android:background="@drawable/bg_list_btn"
android:button="@null"
android:checked="true"
android:gravity="center"
android:text="@string/main_list_day"
android:textColor="#FF82C1"
android:textSize="16sp"
android:textStyle="bold" />
<RadioButton
android:id="@+id/btn_week"
android:layout_width="60dp"
android:layout_height="26dp"
android:layout_marginLeft="20dp"
android:background="@drawable/bg_list_btn"
android:button="@null"
android:gravity="center"
android:text="@string/main_list_week"
android:textColor="#FFFFFF"
android:textSize="16sp"
android:textStyle="bold" />
</RadioGroup>
<LinearLayout
android:id="@+id/item_1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="29dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/item_2"
app:layout_constraintEnd_toStartOf="@+id/item_3"
app:layout_constraintStart_toEndOf="@+id/item_2">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar_1"
android:layout_width="60dp"
android:layout_height="60dp"
android:scaleType="centerCrop"
app:riv_oval="true" />
/>
</RelativeLayout>
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga1"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp" />
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<pl.droidsonroids.gif.GifImageView
android:id="@+id/liveing1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="50dp"
android:src="@mipmap/icon_user_home_living" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/name_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:ellipsize="end"
android:lines="1"
android:maxEms="4"
android:singleLine="true"
android:text="名字"
android:textColor="#FFFFFF"
android:textSize="15sp" />
<ImageView
android:id="@+id/sex_1"
android:layout_width="12dp"
android:layout_height="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
</FrameLayout>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@mipmap/diamond" />
<TextView
android:id="@+id/votes_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="11111"
android:textColor="#FFFFFF"
android:textSize="12sp" />
</LinearLayout>
<com.yunbao.common.custom.MyRadioButton
android:id="@+id/btn_follow_1"
android:layout_width="70dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/background_dbdbdb"
android:button="@null"
android:gravity="center"
android:text="@string/shield_gift_effect"
android:textColor="@color/white"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/item_2"
android:layout_width="0dp"
android:layout_height="152dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="100dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_1"
app:layout_constraintStart_toStartOf="parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar_2"
android:layout_width="66dp"
android:layout_height="66dp"
android:scaleType="centerCrop"
app:riv_border_color="#B6B6B6"
app:riv_border_width="2dp"
app:riv_oval="true" />
</RelativeLayout>
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga2"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp" />
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<pl.droidsonroids.gif.GifImageView
android:id="@+id/liveing2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="50dp"
android:src="@mipmap/icon_user_home_living" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/name_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:ellipsize="end"
android:lines="1"
android:maxEms="4"
android:singleLine="true"
android:text="名字"
android:textColor="#FFFFFF"
android:textSize="15sp" />
<ImageView
android:id="@+id/sex_2"
android:layout_width="12dp"
android:layout_height="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@mipmap/diamond" />
<TextView
android:id="@+id/votes_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="11111"
android:textColor="#FFFFFF"
android:textSize="12sp" />
</LinearLayout>
<com.yunbao.common.custom.MyRadioButton
android:id="@+id/btn_follow_2"
android:layout_width="70dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/background_dbdbdb"
android:button="@null"
android:gravity="center"
android:text="已关注"
android:textColor="@color/white"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/item_3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
android:layout_marginBottom="90dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/item_1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar_3"
android:layout_width="66dp"
android:layout_height="66dp"
android:scaleType="centerCrop"
app:riv_border_color="#B6B6B6"
app:riv_border_width="2dp"
app:riv_oval="true" />
</RelativeLayout>
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga3"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp" />
<RelativeLayout
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp">
<pl.droidsonroids.gif.GifImageView
android:id="@+id/liveing3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="50dp"
android:src="@mipmap/icon_user_home_living" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/name_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:ellipsize="end"
android:lines="1"
android:maxEms="4"
android:singleLine="true"
android:text="名字"
android:textColor="#FFFFFF"
android:textSize="15sp" />
<ImageView
android:id="@+id/sex_3"
android:layout_width="12dp"
android:layout_height="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@mipmap/diamond" />
<TextView
android:id="@+id/votes_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="11111"
android:textColor="#FFFFFF"
android:textSize="12sp" />
</LinearLayout>
<com.yunbao.common.custom.MyRadioButton
android:id="@+id/btn_follow_3"
android:layout_width="70dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/background_dbdbdb"
android:button="@null"
android:gravity="center"
android:text="已关注"
android:textColor="@color/white"
android:textSize="11sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.viewpager.widget.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.viewpager.widget.ViewPager>
<com.yunbao.common.custom.CommonRefreshView
android:id="@+id/refreshView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB