| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thank you for your contribution. I will check and update you on the PR by
the end of the week.
…On Tue, Nov 12, 2019 at 11:22 PM Giovanni De Francesco < ***@***.***> wrote:
This PR enables to write the labels inside the circles instead of below.
This is especially useful when a user needs to draw different numbers,
such as the example below:
Before:
[image: Screenshot 2019-11-12 at 11 19 57]
<https://user-images.githubusercontent.com/2427135/68663095-6216e400-053e-11ea-8ed1-e7a44401945c.png>
After:
[image: Screenshot 2019-11-12 at 11 13 54]
<https://user-images.githubusercontent.com/2427135/68662946-17956780-053e-11ea-9e91-d3c3cc14c6a4.png>
Note that this can be used to write inside the circles labels like "A",
"B" or "C", thus giving a bit more flexibility to the library.
Let me know if you don't like something and I'll fix it or if something
isn't clear.
Thanks a lot.
------------------------------
You can view, comment on, or merge this pull request online at:
#8
Commit Summary
- made possible to have labels only inside
- clean up
File Changes
- *M* app/src/main/java/params/com/statusView/StatusView.kt
<https://github.com/params-ing/StepViewAndroid/pull/8/files#diff-0>
(49)
- *M* app/src/main/res/layout/activity_main.xml
<https://github.com/params-ing/StepViewAndroid/pull/8/files#diff-1>
(5)
- *M* app/src/main/res/values/attrs.xml
<https://github.com/params-ing/StepViewAndroid/pull/8/files#diff-2>
(3)
Patch Links:
- https://github.com/params-ing/StepViewAndroid/pull/8.patch
- https://github.com/params-ing/StepViewAndroid/pull/8.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AG4QI4H5IOBM7W5PMIBYPATQTJ7XVA5CNFSM4JMBLCB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HYU2RZQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG4QI4HX5DXPWOVXIHEZLH3QTJ7XVANCNFSM4JMBLCBQ>
.
|
Sorry, something went wrong.
| * A boolean which decides if labels should be written inside | ||
| */ | ||
|
|
||
| var drawLabels: Boolean by OnValidateProp(false){ |
There was a problem hiding this comment.
Actually I see you are reusing the old variable drawLabels for new functionality.
This might make sense, but on a newer version people already using the library would get unexpected views & might be confused.
Can you instead create a new variable drawStatusInsideCircle & keep the old one as it is
Sorry, something went wrong.
| textPaintLabel.getTextBounds(text, 0, text.length, measuringRect) | ||
| statusItemText = LabelItemText(text, textPaintLabel, circleItem.center.x, circleItem.center.y - measuringRect.exactCenterY()) | ||
| drawLabels -> { | ||
| val text: String = statusData[pos].text |
There was a problem hiding this comment.
statusData[pos].text, this might crash, can you please place a safety check
Sorry, something went wrong.
| app:currentCount="4" | ||
| app:drawLabels="true" | ||
| app:drawLabels="false" | ||
| app:drawCount="true" |
Sorry, something went wrong.
|
Thanks for the review, I'll try to do make these changes next weekend. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR enables to write the labels inside the circles instead of below.
This is especially useful when a user needs to draw different numbers, such as the example below:
Before:

After:

Note that this can be used to write inside the circles labels like "A", "B" or "C", thus giving a bit more flexibility to the library.
Let me know if you don't like something and I'll fix it or if something isn't clear.
Thanks a lot.