use of com.hotbitmapgg.bilibili.entity.live.LiveAppIndexInfo 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();
}
}
Aggregations