For Each n As B4XView In BBCodeView1.mBase.GetAllViewsRecursive
'Log(n)
If n Is ImageView Then
Log(n)
Dim iv As ImageView = n
If iv.GetImage.IsInitialized Then
ImageView1.SetImage(iv.GetImage)
End If
End If
Next
I try to get the text image from the image view (B4J here). The image contains empty pixels and the text is cut a bit.
EDIT: it seems that only the ImageViews from the ScrollPane's innernode (slightly more than the visible part) are available.
Some ImageViews cut off a piece of the text:
I have added some code (to the BCTextExample from Erel) to collect the ImageViews from the BBCodeView1 using your code from above:
B4X:
Sleep(2000)
For Each n As B4XView In BBCodeView1.mBase.GetAllViewsRecursive
'Log(n)
If n Is ImageView Then
Log(n)
Dim iv As ImageView = n
If iv.GetImage.IsInitialized Then
Dim pn As Pane = set_clv1item(iv)
clv1.Add(pn,"")
End If
End If
Next
End Sub
Private Sub set_clv1item(imgview As ImageView) As Pane
Dim pn As Pane
pn.Initialize("")
pn.LoadLayout("clv1item_layout")
pn.SetLayoutAnimated(0, 0, 0, 560,100)
iv1.SetImage(imgview.GetImage)
Return pn
End Sub