update 红包专区
This commit is contained in:
parent
3bf594d0b5
commit
501a7b482b
@ -5,6 +5,7 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardtype = "";
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
@SerializedName("red_packet_status")
|
||||
private int redPacketStatus;
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
@ -382,6 +385,14 @@ public class LiveBean implements Parcelable {
|
||||
this.islive = islive;
|
||||
}
|
||||
|
||||
public int getRedPacketStatus() {
|
||||
return redPacketStatus;
|
||||
}
|
||||
|
||||
public void setRedPacketStatus(int redPacketStatus) {
|
||||
this.redPacketStatus = redPacketStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示靓号
|
||||
*/
|
||||
@ -529,6 +540,7 @@ public class LiveBean implements Parcelable {
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", redPacketStatus=" + redPacketStatus +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
|
@ -68,7 +68,7 @@ public class LiveTaskModel extends BaseModel {
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class NewUser {
|
||||
public static class NewUser implements Serializable{
|
||||
@SerializedName("isNew")
|
||||
private int isNew;
|
||||
@SerializedName("endTime")
|
||||
|
@ -79,9 +79,11 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
ImageView dr_pk_ico;
|
||||
View views;
|
||||
ImageView bgs;
|
||||
private View redPacket;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
live_info_view = (LinearLayout) itemView.findViewById(R.id.live_info_view);
|
||||
mCover = (ImageView) itemView.findViewById(R.id.cover);
|
||||
mName = (TextView) itemView.findViewById(R.id.name);
|
||||
@ -220,6 +222,11 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
if (bean.getIs_week() != null && bean.getIs_week().equals("1")) {
|
||||
views.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,13 @@ public class MainHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页红包专区
|
||||
*/
|
||||
public static void getRedPacket(int p, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Home.getRedPacket", MainHttpConsts.GET_RANDOM)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页
|
||||
|
@ -32,6 +32,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
|
||||
private ImageView bgs;
|
||||
private View views;
|
||||
private View redPacket;
|
||||
private TextView mLiveState, mTitle, mName, mNum;
|
||||
|
||||
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
|
||||
@ -40,6 +41,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.VISIBLE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||
mCover = itemView.findViewById(R.id.cover);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
bgs = itemView.findViewById(R.id.bgs);
|
||||
liveType = itemView.findViewById(R.id.live_type);
|
||||
views = itemView.findViewById(R.id.views);
|
||||
@ -147,6 +149,11 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
} else {
|
||||
viewBg.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
.subscribe(new Observer<Unit>() {
|
||||
|
@ -46,6 +46,7 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
private List<WeekListBean> weekList = new ArrayList<>();
|
||||
//轮询周星榜的下标
|
||||
private int index = 0;
|
||||
private View redPacket;
|
||||
|
||||
public MainHomeLiveWeekItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@ -53,6 +54,7 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.GONE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.VISIBLE);
|
||||
imgWeekHead = itemView.findViewById(R.id.img_week_head);
|
||||
redPacket=itemView.findViewById(R.id.red_packet);
|
||||
weekSvga = (SVGAImageView) itemView.findViewById(R.id.week_svga);
|
||||
viewflipperBanner = itemView.findViewById(R.id.viewflipper_banner);
|
||||
imgWeekHead.setVisibility(View.GONE);
|
||||
@ -119,6 +121,11 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
|
||||
}
|
||||
bannerHandler.removeCallbacks(mFlipRunnable);
|
||||
bannerHandler.postDelayed(mFlipRunnable, delayMillis);
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
.subscribe(new Observer<Unit>() {
|
||||
|
@ -0,0 +1,170 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
import com.yunbao.main.activity.WeekWebViewActivity;
|
||||
import com.yunbao.main.adapter.MainHomeRemFollLiveAdapter;
|
||||
import com.yunbao.main.http.MainHttpConsts;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页红包专区
|
||||
*/
|
||||
public class MainHomeRedPacketLiveViewHolder extends AbsMainHomeChildViewHolder implements OnItemClickListener<LiveBean> {
|
||||
private CommonRefreshView mRefreshView;
|
||||
private MainHomeRemFollLiveAdapter mAdapter;
|
||||
|
||||
public MainHomeRedPacketLiveViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_main_home_live_recom;
|
||||
}
|
||||
|
||||
public static int pp;
|
||||
|
||||
//显示顶部商城tab时,显示底部tabGroup
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("Updata".equals(str)) {
|
||||
if (mRefreshView != null) {
|
||||
mRefreshView.showRefreshBar();
|
||||
mRefreshView.mRecyclerView.scrollToPosition(0);
|
||||
}
|
||||
}else if ("blacklist".equals(str)) {
|
||||
if (mRefreshView != null) {
|
||||
mRefreshView.showRefreshBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView);
|
||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_live);
|
||||
EventBus.getDefault().register(this);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false);
|
||||
mRefreshView.setLayoutManager(gridLayoutManager);
|
||||
ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0);
|
||||
decoration.setOnlySetItemOffsetsButNoDraw(true);
|
||||
mRefreshView.setItemDecoration(decoration);
|
||||
mRefreshView.setRecyclerViewAdapter(mAdapter);
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<LiveBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<LiveBean> getAdapter() {
|
||||
if (mAdapter == null) {
|
||||
mAdapter = new MainHomeRemFollLiveAdapter(mContext, MainActivity.Height);
|
||||
mAdapter.setOnItemClickListener(MainHomeRedPacketLiveViewHolder.this);
|
||||
}
|
||||
return mAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
pp = p;
|
||||
MainHttpUtil.getRedPacket(p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LiveBean> processData(String[] info) {
|
||||
if(pp == 1){
|
||||
return JSON.parseArray(Arrays.toString(info), LiveBean.class);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<LiveBean> list, int count) {
|
||||
EventBus.getDefault().post(new AnchorRecommendModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<LiveBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mRefreshView.initData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemClick(LiveBean bean, int position) {
|
||||
if ("1".equals(bean.getIslive())) {
|
||||
watchLive(bean, Constants.LIVE_HOME, position);
|
||||
}else if(bean.getIs_week()!=null&&bean.getIs_week().equals("1")){
|
||||
String url = CommonAppConfig.HOST + bean.getUrl()+"?a=1";
|
||||
WeekWebViewActivity.forward(mContext, url, true);
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, bean.getUid(),0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
// if (mRefreshView != null) {
|
||||
// mRefreshView.initData();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
MainHttpUtil.cancel(MainHttpConsts.GET_RANDOM);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.RedPacketListActivity;
|
||||
|
||||
@ -21,6 +20,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
private MainHomeFollLiveViewHolder mainHomeFollLiveViewHolder;
|
||||
private MainHomeLiveViewHolder mainHomeLiveViewHolder;
|
||||
private MainHomeRecomLiveViewHolder mainHomeRecomLiveViewHolder;
|
||||
private MainHomeRedPacketLiveViewHolder mainHomeRedPacketLiveViewHolder;
|
||||
|
||||
private ImageView img_trophy;
|
||||
|
||||
@ -73,6 +73,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
} else if (position == 2) {
|
||||
mainHomeRecomLiveViewHolder = new MainHomeRecomLiveViewHolder(mContext, parent);
|
||||
vh = mainHomeRecomLiveViewHolder;
|
||||
}else if(position==3){
|
||||
mainHomeRedPacketLiveViewHolder=new MainHomeRedPacketLiveViewHolder(mContext,parent);
|
||||
vh=mainHomeRedPacketLiveViewHolder;
|
||||
}
|
||||
|
||||
if (vh == null) {
|
||||
@ -90,7 +93,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
@Override
|
||||
protected int getPageCount() {
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -99,6 +102,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
mContext.getString(R.string.follow),
|
||||
mContext.getString(R.string.hot),
|
||||
mContext.getString(R.string.recomment),
|
||||
"红包专区",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:gravity="center"
|
||||
@ -11,277 +12,291 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/live_info_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
<LinearLayout
|
||||
android:id="@+id/live_info_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/cover"
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dp" />
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/bgs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/bg_main_item_bottom"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_corner_radius="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/views"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@mipmap/live_zt">
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="10dp" />
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/bgs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/bg_main_item_bottom"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_corner_radius="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_live_ico"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_main_rest_work" />
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_state"
|
||||
<ImageView
|
||||
android:id="@+id/live_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:text="休息"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="10sp" />
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/views"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@mipmap/live_zt">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/tv_live_ico"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_main_rest_work" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:text="休息"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="16dp"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/pk_avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="@color/color_white"
|
||||
app:riv_border_width="0.8dp"
|
||||
app:riv_corner_radius="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="16dp"
|
||||
android:scaleType="fitXY" />
|
||||
android:id="@+id/pk_ico"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="33dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:src="@mipmap/live_pk" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/pk_avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="@color/color_white"
|
||||
app:riv_border_width="0.8dp"
|
||||
app:riv_corner_radius="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pk_ico"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="33dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:src="@mipmap/live_pk" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dr_pk_ico"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@mipmap/multiplayerpk" />
|
||||
<ImageView
|
||||
android:id="@+id/dr_pk_ico"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@mipmap/multiplayerpk" />
|
||||
|
||||
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_week_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_week_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ViewFlipper
|
||||
android:id="@+id/viewflipper_banner"
|
||||
<com.yunbao.common.custom.MyRelativeLayout5
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:flipInterval="1000"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="3dp"
|
||||
android:inAnimation="@anim/vice_screen_come_in"
|
||||
android:outAnimation="@anim/vice_screen_come_out" />
|
||||
android:layout_marginBottom="9dp"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_week_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@mipmap/chat_head_mo"
|
||||
android:visibility="visible" />
|
||||
<ViewFlipper
|
||||
android:id="@+id/viewflipper_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:flipInterval="1000"
|
||||
android:inAnimation="@anim/vice_screen_come_in"
|
||||
android:outAnimation="@anim/vice_screen_come_out"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_week_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@mipmap/chat_head_mo"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/week_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:autoPlay="true" />
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/week_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:autoPlay="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name2"
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
<TextView
|
||||
android:id="@+id/name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/num2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="#B3ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_left_drawable="@mipmap/icon_main_live_num"
|
||||
app:dt_left_height="14dp"
|
||||
app:dt_left_width="14dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.yunbao.common.custom.MyRelativeLayout5>
|
||||
|
||||
<com.xj.marqueeview.MarqueeView
|
||||
android:id="@+id/rv_ranking_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:background="@drawable/border_f1f1f1"
|
||||
android:visibility="gone"
|
||||
app:mvDirection="bottom_to_top"
|
||||
app:mvInterval="3000" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.xj.marqueeview.MarqueeView
|
||||
android:id="@+id/rv_ranking_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:background="@drawable/border_f1f1f1"
|
||||
android:visibility="gone"
|
||||
app:mvDirection="bottom_to_top"
|
||||
app:mvInterval="3000">
|
||||
|
||||
</com.xj.marqueeview.MarqueeView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/red_packet"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@mipmap/icon_red_packet"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user