NappDrawer
NappDrawer copied to clipboard
[Android] swiping in scrollableView not possible
We have a scrollableView in the center view on Android, but scrolling isn't possible.
On iOS on the other hand, this does work. Maybe because it's a window instead of views?
Is it possible to fix this for Android too?
Cheers
I did it by adding event listener to the scrollable view, type scroll
...
In the handler function, I check for the currentPage
of the scrollableView, if it's the first one (zero index), I enable the open mode of the drawer, else I disable it..
$.scrollableView.addEventListener('scroll', scrollOfScrollableView);
function scrollOfScrollableView() {
// Disallow menu gesture while current page is not the first one
if(OS_ANDROID) {
var NappDrawerModule = require('dk.napp.drawer');
if($.scrollableView.currentPage == 0)
Alloy.Globals.nappDrawerAndroid.setOpenDrawerGestureMode(NappDrawerModule.OPEN_MODE_ALL);
else Alloy.Globals.nappDrawerAndroid.setOpenDrawerGestureMode(NappDrawerModule.OPEN_MODE_NONE);
}
}
Wish I am not too late in adding this code :)