今天写了个关于circlePageIndicator的例子,这个是TabPageIndicator里的一个开源项目,在期间发现了不少问题,在这里总结一下
先来看例子
1、首先是xml的布局,来看看activity_main里的代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="240dp"
android:layout_centerHorizontal="true"
/>
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/circlePage"
android:layout_width="wrap_conte