I am trying CLVNested I am getting "java.lang.reflect.InvocationTargetException" error
Here my codes
B4XMainPage
CLVNested
My Sample code and Original CLVNested Code here
Here my codes
B4XMainPage
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private CustomListView1 As CustomListView
Private clvItem As CustomListView
Private nested As CLVNested
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
nested.Initialize(Me) '<<<<<<<<<<<< Here using "activity" in original code, but i couldn't use "activity" here then using "Me"
nested.base.LoadLayout("1")
nested.CLV = CustomListView1
For i = 1 To 1
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 100%x, 200dip)
p.LoadLayout("Item")
FillInnerList
p.Tag = clvItem 'must set the Panel tag like this
CustomListView1.Add(p, "")
Next
End Sub
Sub FillInnerList
Dim s As String= "lorem ipsum dolor sit amet, consectetur adipiscing elit. " _
& "sed id tempus libero. phasellus tempor ullamcorper feugiat. sed vitae vulputate mauris, vitae efficitur erat. mauris dolor nisi, efficitur sollicitudin tristique id, interdum tempus quam. aliquam eleifend ligula id odio consequat mollis. orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. maecenas viverra orci at hendrerit aliquet. proin sollicitudin erat eu dictum tincidunt." _
& "etiam vulputate egestas libero, ut mattis turpis semper vel. donec lacus nisl, sollicitudin eu congue et, iaculis a sapien. aliquam tristique ullamcorper mi, at malesuada massa finibus non. maecenas id dapibus arcu. in venenatis et eros non bibendum. fusce non lacus sed erat interdum placerat. vivamus tristique orci at lectus feugiat viverra.morbi porta viverra vestibulum. sed congue congue mi, id convallis ex tempor at. proin fermentum semper libero, at ullamcorper lectus consectetur nec. sed id magna erat. nullam in lectus viverra purus rhoncus iaculis nec ultrices tellus. sed eu turpis pellentesque, accumsan ligula non, pharetra libero. vivamus sed quam enim. proin vehicula arcu sit amet malesuada fermentum. cras id dolor non ligula malesuada dapibus. interdum et malesuada fames ac ante ipsum primis in faucibus. curabitur a arcu a urna dapibus tincidunt non id mauris1." _
& "etiam vulputate egestas libero, ut mattis turpis semper vel. donec lacus nisl, sollicitudin eu congue et, iaculis a sapien. aliquam tristique ullamcorper mi, at malesuada massa finibus non. maecenas id dapibus arcu. in venenatis et eros non bibendum. fusce non lacus sed erat interdum placerat. vivamus tristique orci at lectus feugiat viverra.morbi porta viverra vestibulum. sed congue congue mi, id convallis ex tempor at. proin fermentum semper libero, at ullamcorper lectus consectetur nec. sed id magna erat. nullam in lectus viverra purus rhoncus iaculis nec ultrices tellus. sed eu turpis pellentesque, accumsan ligula non, pharetra libero. vivamus sed quam enim. proin vehicula arcu sit amet malesuada fermentum. cras id dolor non ligula malesuada dapibus. interdum et malesuada fames ac ante ipsum primis in faucibus. curabitur a arcu a urna dapibus tincidunt non id mauris2."
clvItem.AddTextItem(s, 0)
End Sub
CLVNested
B4X:
Sub Class_Globals
Private xui As XUI 'ignore
Public base As B4XView
Public CLV As CustomListView
End Sub
Public Sub Initialize (Parent As B4XView)
Dim tpc As TouchPanelCreator
base = tpc.CreateTouchPanel("tpc")
Parent.AddView (base, 0, 0, Parent.Width, Parent.Height)
End Sub
My Sample code and Original CLVNested Code here