JakeWharton/ViewPagerIndicator

CirclePageIndicator has no clue of its width or height

RoelRoel opened this issue · 1 comments

The measurement methods are not correctly implemented which makes it hard to proparly place the CirclePageIndicator if you want to use it in your layouts.
When I for example set the width to "wrap_content" because I want to place a Next and Previous button next to it: the left part is cut off a little.

A workaround for this is to set the paddingLeft and the paddingRight to correct it.

The height is also allways 0: so it has to be corrected with margins to place it in the center.

I looked at the measure methods and didn't really see why it gets cut off but I agree, it does.
I think it has to do with onDraw actually and the 'center' attribute which I don't understand what it's for. But try putting app:centered="false". For the height (of a horizontal) I don't get 0, are you using wrap_content? The edge of the circle gets clipped so I put a padding of 2dp all around it and it's great.