本文整理汇总了Java中cn.bingoogolapple.bgabanner.BGABanner类的典型用法代码示例。如果您正苦于以下问题:Java BGABanner类的具体用法?Java BGABanner怎么用?Java BGABanner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BGABanner类属于cn.bingoogolapple.bgabanner包,在下文中一共展示了BGABanner类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void init() {
super.init();
activityFragment = new ActivityFragment();
articleFragment = new ArticleFragment();
fragments.add(articleFragment);
fragments.add(activityFragment);
titles.add(ARTICLE);
titles.add(ACTIVITY);
pageAdapter = new PageAdapter(getChildFragmentManager(), fragments, titles);
viewPager.setAdapter(pageAdapter);
tabLayout.setupWithViewPager(viewPager);
tabLayout.setTabMode(TabLayout.MODE_FIXED);
bgaBanner.setData(R.drawable.banner1, R.drawable.banner2, R.drawable.banner3, R.drawable.banner4);
bgaBanner.setDelegate(new BGABanner.Delegate() {
@Override
public void onBannerItemClick(BGABanner banner, View itemView, Object model, int position) {
showToast(position + "");
}
});
}
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:26,代码来源:HomeFragment.java
示例2: initListener
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
private void initListener() {
bgaBanner.setDelegate(new BGABanner.Delegate() {
@Override
public void onBannerItemClick(BGABanner banner, View itemView, Object model, int position) {
showToast(position + "");
}
});
loadMore();
refresh();
comment();
praise();
toPersonPage();
}
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:17,代码来源:CircleFragment.java
示例3: getHeadView
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
private View getHeadView() {
View headView = View.inflate(mContext, R.layout.bag_banner_layout, null);
mBGABanner = (BGABanner) headView.findViewById(R.id.banner);
mBGABanner.setAdapter(this);
mBGABanner.setDelegate(this);
mBGABanner.setTransitionEffect(TransitionEffect.Default);
return headView;
}
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:9,代码来源:BgaAllActivity.java
示例4: onBind
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void onBind() {
mBanner.setAdapter(new BGABanner.Adapter() {
@Override
public void fillBannerItem(BGABanner banner, View view, Object model, int position) {
((ImageView) view).setImageResource((int) model);
}
});
mBanner.setData(Arrays.asList(R.mipmap.a, R.mipmap.b, R.mipmap.c, R.mipmap.d, R.mipmap.e, R.mipmap.f,
R.mipmap.g, R.mipmap.h), null);
}
开发者ID:ssseasonnn,项目名称:PracticalRecyclerView,代码行数:12,代码来源:Header.java
示例5: setBanner
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void setBanner(BGABanner.Adapter<ImageView, String> adapter, List<String> banners) {
mBanner.setAdapter(adapter);
mBanner.setData(banners, banners);
}
开发者ID:GitLqr,项目名称:LQRBiliBlili,代码行数:6,代码来源:LiveFragment.java
示例6: fillBannerItem
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void fillBannerItem(BGABanner banner, ImageView itemView, String model, int position) {
mAppComponent.imageLoader().loadImage(mContext, ImageConfigImpl.builder().imageView(itemView).url(model).build());
}
开发者ID:GitLqr,项目名称:LQRBiliBlili,代码行数:5,代码来源:RecommendMultiItemAdapter.java
示例7: convert
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
protected void convert(BaseViewHolder helper, RecommendMultiItem item) {
if (mAppComponent == null) {
mAppComponent = ArmsUtils.obtainAppComponentFromContext(mContext);
}
IndexData.DataBean itemBean = item.getIndexDataBean();
switch (item.getItemType()) {
case RecommendMultiItem.BANNER:
BGABanner banner = helper.getView(R.id.banner);
List<IndexData.DataBean.BannerItemBean> banners = itemBean.getBanner_item();
List<String> images = new ArrayList<>();
if (banners != null && banners.size() > 0) {
for (int i = 0; i < banners.size(); i++) {
IndexData.DataBean.BannerItemBean bannerItem = banners.get(i);
images.add(bannerItem.getImage());
}
}
banner.setAdapter(mBannerAdapter);
banner.setData(images, images);
break;
case RecommendMultiItem.STREAMER:
mAppComponent.imageLoader().loadImage(mContext, ImageConfigImpl.builder().imageView(helper.getView(R.id.iv_streamer)).url(itemBean.getCover()).build());
helper.setText(R.id.tv_item_title, itemBean.getTitle())
.setText(R.id.tv_badge, TextUtils.isEmpty(itemBean.getBadge()) ? ("topic".equals(itemBean.getGotoX()) ? "话题" : "") : itemBean.getBadge())
.setText(R.id.tv_desc, itemBean.getDesc());
break;
case RecommendMultiItem.ITEM_AV:
setItemPaddingAndImage(helper, item, itemBean);
helper.setText(R.id.tv_play, TextHandleUtil.handleCount2TenThousand(itemBean.getPlay()))
.setText(R.id.tv_danmaku, TextHandleUtil.handleCount2TenThousand(itemBean.getDanmaku()))
.setText(R.id.tv_duration, TextHandleUtil.handleDurationSecond(itemBean.getDuration()))
.setText(R.id.tv_title, itemBean.getTitle())
.setText(R.id.tv_tname_tag_name, itemBean.getTname() + "‧" + (itemBean.getTag() == null ? "" : itemBean.getTag().getTag_name()));
break;
case RecommendMultiItem.ITEM_AV_RCMD_REASON:
setItemPaddingAndImage(helper, item, itemBean);
helper.setText(R.id.tv_play, TextHandleUtil.handleCount2TenThousand(itemBean.getPlay()))
.setText(R.id.tv_danmaku, TextHandleUtil.handleCount2TenThousand(itemBean.getDanmaku()))
.setText(R.id.tv_duration, TextHandleUtil.handleDurationSecond(itemBean.getDuration()))
.setText(R.id.tv_title, itemBean.getTitle())
.setText(R.id.tv_rcmd_reason, itemBean.getRcmd_reason().getContent());
break;
case RecommendMultiItem.ITEM_BANGUMI:
setItemPaddingAndImage(helper, item, itemBean);
helper.setText(R.id.tv_play, TextHandleUtil.handleCount2TenThousand(itemBean.getPlay()))
.setText(R.id.tv_favorite, itemBean.getFavorite() + "")
.setText(R.id.tv_title, itemBean.getTitle())
.setText(R.id.tv_last_index, mContext.getResources().getString(R.string.recommend_home_update_to_last_index, itemBean.getLast_index()))
.setText(R.id.tv_badge, itemBean.getBadge());
break;
case RecommendMultiItem.ITEM_LOGIN:
break;
case RecommendMultiItem.ITEM_AD_WEB_S:
setItemPaddingAndImage(helper, item, itemBean);
helper.setText(R.id.tv_title, itemBean.getTitle())
.setText(R.id.tv_desc, itemBean.getDesc());
break;
case RecommendMultiItem.ITEM_ARTICLE_S:
setItemPaddingAndImage(helper, item, itemBean);
helper.setText(R.id.tv_play, TextHandleUtil.handleCount2TenThousand(itemBean.getPlay()))
.setText(R.id.tv_favorite, itemBean.getFavorite() + "")
.setText(R.id.tv_title, itemBean.getTitle())
.setText(R.id.tv_desc, itemBean.getDesc());
break;
case RecommendMultiItem.PRE_HERE_CLICK_TO_REFRESH:
break;
}
}
开发者ID:GitLqr,项目名称:LQRBiliBlili,代码行数:69,代码来源:RecommendMultiItemAdapter.java
示例8: fillBannerItem
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void fillBannerItem(BGABanner banner, ImageView itemView, String model, int position) {
Glide.with(mContext)
.load(model)
.into(itemView);
}
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:7,代码来源:BgaAllActivity.java
示例9: onBannerItemClick
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
@Override
public void onBannerItemClick(BGABanner banner, ImageView itemView, String model, int position) {
T.showSToast(mContext, "you click " + (position + 1));
}
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:5,代码来源:BgaAllActivity.java
示例10: HeaderHolder
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
public HeaderHolder(View itemView) {
super(itemView);
banner = (BGABanner) itemView.findViewById(R.id.banner_splash_pager);
}
开发者ID:maxwell-nc,项目名称:ExhibitionCenter,代码行数:6,代码来源:RecommendedAdapter.java
示例11: setBanner
import cn.bingoogolapple.bgabanner.BGABanner; //导入依赖的package包/类
void setBanner(BGABanner.Adapter<ImageView, String> adapter, List<String> banners);
开发者ID:GitLqr,项目名称:LQRBiliBlili,代码行数:2,代码来源:LiveContract.java
注:本文中的cn.bingoogolapple.bgabanner.BGABanner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论