Closed GoogleCodeExporter closed 8 years ago
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 tittel@kom.e-technik.tu-darmstadt.de
on 19 Jan 2012 at 4:01
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 bachi.in...@gmail.com
on 19 Jan 2012 at 6:09
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 tittel@kom.e-technik.tu-darmstadt.de
on 20 Jan 2012 at 9:38
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 bachi.in...@gmail.com
on 20 Jan 2012 at 2:16
I updated the code. Thanks for the feedback.
Original comment by tittel@kom.e-technik.tu-darmstadt.de
on 20 Jan 2012 at 2:26
Original issue reported on code.google.com by
bachi.in...@gmail.com
on 19 Jan 2012 at 12:28