nativescript-community / ui-drawer

NativeScript plugin that allows you to easily add a side drawer (side menu) to your projects.
https://nativescript-community.github.io/ui-drawer/
Apache License 2.0
24 stars 12 forks source link

ListView into drawer not scroll on Android #6

Closed mobilemindtec closed 2 years ago

mobilemindtec commented 3 years ago

Hi,

I'm try put a listview into drawer, but listview scrolling not work.

mobilemindtec commented 3 years ago

To work I had to implement requestDisallowInterceptTouchEvent:

    enableTouchEvent: () ->
      if not isIOS
        @$refs.drawerLisView.nativeView.android.setOnTouchListener(new android.view.View.OnTouchListener({
          onTouch: (v, ev) =>

            switch ev.getActionMasked()
              when android.view.MotionEvent.ACTION_DOWN, android.view.MotionEvent.ACTION_MOVE
                @touchInList(true)
              when android.view.MotionEvent.ACTION_UP
                @touchInList( false)

            return false
        })) 

    touchInList: (state) ->
      if not isIOS
        @$refs.drawer.nativeView.android.requestDisallowInterceptTouchEvent(state)
farfromrefug commented 3 years ago

could you try with @nativescript-community/ui-collectionview ? that would help find out where the issue really is

keerl commented 3 years ago

I am having the same issue on Android with anything scrollable (ListView, ScrollView, CollectionView, Pager, etc). Here is a project that shows the issue.

ui-drawer-android-scroll-issue.zip

farfromrefug commented 3 years ago

@keerl @mobilemindtec not perfect but it works. With the latest version this will work.

Githubissues.
  • Githubissues is a development platform for aggregating issues.