H Hanz Active Member Aug 7, 2021 #1 Hi, Adding an imageview inside the BBCodeView is simple but I can't add the B4XImageView just like the imageview with the following code: B4X: Dim b4xiv As B4XImageView b4xiv.Initialize("", "b4xiv") b4xiv.Bitmap = job.GetBitmap bbcMessageContent.Views.Put("iv", iv) bbcMessageContent.Text = $" [View=b4xiv Vertical 20/] "$ And I get this error: B4X: java.lang.RuntimeException: Object should first be initialized (B4XView). Thanks.
Hi, Adding an imageview inside the BBCodeView is simple but I can't add the B4XImageView just like the imageview with the following code: B4X: Dim b4xiv As B4XImageView b4xiv.Initialize("", "b4xiv") b4xiv.Bitmap = job.GetBitmap bbcMessageContent.Views.Put("iv", iv) bbcMessageContent.Text = $" [View=b4xiv Vertical 20/] "$ And I get this error: B4X: java.lang.RuntimeException: Object should first be initialized (B4XView). Thanks.
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2021 #2 B4X: Dim b4xiv As B4XImageView = XUIViewsUtils.CreateB4XImageView bbcMessageContent.Views.Put("iv", b4xiv.mBase) Upvote 0
B4X: Dim b4xiv As B4XImageView = XUIViewsUtils.CreateB4XImageView bbcMessageContent.Views.Put("iv", b4xiv.mBase)