Sub Globals
Type WHListItemData (liText As String, liDesc As String, liHTML As String)
End Sub
Sub FillListView
Dim lvi as WHListItemData
lvi.liText = "Some text that's longer than the ListView is wide."
lvi.liDesc = "More textthat could be longer than the ListView is wide."
lvi.liHTML = "Some HTML that's loaded into a webview when the item is tapped."
lvWHappening.AddTwoLines2(lvi.liText, lvi.liDesc, lvi)
Dim lab1 As Label
lab1 = lvWHappening.TwoLinesLayout.Label
lab1.Typeface = Typeface.SANS_SERIF
lab1.TextSize = 18
lab1.TextColor = Colors.Cyan
SetEllipsize(lab1, "END")
Dim lab2 As Label
lab2 = lvWHappening.TwoLinesLayout.SecondLabel
lab2.Typeface = Typeface.SANS_SERIF
lab2.TextSize = 14
lab2.TextColor = Colors.LightGray
SetEllipsize(lab2, "END")
End Sub
Sub SetEllipsize(TextView As Label, Mode As String)
Dim r As Reflector
r.Target = TextView
r.RunMethod2("setLines", 1, "java.lang.int")
r.RunMethod2("setHorizontallyScrolling", True, "java.lang.boolean")
r.RunMethod2("setEllipsize", Mode, "android.text.TextUtils$TruncateAt")
r.RunMethod2("setSelected", True, "java.lang.boolean")
End Sub