Merge branch 'develop_home' into develop_new
This commit is contained in:
@@ -573,7 +573,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
|
||||
private void initMaterialView() {
|
||||
avatarLayout.setVisibility(View.GONE);
|
||||
avatarImage.setOnClickListener(v -> {
|
||||
avatarLayout.setOnClickListener(v -> {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null) {
|
||||
if (AvRoomDataManager.get().isParty()) {
|
||||
|
@@ -73,9 +73,7 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IHomeMoreRoomView, Hom
|
||||
|
||||
|
||||
private void initRoomTitleTab() {
|
||||
|
||||
getMvpPresenter().getHomeTag();
|
||||
|
||||
}
|
||||
|
||||
private void initRoomConcern() {
|
||||
@@ -86,16 +84,9 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IHomeMoreRoomView, Hom
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_SEARCH_RECENT_ENTER_ROOM, "最近进房记录");
|
||||
|
||||
List<HomeConcernsInfo> list = adapter.getData();
|
||||
if (position >= 0 && position < list.size()) {
|
||||
//// ImeUtil.hideIME(HomeMoreRoomActivity.this, tvSearch);
|
||||
HomeConcernsInfo record = list.get(position);
|
||||
// if (record.isValid()) {
|
||||
// list.remove(position);
|
||||
// list.add(0, record);
|
||||
// mFollowRoomsAdapter.setNewData(list);
|
||||
// }
|
||||
AVRoomActivity.start(HomeMoreRoomActivity.this, record.getRoomUid());
|
||||
}
|
||||
}
|
||||
@@ -173,14 +164,11 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IHomeMoreRoomView, Hom
|
||||
}
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(HomeMoreRoomActivity.this);
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(HomeMoreRoomActivity.this, mTabInfoList);
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(HomeMoreRoomActivity.this, mTabInfoList,true);
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this);
|
||||
|
||||
commonNavigator.setAdapter(magicIndicatorAdapter);
|
||||
magicIndicator.setNavigator(commonNavigator);
|
||||
|
||||
commonNavigator.getTitleContainer().setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
|
||||
|
||||
viewPager.setOffscreenPageLimit(5);
|
||||
viewPager.setAdapter(new RoomContributeListAdapter(getSupportFragmentManager(),mFragments));
|
||||
viewPager.addOnPageChangeListener(new OnPageSelectedListener() {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.yizhuan.erban.home.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -35,15 +36,15 @@ public class HomeConcernsAdapter extends BaseQuickAdapter<HomeConcernsInfo, Base
|
||||
CircleImageView circleImageView = helper.getView(R.id.civ_room_avatar);
|
||||
ImageLoadUtilsV2.loadImage(circleImageView, item.getAvatar());
|
||||
circleImageView.setBorderWidth(UIUtil.dip2px(mContext,1));
|
||||
circleImageView.setBorderColor(mContext.getResources().getColor(R.color.appColor));
|
||||
|
||||
TextView tvName = helper.getView(R.id.tv_room_name);
|
||||
if (item.getFollowType() == 1){
|
||||
tvName.setText("");
|
||||
}else {
|
||||
tvName.setText(item.getName());
|
||||
}
|
||||
// helper.setText(R.id.iv_living,item.getFollowType() == 1?item.getName():"直播中");
|
||||
helper.setText(R.id.tv_room_name,item.getFollowType() == 1?"":item.getName());
|
||||
helper.setText(R.id.iv_living,item.getFollowType() == 1?"我的房间":"直播中");
|
||||
helper.setBackgroundRes(R.id.iv_living,item.getFollowType() == 1?R.drawable.bg_living_my_room:R.drawable.bg_common_confirm_normal);
|
||||
circleImageView.setBorderColor(item.getFollowType() == 1?Color.parseColor("#FF6B82"):mContext.getResources().getColor(R.color.appColor));
|
||||
|
||||
|
||||
//
|
||||
|
||||
helper.addOnClickListener(R.id.container_item_room_history);
|
||||
|
||||
|
||||
|
@@ -2,16 +2,11 @@ package com.yizhuan.erban.home.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
import com.yizhuan.erban.R;
|
||||
@@ -20,21 +15,25 @@ import com.yizhuan.erban.home.bean.HomeTabMapInfo;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.widget.LivingIconView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p> 首页热门adapter </p>
|
||||
*
|
||||
* @author Administrator
|
||||
* @date 2017/11/16
|
||||
*/
|
||||
public class HomeRoomFragmentAdapter extends BaseQuickAdapter<HomeTabMapInfo, BaseViewHolder> {
|
||||
public class HomeRoomFragmentAdapter extends BaseMultiItemQuickAdapter<HomeTabMapInfo, BaseViewHolder> {
|
||||
|
||||
private int mBadgeHeight;
|
||||
private Context mContext;
|
||||
/**
|
||||
* 校验跳转房间的频率
|
||||
*/
|
||||
public HomeRoomFragmentAdapter(Context context) {
|
||||
super(R.layout.item_home_tab_map);
|
||||
public HomeRoomFragmentAdapter(Context context, List<HomeTabMapInfo> data) {
|
||||
super(data);
|
||||
addItemType(HomeTabMapInfo.TYPE_NORMAL,R.layout.item_home_tab_map);
|
||||
addItemType(HomeTabMapInfo.TYPE_EMPTY,R.layout.item_erban_grid_empty);
|
||||
this.mContext = context;
|
||||
|
||||
mBadgeHeight = (int) context.getResources().getDimension(R.dimen.tag_height);
|
||||
@@ -45,24 +44,22 @@ public class HomeRoomFragmentAdapter extends BaseQuickAdapter<HomeTabMapInfo, Ba
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
helper.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AVRoomActivity.start(mContext, item.getRoomUid());
|
||||
}
|
||||
});
|
||||
|
||||
LivingIconView livingIconView = helper.getView(R.id.liv_living_icon);
|
||||
livingIconView.setColor(Color.WHITE);
|
||||
livingIconView.start();
|
||||
|
||||
helper.setText(R.id.tv_online_number,item.getOnlineNum()+"")
|
||||
.setText(R.id.tv_title, item.getRoomTitle());
|
||||
switch (helper.getItemViewType()){
|
||||
|
||||
case HomeTabMapInfo.TYPE_NORMAL:
|
||||
helper.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AVRoomActivity.start(mContext, item.getRoomUid());
|
||||
}
|
||||
});
|
||||
LivingIconView livingIconView = helper.getView(R.id.liv_living_icon);
|
||||
livingIconView.setColor(Color.WHITE);
|
||||
livingIconView.start();
|
||||
helper.setText(R.id.tv_online_number,item.getOnlineNum()+"")
|
||||
.setText(R.id.tv_title, item.getRoomTitle());
|
||||
// helper.getView(R.id.lock_bg).setVisibility(!TextUtils.isEmpty(homeRoom.getRoomPwd()) ? View.VISIBLE : View.GONE);
|
||||
|
||||
ImageView mIvTabLabel = helper.getView(R.id.iv_tab_label);
|
||||
|
||||
ImageView mIvTabLabel = helper.getView(R.id.iv_tab_label);
|
||||
// boolean showTab = false;
|
||||
// Drawable icon = null;
|
||||
// if (item.isShowRankHalfIcon()) {
|
||||
@@ -106,17 +103,23 @@ public class HomeRoomFragmentAdapter extends BaseQuickAdapter<HomeTabMapInfo, Ba
|
||||
// .into(mIvTabLabel);
|
||||
//
|
||||
// }
|
||||
ImageView ivCover = helper.getView(R.id.iv_cover);
|
||||
if (!TextUtils.isEmpty(item.getAvatar())) {
|
||||
ImageLoadUtils.loadAvatarBig(item.getAvatar(), ivCover, R.drawable.default_cover);
|
||||
} else {
|
||||
GlideApp.with(mContext)
|
||||
.load(R.drawable.default_cover)
|
||||
.placeholder(R.drawable.default_cover)
|
||||
.into(ivCover);
|
||||
}
|
||||
break;
|
||||
|
||||
case HomeTabMapInfo.TYPE_EMPTY:
|
||||
|
||||
ImageView ivCover = helper.getView(R.id.iv_cover);
|
||||
if (!TextUtils.isEmpty(item.getAvatar())) {
|
||||
ImageLoadUtils.loadAvatarBig(item.getAvatar(), ivCover, R.drawable.default_cover);
|
||||
} else {
|
||||
GlideApp.with(mContext)
|
||||
.load(R.drawable.default_cover)
|
||||
.placeholder(R.drawable.default_cover)
|
||||
.into(ivCover);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -2,6 +2,10 @@ package com.yizhuan.erban.home.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
@@ -10,16 +14,19 @@ import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
private final Context mContext;
|
||||
private final List<? extends CharSequence> mTitleList;
|
||||
private boolean mIsShowIndicator;
|
||||
|
||||
public MainMagicIndicatorAdapter(Context context, List<? extends CharSequence> charSequences) {
|
||||
public MainMagicIndicatorAdapter(Context context, List<? extends CharSequence> charSequences,boolean isShowIndicator) {
|
||||
this.mContext = context;
|
||||
this.mTitleList = charSequences;
|
||||
this.mIsShowIndicator = isShowIndicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,9 +38,9 @@ public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int i) {
|
||||
ScaleTransitionPagerTitleView scaleTransitionPagerTitleView = new ScaleTransitionPagerTitleView(context, true, 8);
|
||||
scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(mContext, R.color.color_white));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(mContext, R.color.color_white));
|
||||
scaleTransitionPagerTitleView.setMinScale(0.7f);
|
||||
scaleTransitionPagerTitleView.setNormalColor(mIsShowIndicator?ContextCompat.getColor(mContext, R.color.color_white):ContextCompat.getColor(mContext, R.color.color_666666));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(mIsShowIndicator?ContextCompat.getColor(mContext, R.color.color_white):ContextCompat.getColor(mContext, R.color.color_333333));
|
||||
scaleTransitionPagerTitleView.setMinScale(0.8f);
|
||||
scaleTransitionPagerTitleView.setTextSize(18);
|
||||
int padding = UIUtil.dip2px(context, 5);
|
||||
scaleTransitionPagerTitleView.setPadding(padding,0,padding,0);
|
||||
@@ -43,6 +50,10 @@ public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
if (mOnItemSelectListener != null) {
|
||||
mOnItemSelectListener.onItemSelect(i, scaleTransitionPagerTitleView);
|
||||
}
|
||||
|
||||
if (mOnBottomItemSelectListener != null) {
|
||||
mOnBottomItemSelectListener.onBottomItemSelect(i, scaleTransitionPagerTitleView);
|
||||
}
|
||||
});
|
||||
return scaleTransitionPagerTitleView;
|
||||
}
|
||||
@@ -50,7 +61,16 @@ public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
return null;
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setLineHeight(UIUtil.dip2px(mContext, 5));
|
||||
indicator.setRoundRadius(UIUtil.dip2px(mContext, 5));
|
||||
indicator.setLineWidth(UIUtil.dip2px(mContext, 9));
|
||||
indicator.setColors(context.getResources().getColor(R.color.white));
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
lp.bottomMargin = 0;
|
||||
indicator.setLayoutParams(lp);
|
||||
return mIsShowIndicator?indicator:null;
|
||||
}
|
||||
|
||||
private OnItemSelectListener mOnItemSelectListener;
|
||||
@@ -62,4 +82,14 @@ public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
public interface OnItemSelectListener {
|
||||
void onItemSelect(int position, TextView view);
|
||||
}
|
||||
|
||||
private OnBottomItemSelectListener mOnBottomItemSelectListener;
|
||||
|
||||
public void setOnBottomItemSelectListener(OnBottomItemSelectListener onBottomItemSelectListener) {
|
||||
mOnBottomItemSelectListener = onBottomItemSelectListener;
|
||||
}
|
||||
|
||||
public interface OnBottomItemSelectListener {
|
||||
void onBottomItemSelect(int position, TextView view);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,10 @@
|
||||
package com.yizhuan.erban.home.bean;
|
||||
|
||||
public class HomeTabMapInfo {
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class HomeTabMapInfo implements MultiItemEntity, Serializable {
|
||||
|
||||
/**
|
||||
* onlineNum : 1
|
||||
@@ -17,6 +21,9 @@ public class HomeTabMapInfo {
|
||||
private String avatar;
|
||||
private int seq;
|
||||
private boolean isTop;
|
||||
public static final int TYPE_EMPTY = 0;
|
||||
public static final int TYPE_NORMAL = 1;
|
||||
private int itemType=0;
|
||||
|
||||
public int getOnlineNum() {
|
||||
return onlineNum;
|
||||
@@ -66,4 +73,12 @@ public class HomeTabMapInfo {
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public void setItemType(int itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
}
|
||||
|
@@ -5,28 +5,19 @@ import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.DynamicDrawableSpan;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -35,7 +26,6 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.amap.api.location.AMapLocation;
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
@@ -44,6 +34,8 @@ import com.amap.api.location.AMapLocationListener;
|
||||
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.jude.rollviewpager.Util;
|
||||
import com.jude.rollviewpager.hintview.ColorPointHintView;
|
||||
@@ -57,42 +49,36 @@ import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.avroom.adapter.RoomContributeListAdapter;
|
||||
import com.yizhuan.erban.avroom.game.MatchActivity;
|
||||
import com.yizhuan.erban.base.BaseMvpFragment;
|
||||
import com.yizhuan.erban.base.list.BaseViewHolder;
|
||||
import com.yizhuan.erban.base.list.CommonAdapter;
|
||||
import com.yizhuan.erban.bindadapter.BaseAdapter;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.databinding.FragmentGameHomeBinding;
|
||||
import com.yizhuan.erban.home.activity.HomeMoreRoomActivity;
|
||||
import com.yizhuan.erban.home.adapter.BannerAdapter;
|
||||
import com.yizhuan.erban.home.adapter.HomeConcernsAdapter;
|
||||
import com.yizhuan.erban.home.adapter.MainMagicIndicatorAdapter;
|
||||
import com.yizhuan.erban.home.bean.HomeTagInfo;
|
||||
import com.yizhuan.erban.home.dialog.CreateRoomDialog;
|
||||
import com.yizhuan.erban.home.event.RefreshHomeDataEvent;
|
||||
import com.yizhuan.erban.home.model.HomeModel;
|
||||
import com.yizhuan.erban.home.presenter.MainFragmentPresenter;
|
||||
import com.yizhuan.erban.home.view.IMainFragmentView;
|
||||
import com.yizhuan.erban.location.LocationManager;
|
||||
import com.yizhuan.erban.location.LocationUploadEvent;
|
||||
import com.yizhuan.erban.radish.signin.SignInActivity;
|
||||
import com.yizhuan.erban.ui.indicator_impl.IndicatorHelper;
|
||||
import com.yizhuan.erban.ui.search.SearchActivity;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
import com.yizhuan.erban.ui.widget.OnPageSelectedListener;
|
||||
import com.yizhuan.erban.ui.widget.higuide.TuTuGuideHelper;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import com.yizhuan.erban.utils.CommonJumpHelper;
|
||||
import com.yizhuan.erban.ui.widget.recyclerview.decoration.VerticalDecoration;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.UriProvider;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.certification.CertificationModel;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeBannerInfo;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeTitleInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeConcernsInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TagListInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RouterType;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.market_verify.MarketVerifyModel;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
@@ -108,8 +94,8 @@ import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.callback.CallBack;
|
||||
import com.yizhuan.xchat_android_library.utils.JavaUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SizeUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -119,7 +105,6 @@ import java.security.MessageDigest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
@@ -131,16 +116,13 @@ import io.reactivex.schedulers.Schedulers;
|
||||
import static com.yizhuan.xchat_android_core.certification.CertificationModel.CER_TYPE_FORCE;
|
||||
import static com.yizhuan.xchat_android_core.certification.CertificationModel.CER_TYPE_GUIDE;
|
||||
import static com.yizhuan.xchat_android_core.certification.CertificationModel.CER_TYPE_NONE;
|
||||
import static com.yizhuan.xchat_android_core.home.bean.BannerInfo.SKIP_TYPE_ROUTER;
|
||||
import static com.yizhuan.xchat_android_core.home.bean.BannerInfo.SKIP_TYP_APP;
|
||||
import static com.yizhuan.xchat_android_core.home.bean.BannerInfo.SKIP_TYP_H5;
|
||||
|
||||
/**
|
||||
* 66星球首页
|
||||
*/
|
||||
@CreatePresenter(MainFragmentPresenter.class)
|
||||
public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentPresenter>
|
||||
implements IMainFragmentView, View.OnClickListener, MainMagicIndicatorAdapter.OnItemSelectListener {
|
||||
implements IMainFragmentView, View.OnClickListener, MainMagicIndicatorAdapter.OnItemSelectListener, MainMagicIndicatorAdapter.OnBottomItemSelectListener {
|
||||
public static final String TAG = "GameHomeFragment";
|
||||
private FragmentGameHomeBinding mBinding;
|
||||
|
||||
@@ -166,6 +148,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
public AMapLocationClientOption mLocationOption = null;
|
||||
|
||||
private List<Fragment> mFragments;
|
||||
private List<Fragment> mFragmentsBottom;
|
||||
private volatile boolean isUserLogin;
|
||||
|
||||
/**
|
||||
@@ -182,6 +165,8 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
*/
|
||||
private static final String BANNER_TYPE = "1";
|
||||
|
||||
private HomeConcernsAdapter mFollowRoomsAdapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -255,13 +240,32 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
initGuide();
|
||||
initRefreshView();
|
||||
initTitleTab();
|
||||
initRoomConcern();
|
||||
initAppBarListioner();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void initAppBarListioner() {
|
||||
// mBinding.appBar.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> {
|
||||
// if (verticalOffset == 0)
|
||||
// {
|
||||
// LogUtils.e("展开状态");
|
||||
// mBinding.collapsingLayout.setContentScrim(null);
|
||||
// }
|
||||
// else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange())
|
||||
// {
|
||||
// LogUtils.e("折叠状态");
|
||||
// mBinding.collapsingLayout.setContentScrimResource(R.color.color_7154EE);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// LogUtils.e("中间状态");
|
||||
// mBinding.collapsingLayout.setContentScrimResource(R.color.color_7154EE);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private void initRefreshView() {
|
||||
mBinding.appBar.addOnOffsetChangedListener((AppBarLayout.OnOffsetChangedListener) (appBarLayout, i) -> {
|
||||
mBinding.appBar.addOnOffsetChangedListener((appBarLayout, i) -> {
|
||||
if (i >= 0) {
|
||||
mBinding.refreshLayout.setEnabled(true); //当滑动到顶部的时候开启
|
||||
} else {
|
||||
@@ -273,6 +277,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
mBinding.refreshLayout.setRefreshing(false);
|
||||
initRoomTitleTab();
|
||||
initBanner();
|
||||
getHomeConcern();
|
||||
EventBus.getDefault().post(new RefreshHomeDataEvent());
|
||||
});
|
||||
}
|
||||
@@ -293,9 +298,8 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试tab
|
||||
* 推荐房间TAG
|
||||
*/
|
||||
|
||||
private void initRoomTitleTab() {
|
||||
getMvpPresenter().getHomeTag();
|
||||
}
|
||||
@@ -308,33 +312,39 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
fragmentPos.add(TAB_TYPE_DYNAMIC);
|
||||
fragmentPos.add(TAB_TYPE_PLAY);
|
||||
List<String> tagList = new ArrayList<>();
|
||||
List<Fragment> fragmentList = new ArrayList<>();
|
||||
mFragmentsBottom = new ArrayList<>();
|
||||
|
||||
tagList.add(getResources().getString(R.string.home_tab_dynamic));
|
||||
tagList.add(getResources().getString(R.string.home_tab_caht));
|
||||
|
||||
fragmentList.add(HomeDynamicFragment.newInstance());
|
||||
fragmentList.add(HomePlayFragment.newInstance());
|
||||
mFragmentsBottom.add(HomeDynamicFragment.newInstance());
|
||||
mFragmentsBottom.add(HomePlayFragment.newInstance());
|
||||
|
||||
//init viewpager
|
||||
mBinding.viewPagerBottom.setAdapter(new RoomContributeListAdapter(getChildFragmentManager(), fragmentList));
|
||||
|
||||
// mBinding.viewPagerBottom.setAdapter(new RoomContributeListAdapter(getChildFragmentManager(), fragmentList));
|
||||
//
|
||||
// mBinding.viewPagerBottom.addOnPageChangeListener(new OnPageSelectedListener() {
|
||||
// @Override
|
||||
// public void onPageSelected(int position) {
|
||||
// StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_SQUARE_RECOMMEND_FOLLOW,
|
||||
// "切换推荐和关注tab-区分-" + ((position == 0) ? "动态" : "聊天交友"));
|
||||
// }
|
||||
// });
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(getContext(), tagList,false);
|
||||
magicIndicatorAdapter.setOnBottomItemSelectListener(this);
|
||||
commonNavigator.setAdapter(magicIndicatorAdapter);
|
||||
mBinding.magicIndicatorBottom.setNavigator(commonNavigator);
|
||||
commonNavigator.getTitleContainer().setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
|
||||
mBinding.viewPagerBottom.setOffscreenPageLimit(5);
|
||||
mBinding.viewPagerBottom.setAdapter(new RoomContributeListAdapter(getChildFragmentManager(), mFragmentsBottom));
|
||||
mBinding.viewPagerBottom.addOnPageChangeListener(new OnPageSelectedListener() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_SQUARE_RECOMMEND_FOLLOW,
|
||||
"切换推荐和关注tab-区分-" + ((position == 0) ? "动态" : "聊天交友"));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(getContext(), tagList);
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this);
|
||||
|
||||
commonNavigator.setAdapter(magicIndicatorAdapter);
|
||||
mBinding.magicIndicatorBottom.setNavigator(commonNavigator);
|
||||
//init indicator
|
||||
IndicatorHelper.handle(getContext(), mBinding.viewPagerBottom, mBinding.magicIndicatorBottom, tagList);
|
||||
ViewPagerHelper.bind(mBinding.magicIndicatorBottom, mBinding.viewPagerBottom);
|
||||
|
||||
}
|
||||
|
||||
@@ -556,6 +566,46 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomsSuccess(List<HomeConcernsInfo> list) {
|
||||
if (list != null && list.size() > 0) {
|
||||
mBinding.rvFollowRoom.setVisibility(View.VISIBLE);
|
||||
mFollowRoomsAdapter.setNewData(list);
|
||||
} else {
|
||||
mBinding.rvFollowRoom.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomFail() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 顶部关注房间
|
||||
*/
|
||||
private void initRoomConcern() {
|
||||
mFollowRoomsAdapter = new HomeConcernsAdapter(null,mContext);
|
||||
mBinding.rvFollowRoom.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
mBinding.rvFollowRoom.addItemDecoration(new VerticalDecoration(SizeUtils.dp2px(mContext, 10), false, true));
|
||||
mFollowRoomsAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_SEARCH_RECENT_ENTER_ROOM, "最近进房记录");
|
||||
List<HomeConcernsInfo> list = adapter.getData();
|
||||
if (position >= 0 && position < list.size()) {
|
||||
HomeConcernsInfo record = list.get(position);
|
||||
AVRoomActivity.start(mContext, record.getRoomUid());
|
||||
}
|
||||
}
|
||||
});
|
||||
mBinding.rvFollowRoom.setAdapter(mFollowRoomsAdapter);
|
||||
}
|
||||
|
||||
private void getHomeConcern(){
|
||||
getMvpPresenter().getHomeConcerns();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void titleListSuccess(List<TagListInfo> tagListInfoList) {
|
||||
|
||||
@@ -566,11 +616,13 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 推荐房间
|
||||
* @param position
|
||||
* @param view
|
||||
*/
|
||||
@Override
|
||||
public void onItemSelect(int position, TextView view) {
|
||||
// if (mHomeTitleInfos == null) {
|
||||
// return;
|
||||
// }
|
||||
if (mFragments == null || mFragments.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -578,114 +630,26 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
if (fragment == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mBinding.viewPager.setCurrentItem(position);
|
||||
|
||||
}
|
||||
|
||||
private List<String> convert(@NonNull List<HomeTitleInfo> homeTitleInfos) {
|
||||
List<String> list = new ArrayList<>(homeTitleInfos.size());
|
||||
for (HomeTitleInfo homeTitleInfo : homeTitleInfos) {
|
||||
list.add(homeTitleInfo.getName());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示下拉框
|
||||
*
|
||||
* @param opts 下拉列表
|
||||
* 底部动态聊天交友
|
||||
* @param position
|
||||
* @param view
|
||||
*/
|
||||
private void showPopup(List<HomeTitleInfo> opts, TextView targetView, int itemPosition) {
|
||||
List<String> labels = convert(opts);
|
||||
|
||||
int currentPosition = 0;
|
||||
if (targetView.getTag() == null) {
|
||||
for (int i = 0; i < opts.size(); i++) {
|
||||
HomeTitleInfo item = opts.get(i);
|
||||
if (targetView.getText().toString().startsWith(item.getName())) {
|
||||
currentPosition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
currentPosition = (Integer) targetView.getTag();
|
||||
}
|
||||
|
||||
View view = getLayoutInflater().inflate(R.layout.layout_home_pop_list, null);
|
||||
PopupWindow popupWindow = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true);
|
||||
popupWindow.setOutsideTouchable(true);
|
||||
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
popupWindow.setFocusable(true);
|
||||
ListView listView = popupWindow.getContentView().findViewById(R.id.listView);
|
||||
|
||||
|
||||
int finalCurrentPosition = currentPosition;
|
||||
listView.setAdapter(new ArrayAdapter<String>(getContext(), R.layout.item_pop_list, labels) {
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
CheckBox tv = (CheckBox) super.getView(position, convertView, parent);
|
||||
tv.setChecked(finalCurrentPosition == position);
|
||||
tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
targetView.setText(labels.get(position));
|
||||
targetView.setTag(position);
|
||||
popupWindow.dismiss();
|
||||
refreshFragment(itemPosition, String.valueOf(opts.get(position).getId()), opts.get(position).getName());
|
||||
opts.get(position).saveDefault();
|
||||
}
|
||||
});
|
||||
return tv;
|
||||
}
|
||||
});
|
||||
|
||||
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
setTabArrow(targetView, false);
|
||||
backgroundAlpha(1.0f);
|
||||
}
|
||||
});
|
||||
popupWindow.showAsDropDown(targetView, ScreenUtil.dip2px(6), 0);
|
||||
backgroundAlpha(0.6f);
|
||||
setTabArrow(targetView, true);
|
||||
}
|
||||
|
||||
private void refreshFragment(int itemPosition, String type, String name) {
|
||||
if (mFragments == null) {
|
||||
@Override
|
||||
public void onBottomItemSelect(int position, TextView view) {
|
||||
if (mFragmentsBottom == null || mFragmentsBottom.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Fragment fragment = mFragments.get(itemPosition);
|
||||
Fragment fragment = mFragmentsBottom.get(position);
|
||||
if (fragment == null) {
|
||||
return;
|
||||
}
|
||||
if (fragment instanceof RecommendationFragment) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOME_GODDESS_OF_HARMONY, "首页-" + name);
|
||||
((RecommendationFragment) fragment).setTypeAndRefresh(type, name);
|
||||
}
|
||||
|
||||
mBinding.viewPagerBottom.setCurrentItem(position);
|
||||
}
|
||||
|
||||
private void setTabArrow(TextView tv, boolean isUp) {
|
||||
String text = tv.getText().toString();
|
||||
SpannableString ss = getArrowSpannableString(isUp, text);
|
||||
tv.setText(ss);
|
||||
LogUtil.i("test", tv.getText().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换成带箭头的文本
|
||||
*/
|
||||
private SpannableString getArrowSpannableString(boolean isUp, String text) {
|
||||
if (!text.endsWith("[arrow]")) {
|
||||
text = text + " [arrow]";
|
||||
}
|
||||
SpannableString ss = new SpannableString(text);
|
||||
ss.setSpan(new ImageSpan(getContext(), isUp ? R.drawable.ic_home_arrow_up_black : R.drawable.ic_home_arrow_down_black, DynamicDrawableSpan.ALIGN_BASELINE), text.length() - "[arrow]".length(), text.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return ss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGetFirstPageBannerFailed(String message) {
|
||||
@@ -731,14 +695,11 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
}
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(getContext(), mTabInfoList);
|
||||
MainMagicIndicatorAdapter magicIndicatorAdapter = new MainMagicIndicatorAdapter(getContext(), mTabInfoList,true);
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this);
|
||||
|
||||
commonNavigator.setAdapter(magicIndicatorAdapter);
|
||||
mBinding.magicIndicator.setNavigator(commonNavigator);
|
||||
|
||||
commonNavigator.getTitleContainer().setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
|
||||
|
||||
mBinding.viewPager.setOffscreenPageLimit(5);
|
||||
mBinding.viewPager.setAdapter(new RoomContributeListAdapter(getChildFragmentManager(), mFragments));
|
||||
mBinding.viewPager.addOnPageChangeListener(new OnPageSelectedListener() {
|
||||
@@ -770,6 +731,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
mBinding.setOpenVisible(!(userInfo != null && userInfo.getPlatformRole() == 1));
|
||||
initRoomTitleTab();
|
||||
initBanner();
|
||||
getHomeConcern();
|
||||
}
|
||||
|
||||
private void initBanner() {
|
||||
@@ -882,18 +844,6 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
|
||||
}
|
||||
|
||||
private void backgroundAlpha(float f) {
|
||||
Activity activity = getActivity();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
|
||||
lp.alpha = f;
|
||||
|
||||
activity.getWindow().setAttributes(lp);
|
||||
|
||||
}
|
||||
|
||||
private void setBanner(List<BannerInfo> bannerList){
|
||||
//审核中状态,去掉跳转房间banner
|
||||
if (MarketVerifyModel.get().isMarketChecking()) {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.yizhuan.erban.home.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -40,8 +41,6 @@ public class HomeDynamicFragment extends BaseFragment{
|
||||
Unbinder unbinder;
|
||||
@BindView(R.id.recycler_view)
|
||||
RecyclerView recyclerView;
|
||||
// @BindView(R.id.refresh_layout)
|
||||
// SwipeRefreshLayout refreshLayout;
|
||||
|
||||
private boolean isLoading = false;
|
||||
|
||||
@@ -100,6 +99,7 @@ public class HomeDynamicFragment extends BaseFragment{
|
||||
getHomeDynamic();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void getHomeDynamic(){
|
||||
HomeModel.get().getHomeDynamic().subscribe((serviceResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
@@ -118,6 +118,8 @@ public class HomeDynamicFragment extends BaseFragment{
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onReloadData() {
|
||||
loadData();
|
||||
|
@@ -15,6 +15,7 @@ import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.erban.common.NoDataFragment;
|
||||
import com.yizhuan.erban.home.adapter.HomeRoomFragmentAdapter;
|
||||
import com.yizhuan.erban.home.bean.HomeTabMapInfo;
|
||||
import com.yizhuan.erban.home.model.HomeModel;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeItem;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
@@ -106,7 +107,7 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
showNoData();
|
||||
mHomeRoomAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mHomeRoomAdapter.setNewData(serviceResult);
|
||||
mHomeRoomAdapter.setNewData(getMultipleItemData(serviceResult));
|
||||
mHomeRoomAdapter.notifyDataSetChanged();
|
||||
|
||||
} else {
|
||||
@@ -120,7 +121,7 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
private void initRecyclerView() {
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerView.setItemAnimator(null);
|
||||
mHomeRoomAdapter = new HomeRoomFragmentAdapter(getContext());
|
||||
mHomeRoomAdapter = new HomeRoomFragmentAdapter(getContext(),null);
|
||||
mHomeRoomAdapter.setEnableLoadMore(false);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), ROWS);
|
||||
mHomeRoomAdapter.setEnableLoadMore(false);
|
||||
@@ -134,6 +135,32 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
//重点转化方法啊,
|
||||
/**
|
||||
* 添加布局Itemtype
|
||||
* @param itemList
|
||||
* @return
|
||||
*/
|
||||
private List<HomeTabMapInfo> getMultipleItemData(List<HomeTabMapInfo> itemList) {
|
||||
if (null==itemList||itemList.size()<=0){
|
||||
return null;
|
||||
}
|
||||
|
||||
final int ROOM_COUNT = 6;
|
||||
final int ADD_COUNT = ROOM_COUNT - itemList.size();
|
||||
|
||||
for (int i = 0; i < ADD_COUNT; i++) {
|
||||
HomeTabMapInfo info = new HomeTabMapInfo();
|
||||
info.setItemType(HomeTabMapInfo.TYPE_EMPTY);
|
||||
itemList.add(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < itemList.size(); i++) {
|
||||
itemList.get(i).setItemType(itemList.get(i).getRoomTitle() == null?HomeTabMapInfo.TYPE_EMPTY:HomeTabMapInfo.TYPE_NORMAL);
|
||||
}
|
||||
return itemList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initiate() {
|
||||
refreshData();
|
||||
|
@@ -12,7 +12,6 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseMvpFragment;
|
||||
import com.yizhuan.erban.community.publish.presenter.WorldChoosePresenter;
|
||||
import com.yizhuan.erban.home.adapter.HomeRoomFragmentAdapter;
|
||||
import com.yizhuan.erban.home.bean.HomeTabMapInfo;
|
||||
import com.yizhuan.erban.home.presenter.HomeTabMapPresenter;
|
||||
@@ -91,15 +90,16 @@ public class HomeTabMapFragment extends BaseMvpFragment<IHomeTabMapView, HomeTab
|
||||
private void initRecyclerView() {
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerView.setItemAnimator(null);
|
||||
mHomeRoomAdapter = new HomeRoomFragmentAdapter(getContext());
|
||||
mHomeRoomAdapter = new HomeRoomFragmentAdapter(getContext(),null);
|
||||
mHomeRoomAdapter.setOnLoadMoreListener(this, recyclerView);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), ROWS);
|
||||
recyclerView.setLayoutManager(gridLayoutManager);
|
||||
recyclerView.setAdapter(mHomeRoomAdapter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
@@ -116,12 +116,23 @@ public class HomeTabMapFragment extends BaseMvpFragment<IHomeTabMapView, HomeTab
|
||||
if (list == null || list.size() == 0) {
|
||||
showNoData();
|
||||
} else {
|
||||
mHomeRoomAdapter.setNewData(list);
|
||||
mHomeRoomAdapter.setNewData(getMultipleItemData(list));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<HomeTabMapInfo> getMultipleItemData(List<HomeTabMapInfo> itemList) {
|
||||
if (null==itemList||itemList.size()<=0){
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < itemList.size(); i++) {
|
||||
itemList.get(i).setItemType(HomeTabMapInfo.TYPE_NORMAL);
|
||||
}
|
||||
return itemList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void homeTabMapFails(String error) {
|
||||
hideStatus();
|
||||
|
@@ -35,6 +35,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.certification.CertificationModel;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeBannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeConcernsInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TagListInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.market_verify.MarketVerifyModel;
|
||||
@@ -315,6 +316,16 @@ public class MainFragment extends BaseMvpFragment<IMainFragmentView, MainFragmen
|
||||
initTabIndicator(mTabInfoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomsSuccess(List<HomeConcernsInfo> infos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomFail() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void titleListSuccess(List<TagListInfo> tagListInfoList) {
|
||||
showByMarketCheckingStatus(tagListInfoList);
|
||||
|
@@ -39,6 +39,7 @@ import com.yizhuan.xchat_android_core.customer_server.CustomerServerModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.headwear.bean.HeadWearInfo;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeBannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeConcernsInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TagListInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
@@ -647,6 +648,16 @@ public class MeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentP
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomsSuccess(List<HomeConcernsInfo> infos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomFail() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void titleListSuccess(List<TagListInfo> tagListInfoList) {
|
||||
|
||||
|
@@ -5,6 +5,7 @@ import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.yizhuan.erban.base.BaseMvpPresenter;
|
||||
import com.yizhuan.erban.home.bean.HomeTagInfo;
|
||||
import com.yizhuan.erban.home.view.IMainFragmentView;
|
||||
@@ -290,42 +291,56 @@ public class MainFragmentPresenter extends BaseMvpPresenter<IMainFragmentView> {
|
||||
* 获取首页banner
|
||||
*/
|
||||
public void getHomeBanner(String type) {
|
||||
if (mDisposable != null && !mDisposable.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
mDisposable = com.yizhuan.erban.home.model.HomeModel.get()
|
||||
com.yizhuan.erban.home.model.HomeModel.get()
|
||||
.getHomeBanner(type)
|
||||
.compose(bindUntilEvent(PresenterEvent.DESTROY))
|
||||
.subscribe(new BiConsumer<List<BannerInfo>, Throwable>() {
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new SingleObserver<List<BannerInfo>>() {
|
||||
@Override
|
||||
public void accept(List<BannerInfo> infos, Throwable throwable) throws Exception {
|
||||
if (throwable == null) {
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<BannerInfo> infos) {
|
||||
IMainFragmentView iMainFragmentView = getMvpView();
|
||||
if (iMainFragmentView != null)
|
||||
getMvpView().onGetHomeBannerSuccess(infos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
LogUtil.e(e.getMessage());
|
||||
}
|
||||
});
|
||||
mCompositeDisposable.add(mDisposable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页banner和tab
|
||||
* 获取首页tag
|
||||
*/
|
||||
public void getHomeTag() {
|
||||
if (mDisposable != null && !mDisposable.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
mDisposable = com.yizhuan.erban.home.model.HomeModel.get()
|
||||
com.yizhuan.erban.home.model.HomeModel.get()
|
||||
.getHomeTag()
|
||||
.compose(bindUntilEvent(PresenterEvent.DESTROY))
|
||||
.subscribe(new BiConsumer<List<HomeTagInfo>, Throwable>() {
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new SingleObserver<List<HomeTagInfo>>() {
|
||||
@Override
|
||||
public void accept(List<HomeTagInfo> infos, Throwable throwable) throws Exception {
|
||||
if (throwable == null) {
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<HomeTagInfo> infos) {
|
||||
IMainFragmentView iMainFragmentView = getMvpView();
|
||||
if (iMainFragmentView != null)
|
||||
getMvpView().onGetHomeTagSuccess(infos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
LogUtil.e(e.getMessage());
|
||||
}
|
||||
});
|
||||
mCompositeDisposable.add(mDisposable);
|
||||
}
|
||||
|
||||
public void uploadAddress(long uid, String address, int adcode, double longitude, double latitude) {
|
||||
@@ -355,4 +370,19 @@ public class MainFragmentPresenter extends BaseMvpPresenter<IMainFragmentView> {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
public void getHomeConcerns(){
|
||||
com.yizhuan.erban.home.model.HomeModel.get().getHomeConcerns().subscribe((result, throwable) -> {
|
||||
if (throwable != null) {
|
||||
if (mMvpView != null) {
|
||||
mMvpView.getFollowRoomFail();
|
||||
}
|
||||
} else {
|
||||
if (mMvpView != null) {
|
||||
mMvpView.getFollowRoomsSuccess(result);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@ package com.yizhuan.erban.home.view;
|
||||
import com.yizhuan.erban.home.bean.HomeTagInfo;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeBannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeConcernsInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TagListInfo;
|
||||
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeItem;
|
||||
@@ -27,6 +28,9 @@ public interface IMainFragmentView extends IMvpBaseView {
|
||||
|
||||
void showByMarketCheckingStatus(List<TagListInfo> tagListInfoList);
|
||||
|
||||
void getFollowRoomsSuccess(List<HomeConcernsInfo> infos);
|
||||
|
||||
void getFollowRoomFail();
|
||||
|
||||
/**
|
||||
* 假实现,用于在View销毁后 调用View方法导致空指针问题,的一种解决方案
|
||||
@@ -43,6 +47,16 @@ public interface IMainFragmentView extends IMvpBaseView {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomsSuccess(List<HomeConcernsInfo> infos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFollowRoomFail() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void titleListSuccess(List<TagListInfo> tagListInfoList) {
|
||||
|
||||
@@ -98,4 +112,5 @@ public interface IMainFragmentView extends IMvpBaseView {
|
||||
|
||||
void onGetHomeTagSuccess(List<HomeTagInfo> tagInfos);
|
||||
|
||||
|
||||
}
|
||||
|
11
app/src/main/res/drawable/bg_living_my_room.xml
Normal file
11
app/src/main/res/drawable/bg_living_my_room.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:startColor="#FF879A"
|
||||
android:endColor="#FF6B82"/>
|
||||
<corners android:radius="19dp"/>
|
||||
|
||||
</shape>
|
@@ -259,6 +259,14 @@
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_follow_room"
|
||||
|
@@ -46,7 +46,7 @@
|
||||
android:layout_height="@dimen/dp_drag_layout_bg_height"
|
||||
android:background="@drawable/bg_room_main_entrance"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="95dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:visibility="visible">
|
||||
|
||||
|
@@ -52,107 +52,115 @@
|
||||
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:contentScrim="@color/appColor"
|
||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed|exitUntilCollapsed">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll">
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll">
|
||||
android:minHeight="55dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:minHeight="60dp"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingRight="15dp"
|
||||
>
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="更多房间"
|
||||
android:onClick="@{click}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_12"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:drawableRight="@drawable/arrow_right_white"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_follow_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"/>
|
||||
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_indicator"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_follow_room"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="15dp"
|
||||
>
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_F9F9F9"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_roll_view" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/home_banner_group"
|
||||
<TextView
|
||||
android:id="@+id/tv_room_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="fl_roll_view" />
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="更多房间"
|
||||
android:onClick="@{click}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_12"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:drawableRight="@drawable/arrow_right_white"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="270dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_indicator"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_F9F9F9"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_roll_view" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/home_banner_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="fl_roll_view" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
@@ -242,7 +250,7 @@
|
||||
android:id="@+id/magic_indicator_bottom"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingRight="14dp" />
|
||||
</FrameLayout>
|
||||
|
@@ -6,17 +6,24 @@
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:layout_width="108dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="1.5dp"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.SquareLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_4">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:riv_corner_radius="@dimen/dp_16"
|
||||
app:riv_corner_radius="@dimen/dp_12"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_erban_grid_empty" />
|
||||
|
||||
@@ -36,6 +43,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_15" />
|
||||
android:layout_height="@dimen/dp_15"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@@ -10,7 +10,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_room_history_avatar_container"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="55dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" >
|
||||
@@ -19,16 +19,19 @@
|
||||
android:id="@+id/civ_room_avatar"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
app:civ_border_width="1dp"
|
||||
app:civ_border_width="2dp"
|
||||
tools:src="@color/multiple_image_select_accent"
|
||||
app:civ_border_color="@color/appColor"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_living"
|
||||
android:layout_width="38dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:background="@drawable/bg_common_confirm_normal"
|
||||
android:text="直播中"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_11"
|
||||
@@ -40,10 +43,9 @@
|
||||
android:id="@+id/tv_room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2.5dp"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_12"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textColor="@color/white"
|
||||
tools:text="小小问问小问问小问问问问"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@@ -8,6 +8,7 @@
|
||||
tools:layout_width="108dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="1.5dp"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -29,9 +30,9 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="7dp"
|
||||
android:paddingTop="2dp"
|
||||
|
@@ -532,5 +532,6 @@
|
||||
<color name="color_F770FF">#F770FF</color>
|
||||
<color name="color_EFEBFF">#EFEBFF</color>
|
||||
|
||||
<color name="color_FF6B82">#FF6B82</color>
|
||||
|
||||
</resources>
|
||||
|
@@ -3,14 +3,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<!-- <android.support.v4.widget.SwipeRefreshLayout-->
|
||||
<!-- android:id="@+id/refresh_layout"-->
|
||||
<!-- android:focusableInTouchMode="true"-->
|
||||
<!-- android:focusable="true"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent">-->
|
||||
|
||||
<com.yizhuan.erban.common.widget.StatusLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -23,6 +15,4 @@
|
||||
android:background="@color/color_F9F9F9" />
|
||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||
|
||||
|
||||
<!-- </android.support.v4.widget.SwipeRefreshLayout>-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Reference in New Issue
Block a user