Android Question Make manual parallax scrollview

Pooya1

Active Member
Licensed User
Hi
I have tab bar that contain 3 tab
I have a scrollview in first tab that contain many items
I want to when user scroll scrollview to bottom,my tab bar change position to top and when user back
to top scrollview,tab bar back to main position
I attach sample gif for parallax
I use below code in my app
It work but it wrong for parallax sometime
Please give me good sample
B4X:
    If Position > 100 Then
        If svhotelinfo.Top = 0 Then
            svhotelinfo.Height = svhotelinfo.Height + 65dip
            svhotelinfo.Top = svhotelinfo.Top - 65dip
        End If
    
    Else if Position < 50 Then
        If svhotelinfo.Top < 0 Then
            svhotelinfo.Height = svhotelinfo.Height - 65dip
            svhotelinfo.Top = svhotelinfo.Top + 65dip
        End If
    End If
 

Attachments

  • ezgif-5-42f9d7b85f.gif
    ezgif-5-42f9d7b85f.gif
    390.9 KB · Views: 315
Top