Open mr-kamran-ali opened 6 years ago
Damn. Same problem here. One workaround I found was disallowing touch interception of sliding layer on scrollview touch event.
scrollView.setOnTouchListener { view, motionEvent -> if (motionEvent.action == MotionEvent.ACTION_DOWN) sliding_layer.requestDisallowInterceptTouchEvent(true) false }
But doing so will restrict us from closing the sliding layer with touch, I close the sliding layer in the overridden onBackPressed
override fun onBackPressed() { when { sliding_layer.isOpened -> sliding_layer.closeLayer(true) else -> super.onBackPressed() } }
I know this is bad. Please provide feedback when some solution is found.
When Scrollview is touched to scoll items up or down, sometimes if motion is not strictly veritcal (maybe slightly tilting to left or right) it closes the slidinglayer. I dont want this.
Any listener to give all touch events to scrollview and not to slidinglayer?