Closed mobilemindtec closed 2 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)
could you try with @nativescript-community/ui-collectionview ? that would help find out where the issue really is
I am having the same issue on Android with anything scrollable (ListView, ScrollView, CollectionView, Pager, etc). Here is a project that shows the issue.
@keerl @mobilemindtec not perfect but it works. With the latest version this will work.
prevent the drawer from dragging if the collectionview "can" scroll
<template>
<Page>
<ActionBar>
<Label text="Vue.js Demo" />
</ActionBar>
<Drawer ref="drawer" :simultaneousHandlers="[collectionViewGestureTag]" :shouldPan="shouldPan">
<GridLayout ~bottomDrawer width="80%" height="75%">
<Label text="This is the bottom drawer" />
<CollectionView
ref="collectionView"
automationText="collectionView"
iosOverflowSafeArea="true"
:items="itemList"
itemIdGenerator="index"
colWidth="50%"
rowHeight="200"
@loaded="onCollectionViewLoaded"
>
<v-template>
<GridLayout rows="*, auto" :backgroundColor="item.color" class="item">
<StackLayout row="1">
<Label row="1" :text="item.name" class="title" />
<Label row="1" :text="item.color" class="subtitle" />
</StackLayout>
</GridLayout>
</v-template>
</CollectionView>
</GridLayout>
<StackLayout ~mainContent backgroundColor="white">
<Button @tap="onOpenBottomDrawer" text="Open Bottom Drawer" width="250" marginTop="25" />
</StackLayout>
</Drawer>
</Page>
</template>
Hi,
I'm try put a listview into drawer, but listview scrolling not work.