I have a CLV the contains 4 images (swiped horisontally)
When an action occurs (like pushing af bottom or scrolling to the end of another CLV (vertically) - the currently showed image in the first CLV must be a little resized (like + 10%).
How to do that ?
B4X:
clvProfilePictures.Add(CI(clvProfilePictures.AsView.width, clvProfilePictures.AsView.Height, $"This is item #${i}"$, bitmaps.Get(i)),"")
private Sub CI(w As Int, h As Int, t As String, image As String) As Panel
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, w, h)
p.LoadLayout("cardProfile")
lblProfileLabel.Text=t
imgProfileCard.setBitmap(xui.LoadBitmapResize(File.DirDocuments, image, w,h,False))
Return p
End Sub
You can use CLV.FirstVisibleIndex to find the first item and CLV.ResizeItem to resize it. Make sure to use anchors in the cardProfile layout and the image will be resized.
Tip: better to use B4XImageView (XUI Views) instead of ImageView.