i believe sample from link you provided show us how to set and read custom type value, just read carefully
Set value:
B4X:
...
Dim cd As CardData
cd.Initialize
cd.Title = $"This is item #${i}"$
cd.Content = content
cd.BitmapFile = bitmaps.Get((i - 1) Mod bitmaps.Size)
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, CLV1.AsView.Width, 280dip)
CLV1.Add(p, cd)
...
read value:
B4X:
...
Dim cd As CardData = CLV1.GetValue(i) 'change i with index parameter from ItemClick event
p.LoadLayout("Card1")
lblTitle.Text = cd.Title
lblContent.Text = cd.Content
...