Sub clv1_ItemClick (Index As Int, Value As Object)
expandable.ToggleItem(Index)
Sleep(clv1.AnimationDuration + 20) ' <---
Dim pnl As B4XView = clv1.GetPanel(Index).GetView(1)
dim iv as B4XView = pnl.GetView(0)
iv.SetBitmap(lastPicture)
End Sub
I have used and modified Erel's example (attached).
Sub clv1_ItemClick (Index As Int, Value As Object)
expandable.ToggleItem(Index)
Sleep(clv1.AnimationDuration + 20) ' <---
Dim pnl As B4XView = clv1.GetPanel(Index).GetView(1)
dim iv as B4XView = pnl.GetView(0)
iv.SetBitmap(lastPicture)
End Sub
I have used and modified Erel's example (attached).
In this case declare the view as ImageView .. not B4XView
B4X:
Dim pnl As B4XView = clv1.GetPanel(Index).GetView(1)
dim iv as ImageView = pnl.GetView(0)
iv.Bitmap = LastPicture
iv.Invalidate ...
As a side note ... If you declare the panel as B4XView , you can reference the child b4xView's properties without explicitly declaring them ie: (Refer post #3)
B4X:
Dim pnl As B4XView = clv1.GetPanel(Index).GetView(1)
pnl.GetView(0).SetBitmap(lastPicture)
It does not invalidate (redraw) the bitmap in the ImageView that is located at pnl.GetView(0). When I close the app and then open the app again the image displays correctly. But without closing the app the bitmap does not fit the ImageView.