Android图片轮播组件(多模式) android-image-indicator

码农软件 · 软件分类 · Android UI 组件 · 2019-04-26 20:26:56

软件介绍

一、简介

基于ViewPager的用户指引,广告图片Gallery,及自动轮播图片Gallery,使用起来超简单!
GitHub地址:https://github.com/panxw/android-image-indicator

二、使用示例

1、广告图片Gallery

<com.allthelucky.common.view.ImageIndicatorView
    android:id="@+id/indicate_view"
    android:layout_width="match_parent"
    android:layout_height="160dp" />
代码:

imageIndicatorView = (ImageIndicatorView) findViewById(R.id.indicate_view);
  final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
  imageIndicatorView.setupLayoutByDrawable(resArray);
  imageIndicatorView.show();
2、自动轮播模式

<com.allthelucky.common.view.AutoImageIndicatorView
    android:id="@+id/auto_indicate_view"
    android:layout_width="match_parent"
    android:layout_height="160dp" />
代码:

autoImageIndicatorView = (AutoImageIndicatorView) findViewById(R.id.auto_indicate_view);
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
autoImageIndicatorView.setBroadcastEnable(true);
autoImageIndicatorView.setBroadCastTimes(5);//循环播放5次
autoImageIndicatorView.setBroadcastTimeIntevel(2 * 1000, 3 * 1000);//播放启动时间及间隔
autoImageIndicatorView.setupLayoutByDrawable(resArray);//图片
autoImageIndicatorView.show();

效果图:


3、用户指引模式

this.imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view);
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
imageIndicatorView.setupLayoutByDrawable(resArray);
imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE);
imageIndicatorView.show();

效果图:



PS:
顺便宣传下自己的GitHub,https://github.com/panxw, 欢迎来Follow~

本文地址:https://www.codercto.com/soft/d/4454.html

C语言的科学和艺术

C语言的科学和艺术

罗伯茨 / 翁惠玉 / 机械工业出版社 / 2005-3 / 55.00元

《C语言的科学和艺术》是计算机科学的经典教材,介绍了计算机科学的基础知识和程序设计的专门知识。《C语言的科学和艺术》以介绍ANSI C为主线,不仅涵盖C语言的基本知识,而且介绍了软件工程技术以及如何应用良好的程序设计风格进行开发等内容。《C语言的科学和艺术》采用了库函数的方法,强调抽象的原则,详细阐述了库和模块化开发。此外,《C语言的科学和艺术》还利用大量实例讲述解决问题的全过程,对开发过程中常见......一起来看看 《C语言的科学和艺术》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

html转js在线工具
html转js在线工具

html转js在线工具