I'm creating it with designer and I have issue on setting height and width for that listview row
I used this command :
p.SetLayoutAnimated(0,0,0,60%x,35%x)
But i'm unable to found exact height and width of that designer / view
you can see the height in the designer, i think u do not want use %y
dip give u the same size at any device.
B4X:
Sub CreateListItem(Item As SinglePassword) As B4XView
Dim p As B4XView = xui.CreatePanel("Row")
#if B4J
p.SetLayoutAnimated(0 ,0,0,600,30dip) 'how to use 100%x ???
#Else If B4A
p.SetLayoutAnimated(0 ,0,0,100%x,30dip)
#End If
p.LoadLayout("Row")
LabelColumn1.Text = Item.Name
LabelColumn2.Text = Item.User
LabelColumn3.Text = Item.Mail
LabelColumn4.Text = Item.Url
Return p
End Sub
Dim p As B4XView = xui.CreatePanel("Row")
#if B4J
p.SetLayoutAnimated(0 ,0,0,600,30dip) 'how to use 100%x ???
#Else If B4A
p.SetLayoutAnimated(0 ,0,0,100%x,30dip)
#End If
No. I want actually used height from top of my that layout designer file,
like my custom listview designer has three label, then I need height upto three label.
Is any command there that give me actual used height
u can use .top .height property from labels or the variant size you set in the designer.
for a static layout i would drag one element into, size as needed and copy/paste this height.
in your case at static layout the top+height of the last label is your row height.
1. You should never load a layout to a panel before the panel size is set.
2. As a general rule, the layout size is always set by its parent container.
Open the m411_listview layout file and calculate its size.