Android Question NSV: nested scroll views

udg

Expert
Licensed User
Hi all,
experimenting with the Expandable list view (based on the XCustomListView) I encountered a limit we all know from the beginning: nested scrolling views are not allowed/good idea.

I started to think how to signal the sv in the outer Expandable list to stop listening to gestures in order to give an inner Expandable list the opportinity to scroll its content.
Then I found a few references to something that seems to be around since API 21: NSV.

Here a few links:
https://developer.android.com/reference/android/support/v4/widget/NestedScrollView
https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild
http://www.devexchanges.info/2016/07/nested-scroll-views-in-android.html
https://www.androiddesignpatterns.com/2018/01/experimenting-with-nested-scrolling.html

So, I have a couple of questions:
1. is there any chance we will have a class implementing the NSV mecchanism in the near future?
2. will this eventual class be compatible with iOS (I mean does iOS have any counterpart to NSV)?

And the most important question, will a NSV-based solution be regarded as a poor-UX one?

TIA
 

Erel

Administrator
Staff member
Licensed User
You can use TouchPanelCreator from ViewsEx to have more control over the handling of touch events. The handling is not so simple. It is used in CLVSwipe: https://www.b4x.com/android/forum/t...ctions-and-pull-to-refresh.98252/#post-625583 and B4XDrawer: https://www.b4x.com/android/forum/threads/b4x-b4xdrawer-sliding-drawer.97828/#content

And the most important question, will a NSV-based solution be regarded as a poor-UX one?
Eventually you cannot really know whether the user wants to scroll the full list of the nested list. The result can be annoying for the user. A different approach is to show a dialog with the list of items when the user clicks on an item in the first list. This will be much simpler to implement and the result might be better.
 

udg

Expert
Licensed User
Thanks Erel, I've read a similar suggestion by you in a different thread (b4i?) looking at results from the search engine.
BTW, that (dialogs or "covering" panels) is the way I programmed so far; my question derives from a specific request to have a kind of cascaded (or nested) expandable lists received by a graphics designer working with a possible customer. I share your doubts about usability for the end user.
 
Top