Sub Item_LayoutCreator(LayoutName As String) As View
'The Item layout is a classic ListView layout: an ImageView on the left and two Labels beside.
Dim pnl As Panel
Dim gd As GradientDrawable
Dim Couleurs(2) As Int
Couleurs(0) = Colors.DarkGray
Couleurs(1) = Colors.Black
gd.Initialize("TOP_BOTTOM", Couleurs)
pnl.Initialize("Item")
pnl.Background = gd
Dim ivImage As ImageView
ivImage.Initialize("")
ivImage.Gravity = Gravity.NO_GRAVITY
pnl.AddView(ivImage, 0, 0, 70dip, 70dip) ' Fixed height OK
Dim lblText1 As Label
lblText1.Initialize("")
lblText1.TextColor = Colors.White
lblText1.TextSize = 15
lblText1.Typeface = Typeface.DEFAULT_BOLD
lblText1.Gravity = Gravity.TOP
pnl.AddView(lblText1, 80dip, 5dip, 100%x - 90dip, 25dip) ' Fixed height OK
Dim lblText2 As Label
lblText2.Initialize("")
lblText2.TextColor = Colors.LightGray
lblText2.TextSize = 13
lblText2.Typeface = Typeface.DEFAULT
lblText2.Gravity = Gravity.TOP
pnl.AddView(lblText2, 80dip, 29dip, 100%x - 90dip, << variable height here >>>)
' Dim r As Reflector
' r.Target = lblText2
' r.RunMethod2("setMaxLines", 2, "java.lang.int")
' r.RunMethod2("setHorizontallyScrolling", False, "java.lang.boolean")
' r.RunMethod2("setEllipsize", "START", "android.text.TextUtils$TruncateAt")
Return pnl
End Sub