B4J Question how to set customlistview height ?

qey

Member
Hi i would like to ask how to adjust the clv height. The one highlighted in yellow box

B4X:
Dim Pnl As B4XView = xui.CreatePanel("") Pnl.SetLayoutAnimated(0,0,0,clvItem.AsView.Width,clvItem.AsView.Height)
Pnl.LoadLayout("griditem")
lblItem.WrapText = True
lblItem.As(JavaObject).RunMethod("setTextAlignment", Array("CENTER"))
lblItem.Text = colroot.Get("title")
Dim Ico As B4XBitmap = Base64EncodeDecodeImage.Base64StringToImage(colroot.Get("photo"))
imgItem.Bitmap = Ico
lblAddonPrice1.Text = colroot.Get("charges")
clvItem.Add(Pnl,"")

 

Lucas Siqueira

Active Member
Licensed User
Longtime User
1) open the item designer that goes inside the clv and get its height.

2) remove the AutoScaleAll line in the clv item designer.

3) change the 200dip by the height of your panel in the designer.

B4X:
Pnl.SetLayoutAnimated(0,0,0,clvItem.AsView.Width,200dip)
 
Upvote 0

qey

Member
Hi Lucas ! Thank you for your help. I try it already and it works for my side. Thank you !!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…