-
Notifications
You must be signed in to change notification settings - Fork 146
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
Support for different height on active bar #87
base: master
Are you sure you want to change the base?
Conversation
Some modifications on alwaysActive and areSelectedValuesDefault logic
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 the PR, just need a few changes!
@@ -116,6 +117,7 @@ | |||
private int textSize; | |||
private int distanceToTop; | |||
private RectF rect; | |||
private RectF rectActive; |
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.
I'm thinking that this doesn't need another rect on top of it, could be done with the one we have that's already drawing the line, just need to adapt its top
and bottom
when we draw it if it's active
*/ | ||
private void drawThumb(float screenCoord, boolean pressed, Canvas canvas, boolean areSelectedValuesDefault) { | ||
Bitmap buttonToDraw; | ||
if (!activateOnDefaultValues && areSelectedValuesDefault) { | ||
if (alwaysActive) { |
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.
Why did you need this? As far as I can tell, if the alwaysActive
flag is on, the buttons never show as disabled
@@ -26,6 +26,9 @@ | |||
<!-- the height of the bar --> | |||
<attr name="barHeight" format="dimension"/> | |||
|
|||
<!-- the height of the active bar --> |
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 is good, but there should also be a way to set this in code
I removed the extra RectF object. Also I exposed both barHeight and activeBarHeight variables. Have a look :) |
Some modifications on alwaysActive and areSelectedValuesDefault logic