消息列表更多操作

This commit is contained in:
ningwenqiang 2024-11-01 20:34:14 +08:00
parent e5e3a6ea84
commit 0e74652f41
26 changed files with 501 additions and 114 deletions

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="11dp"/>
<solid android:color="#40000000" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

View File

@ -35,6 +35,8 @@ import com.yunbao.main.R;
import com.yunbao.main.views.MainHomeLiveItemViewHolder; import com.yunbao.main.views.MainHomeLiveItemViewHolder;
import com.yunbao.main.views.MainHomeLiveWeekItemViewHolder; import com.yunbao.main.views.MainHomeLiveWeekItemViewHolder;
import net.lucode.hackware.magicindicator.buildins.UIUtil;
import java.util.List; import java.util.List;
@ -117,9 +119,15 @@ public class MainHomeLiveAdapter extends RefreshAdapter<LiveBean> {
headVh.setIsRecyclable(false); headVh.setIsRecyclable(false);
return headVh; return headVh;
case WEEKLAYOUT: case WEEKLAYOUT:
return new MainHomeLiveWeekItemViewHolder(mInflater.inflate(R.layout.item_main_home_lives, parent, false)); // View itemView= mInflater.inflate(R.layout.item_main_home_lives, parent, false);
// int width= (UIUtil.getScreenWidth(mContext) - UIUtil.dip2px(mContext,37))/2;
// itemView.setLayoutParams(new ViewGroup.LayoutParams(width , (int) (width*1.235)));
return new MainHomeLiveWeekItemViewHolder(mInflater.inflate(R.layout.item_main_home_lives_pola, parent, false));
default: default:
return new MainHomeLiveItemViewHolder(mInflater.inflate(R.layout.item_main_home_lives, parent, false)); // View itemView2= mInflater.inflate(R.layout.item_main_home_lives_pola, parent, false);
// int width2= (UIUtil.getScreenWidth(mContext) - UIUtil.dip2px(mContext,37))/2;
// itemView2.setLayoutParams(new ViewGroup.LayoutParams(width2 , (int) (width2*1.235)));
return new MainHomeLiveItemViewHolder(mInflater.inflate(R.layout.item_main_home_lives_pola, parent, false));
} }
} }

View File

@ -234,11 +234,15 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder {
mIndicator.setNavigator(commonNavigator); mIndicator.setNavigator(commonNavigator);
ViewPagerHelper.bind(mIndicator, mViewPager); ViewPagerHelper.bind(mIndicator, mViewPager);
//默认选择第几个 //默认选择第几个
mIndicator.onPageSelected(1); mIndicator.onPageSelected(getDefaultSelect());
mViewPager.setCurrentItem(1); mViewPager.setCurrentItem(getDefaultSelect());
unReadMsgHandle(); unReadMsgHandle();
} }
public int getDefaultSelect(){
return 1;
}
private void unReadMsgHandle() { private void unReadMsgHandle() {
String unReadCount = "0"; String unReadCount = "0";
if (SpUtil.getInstance().getBooleanValue(SpUtil.HAS_SYSTEM_MSG)) { if (SpUtil.getInstance().getBooleanValue(SpUtil.HAS_SYSTEM_MSG)) {

View File

@ -9,6 +9,7 @@ import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.jakewharton.rxbinding3.view.RxView; import com.jakewharton.rxbinding3.view.RxView;
@ -113,7 +114,8 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
//直播中 //直播中
mType.setImageResource(MainIconUtil.getLiveTypeIcon(bean.getType())); mType.setImageResource(MainIconUtil.getLiveTypeIcon(bean.getType()));
mType.setVisibility(View.VISIBLE); mType.setVisibility(View.VISIBLE);
mLiveIco.setImageResource(R.mipmap.icon_main_rest_work); mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot);
mLiveIco.setVisibility(View.VISIBLE);
mNum.setVisibility(View.VISIBLE); mNum.setVisibility(View.VISIBLE);
liveType.setVisibility(View.VISIBLE); liveType.setVisibility(View.VISIBLE);
mLiveState.setText(mContext.getString(R.string.lives_state)); mLiveState.setText(mContext.getString(R.string.lives_state));
@ -122,7 +124,8 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
//休息中 //休息中
mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING)); mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING));
mType.setVisibility(View.GONE); mType.setVisibility(View.GONE);
mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot); // mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot);
mLiveIco.setVisibility(View.INVISIBLE);
mLiveState.setText(mContext.getString(R.string.rest_state)); mLiveState.setText(mContext.getString(R.string.rest_state));
liveType.setVisibility(View.GONE); liveType.setVisibility(View.GONE);
mNum.setVisibility(View.GONE); mNum.setVisibility(View.GONE);
@ -153,7 +156,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
} else { } else {
viewBg.setVisibility(View.GONE); viewBg.setVisibility(View.GONE);
} }
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams(); ConstraintLayout.LayoutParams dragon_moneyLayoutParams = (ConstraintLayout.LayoutParams) dragon_money.getLayoutParams();
if (bean.getRedPacketStatus() == 1) { if (bean.getRedPacketStatus() == 1) {
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55); dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55);
redPacket.setVisibility(View.VISIBLE); redPacket.setVisibility(View.VISIBLE);

View File

@ -107,7 +107,7 @@ public class MainHomeLiveWeekItemViewHolder<T> extends RecyclerView.ViewHolder {
TextView textView = rootView.findViewById(R.id.name2); TextView textView = rootView.findViewById(R.id.name2);
TextView title = rootView.findViewById(R.id.title); TextView title = rootView.findViewById(R.id.title);
ImageView imageView = rootView.findViewById(R.id.week_live); ImageView imageView = rootView.findViewById(R.id.week_live);
ImgLoader.display2(itemView.getContext(), model.getAnchor_avatar(), imageView,400,400); ImgLoader.display2(itemView.getContext(), model.getAnchor_avatar(), imageView,itemView.getWidth(),itemView.getHeight());
textView.setText(model.getAnchor_name()); textView.setText(model.getAnchor_name());
title.setText(model.getContent()); title.setText(model.getContent());
viewflipperBanner.addView(rootView); viewflipperBanner.addView(rootView);

View File

@ -148,13 +148,8 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O
typeHot = list.get(0).getEnglish(); typeHot = list.get(0).getEnglish();
select = list.get(0).getId(); select = list.get(0).getId();
} }
list.add(0, getCoLiveClass());
list.add(0, getAttentionLiveClass()); list.add(0, getAttentionLiveClass());
if (list.size() > 2) {
list.add(2, getCoLiveClass());
} else {
list.add(getCoLiveClass());
}
mShadow = findViewById(R.id.shadow); mShadow = findViewById(R.id.shadow);
mBtnDismiss = findViewById(R.id.btn_dismiss); mBtnDismiss = findViewById(R.id.btn_dismiss);
@ -192,7 +187,7 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O
} }
}); });
mRefreshView.setLayoutManager(gridLayoutManager); mRefreshView.setLayoutManager(gridLayoutManager);
ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0); ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 7, 7);
decoration.setOnlySetItemOffsetsButNoDraw(true); decoration.setOnlySetItemOffsetsButNoDraw(true);
mRefreshView.setItemDecoration(decoration); mRefreshView.setItemDecoration(decoration);
mAdapter = new MainHomeLiveAdapter(mContext, MainActivity.Height); mAdapter = new MainHomeLiveAdapter(mContext, MainActivity.Height);
@ -215,7 +210,7 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O
targetList.addAll(list); targetList.addAll(list);
} }
final MainHomeLivesClassAdapter topAdapter = new MainHomeLivesClassAdapter(mContext, targetList, false); final MainHomeLivesClassAdapter topAdapter = new MainHomeLivesClassAdapter(mContext, targetList, false);
topAdapter.choice = 1; topAdapter.choice = 2;
topAdapter.setOnItemClickListener(new OnItemClickListener<LiveClassBean>() { topAdapter.setOnItemClickListener(new OnItemClickListener<LiveClassBean>() {
@Override @Override
public void onItemClick(LiveClassBean bean, int position) { public void onItemClick(LiveClassBean bean, int position) {
@ -252,7 +247,7 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O
if (position == 0) { if (position == 0) {
Log.i("MainHomeViewHolder2", "mLiveOptFollAgent:"); Log.i("MainHomeViewHolder2", "mLiveOptFollAgent:");
flag= changeLiveOptAgent(mLiveOptFollAgent); flag= changeLiveOptAgent(mLiveOptFollAgent);
} else if (position == 2) { } else if (position == 1) {
Log.i("MainHomeViewHolder2", "mLiveOptComAgent:"); Log.i("MainHomeViewHolder2", "mLiveOptComAgent:");
flag= changeLiveOptAgent(mLiveOptComAgent); flag= changeLiveOptAgent(mLiveOptComAgent);
} else { } else {

View File

@ -6,6 +6,7 @@ import android.text.TextUtils;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.utils.ProcessResultUtil; import com.yunbao.common.utils.ProcessResultUtil;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
@ -23,6 +24,8 @@ public class MainMessageHeadViewHolder extends AbsMainHomeParentComViewHolder {
private boolean floatWarOrder; private boolean floatWarOrder;
private String homeZdyPop; private String homeZdyPop;
XPopup.Builder moreXPopup;
public boolean isFloatWarOrder() { public boolean isFloatWarOrder() {
return floatWarOrder; return floatWarOrder;
@ -92,7 +95,7 @@ public class MainMessageHeadViewHolder extends AbsMainHomeParentComViewHolder {
} else if (position == 0) { } else if (position == 0) {
mainMessageViewHolder2 = new MainMessageViewHolder2((MainActivity) mContext, parent); mainMessageViewHolder2 = new MainMessageViewHolder2((MainActivity) mContext, parent);
vh = mainMessageViewHolder2; vh = mainMessageViewHolder2;
mainMessageViewHolder2.setMoreView(findViewById(R.id.moreImg));
} else if (position == 1) { } else if (position == 1) {
systemMessageViewHolder2 = new SystemMessageViewHolder2(mContext, parent,(MainActivity) mContext); systemMessageViewHolder2 = new SystemMessageViewHolder2(mContext, parent,(MainActivity) mContext);
vh = systemMessageViewHolder2; vh = systemMessageViewHolder2;
@ -125,5 +128,8 @@ public class MainMessageHeadViewHolder extends AbsMainHomeParentComViewHolder {
return new String[]{mContext.getString(R.string.activity_msg_title), mContext.getString(R.string.interaction_type)}; return new String[]{mContext.getString(R.string.activity_msg_title), mContext.getString(R.string.interaction_type)};
} }
@Override
public int getDefaultSelect() {
return 0;
}
} }

View File

@ -134,6 +134,7 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
private MainActivity mContext; private MainActivity mContext;
XPopup.Builder moreXPopup; XPopup.Builder moreXPopup;
private String homeZdyPop; private String homeZdyPop;
private View more;
private ViewPager2 viewPager; private ViewPager2 viewPager;
private MagicIndicator mIndicator; private MagicIndicator mIndicator;
@ -187,6 +188,9 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
MessageIMManager.get(mContext).resetImUnReadMessageCount(mContext); MessageIMManager.get(mContext).resetImUnReadMessageCount(mContext);
} }
public void setMoreView(View view){
more=view;
}
@Override @Override
public void init() { public void init() {
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
@ -239,6 +243,13 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
netHandler = new Handler(Looper.getMainLooper()); netHandler = new Handler(Looper.getMainLooper());
if(more!=null){
moreXPopup = new XPopup.Builder(mContext).atView(more);
more.setOnClickListener(view -> {
moreXPopup.asCustom(new MsgMoreDialog(mContext)).show();
});
}
initData(); initData();
} }
@ -466,6 +477,7 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
tabLayout1.setVisibility(View.GONE); tabLayout1.setVisibility(View.GONE);
tabLayout2.setVisibility(View.GONE); tabLayout2.setVisibility(View.GONE);
tabLayout3.setVisibility(View.GONE); tabLayout3.setVisibility(View.GONE);
findViewById(R.id.line).setVisibility(View.GONE);
//tabLayouts.setLayoutParams(params); //tabLayouts.setLayoutParams(params);
} else if (userType == 1) {//主播A } else if (userType == 1) {//主播A
tab_icon.setVisibility(View.VISIBLE); tab_icon.setVisibility(View.VISIBLE);
@ -549,9 +561,16 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
@Override @Override
public void onSuccess(MessageChatIsAnchor data) { public void onSuccess(MessageChatIsAnchor data) {
DebugUtils.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
if(more!=null){
more.setVisibility(View.VISIBLE);
}
}); });
if (data.getIsAnchor() == 1 && CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) { if (data.getIsAnchor() == 1 && CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) {
userType = 2;//主播B userType = 2;//主播B
if(more!=null){
more.setVisibility(View.VISIBLE);
}
viewPager.setUserInputEnabled(true); viewPager.setUserInputEnabled(true);
//mIndicator.setVisibility(View.VISIBLE); //mIndicator.setVisibility(View.VISIBLE);
} else if (CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) { } else if (CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) {
@ -595,17 +614,17 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
textNewsNotice.setVisibility(View.GONE); textNewsNotice.setVisibility(View.GONE);
} else { } else {
textNewsNotice.setVisibility(View.VISIBLE); textNewsNotice.setVisibility(View.VISIBLE);
setChatApt(userBean.getType(),officialDate,officialContent); // setChatApt(userBean.getType(),officialDate,officialContent);
// officialDate.setText(userBean.getLastDate()); // officialDate.setText(userBean.getLastDate());
// officialContent.setText(userBean.getContent()); // officialContent.setText(userBean.getContent());
// int numberInt = Integer.parseInt(userBean.getNum()); int numberInt = Integer.parseInt(userBean.getNum());
// if (numberInt > 99) { if (numberInt > 99) {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
// textNewsNotice.setText("99+"); textNewsNotice.setText("99+");
// } else { } else {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
// textNewsNotice.setText(String.valueOf(numberInt)); textNewsNotice.setText(String.valueOf(numberInt));
// } }
} }
//ImgLoader.display(mContext, userBean.getNewImage(), imgNewsNotice); //ImgLoader.display(mContext, userBean.getNewImage(), imgNewsNotice);
@ -659,17 +678,17 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
textSystemMessages.setVisibility(View.GONE); textSystemMessages.setVisibility(View.GONE);
} else { } else {
textSystemMessages.setVisibility(View.VISIBLE); textSystemMessages.setVisibility(View.VISIBLE);
systemDate.setText(userBean.getLastDate()); // systemDate.setText(userBean.getLastDate());
systemContent.setText(userBean.getContent()); // systemContent.setText(userBean.getContent());
// int numberInt = Integer.parseInt(userBean.getNum()); int numberInt = Integer.parseInt(userBean.getNum());
// if (numberInt > 99) { if (numberInt > 99) {
// textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
// textSystemMessages.setText("99+"); textSystemMessages.setText("99+");
// } else { } else {
// textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
// textSystemMessages.setText(String.valueOf(numberInt)); textSystemMessages.setText(String.valueOf(numberInt));
// } }
} }
//ImgLoader.display(mContext, userBean.getNewImage(), imgSystemMessages); //ImgLoader.display(mContext, userBean.getNewImage(), imgSystemMessages);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.systemClickView), () -> { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.systemClickView), () -> {
@ -788,18 +807,18 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
textNewsNotice.setVisibility(View.GONE); textNewsNotice.setVisibility(View.GONE);
textNewsNotice.setText(""); textNewsNotice.setText("");
} else { } else {
// String number = textNewsNotice.getText().toString().trim(); String number = textNewsNotice.getText().toString().trim();
textNewsNotice.setVisibility(View.VISIBLE); textNewsNotice.setVisibility(View.VISIBLE);
setChatApt(model.getType(),officialDate,officialContent); // setChatApt(model.getType(),officialDate,officialContent);
// int numberInt = Integer.parseInt(number) + 1; int numberInt = Integer.parseInt(number) + 1;
// if (numberInt > 99) { if (numberInt > 99) {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
// textNewsNotice.setText("99+"); textNewsNotice.setText("99+");
// } else { } else {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
// textNewsNotice.setText(String.valueOf(numberInt)); textNewsNotice.setText(String.valueOf(numberInt));
// } }
} }

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#F7F7F7" android:background="@color/white"
app:contentAlpha="0.5" app:contentAlpha="0.5"
app:contentToggle="true" app:contentToggle="true"
app:slideMode="left" app:slideMode="left"

View File

@ -119,7 +119,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp"> android:layout_marginBottom="10dp">
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
@ -128,7 +128,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:textColor="#fff" android:textColor="#fff"
android:textSize="10sp" /> android:textSize="12sp" />
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
android:id="@+id/num" android:id="@+id/num"
@ -138,10 +138,11 @@
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:gravity="center" android:gravity="center"
android:singleLine="true" android:singleLine="true"
android:textColor="#B3ffffff" android:textColor="#fff"
android:textSize="10sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
app:dt_left_drawable="@mipmap/icon_main_live_num" tools:text="880k"
app:dt_left_drawable="@mipmap/ic_yola_live_fire"
app:dt_left_height="14dp" app:dt_left_height="14dp"
app:dt_left_width="14dp" /> app:dt_left_width="14dp" />
@ -183,16 +184,18 @@
android:layout_marginBottom="40dp" android:layout_marginBottom="40dp"
android:src="@mipmap/multiplayerpk" /> android:src="@mipmap/multiplayerpk" />
</com.yunbao.common.custom.MyRelativeLayout5> </com.yunbao.common.custom.MyRelativeLayout5>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/lt_week_list" android:id="@+id/lt_week_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
tools:visibility="visible"
android:visibility="gone"> android:visibility="gone">
<com.yunbao.common.custom.MyRelativeLayout5 <com.yunbao.common.custom.MyRelativeLayout5
@ -249,6 +252,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:textColor="#fff" android:textColor="#fff"
tools:text="name"
android:textSize="10sp" /> android:textSize="10sp" />
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
@ -259,8 +263,8 @@
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:gravity="center" android:gravity="center"
android:singleLine="true" android:singleLine="true"
android:textColor="#B3ffffff" android:textColor="#fff"
android:textSize="10sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
app:dt_left_drawable="@mipmap/icon_main_live_num" app:dt_left_drawable="@mipmap/icon_main_live_num"
app:dt_left_height="14dp" app:dt_left_height="14dp"

View File

@ -0,0 +1,316 @@
<?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"
tools:layout_width="170dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.809"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:riv_corner_radius="10dp" />
<com.yunbao.common.custom.RatioRoundImageView
android:id="@+id/bgs"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:src="@mipmap/bg_main_item_bottom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:riv_corner_radius="10dp" />
<ImageView
android:id="@+id/view_bg"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitXY"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/live_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/views"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-5dp"
android:background="@drawable/background_40000_9"
app:layout_constraintBottom_toBottomOf="@+id/tv_live_state"
app:layout_constraintEnd_toEndOf="@+id/tv_live_state"
app:layout_constraintStart_toStartOf="@+id/tv_live_ico"
app:layout_constraintTop_toTopOf="@+id/tv_live_state" />
<TextView
android:id="@+id/tv_live_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:gravity="center"
android:paddingTop="2dp"
android:paddingEnd="6dp"
android:paddingBottom="2dp"
android:textColor="@color/color_white"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="休息中" />
<ImageView
android:id="@+id/tv_live_ico"
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:layout_marginEnd="2dp"
android:src="@mipmap/icon_main_rest_work"
app:layout_constraintBottom_toBottomOf="@+id/tv_live_state"
app:layout_constraintEnd_toStartOf="@+id/tv_live_state"
app:layout_constraintTop_toTopOf="@+id/tv_live_state" />
<!-- 这里从下面开始布局 这里是普通的-->
<com.yunbao.common.custom.DrawableTextView
android:id="@+id/num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:drawablePadding="4dp"
android:gravity="center"
android:singleLine="true"
android:textColor="#fff"
android:textSize="14sp"
android:textStyle="bold"
app:dt_left_drawable="@mipmap/ic_yola_live_fire"
app:dt_left_height="14dp"
app:dt_left_width="14dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="880k" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:ellipsize="end"
android:singleLine="true"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/num"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/num"
tools:text="mame" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginBottom="6dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="#99ffffff"
android:textSize="10sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/name"
app:layout_constraintStart_toStartOf="parent"
tools:text="Title" />
<ImageView
android:id="@+id/type"
app:layout_constraintBottom_toTopOf="@+id/title"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="50dp"
android:layout_height="16dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="4dp"
android:scaleType="fitXY" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/pk_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/title"
android:layout_marginEnd="10dp"
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"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toTopOf="@+id/pk_avatar"
app:layout_constraintBottom_toBottomOf="@+id/pk_avatar"
android:src="@mipmap/live_pk" />
<ImageView
android:id="@+id/dr_pk_ico"
android:layout_width="100dp"
android:layout_height="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pk_ico"
android:src="@mipmap/multiplayerpk" />
<androidx.constraintlayout.widget.Group
android:id="@+id/live_info_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="cover,bgs,live_type,views,tv_live_ico,tv_live_state,type,title,name,num"/>
<!-- 这里从下面开始布局 这里是周星榜的-->
<ViewFlipper
android:id="@+id/viewflipper_banner"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.809"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:riv_corner_radius="10dp"
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="0dp"
android:layout_height="0dp"
android:layout_margin="3dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="visible" />
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/week_svga"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:autoPlay="true" />
<TextView
android:id="@+id/name2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:ellipsize="end"
android:singleLine="true"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/num"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/num"
tools:text="mame" />
<com.yunbao.common.custom.DrawableTextView
android:id="@+id/num2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:drawablePadding="4dp"
android:gravity="center"
android:singleLine="true"
android:textColor="#fff"
android:textSize="14sp"
android:textStyle="bold"
app:dt_left_drawable="@mipmap/ic_yola_live_fire"
app:dt_left_height="14dp"
app:dt_left_width="14dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="880k" />
<androidx.constraintlayout.widget.Group
android:id="@+id/lt_week_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="num2,name2,week_svga,img_week_head,viewflipper_banner"/>
<!-- 这里是顶部的红包 等等-->
<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"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/border_f1f1f1"
android:visibility="gone"
app:mvDirection="bottom_to_top"
app:mvInterval="3000">
</com.xj.marqueeview.MarqueeView>
<ImageView
android:id="@+id/dragon_money"
android:layout_width="25dp"
android:layout_height="30dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="25dp"
android:layout_marginTop="55dp"
android:visibility="gone"
app:srcCompat="@mipmap/icon_live_dragon_money"
tools:visibility="visible" />
<ImageView
android:id="@+id/red_packet"
android:layout_width="30dp"
android:layout_height="30dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="20dp"
android:layout_marginTop="25dp"
android:visibility="gone"
app:srcCompat="@mipmap/icon_red_packet"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,22 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.yunbao.common.custom.MyRelativeLayout5 xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView <ImageView
android:id="@+id/week_live" android:id="@+id/week_live"
android:layout_width="match_parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.809"
android:layout_width="0dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_height="match_parent" /> android:layout_height="0dp" />
<TextView <TextView
android:id="@+id/name2" android:id="@+id/name2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginLeft="10dp" app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="5dp" android:layout_marginStart="10dp"
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
@ -28,12 +34,14 @@
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@id/name2" app:layout_constraintBottom_toTopOf="@+id/name2"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginBottom="5dp"
android:ellipsize="end" android:ellipsize="end"
android:includeFontPadding="false" android:includeFontPadding="false"
android:maxLines="1" android:maxLines="1"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:textColor="#fff" android:textColor="#fff"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" /> android:textStyle="bold" />
</com.yunbao.common.custom.MyRelativeLayout5> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -4,16 +4,10 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@mipmap/bg_yola_index"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@mipmap/bg_yola_index"
app:layout_constraintDimensionRatio="1.512"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/meTitleTv" android:id="@+id/meTitleTv"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/gray2" android:background="@mipmap/bg_yola_index"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="50dp"> android:paddingBottom="50dp">
@ -22,7 +22,6 @@
<ImageView <ImageView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:src="@mipmap/bg_yola_index"
app:layout_constraintDimensionRatio="1.512" app:layout_constraintDimensionRatio="1.512"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -4,8 +4,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:background="@color/white" android:orientation="vertical"
android:orientation="vertical"> tools:background="@color/white">
<!-- 官方息部分 --> <!-- 官方息部分 -->
<View <View
@ -18,6 +18,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/official_portrait" /> app:layout_constraintTop_toTopOf="@+id/official_portrait" />
<com.yunbao.common.views.weight.ClipPathCircleImage <com.yunbao.common.views.weight.ClipPathCircleImage
android:id="@+id/official_portrait" android:id="@+id/official_portrait"
android:layout_width="54dp" android:layout_width="54dp"
@ -36,13 +37,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginTop="4dp"
android:ellipsize="end" android:ellipsize="end"
android:maxWidth="120dp" android:maxWidth="120dp"
android:maxLines="1" android:maxLines="1"
android:text="@string/activity_msg_news_notice" android:text="@string/activity_msg_news_notice"
android:textColor="@color/rc_text_main_color" android:textColor="@color/rc_text_main_color"
android:textSize="15sp" android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/official_portrait"
app:layout_constraintStart_toEndOf="@+id/official_portrait" app:layout_constraintStart_toEndOf="@+id/official_portrait"
app:layout_constraintTop_toTopOf="@+id/official_portrait" /> app:layout_constraintTop_toTopOf="@+id/official_portrait" />
@ -55,6 +56,7 @@
android:layout_marginEnd="18dp" android:layout_marginEnd="18dp"
android:textColor="@color/rc_auxiliary_color" android:textColor="@color/rc_auxiliary_color"
android:textSize="12sp" android:textSize="12sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/official_title" app:layout_constraintBottom_toBottomOf="@+id/official_title"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/official_title" app:layout_constraintTop_toTopOf="@+id/official_title"
@ -72,6 +74,7 @@
android:paddingEnd="6dp" android:paddingEnd="6dp"
android:textColor="@color/rc_secondary_color" android:textColor="@color/rc_secondary_color"
android:textSize="12dp" android:textSize="12dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/official_portrait" app:layout_constraintBottom_toBottomOf="@+id/official_portrait"
app:layout_constraintEnd_toStartOf="@+id/official_unread_count" app:layout_constraintEnd_toStartOf="@+id/official_unread_count"
app:layout_constraintStart_toStartOf="@+id/official_title" app:layout_constraintStart_toStartOf="@+id/official_title"
@ -80,19 +83,19 @@
<TextView <TextView
android:id="@+id/official_unread_count" android:id="@+id/official_unread_count"
style="@style/TextStyle.Alignment" style="@style/TextStyle.Alignment"
android:layout_width="8dp" android:layout_width="18dp"
android:layout_height="8dp" android:layout_height="18dp"
android:layout_marginEnd="18dp"
android:background="@drawable/red_dot" android:background="@drawable/red_dot"
android:gravity="center" android:gravity="center"
android:visibility="gone"
tools:visibility="visible"
android:textColor="@color/rc_white_color" android:textColor="@color/rc_white_color"
android:textSize="10sp" android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@+id/official_content" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/official_portrait"
app:layout_constraintDimensionRatio="1" app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toEndOf="@+id/official_date" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/official_content" /> app:layout_constraintTop_toTopOf="@+id/official_portrait"
tools:visibility="visible" />
<!-- 系统消息部分 --> <!-- 系统消息部分 -->
@ -106,6 +109,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/system_portrait" /> app:layout_constraintTop_toTopOf="@+id/system_portrait" />
<com.yunbao.common.views.weight.ClipPathCircleImage <com.yunbao.common.views.weight.ClipPathCircleImage
android:id="@+id/system_portrait" android:id="@+id/system_portrait"
android:layout_width="54dp" android:layout_width="54dp"
@ -124,13 +128,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginTop="4dp"
android:ellipsize="end" android:ellipsize="end"
android:maxWidth="120dp" android:maxWidth="120dp"
android:maxLines="1" android:maxLines="1"
android:text="@string/system_msg" android:text="@string/system_msg"
android:textColor="@color/rc_text_main_color" android:textColor="@color/rc_text_main_color"
android:textSize="15sp" android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/system_portrait"
app:layout_constraintStart_toEndOf="@+id/system_portrait" app:layout_constraintStart_toEndOf="@+id/system_portrait"
app:layout_constraintTop_toTopOf="@+id/system_portrait" /> app:layout_constraintTop_toTopOf="@+id/system_portrait" />
@ -143,6 +147,7 @@
android:layout_marginEnd="18dp" android:layout_marginEnd="18dp"
android:textColor="@color/rc_auxiliary_color" android:textColor="@color/rc_auxiliary_color"
android:textSize="12sp" android:textSize="12sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/system_title" app:layout_constraintBottom_toBottomOf="@+id/system_title"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/system_title" app:layout_constraintTop_toTopOf="@+id/system_title"
@ -160,6 +165,7 @@
android:paddingEnd="6dp" android:paddingEnd="6dp"
android:textColor="@color/rc_secondary_color" android:textColor="@color/rc_secondary_color"
android:textSize="12dp" android:textSize="12dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/system_portrait" app:layout_constraintBottom_toBottomOf="@+id/system_portrait"
app:layout_constraintEnd_toStartOf="@+id/system_unread_count" app:layout_constraintEnd_toStartOf="@+id/system_unread_count"
app:layout_constraintStart_toStartOf="@+id/system_title" app:layout_constraintStart_toStartOf="@+id/system_title"
@ -168,19 +174,19 @@
<TextView <TextView
android:id="@+id/system_unread_count" android:id="@+id/system_unread_count"
style="@style/TextStyle.Alignment" style="@style/TextStyle.Alignment"
android:layout_width="8dp" android:layout_width="18dp"
android:layout_height="8dp" android:layout_height="18dp"
android:layout_marginEnd="18dp"
android:background="@drawable/red_dot" android:background="@drawable/red_dot"
android:gravity="center" android:gravity="center"
android:visibility="gone"
tools:visibility="visible"
android:textColor="@color/rc_white_color" android:textColor="@color/rc_white_color"
android:textSize="10sp" android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@+id/system_content" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/system_portrait"
app:layout_constraintDimensionRatio="1" app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toEndOf="@+id/system_date" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/system_content" /> app:layout_constraintTop_toTopOf="@+id/system_portrait"
tools:visibility="visible" />
<!-- 切换选择消息类型的--> <!-- 切换选择消息类型的-->
@ -365,13 +371,14 @@
tools:visibility="visible" /> tools:visibility="visible" />
<View <View
android:layout_marginTop="18dp" android:id="@+id/line"
app:layout_constraintTop_toBottomOf="@+id/tab1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="1dp" android:layout_height="1dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="18dp"
android:background="#EFEFEF" android:background="#EFEFEF"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab1" />
<!-- 摆放控件 --> <!-- 摆放控件 -->
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
@ -381,22 +388,22 @@
android:layout_marginTop="19dp" android:layout_marginTop="19dp"
android:layout_marginBottom="50dp" android:layout_marginBottom="50dp"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_constraintTop_toBottomOf="@+id/tab1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent" /> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab1" />
<!-- 此容器用于动态放置 隐藏的--> <!-- 此容器用于动态放置 隐藏的-->
<LinearLayout <LinearLayout
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/lt_nodata_msg" android:id="@+id/lt_nodata_msg"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:gravity="center" android:gravity="center"
android:visibility="gone"> android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -406,11 +413,11 @@
<net.lucode.hackware.magicindicator.MagicIndicator <net.lucode.hackware.magicindicator.MagicIndicator
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/indicator" android:id="@+id/indicator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="37dp" android:layout_height="37dp"
android:visibility="gone" /> android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:background="@color/white" android:background="@mipmap/bg_yola_index"
android:orientation="vertical"> android:orientation="vertical">
@ -47,6 +47,19 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/moreImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:padding="6dp"
android:src="@mipmap/ic_yola_msg_more"
android:visibility="gone"
tools:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/addressBookImg" android:id="@+id/addressBookImg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -55,8 +68,10 @@
android:padding="6dp" android:padding="6dp"
android:src="@mipmap/ic_yola_address_book" android:src="@mipmap/ic_yola_address_book"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="@+id/moreImg"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B