Android Question strange probem with customlistview

tufanv

Expert
Licensed User
Longtime User
Hello,

I added the customlistview.bas to my project. I added a custom view set it to customlistview. it displays a white box even if i set visible = false. Also i cant c hange its color it alwas shows white. Even it is invisible .

Can someone help please
 

LucaMs

Expert
Licensed User
Longtime User
You could add these global variables and routines to the library:

B4X:
' Global variables
Private mBase As Panel
Private mVisible As Boolean
Private mBaseColor As Int

mBase = base ' < ---  in Sub DesignerCreateView

Public Sub setVisible(Visible As Boolean)
    mVisible = Visible
    sv.Visible = mVisible
End Sub
Public Sub getVisible As Boolean
    Return mVisible
End Sub

Public Sub setColor(Color As Int)
    mBaseColor = Color
    mBase.Color = mBaseColor
End Sub
Public Sub getColor As Int
    Return mBaseColor
End Sub

and set visibility and color in your activity code.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…