Bug? FastScroller and KitKat

Informatix

Expert
Licensed User
Longtime User
Hello,

(set)FastScrollEnabled doesn't change anything with Kitkat; the fast scroller does not appear in listviews (in fact it appears in an unpredictable manner, very rarely, and it is oversized or stretched). It is obvious it's not an issue with the B4A ListView, but with the Google's code. I have the same problem in my UltimateListView and in a Java demo using a listview.
 

Informatix

Expert
Licensed User
Longtime User
I checked this morning. The issue is still there with KitKat 4.4.2.
I can easily reproduce this issue with the B4A ListView or my UltimateListView (which are completely different libs).
A possible workaround is to do something like this:
B4X:
ListView1.SetSelection(0): DoEvents
ListView1.SetSelection(0)
then scroll manually.
It looks stupid but it works.
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
I'd noticed that once the list has been cleared and rebuilt, the fast scroll appears, I don't know for how long.

Your work around worked on a test project, but for some reason not in the large project I am working on at the moment. Another options is:

B4X:
Dim PH As Phone
    If PH.SdkVersion = 19 Then
        Dim JO As JavaObject = ListView1
        JO.RunMethod("setFastScrollAlwaysVisible",Array As Object(True))
    End If

Not ideal, but it worked for me. I already use the Phone Object within the app so the permissions are already there. May be an issue for some.
 

stevel05

Expert
Licensed User
Longtime User
Even better, thanks Erel.
 

Informatix

Expert
Licensed User
Longtime User
I'd noticed that once the list has been cleared and rebuilt, the fast scroll appears, I don't know for how long.

Your work around worked on a test project, but for some reason not in the large project I am working on at the moment. Another options is:

B4X:
Dim PH As Phone
    If PH.SdkVersion = 19 Then
        Dim JO As JavaObject = ListView1
        JO.RunMethod("setFastScrollAlwaysVisible",Array As Object(True))
    End If

Not ideal, but it worked for me. I already use the Phone Object within the app so the permissions are already there. May be an issue for some.

Yes, it's not ideal because it displays the fast scroller even when the list is idle. Moreover, the fast scroller does not behave well and I can't say that's a real working solution. I prefer the solution that I gave and until now I never met a case where it didn't work (so I'm a little bit surprised that it does not work for you). That being said, this problem should be fixed in the next Kitkat version because Google is now aware of the issue and is working on a fix.
 
Top