iOS Question Blurry images on CSBuilder

Angel Garcia

Member
Licensed User
Hi All,
Maybe this is a silly question, i'm getting blurry/distorted images when appending images to CSBuilder.
I use the resize function on initialize bitmap to adjust images before adding them to the builder.
I'm using the code on this post to perform the append image: https://www.b4x.com/android/forum/threads/csbuilder-size-appendimage.87211/#post-552019

My Code is like this:
cs:
dim cs1 as csbuilder

cs1.Initialize

CallSub3(Starter,"AppendImage",cs1,LoadBitmapResize(File.DirAssets,"ame1.png",20dip,20dip,True))'here i call the function from a central code module

'... Here sometimes is added more images in a row, thats why i use csbuilder, and in B4A works fine

cs1.PopAll

Label1.AttributedText=cs1

I've tried BBcodeView and works better and images are displayed fine, the problem is that i need the Click event that has the label control, and in BBCodeView i dont have a click event for the tag, only for URL text, and that dont work for me.

Is there a way to make it work for the Csbuilder?
Am I doing something wrong?
Many thanks all in advance!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've tried BBcodeView and works better and images are displayed fine, the problem is that i need the Click event that has the label control, and in BBCodeView i dont have a click event for the tag, only for URL text, and that dont work for me.
This should be easily done with BBCodeView.

Which click do you want to handle? On the control itself?
 
Upvote 0

Angel Garcia

Member
Licensed User
Hello Erel,
Yes, with a simple Click event for the whole BBCodeView control it would be enough, even with a click event for the image tag would work for what i want.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
even with a click event for the image tag would work for what i want
This one is simple. Create a panel and put the ImageView inside it. Now handle the panel click event.

B4X:
Dim ivPanel As B4XView = xui.CreatePanel("ivPanel")
ivPanel.SetLayoutAnimated(0, 0, 0, 50dip, 50dip)
Dim iv As B4XImageView = XUIViewsUtils.CreateB4XImageView
ivPanel.AddView(iv.mBase, 0, 0, ivPanel.Width, ivPanel.Height)
iv.Bitmap = xui.LoadBitmap(File.DirAssets, "logo.png")
BBCodeView1.Views.Put("ivPanel", ivPanel)

Sub ivPanel_Click
    Log("click")
End Sub
Requires the latest version of XUI Views: https://www.b4x.com/android/forum/threads/100836/#content
 
Upvote 0

Angel Garcia

Member
Licensed User
This one is simple. Create a panel and put the ImageView inside it. Now handle the panel click event.

Thanks Erel, you gave me the right idea!.
At the end i placed a Panel and a BBCodeView inside it, and later loaded all the images needed in a row, and as you said i handle the Click event from Panel.
Now it works
Many thanks! šŸ˜
 
Upvote 0
Top