Android Question Hide/Show a view when onScroll from a ListView is called

Walter Adriano da Silva

Member
Licensed User
Is there a way hide or show a View or the ToolBar through ListView.onScroll method()?

Following an example

demo_gif.gif


This example use a RecyclerView, but I need do this with a ListView

Example source: https://github.com/mzgreen/HideOnScrollExample
 

LucaMs

Expert
Licensed User
You should add this routine to CustomListView:
B4X:
Private Sub sv_ScrollChanged(Position As Int)
    If SubExists(CallBack, EventName & "_ScrollChanged") Then
        CallSubDelayed2(CallBack, EventName & "_ScrollChanged", Position)
    End If
End Sub

so you can handle the ScrollChanged event in your Activity.
 
Upvote 0
Top