Hi Guys,
Trying to solve the SetLayoutAnimated behaviour issue, as shown here, I thought about combining a "snapshot" of the listview, into a panel background using canvas...
So I would have a combined image of the both views, thus the resizing would, hopefully be smother...
But for the life of me, I just can't figure out how to combine them!
here's my code:
What am I doing wrong? I only get the Panel background as it was!
[EDIT] Can it be that a ListView cannot be converted into a canvas, showing the visible items on the list?
[EDIT2] Apparently it can be rendered to a canvas...
Trying to solve the SetLayoutAnimated behaviour issue, as shown here, I thought about combining a "snapshot" of the listview, into a panel background using canvas...
So I would have a combined image of the both views, thus the resizing would, hopefully be smother...
But for the life of me, I just can't figure out how to combine them!
here's my code:
B4X:
Dim Bmp As Bitmap
Dim bkg1 As Canvas
Dim bkg2 As Canvas
Dim DestRect As Rect
bkg1.Initialize(Panel2)
bkg2.Initialize(ListView1)
DestRect.Initialize(0, 0, Panel2.Width, Panel2.Height) 'both views have the exact same size
bkg1.DrawBitmap(bkg2.Bitmap, DestRect,DestRect)
Panel2.SetBackgroundImage(bkg1.Bitmap)
Panel2.Invalidate
What am I doing wrong? I only get the Panel background as it was!
[EDIT] Can it be that a ListView cannot be converted into a canvas, showing the visible items on the list?
[EDIT2] Apparently it can be rendered to a canvas...
B4X:
void draw(Canvas canvas)
Manually render this view (and all of its children) to the given Canvas.
Last edited: