Git Product home page Git Product logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Thanks for the feedback. I too use the widget in a scrollable layout, but don't 
experience this problem. Only if I get too far away from the slider handle when 
dragging, the motion event gets routed to the scrollable container (which in my 
opinion is the correct behaviour).

Could you be more specific about your setting (Android version, UI classes 
being used, etc.)? I'm willing to help, but be aware I'm far from being an 
Android UI expert :)

Original comment by [email protected] on 19 Jan 2012 at 4:01

from range-seek-bar.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
By now I found out some more details:

- The layout has an EditText field above the widget
- It's the EditText that gets the focus (and thus the ScrollView scrolls there) 
as soon as the slider is moved
- A stock SeekBar view does not invoke that focusing/scrolling when sliding
- If I comment out the overwritten onDraw(Canvas canvas) in RangeSeeker.java, 
the effect is gone (but now drawing of course)
- Even if the code in onDraw() is commented out but merely the empty 
overwritten onDraw() remains, the effect is there

I tried different focus settings but haven't found a solution yet. Any help 
welcome :)

Original comment by [email protected] on 19 Jan 2012 at 6:09

from range-seek-bar.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Still couldn't reproduce, but this sounds like a focus issue.

Does it help, if you add these 2 lines in the constructor of RangeSeekBar.java:

setFocusable(true);
setFocusableInTouchMode(true);

This should prevent the EditText to gain the focus while interacting with the 
seek bar.

Original comment by [email protected] on 20 Jan 2012 at 9:38

from range-seek-bar.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Making the range seeker focusable indeed helped - thanks a lot for the hint 
(pretty obvious actually, but, heck, I searched elsewhere first :) Maybe you 
want to add that to the code too.

Original comment by [email protected] on 20 Jan 2012 at 2:16

from range-seek-bar.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
I updated the code. Thanks for the feedback.

Original comment by [email protected] on 20 Jan 2012 at 2:26

  • Changed state: Fixed

from range-seek-bar.

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.