直播间的滚动修复直播间聊天问题

This commit is contained in:
18401019693 2022-08-22 15:10:52 +08:00
parent 42a0440e6f
commit 318a3dcf8c

View File

@ -215,6 +215,22 @@ public class LiveAudienceActivity extends LiveActivity {
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
mCurrentItem = position; mCurrentItem = position;
Log.e(TAG, "mCurrentItem:" + mCurrentItem); Log.e(TAG, "mCurrentItem:" + mCurrentItem);
if (mCurrentItem == itemModelList.size() - 1) {
MainNetManager.get(mContext)
.anchorRecommend("30", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
@Override
public void onSuccess(AnchorRecommendModel data) {
itemModelList.addAll(data.getList());
mPagerAdapter.notifyDataSetChanged();
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
} }
@Override @Override