Android图片工具类: android-image-indicator

jopen 10年前

基于ViewPager的用户指引,图片Gallery,及自动轮播图片Gallery,使用起来超简单!

Style 1:

common mode:

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

set ImageIndicatorView as:

  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();

broadcast mode:

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

set AutoImageIndicatorView as:

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();

68747470733a2f2f7261772e6769746875622e636f6d2f616c6c7468656c75636b792f616e64726f69642d696d6167652d696e64696361746f722f6d61737465722f416e64726f6964496d616765496e64696361746f722f73637265656e73686f742f706f73746572302e6a7067.jpg

Style2(user guide mode):

<com.allthelucky.common.view.ImageIndicatorView      android:id="@+id/guide_indicate_view"      android:layout_width="match_parent"      android:layout_height="match_parent" />

set ImageIndicatorView as:

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();

ScreenShot

ScreenShot

项目主页:http://www.open-open.com/lib/view/home/1406259768179