Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

allow for horizontal callouts using gravity sideAuto and sideCenter#62

Open
asproat wants to merge 4 commits into
mreram:masterfrom
asproat:sidelabelmod
Open

allow for horizontal callouts using gravity sideAuto and sideCenter#62
asproat wants to merge 4 commits into
mreram:masterfrom
asproat:sidelabelmod

Conversation

@asproat

@asproat asproat commented Feb 2, 2022

Copy link
Copy Markdown

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

private int yMessageView = 0;
private int xMessageView = 0;

private float startXLineAndCircle;

Copy link
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed

private float circleIndicatorSizeFinal;
private float circleInnerIndicatorSize = 0;
private float lineIndicatorWidthSize;
private float lineIndicatorHeightSize;

Copy link
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed

paintCircleInner.setAntiAlias(true);

final float x = (targetRect.left / 2 + targetRect.right / 2);
float x = 0.0f;

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

Reset

@mreram mreram left a comment

Copy link
Copy Markdown
Owner

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants