Cut at the top
Closed this issue · 11 comments
what the value of layout_height
of this indicator?
in my xml:
<myproject.CirclePageIndicator
android:id="@+id/page_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
my style:
<!-- Indicador de pagina em circulo -->
<declare-styleable name="ViewPagerIndicator">
<attr name="vpiCirclePageIndicatorStyle" format="reference"/>
</declare-styleable>
<!-- Configurações -->
<bool name="default_circle_indicator_centered">true</bool>
<color name="default_circle_indicator_fill_color">@color/grey_claro</color>
<color name="default_circle_indicator_page_color">#00000000</color>
<integer name="default_circle_indicator_orientation">0</integer>
<dimen name="default_circle_indicator_radius">6dp</dimen>
<bool name="default_circle_indicator_snap">false</bool>
<color name="default_circle_indicator_stroke_color">@color/dividerColor</color>
<dimen name="default_circle_indicator_stroke_width">1dp</dimen>
<!-- Configurações -->
<attr name="centered" format="boolean" />
<attr name="strokeWidth" format="dimension" />
<declare-styleable name="CirclePageIndicator">
<!-- Whether or not the indicators should be centered. -->
<attr name="centered" />
<!-- Color of the filled circle that represents the current page. -->
<attr name="fillColor" format="color" />
<!-- Color of the filled circles that represents pages. -->
<attr name="pageColor" format="color" />
<!-- Orientation of the indicator. -->
<attr name="android:orientation"/>
<!-- Radius of the circles. This is also the spacing between circles. -->
<attr name="radius" format="dimension" />
<!-- Whether or not the selected indicator snaps to the circles. -->
<attr name="snap" format="boolean" />
<!-- Color of the open circles. -->
<attr name="strokeColor" format="color" />
<!-- Width of the stroke used to draw the circles. -->
<attr name="strokeWidth" />
<!-- View background -->
<attr name="android:background"/>
</declare-styleable>
Could you post your layout file or show your layout bounds through this way:
Settings -> Developer options -> Show layout bounds.
This way may be useful tp debug layout problem.
<android.support.v4.view.ViewPager
android:id="@+id/vpFullScreenCameras"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<br.com.mypackage.util.pagerindicator.CirclePageIndicator
android:id="@+id/page_indicator_fullScreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
try at other places :/
Is the indicator covered by other views ?
Could you show your layout bounds, and then capture the screen and post it ?
I've found the cause and fixed it in my branch.
This is my branch: https://github.com/msdx/ViewPagerIndicator/tree/msdx
If you are gradle user, it will very easy to include the library:
maven { url "http://oss.jfrog.org/oss-snapshot-local/" } // declare SNAPSHOT repository
compile 'com.githang:viewpagerindicator:2.5-SNAPSHOT@aar' // declare the dependency
it worked, thank you.
You can give some value to paddingTop
to avoid this issue.