com.youth.banner.Banner.setIndicatorGravity()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中com.youth.banner.Banner.setIndicatorGravity()方法的一些代码示例,展示了Banner.setIndicatorGravity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Banner.setIndicatorGravity()方法的具体详情如下:
包路径:com.youth.banner.Banner
类名称:Banner
方法名:setIndicatorGravity

Banner.setIndicatorGravity介绍

暂无

代码示例

代码示例来源:origin: gaolhjy/enjoyshop

/**
 * 轮播图数据
 */
private void setBannerData() {
  //设置图片集合
  mBanner.setImages(images);
  //设置标题集合(当banner样式有显示title时)
  mBanner.setBannerTitles(titles);
  //设置指示器位置(当banner模式中有指示器时)
  mBanner.setIndicatorGravity(BannerConfig.CENTER);
  mBanner.start();
}

代码示例来源:origin: wythe0102/Mall

banner.setIndicatorGravity(Banner.CENTER);
banner.setDelayTime(5000);//设置轮播间隔时间
bannerActivity.setIndicatorGravity(Banner.CENTER);
bannerActivity.setDelayTime(5000);//设置轮播间隔时间

代码示例来源:origin: wythe0102/Mall

banner.setIndicatorGravity(Banner.CENTER);
banner.setDelayTime(5000);//设置轮播间隔时间

代码示例来源:origin: Vegen/SmartCampus

viewTop.getLayoutParams().height = (int) marginHeight;
banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE);
banner.setIndicatorGravity(BannerConfig.CENTER);
banner.setImageLoader(new GlideImageLoader());
banner.setOnBannerListener(position -> {

代码示例来源:origin: SunAlwaysOnline/Sukeda

banner.setIndicatorGravity(BannerConfig.CENTER);

代码示例来源:origin: SunAlwaysOnline/Sukeda

banner.setIndicatorGravity(BannerConfig.CENTER);
banner.setOnBannerListener(new OnBannerListener() {
  @Override

代码示例来源:origin: wzmyyj/ZYMK

@Override
protected void initView() {
  view = mInflater.inflate(R.layout.panel_banner, null);
  mBanner = view.findViewById(R.id.banner);
  List images = new ArrayList<>();
  List<String> titles = new ArrayList<>();
  setData(images, titles);
  //设置图片加载器
  mBanner.setImageLoader(getImageLoader());
  //设置图片集合
  mBanner.setImages(images);
  //设置banner动画效果
  mBanner.setBannerAnimation(Transformer.Accordion);
  //设置标题集合(当banner样式有显示title时)
  mBanner.setBannerTitles(titles);
  //设置自动轮播,默认为true
  mBanner.isAutoPlay(true);
  //设置轮播时间
  mBanner.setDelayTime(5000);
  //设置banner样式
  mBanner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE);
  //设置指示器位置(当banner模式中有指示器时)
  mBanner.setIndicatorGravity(BannerConfig.RIGHT);
  // 自定义样式
  setBanner(mBanner);
  //banner设置方法全部调用完毕时最后调用
  mBanner.start();
}

代码示例来源:origin: BolexLiu/ApkBusBlog

private void initBannerStyle() {
  //设置banner样式
  banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE);
  //设置图片加载器
  banner.setImageLoader(new GlideImageLoader());
  //设置banner动画效果
  banner.setBannerAnimation(Transformer.ZoomOutSlide);
  //设置自动轮播,默认为true
  banner.isAutoPlay(true);
  //设置轮播时间
  banner.setDelayTime(3000);
  //设置指示器位置(当banner模式中有指示器时)
  banner.setIndicatorGravity(BannerConfig.CENTER);
  //banner设置方法全部调用完毕时最后调用
}

代码示例来源:origin: 6ag/BaoKanAndroid

.setDelayTime(5000)
.setBannerAnimation(Transformer.Default)
.setIndicatorGravity(BannerConfig.RIGHT)
.start();

代码示例来源:origin: yoyiyi/bilisoleil

@Override
public void onBindHeaderViewHolder(ViewHolder holder) {
  Banner bannar = holder.getView(R.id.banner);
  List<String> urls = Stream.of(mList).map(bannerBean -> bannerBean.image).collect(Collectors.toList());
  bannar.setIndicatorGravity(BannerConfig.RIGHT)
      .setImages(urls)
      .setImageLoader(new GlideImageLoader())
      .start();
  bannar.setOnBannerListener(i -> {
    RegionRecommend.BannerBean.TopBean bannerBean = mList.get(i);
    BrowerActivity.startActivity(mContext,bannerBean.uri,bannerBean.title,bannerBean.image);
  });
}

代码示例来源:origin: yoyiyi/bilisoleil

@Override
public void onBindHeaderViewHolder(ViewHolder holder) {
  Banner banner = holder.getView(R.id.banner);
  List<String> urls = Stream.of(mList).map(bannerBean -> bannerBean.img).collect(Collectors.toList());
  banner.setIndicatorGravity(BannerConfig.RIGHT)
      .setImages(urls)
      .setImageLoader(new GlideImageLoader())
      .start();
  banner.setOnBannerListener(i -> {
    LivePartition.BannerBean bannerBean = mList.get(i);
    BrowerActivity.startActivity(mContext,bannerBean.link,bannerBean.title,bannerBean.img);
  });
}

代码示例来源:origin: zhouxianling/VlayoutDemo

mBanner.setIndicatorGravity(BannerConfig.CENTER);

代码示例来源:origin: AdleyLong/RecyclerViewDemo

.setImages(urls)
.setDelayTime(2000)
.setIndicatorGravity(BannerConfig.RIGHT)
.setOnBannerClickListener(new OnBannerClickListener() {
  @Override

代码示例来源:origin: SunAlwaysOnline/Sukeda

private void initBanner(View v, List<String> list) {
  banner = (Banner) v.findViewById(R.id.banner);
  //设置banner样式
  banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR);
  //设置指示器位置(当banner模式中有指示器时)
  banner.setIndicatorGravity(BannerConfig.CENTER);
  //设置图片加载器
  banner.setImageLoader(new GlideImageLoader());
  //设置图片集合
  banner.setImages(list);
  //设置banner动画效果
  banner.setBannerAnimation(Transformer.Default);
  //设置自动轮播,默认为true
  banner.isAutoPlay(true);
  //设置轮播时间
  banner.setDelayTime(3000);
  banner.setOnBannerListener(new OnBannerListener() {
    @Override
    public void OnBannerClick(int position) {
      com.example.bmobtest.Utils.Toast.show_info(getActivity(), "该图片不包括内容!");
    }
  });
  //banner设置方法全部调用完毕时最后调用
  banner.start();
}

代码示例来源:origin: yoyiyi/bilisoleil

List<InterestAd.ResultBean> adList = mulInterest.mInterestAdList.result;
List<String> urls = Stream.of(adList).map(bannerBean -> bannerBean.ads_image).collect(Collectors.toList());
banner.setIndicatorGravity(BannerConfig.RIGHT)
    .setImages(urls)
    .setImageLoader(new GlideImageLoader())

代码示例来源:origin: yoyiyi/bilisoleil

List<Recommend.BannerItemBean> banner_item = mulRecommend.mBannerItemBean;
List<String> urls = Stream.of(banner_item).map(bannerBean -> bannerBean.image).collect(Collectors.toList());
bannar.setIndicatorGravity(BannerConfig.RIGHT)
    .setImages(urls)
    .setImageLoader(new GlideImageLoader())

代码示例来源:origin: yaozs/YzsLib

banner.setIndicatorGravity(BannerConfig.CENTER);

代码示例来源:origin: yaozs/YzsLib

banner.setIndicatorGravity(BannerConfig.CENTER);

代码示例来源:origin: borneywpf/TLRLoadRefresh

mBanner.setIndicatorGravity(BannerConfig.CENTER);

代码示例来源:origin: SunAlwaysOnline/Sukeda

private void initBanner() {
  banner = (Banner) findViewById(R.id.banner);
  //设置banner样式
  banner.setBannerStyle(BannerConfig.NUM_INDICATOR_TITLE);
  //设置图片加载器
  banner.setImageLoader(new GlideImageLoader());
  //设置图片集合
  List<String> title = LibraryPictureUtil.get_library_pic_title();
  List<String> url = LibraryPictureUtil.get_library_picture_url();
  banner.setImages(url);
  //设置banner动画效果
  banner.setBannerAnimation(Transformer.Default);
  //设置标题集合(当banner样式有显示title时)
  banner.setBannerTitles(title);
  //设置自动轮播,默认为true
  banner.isAutoPlay(true);
  //设置轮播时间
  banner.setDelayTime(3000);
  //设置指示器位置(当banner模式中有指示器时)
  banner.setIndicatorGravity(BannerConfig.CENTER);
  //banner设置方法全部调用完毕时最后调用
  banner.start();
}

相关文章