一、添加依赖
compile 'com.panxw.imageindicator:library:1.0.2'
二、xml布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mly.panhouye.demo.MainActivity">
<com.panxw.android.imageindicator.ImageIndicatorView
android:id="@+id/indicate"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.panxw.android.imageindicator.ImageIndicatorView>
</RelativeLayout>
Java中代码
1.加载本地图片