0

what I need here is actually difficult to express in words. I am using viewpager to transact between fragments in my android app. But I also want to show which fragment user is seeing currently by showing small dots below.

Please see the image to get a clear view of what I am trying to say. So, is there any library or something to achieve this.

Please let me know. Thanks in advance. :-)enter image description here

Anush
  • 95
  • 7
  • Check this [Link](http://viewpagerindicator.com/) for library and for more [details](http://stackoverflow.com/questions/12316931/android-view-pager-with-page-indicator) – Yugesh Feb 07 '14 at 06:46

2 Answers2

0

It is call PageIndicatior. This is library that you can use for implementation

https://github.com/JakeWharton/Android-ViewPagerIndicator

Biraj Zalavadia
  • 28,348
  • 10
  • 61
  • 77
0

1)First of all download ViewPagerIndicator Library Project from this Location :: http://viewpagerindicator.com/

2). Add that Project as Library in your Application.

3). Add this code in your XML where you have define ViewPages as well.

<com.viewpagerindicator.CirclePageIndicator
    android:id="@+id/indicator"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="3dp"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="30dp"
    android:layout_centerHorizontal="true"
    android:padding="10dip"
    app:fillColor="#FFFFFF"
    app:pageColor="#000000"
    app:radius="5dp"
    app:strokeColor="#C0C0C0"
    app:strokeWidth="1dp" 
    />

4). Create Reference in Activity side eg: private CirclePageIndicator circlePageIndicator;

5). Create Object eg:circlePageIndicator = (CirclePageIndicator) findViewById(R.id.indicator);

6). Pass ViewPager Object into this Method circlePageIndicator.setViewPager(viewPagerObj);

Mihir Vyas
  • 143
  • 5