Android Question Moving or hiding a CustomListView

Shadow&Max

Active Member
Licensed User
Longtime User
I have Erel's CustomListView on a screen, but I want to either hide it (visible or invisible) or move it down (Top).

The CustomListView itself has all the size properties and the visible property, but those don't seem to be available programmatically.

I'm trying to put a full-screen panel in front of it, and I can't hide it, period... It comes up through the panel over it, and the panel's opaque, and it covers everything in the panel, even though the panel's order is in front of the clv.

How can I hide this puppy???
 

mangojack

Expert
Licensed User
Longtime User
Have you disabled / Hide the panel that contains the clv ? ie ...

B4X:
'load custom list view   
   clv1.Initialize(Me, "clv1")   
   Panel1.AddView(clv1.AsView, 0, RowHeight, Panel1.Width, Panel1.Height -RowHeight)

'hide / disable CLV
Panel1.Visible = False
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
This is in Erel's Modified CustomListView...

I did solve it... I had the positioning set in the script, so it kept resetting itself... it's working now, I think, but I still have to test some more...

Thanks...
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Funny, the properties for top, visible etc are in the designer, but not available in code...

I don't have the CLV in another panel... It's just on the form...
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Got it... I wasn't going far enough... clv.AsView.Visible did it... thanks...
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You can add the routines below to the CustomListView class to make the properties available in the code:
B4X:
'set or get the Visible property
Public Sub setVisible(Visible As Boolean)
    sv.Visible = Visible
End Sub

Public Sub getVisible As Boolean
    Return sv.Visible
End Sub

'set or get the Left property
Public Sub setLeft(Left As Int)
    sv.Left = Left
End Sub

Public Sub getLeft As Int
    Return sv.Left
End Sub

'set or get the Top property
Public Sub setTop(Top As Int)
    sv.Top = Top
End Sub

Public Sub getTop As Int
    Return sv.Top
End Sub

'set or get the Width property
Public Sub setWidth(Width As Int)
   sv.Width = Width
End Sub

Public Sub getWidth As Int
   Return sv.Width
End Sub

'set or get the Height property
Public Sub setHeight(Height As Int)
   sv.Height = Height
End Sub

Public Sub getHeight As Int
   Return sv.Height
End Sub
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Thanks Klaus... I'm saving this thread, but I was able to do it by just accessing the view.
 
Upvote 0
Top