本文整理匯總了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);
}
}