Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

VerticalScrollview inside slidinglayer vertical right. On Scroll closes the slidinglayer. #107

Open
mr-kamran-ali opened this issue Jan 4, 2018 · 1 comment

Comments

@mr-kamran-ali
Copy link

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?

@Akhilez
Copy link

Akhilez commented Jan 20, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants