lamotora / android-wheel

Automatically exported from code.google.com/p/android-wheel
0 stars 0 forks source link

wheelView.setEnabled(false) still lets the user scroll the view #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  set the enabled field to false
2.  run app and scroll the wheel
3.

What is the expected output? What do you see instead?
Wheel view should not allow scrolling or selection change from the user. At the 
moment the user can change the selection and scroll the wheel

What version of the product are you using? On what operating system?
Release 16, on Android 2.2

Please provide any additional information below.

Original issue reported on code.google.com by jeromede...@gmail.com on 14 Feb 2011 at 9:27

GoogleCodeExporter commented 9 years ago
You can set 
  wheel.setFocusable(false);
  wheel.setFocusableInTouchMode(false);
in the init wheel function to disable scrolling, not a nice thing to do 
probably but works like a charm

Original comment by Distorte...@gmail.com on 19 Feb 2011 at 9:35

GoogleCodeExporter commented 9 years ago
Will give it a bash, thanks for the response.

Original comment by jeromede...@gmail.com on 21 Feb 2011 at 7:04

GoogleCodeExporter commented 9 years ago
I've tried setFocusable + setFocusableInTouchMode in init wheel function, this 
only seem to disable clicking/skipping but not scrolling. I also tried 
setLongClickable(false), setClickable and so on but to no avail.

Original comment by thomasko...@gmail.com on 21 Feb 2011 at 9:04

GoogleCodeExporter commented 9 years ago
It needs to fix WheelView.onTouchEvent() that should do nothing if wheel is 
disabled:
        @Override
        public boolean onTouchEvent(MotionEvent event) {
                if (!isEnabled() || getViewAdapter() == null) {
                        return true; // or false?
                }
        . . .

Hope it helps.
Will update it soon.

Original comment by yuri.kan...@gmail.com on 22 Feb 2011 at 7:55

GoogleCodeExporter commented 9 years ago
Thanks Yuri. Also wanted to tell that I am very grateful for the effort you put 
into this view. Thanks

Original comment by jeromede...@gmail.com on 22 Feb 2011 at 8:06

GoogleCodeExporter commented 9 years ago
Excellent, that did the trick! Many thanks and big up yourself for this awesome 
widget!

Original comment by thomasko...@gmail.com on 23 Feb 2011 at 12:01

GoogleCodeExporter commented 9 years ago

Original comment by yuri.kan...@gmail.com on 4 Mar 2011 at 8:56