Just an update to the example I posted in the post #2:
In the sub CreateListItem(...) I had the code:
Sub CreateListItem(c As carSearch, Width As Int, Height As Int) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, Width, Height)
p.LoadLayout("vehicleLV")
schLblModel.Text = c.CModel
schLblKeyway.Text = c.CKey
schLblChip.Text = c.CChip
Dim r As Reflector
For Each v As B4XView In p.GetAllViewsRecursive
r.Target = v
r.SetOnTouchListener("lvModels_Touch")
Next
Return p
End Sub
In this code I set the SetOnTouchListener on each view in the second CLV.
But I have realized, that it is enough, to set the SetOnTouchListener only on the new Panel p (B4XView).
So the code can be like this:
Sub CreateListItem(c As carSearch, Width As Int, Height As Int) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, Width, Height)
p.LoadLayout("vehicleLV")
schLblModel.Text = c.CModel
schLblKeyway.Text = c.CKey
schLblChip.Text = c.CChip
Dim r As Reflector
r.Target = p 'v
r.SetOnTouchListener("lvModels_Touch")
Return p
End Sub
So for the scrolling of the inside CLV we need to set SetOnTouchListener, and when this CLV is touched, we have to disable scrolling of the first CLV with the sub:
Sub lvModels_Touch(ViewTag As Object, Action As Int, X As Float, Y As Float, EventData As Object) As Boolean
Log("action " & Action)
If Action = 0 Then 'ACTION_DOWN
Dim r As Reflector
r.Target = clvVehicles.sv
r.RunMethod2("requestDisallowInterceptTouchEvent", True, "java.lang.boolean")
End If
Return False
End Sub
I think, it makes the code simpler than using CLVnested class.