Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

CirclePageIndicator has no clue of its width or height #398

Open
RoelRoel opened this issue Mar 11, 2016 · 1 comment
Open

CirclePageIndicator has no clue of its width or height #398

RoelRoel opened this issue Mar 11, 2016 · 1 comment

Comments

@RoelRoel
Copy link

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.

@RoelRoel RoelRoel changed the title CirclePageIndicator has no clue of its with or height CirclePageIndicator has no clue of its width or height Mar 11, 2016
@CapnSpellcheck
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants