Code Monkey home page Code Monkey logo

Comments (4)

tylerwilson avatar tylerwilson commented on August 25, 2024 1

I also see this when trying to edit my preferences. I looked into the code, and I believe this is the bug. In MaterialSeekBarController.java, line 89:

mCurrentValue = attrs.getAttributeIntValue(android.R.attr.defaultValue, DEFAULT_CURRENT_VALUE);

The AttributeSet method getAttributeValue takes an int which is an index into the set, but android.R.attr.defaultValue is a constant value (16843245 in my case). So this throws an exception. It is caught, so it defaults to 50.

From reading, I think the correct call should be:

mCurrentValue = attrs.getAttributeIntValue("http://schemas.android.com/apk/res/android", "defaultValue", DEFAULT_CURRENT_VALUE);

I cannot test since I am hooking into the original package via gradle, and am not up for forking and testing that way. :-) I would be curious to know if I am right though.

  • Tyler

Update: After posting this comment, I saw the pull request that is waiting. This is the fix for this issue. Request to author to accept the pull request.

from materialseekbarpreference.

dmytroKarataiev avatar dmytroKarataiev commented on August 25, 2024

This pull request solves the problem: #23

from materialseekbarpreference.

tylerwilson avatar tylerwilson commented on August 25, 2024

I understand that, but the owner of this repo needs to accept this pull request, yes? I tried a trick to get your fork via gradle and jitpick.io, but haven't gotten it working quite yet. I wasn't really up for doing my own fork just for a one line fix. Thanks!

from materialseekbarpreference.

MrBIMC avatar MrBIMC commented on August 25, 2024

@manj1790 @tylerwilson @dmytroKarataiev

Sorry for not responding for so long, but I finally came back to work on this lib. I just pushed a new release that fixed most of the known bugs(and added a bit of a new stuff). Though notice that it has some breaking changes, so you'll have to edit couple of xml/java lines manually to make it to work.

Read README.md for more deteils :D

from materialseekbarpreference.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.