Android Question [B4X] BBListItem - BCTextEngine inside CLV Display Problem

klaus

Expert
Licensed User
Longtime User
Hi Erel,
I tried the BBListItem - BCTextEngine inside CLV project, second post, with several texts.
I get a display problem.
Long texts are not displayed entirely.

1622463769466.png

In all three platforms.

In B4A I get an error file not found, it is an image file in File.DirAssets, it is there and he name is correct.
Error occurred on line: 428 (BBCodeParser)
java.io.FileNotFoundException: /data/user/0/b4a.BCTextInCLV/files/virtual_assets/dreamview.jpg: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:492)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:205)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.initializeSampleImpl(CanvasWrapper.java:601)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.InitializeResize(CanvasWrapper.java:548)
at anywheresoftware.b4a.keywords.Common.LoadBitmapResize(Common.java:1370)
at anywheresoftware.b4a.objects.B4XViewWrapper$XUI.LoadBitmapResize(B4XViewWrapper.java:713)
at b4a.BCTextInCLV.bbcodeparser$ResumableSub_SetImageView.resume(bbcodeparser.java:1423)
at b4a.BCTextInCLV.bbcodeparser._setimageview(bbcodeparser.java:1201)
at b4a.BCTextInCLV.bbcodeparser._texttorun(bbcodeparser.java:514)
at b4a.BCTextInCLV.bbcodeparser._createruns(bbcodeparser.java:316)
at b4a.BCTextInCLV.bblistitem._parseanddraw(bblistitem.java:1090)
at b4a.BCTextInCLV.bblistitem._settext(bblistitem.java:97)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)

Attached the test project.
 

Attachments

  • BCTextInCLV1.zip
    453.4 KB · Views: 259

Mahares

Expert
Licensed User
Longtime User
Attached the test project.
I know you are addressing this to Erel, but out of curiosity and because your projects are always authentic, I ran your project in B4A with no modifications., except the package name and label: B4A Example and package: b4a.example. The project worked the way it is supposed to.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I guess that the file issue will be resolved if you uninstall the app, clean the project and install again.

The display issue is related to a bug in my example. It doesn't update the BBListItem parent height, the second panel in the layout. Add this:
B4X:
BB.Text = GetContent(i)    'KC
BB.mBase.Parent.Height = BB.mBase.Height + 10dip * 2
 
Upvote 0
Top