CirclePageIndicator not properly centered

Author: kdbruinCreated Mar 11, 2014Updated Mar 9, 2017

I've a layout where a clear line marks the vertical center of the screen:

https://www.dropbox.com/s/pa7mfx73liujz6b/device-2014-03-11-154308.png

As you can see the indicators do not center properly with either the "centered" or "layout_gravity" attribute. I've the following XML:

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" >

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center" />

    <com.viewpagerindicator.CirclePageIndicator
        android:id="@+id/indicator"
        android:layout_gravity="bottom|center"   <!-- doesn't work -->
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:padding="6dp"
        app:centered="true"    <!-- doesn't work either -->
        app:fillColor="#FFFFFFFF"
        app:pageColor="#88FFFFFF"
        app:radius="4dp"
        app:strokeColor="#FF1047A9"
        app:strokeWidth="1dp" />
</FrameLayout>

Changing the layout_width for the indicator to "wrap_content" doesn't change anything.

This is with version 2.4.1 of the library.

Source: JakeWharton/ViewPagerIndicator