use of com.hotbitmapgg.bilibili.widget.banner.BannerEntity in project bilibili-android-client by HotBitmapGG.
the class LiveAppIndexAdapter method setLiveInfo.
public void setLiveInfo(LiveAppIndexInfo liveAppIndexInfo) {
this.mLiveAppIndexInfo = liveAppIndexInfo;
entranceSize = 4;
liveSizes.clear();
bannerEntitys.clear();
int tempSize = 0;
int partitionSize = mLiveAppIndexInfo.getData().getPartitions().size();
List<LiveAppIndexInfo.DataBean.BannerBean> banner = mLiveAppIndexInfo.getData().getBanner();
Observable.from(banner).forEach(bannerBean -> bannerEntitys.add(new BannerEntity(bannerBean.getLink(), bannerBean.getTitle(), bannerBean.getImg())));
for (int i = 0; i < partitionSize; i++) {
liveSizes.add(tempSize);
tempSize += mLiveAppIndexInfo.getData().getPartitions().get(i).getLives().size();
}
}
use of com.hotbitmapgg.bilibili.widget.banner.BannerEntity in project bilibili-android-client by HotBitmapGG.
the class HomeBangumiFragment method finishTask.
@Override
protected void finishTask() {
mSwipeRefreshLayout.setRefreshing(false);
mIsRefreshing = false;
hideEmptyView();
Observable.from(banners).compose(bindToLifecycle()).forEach(bannersBean -> bannerList.add(new BannerEntity(bannersBean.getLink(), bannersBean.getTitle(), bannersBean.getImg())));
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiBannerSection(bannerList));
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiItemSection(getActivity()));
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiNewSerialSection(getActivity(), newBangumiSerials));
if (!bangumibobys.isEmpty()) {
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiBobySection(getActivity(), bangumibobys));
}
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiSeasonNewSection(getActivity(), season, seasonNewBangumis));
mSectionedRecyclerViewAdapter.addSection(new HomeBangumiRecommendSection(getActivity(), bangumiRecommends));
mSectionedRecyclerViewAdapter.notifyDataSetChanged();
}
Aggregations