Closed Teja-Konjeti closed 8 years ago
Could you please provide more information about what isn't working. Can you also include:
OnTouchListener
on SublimePicker
.@vikramkakkar I'm using the picker in nested Scroll View nd can't scroll when scrolling in the white area in radial time picker.
Can you guide me on how to do that
nd onTouch is not even called. I thought of passing the event to Nested Scroll View.
RadialTimePickerView
sets its own OnTouchListener
: Link
And it captures all touch events by returing true
: Link
To solve your problem, RadialTimePickerView's onTouch(MotionEvent)
will have to conditionally return false
. The condition will be this:
private int getDegreesFromXY(float x, float y) { // defined in `RadialTimePickerView`
final double hypotenuse = Math.sqrt(
(y - mYCenter) * (y - mYCenter) + (x - mXCenter) * (x - mXCenter));
// Basic check if we're outside the range of the disk
if (hypotenuse > mCircleRadius[HOURS]) {
// If we are outside the range of the disk && action == MotionEvent.ACTION_DOWN,
// return `false` from `onTouch(MotionEvent)`.
return -1;
}
....
....
}
This may just be the beginning of a solution, and additional changes may be required. But, you can definitely give it a try.
@vikramkakkar I tried it before raising the issue itself. Making it return false in each and every case also wouldn't help. Plz Reply ASAP.
@vikramkakkar Using setOntouchListener on SubLimePicker Class.