Other Wishes - [B4X] [XUI] AS Settings

wimpie3

Well-Known Member
Licensed User
Longtime User
1. Would it be possible to define a background color FOR EACH GROUP, like in this screenshot (and even allow a transparent color to show what's behind the view)?



2. Is it possible to raise an event when the view is scrolled, with the position of the scroll bar? This would make it possible to animate images based on the scroll position.
 

Alexander Stolte

Expert
Licensed User
Longtime User
1. Would it be possible to define a background color FOR EACH GROUP, like in this screenshot (and even allow a transparent color to show what's behind the view)?
From V2.15+ you can use the new CustomDrawGroup Event togehter with the CustomDrawProperty Event
B4X:
Private Sub AS_Settings1_CustomDrawGroup(CustomDrawGroup As AS_Settings_CustomDrawGroup)
    CustomGroupColor(CustomDrawGroup.GroupViews.BackgroundPanel,CustomDrawGroup.group.Key)
End Sub

Private Sub AS_Settings1_CustomDrawProperty(CustomDrawProperty As AS_Settings_CustomDrawProperty)
    CustomGroupColor(CustomDrawProperty.PropertyViews.RootBackgroundPanel,CustomDrawProperty.Property.Group.Key)
    CustomGroupColor(CustomDrawProperty.PropertyViews.BackgroundPanel,CustomDrawProperty.Property.Group.Key)
End Sub

Private Sub CustomGroupColor(BackgroundPanel As B4XView,GroupKey As String)
    Select Case GroupKey
        Case "Basic"
            BackgroundPanel.Color = xui.Color_ARGB(255,73, 98, 164)
        Case "Advanced"
            BackgroundPanel.Color = xui.Color_ARGB(255,141, 68, 173)
    End Select
End Sub

and even allow a transparent color to show what's behind the view
Unfortunately, this does not work, even if I set the BackgroundColor property to transparent. Unfortunately I don't feel like researching why the transparent doesn't work, the library takes too much time. It is supposed to save time, but it takes too much time for me. Sorry

2. Is it possible to raise an event when the view is scrolled, with the position of the scroll bar? This would make it possible to animate images based on the scroll position.
From V2.15 you can use the PageScrollChanged Event
B4X:
Private Sub AS_Settings1_PageScrollChanged(Offset As Int, Page As AS_SettingsPage)
    Log("PageScrollChanged: " & Offset)
End Sub
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
There seems to be a 1px border around the view I can't get rid of (see white line in screenshot)... can you check if this is something you left behind in the code?

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