Android Question How to dynamically change xCustomListView's size?

Binary01

Active Member
Licensed User
Longtime User
Hello,

In my app, I load a layout that contains xCustomListView into myMainPanel.
B4X:
myMainPanel.LoadLayout("mycustomlistviewlayout")

In layoutscript
B4X:
      myListView.SetTopAndBottom(1dip, 100%y)
      myListView.SetLeftAndRight(1dip,100%x)
I already changed Horizontal Anchor and Vertical Anchor properties are set Both for
myListView (xCustomListView)

In my Main Activity, a button is clicked, myMainPanel's height is changed.
B4X:
    Sub btn1_Click
        myMainPanel.BringToFront
        myMainPanel.SetLayoutAnimated(200, myMainPanel.Left, myMainPanel.Top, myMainPanel.Width, 60%y)
     End Sub

When I clicked btn1, myMainPanel's height is changed, but myListView's height is not changed. I want to change xCustomListView's size, not item's height.

How can I fix it?

Thanks.
 
Last edited:

Binary01

Active Member
Licensed User
Longtime User

Thank Erel.

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