CircleIndicator

Additional

Language
Java
Version
N/A
Created
Oct 7, 2015
Updated
Oct 19, 2016 (Retired)
Owner
xiayong (THEONE10211024)
Contributors
xiayong (THEONE10211024)
trongdth
tangculijier
vdubedout
4
Activity
Badge
Generate
Download
Source code
APK file

Advertising

CircleIndicator

a lightweight viewpager indicator!

Usage

xml:

 <pers.medusa.circleindicator.widget.CircleIndicator
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_centerVertical="true"
        android:id="@+id/indicator"
        CircleIndicator:ci_background="@android:color/white"
        CircleIndicator:ci_selected_background="0xffe6454a"
        CircleIndicator:ci_mode="outside"
        CircleIndicator:ci_gravity="center"
        CircleIndicator:ci_radius="10dp"
        CircleIndicator:ci_margin="5dp"
        />

java:

        circleIndicator.setViewPager(viewPager);

Notice:the method should be called after ViewPager.setAdapter().

#####Properties:

  • app: ci_radius :indicator's radiusapp: ci_margin :margin between two indicatorsapp: ci_background:indicator's backgroundapp: ci_selected_background:selected indicator's backgroundapp: ci_gravity:indicator's layout gravity,support left,center and right.app: ci_mode:indicator's change mode when viewpager scrolled