Android Question event on customListView scroll

DALB

Active Member
Licensed User
Hello,
Thanks in advance for any anwser.

Is there a word or a code for the scrolling customListView.
An example:

When I scroll a customListView, I need to make a panel off : visible=False
When I stop Scrolling the customListView the panel is on. Its state is : visible=True.

It's like a 'onCustomListViewScrolling'...do this.
I'm looking for an event on the scrolling.
Something we find in ActionScript 3.

I don't find anything like this in the customListView Core...or I don't see which word to use.
 

DALB

Active Member
Licensed User
based on

B4X:
Sub clv1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
    panel.Visible=True
End Sub

I wish

B4X:
if clv1_scroll (true) then
                 panel.Visible=False
  else 
                 panel.Visible=True
 end if
End Sub

Maybe a java syntax could render this ?
 
Last edited:
Upvote 0

DALB

Active Member
Licensed User
Found something which fits nearly good :

B4X:
Globals
    Private findex as int=0
end sub


Sub clv1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
    If FirstIndex<>findex Then
        Log(FirstIndex)
        pnlcompte.Visible=False
    Else
        pnlcompte.Visible=True
    End If
    Sleep(500)
    findex=FirstIndex
End Sub

I need to move a little bit the customlistview at the end of its scrolling and the panel appears !
I'll look for smarter solution.

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…