-
Notifications
You must be signed in to change notification settings - Fork 4k
Add extraSpacing attribute to CirclePageIndicator #231
base: master
Are you sure you want to change the base?
Conversation
The extraSpacing attribute specifies additional spacing between the circles, also configurable via the setExtraSpacing(float) method.
@JakeWharton Pull this one Jake! |
The centering of the circles is not working correctly anymore. You should maybe check the calculation of the longOffset inside the onDraw-Method (line 240++). |
@JakeWharton will you merge this? |
Hi @JakeWharton Could you please merge this? |
@JakeWharton merge this one, please! |
@JakeWharton As per your last commit. I have made the necessary changes in the code. it seems to be working fine. Only problem which i have facing currently is when I apply extra spacing the circle doesnt fit in the centre. Can you help me please? |
@malikkhoja This should solve your problem of centering (line 240 and following): final float threeRadius = mRadius * 2 + mExtraSpacing;
final float shortOffset = shortPaddingBefore + mRadius;
float longOffset = longPaddingBefore + mRadius;
if (mCentered) {
final float circleSize = mRadius * 2;
final float width = count * circleSize + ((count - 1) * mExtraSpacing);
longOffset += ((longSize - longPaddingBefore - longPaddingAfter) / 2.0f) - (width / 2.0f);
} |
Hi Jake, Thanks for the reply. I really appreciate that. I ll try and let you know Thanks, On Tue, Sep 15, 2015 at 2:12 PM, YvesDelcoigne notifications@github.com
|
Hi @JakeWharton, |
Can this change be merged in? |
The
extraSpacing
XML attribute specifies additional spacing between the circles,also configurable via the
setExtraSpacing(float)
method.