Recent

Author Topic: LAMW: is it possible to scroll jListView with the scrollbar thumb?  (Read 1716 times)

Manlio

  • Full Member
  • ***
  • Posts: 170
  • Pascal dev
I have a jListView control with thousands of items, and it works fine, but it takes a lot of time to scroll with swiping motions.

A sort of scroll bar appears on the right, but it's very thin, and the thumb is also very short (because there are many items).

When I try to tap on that tiny scroll bar nothing happens, the list gets selected instead. I don't know if that is because the scroll bar thumb is too small of a target for a tap, or because that scroll bar is not supposed to be used actively and it is only used to show the current position within the list.

So, does anyone know that?

1. Is it supposed to be possible to scroll long lists with the scroll bar?

2. If so, how to make the scroll bar thumb bigger, so it can be actually tapped and dragged?

Thanks!
manlio mazzon gmail

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: LAMW: is it possible to scroll jListView with the scrollbar thumb?
« Reply #1 on: December 24, 2019, 04:21:22 pm »
On Android I never used a scrollbar, is just to display where is the position.

One usually scrolls from the content area.

Maybe you can use filters to reduce the list size?

Manlio

  • Full Member
  • ***
  • Posts: 170
  • Pascal dev
Re: LAMW: is it possible to scroll jListView with the scrollbar thumb?
« Reply #2 on: December 26, 2019, 05:49:50 am »
After further research I found that the XML tag attribute android:fastScrollEnabled can be used to make scroll bars responsive to user taps, as for example discussed here:

https://stackoverflow.com/questions/18254370/how-to-add-draggable-scrollbar-to-scrollview-listview-in-android/18254692

...but the above example is still not enough for me to understand how to apply it in my own project.

Moreover, in LAMW, the main layout XML file is managed automatically by the wizard, if I'm not mistaken?

So it would be great if LAMW could implement, for example, android:fastScrollEnabled="true" and android:fastScrollAlwaysVisible
as two boolean properties of jView and descendants.

manlio mazzon gmail

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: LAMW: is it possible to scroll jListView with the scrollbar thumb?
« Reply #3 on: December 26, 2019, 03:37:15 pm »
Notice that ListView is deprecated (at least on Android Studio) and you should be using RecyclerView instead.

No one is used to scroll with a scrollbar on Android, take that into consideration, that way is strange.

Manlio

  • Full Member
  • ***
  • Posts: 170
  • Pascal dev
Re: LAMW: is it possible to scroll jListView with the scrollbar thumb?
« Reply #4 on: December 27, 2019, 04:25:38 pm »
Notice that ListView is deprecated (at least on Android Studio) and you should be using RecyclerView instead.

Thanks

No one is used to scroll with a scrollbar on Android, take that into consideration, that way is strange.

I understand, and I agree with you for 99.5% of the cases, but there may be a few cases (e.g. truly huge lists, power user) in which this feature would be useful. And after all, the android:fastScrollAlwaysVisible tag is available in the system for anything scrollable, and therefore, if it's not too much trouble, perhaps a hook to it could be made in LAMW.

Thanks for the feedback!
manlio mazzon gmail

 

TinyPortal © 2005-2018