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

Support for different height on active bar #87

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

Conversation

gsarris
Copy link

@gsarris gsarris commented Oct 26, 2016

Some modifications on alwaysActive and areSelectedValuesDefault logic

Some modifications on alwaysActive and areSelectedValuesDefault logic
Copy link
Owner

@anothem anothem 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 the PR, just need a few changes!

@@ -116,6 +117,7 @@
private int textSize;
private int distanceToTop;
private RectF rect;
private RectF rectActive;
Copy link
Owner

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) {
Copy link
Owner

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

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

@gsarris
Copy link
Author

gsarris commented Feb 1, 2017

I removed the extra RectF object.

Also I exposed both barHeight and activeBarHeight variables.

Have a look :)

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.

2 participants