Android Question sub ScrollChanged in horizontalscrollview

MroBurk

Member
Licensed User
Hi, I need help with this project that I found in the forum. I want to change the button's color when I scroll with my finger directly on the screen. I add a sub Button()_click that changes the Scroll position. Why does the code below show any value of ScrollPosition? There is another method to change the button's color if I scroll directly?
B4X:
Private Sub pnlScv_ScrollChanged(Position As Int)
    Log(Position)
    Log(pnlScv.ScrollPosition)
End Sub
 

Attachments

  • HorScvPanel.zip
    135.4 KB · Views: 80

khwarizmi

Active Member
Licensed User
Longtime User
You haven't written the event name when initializing the HorizontalScrollView:

B4X:
pnlScv.Initialize(Activity.Width,"pnlScv")
 
Upvote 0
Top