You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.
I'm having trouble with the EnhancedListView in a fragment from ViewPager. I'm not sure if this question has been answered here, but I couldn't find a solution.
I've initialized an enhanced list view with a custom BaseAdapter which is in a the first out of 3 fragments of a view pager. The swiping (SwipeDirection.END) only works when my list is scrolling and I interrupt the scrolling with a horizontal slide on top of a list item. When the list isn't scrolling, the swipe on top of a list item isn't detected.
I tried calling view.getParent().requestDisallowInterceptTouchEvent(true); for every single list item in the adapter, but that only cancels the list view scrolling, and view.getParent().getParent().requestDisallowInterceptTouchEvent(true); which cancels the swiping to the next fragment but does not enable swipe to dismiss.
For the record, I initialize the list like this:
EnhancedListView lv = (EnhancedListView) v.findViewById(R.id.transactionsList);
lv.setAdapter(adapter);
lv.enableSwipeToDismiss();
// transactionHolder - id of the list item layout
lv.setSwipingLayout(R.id.transactionHolder);
EnhancedListView.UndoStyle style = UndoStyle.SINGLE_POPUP;
lv.setUndoStyle(style);
EnhancedListView.SwipeDirection direction = SwipeDirection.END;
lv.setSwipeDirection(direction);
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello all,
I'm having trouble with the EnhancedListView in a fragment from ViewPager. I'm not sure if this question has been answered here, but I couldn't find a solution.
I've initialized an enhanced list view with a custom BaseAdapter which is in a the first out of 3 fragments of a view pager. The swiping (SwipeDirection.END) only works when my list is scrolling and I interrupt the scrolling with a horizontal slide on top of a list item. When the list isn't scrolling, the swipe on top of a list item isn't detected.
I tried calling view.getParent().requestDisallowInterceptTouchEvent(true); for every single list item in the adapter, but that only cancels the list view scrolling, and view.getParent().getParent().requestDisallowInterceptTouchEvent(true); which cancels the swiping to the next fragment but does not enable swipe to dismiss.
For the record, I initialize the list like this:
EnhancedListView lv = (EnhancedListView) v.findViewById(R.id.transactionsList);
lv.setAdapter(adapter);
lv.enableSwipeToDismiss();
// transactionHolder - id of the list item layout
lv.setSwipingLayout(R.id.transactionHolder);
EnhancedListView.UndoStyle style = UndoStyle.SINGLE_POPUP;
lv.setUndoStyle(style);
EnhancedListView.SwipeDirection direction = SwipeDirection.END;
lv.setSwipeDirection(direction);
The text was updated successfully, but these errors were encountered: