修复豪气榜神秘人问题
This commit is contained in:
parent
87afe9297d
commit
b2f35fdc16
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
// serverHost : "https://napi.yaoulive.com",
|
serverHost : "https://napi.yaoulive.com",
|
||||||
//测试
|
//测试
|
||||||
serverHost : "https://ceshi.yaoulive.com",
|
// serverHost : "https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//腾讯地图
|
//腾讯地图
|
||||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
package com.yunbao.main.views;
|
package com.yunbao.main.views;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -13,6 +9,8 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.google.android.material.appbar.AppBarLayout;
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||||
@ -29,14 +27,12 @@ import com.yunbao.common.http.CommonHttpUtil;
|
|||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.AbsMainViewHolder;
|
import com.yunbao.common.views.AbsMainViewHolder;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
@ -91,14 +87,34 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
|
|||||||
hv = new HeadView(rootView);
|
hv = new HeadView(rootView);
|
||||||
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list);
|
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list);
|
||||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
loadData = list -> {
|
loadData = new OnLoadData() {
|
||||||
Log.i("测试", "onData: " + list.size());
|
@Override
|
||||||
for (int i = 0; i < list.size(); i++) {
|
public void onData(List<ListBean> list, List<String> outRankHide) {
|
||||||
if (i < 3) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
hv.setData(list.get(i), i);
|
if (outRankHide != null) {
|
||||||
|
for (String hideId : outRankHide) {
|
||||||
|
if (i < 3) {
|
||||||
|
hv.setData(list.get(i).setHide(TextUtils.equals(list.get(i).getUid(), hideId)), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (i < 3) {
|
||||||
|
hv.setData(list.get(i), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// list -> {
|
||||||
|
// Log.i("测试", "onData: " + list.size());
|
||||||
|
// for (int i = 0; i < list.size(); i++) {
|
||||||
|
// if (i < 3) {
|
||||||
|
//
|
||||||
|
// hv.setData(list.get(i), i);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// };
|
||||||
rootView.addOnOffsetChangedListener(new AppBarLayout.BaseOnOffsetChangedListener() {
|
rootView.addOnOffsetChangedListener(new AppBarLayout.BaseOnOffsetChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
||||||
@ -151,7 +167,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
|
|||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -206,7 +222,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnLoadData {
|
public interface OnLoadData {
|
||||||
void onData(List<ListBean> list);
|
void onData(List<ListBean> list, List<String> outRankHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnAppbarListener {
|
public interface OnAppbarListener {
|
||||||
@ -372,7 +388,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
|
|||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,9 +57,10 @@ public class MainListContributeViewHolder extends AbsMainListChildViewHolder {
|
|||||||
list = JSON.parseArray(Arrays.toString(info), ListBean.class);
|
list = JSON.parseArray(Arrays.toString(info), ListBean.class);
|
||||||
if (mRefreshView.getPageCount() == 1) {
|
if (mRefreshView.getPageCount() == 1) {
|
||||||
if (loadData != null) {
|
if (loadData != null) {
|
||||||
loadData.onData(list);
|
loadData.onData(list,outRankHide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mAdapter.setHide(outRankHide);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.yunbao.common.adapter.RefreshAdapter;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.custom.CommonRefreshView;
|
import com.yunbao.common.custom.CommonRefreshView;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
import com.yunbao.main.adapter.MainListAdapter;
|
import com.yunbao.main.adapter.MainListAdapter;
|
||||||
import com.yunbao.main.bean.ListBean;
|
import com.yunbao.main.bean.ListBean;
|
||||||
import com.yunbao.main.http.MainHttpConsts;
|
import com.yunbao.main.http.MainHttpConsts;
|
||||||
@ -54,7 +53,7 @@ public class MainListProfitViewHolder extends AbsMainListChildViewHolder {
|
|||||||
list = JSON.parseArray(Arrays.toString(info), ListBean.class);
|
list = JSON.parseArray(Arrays.toString(info), ListBean.class);
|
||||||
if (mRefreshView.getPageCount() == 1) {
|
if (mRefreshView.getPageCount() == 1) {
|
||||||
if (loadData != null) {
|
if (loadData != null) {
|
||||||
loadData.onData(list);
|
loadData.onData(list, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
Reference in New Issue
Block a user