New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow for horizontal callouts using gravity sideAuto and sideCenter #62
base: master
Are you sure you want to change the base?
Conversation
|
||
private float startXLineAndCircle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unused. you can remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
private float startYLineAndCircle; | ||
private float circleIndicatorSize = 0; | ||
private float circleIndicatorSizeFinal; | ||
private float circleInnerIndicatorSize = 0; | ||
private float lineIndicatorWidthSize; | ||
private float lineIndicatorHeightSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this one is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -273,24 +287,48 @@ protected void onDraw(final Canvas canvas) { | |||
paintCircleInner.setColor(CIRCLE_INNER_INDICATOR_COLOR); | |||
paintCircleInner.setAntiAlias(true); | |||
|
|||
final float x = (targetRect.left / 2 + targetRect.right / 2); | |||
float x = 0.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable name is too general, x of what? please clarify it and choose a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to xOfCalloutLine
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="left" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginRight="10dp" | ||
android:maxWidth="0dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It made invisible this image view, please revert these changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, it would be a nice change, please check out my comments and let me know when you fix them.
Added two gravity values: sideAuto and sideCenter that make the callout appear right or left of the selected view