D devmobile Active Member Licensed User Oct 9, 2017 #1 I understood that exist below event for AHViewPager B4X: sub EventName_PageScrolled (Position As Int, PositionOffset as Float, PositionOffsetPixels as Int) I want to change color when user scrolling pager But for each scroll i need change color looklike some app How do it?
I understood that exist below event for AHViewPager B4X: sub EventName_PageScrolled (Position As Int, PositionOffset as Float, PositionOffsetPixels as Int) I want to change color when user scrolling pager But for each scroll i need change color looklike some app How do it?
Emme Developer Well-Known Member Licensed User Longtime User Oct 9, 2017 #2 devmobile said: I understood that exist below event for AHViewPager B4X: sub EventName_PageScrolled (Position As Int, PositionOffset as Float, PositionOffsetPixels as Int) I want to change color when user scrolling pager But for each scroll i need change color looklike some app How do it? Click to expand... B4X: vp_PageChanged (Position As Int) pc.GetPageAt(Position).Panel.Color = yourcolor End Sub Vp is your pageviewer, pc page container Upvote 0
devmobile said: I understood that exist below event for AHViewPager B4X: sub EventName_PageScrolled (Position As Int, PositionOffset as Float, PositionOffsetPixels as Int) I want to change color when user scrolling pager But for each scroll i need change color looklike some app How do it? Click to expand... B4X: vp_PageChanged (Position As Int) pc.GetPageAt(Position).Panel.Color = yourcolor End Sub Vp is your pageviewer, pc page container
Emme Developer Well-Known Member Licensed User Longtime User Oct 9, 2017 #3 Another way, that i used in my app, is declare a global array of color, with the same size of pages. B4X: VP_PageChanged (Position As Int) TabLayout.Color = CColor(Position) End Sub Upvote 0
Another way, that i used in my app, is declare a global array of color, with the same size of pages. B4X: VP_PageChanged (Position As Int) TabLayout.Color = CColor(Position) End Sub
D devmobile Active Member Licensed User Oct 9, 2017 #4 Emme Developer said: B4X: vp_PageChanged (Position As Int) pc.GetPageAt(Position).Panel.Color = yourcolor End Sub Vp is your pageviewer, pc page container Click to expand... I know this my friend I want to change color from page1 to page2 dynamic Example page1 is red and page2 blue When i scroll from page1 to page2 i want to change from red to blue slowly Upvote 0
Emme Developer said: B4X: vp_PageChanged (Position As Int) pc.GetPageAt(Position).Panel.Color = yourcolor End Sub Vp is your pageviewer, pc page container Click to expand... I know this my friend I want to change color from page1 to page2 dynamic Example page1 is red and page2 blue When i scroll from page1 to page2 i want to change from red to blue slowly