本文整理汇总了Java中com.bigkoo.convenientbanner.CBViewHolderCreator类的典型用法代码示例。如果您正苦于以下问题:Java CBViewHolderCreator类的具体用法?Java CBViewHolderCreator怎么用?Java CBViewHolderCreator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CBViewHolderCreator类属于com.bigkoo.convenientbanner包,在下文中一共展示了CBViewHolderCreator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateBannerData
import com.bigkoo.convenientbanner.CBViewHolderCreator; //导入依赖的package包/类
private void updateBannerData() {
if (mBannerDatas.isEmpty()) {
mBannerDatas.add(new BannerObject());
}
banner.setPages(new CBViewHolderCreator() {
@Override
public Object createHolder() {
return new LocalImageHolder();
}
}, mBannerDatas);
int bannerStartPos = 0;
bannerIndicator.setCount(mBannerDatas.size(), bannerStartPos);
bannerName.setVisibility(View.VISIBLE);
if (mBannerDatas.size() > 0) {
bannerName.setText(mBannerDatas.get(bannerStartPos).getName());
bannerTitle.setText(mBannerDatas.get(bannerStartPos).getTitle());
}
}
示例2: onBindData2View
import com.bigkoo.convenientbanner.CBViewHolderCreator; //导入依赖的package包/类
@Override
public void onBindData2View(List<TopStoriesBean> data) {
convenientBanner
.setPages(new CBViewHolderCreator<NetworkImageHolderView>() {
@Override
public NetworkImageHolderView createHolder() {
return new NetworkImageHolderView();
}
}, data)
.setPageIndicator(new int[]{R.drawable.ic_page_indicator,
R.drawable.ic_page_indicator_focused})
.setPageTransformer(ConvenientBanner.Transformer.AccordionTransformer)
.startTurning(5000);
}
示例3: showAndRunAdsBanner
import com.bigkoo.convenientbanner.CBViewHolderCreator; //导入依赖的package包/类
@Override
public void showAndRunAdsBanner(List<String> imgUrls, int period) {
if (bannerMain != null) {
bannerMain.setPages(
new CBViewHolderCreator<ImageViewHolder>() {
@Override
public ImageViewHolder createHolder() {
return new ImageViewHolder();
}
}, imgUrls)
.setPageIndicator(new int[]{R.drawable.ic_banner_indicator, R.drawable.ic_banner_indicator_focus})
.setPageTransformer(ConvenientBanner.Transformer.DefaultTransformer);
bannerMain.startTurning(period);
}
}