-
Notifications
You must be signed in to change notification settings - Fork 75
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
Bar size and max value not in sync #33
Comments
Confirmed that it is a seekbar problem, the seekbar does not respect the maximum value set. |
Opened a pull request with the fix |
Hi what's the status of the PR/ISSUE i'm issueing also this bug. |
This is a bug. `void setMaxValue(int maxValue) {
Have to change as below : `void setMaxValue(int maxValue) {
|
This does not strike me as the correct solution. The if-else is there in case there are negative numbers, and in that case it is indeed necessary to fix as they have it. I'm not 100% sure what the fix is, but one problem lies in setCurrentValue(), line 295 (of the version I just cloned) of PreferenceControllerDelegate.java:
This is because value has minValue baked into it; see for instance line 155, where onProgressChanged() adds minValue into currentValue, which is passed to setCurrentValue() in line 172 of onStopTrackingTouch(). Line 295 should read
That seems to fix my problems, but it may not fix all of them; there may be an issue with intervals. I'm using an interval of 1, and I'm too tired to think it through right now (had to battle Android Studio to get it to use a local copy of MBSP). Edit: Had a couple of wrong line numbers in there for a moment, sorry. |
Is there any news on this bug ? It seems to me that @polaris0227 is right. The condition on negative value appears to be wrong: you always want to set the max of There are only 3 possibilities : both are positive, both are negative and only minValue is negative. But in all those cases, the distance is always equal to
|
@DanChaltiel Your best bet is probably to import the source, make the change I described, and go from there. The question is a year and a half old; there are pretty old pull requests on the project; it looks like abandonware. |
Tested with
SeekBarPreference
Default: 25, Min: 10, Max: 50, Interval: 1
The text was updated successfully, but these errors were encountered: