Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asproat
Copy link

@asproat asproat commented Feb 2, 2022

Added two gravity values: sideAuto and sideCenter that make the callout appear right or left of the selected view


private float startXLineAndCircle;
Copy link
Owner

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

Copy link
Author

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;
Copy link
Owner

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

Copy link
Author

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;
Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to xOfCalloutLine

Comment on lines 23 to 26
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
android:maxWidth="0dp"
Copy link
Owner

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reset

Copy link
Owner

@mreram mreram left a 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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants