Android Question The xCustomListView sample program exits as soon as it is sent to the phone. How to change?

goomoo

Member
Licensed User
Longtime User
The xCustomListView sample program exits as soon as it is sent to the phone. How to change?

Thank you .

B4X:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    
    Dim i As Int
    For i=0 To 5
        Dim pnl As Panel
        pnl.Initialize("panel_" & i)
        Dim image As ImageView
        image.Initialize("image_" & i)
        Dim sFilename As String="logo_" & i & ".png"
        Log("sFilename: " & sFilename)
        'xui.MsgboxAsync(sFilename, "sFilename")
        'image.Bitmap=LoadBitmap(File.DirAssets,sFilename)    '<< -- There's a problem here.
        pnl.AddView(image,0dip,0dip,80dip,80dip)
        CustomListView1.Add(pnl,"panel_" & i)
    Next
End Sub
 

Attachments

  • xCustomListView_example_20211114.zip
    205.1 KB · Views: 216

roumei

Active Member
Licensed User
The error is reported in the logs. There are two files that are missing: logo_2.png and logo_8.png.
logo_1.png:
java.io.FileNotFoundException: /data/user/0/com.xxx.xxx/files/virtual_assets/logo_2.png: open failed: ENOENT (No such file or directory)
 
Upvote 0

goomoo

Member
Licensed User
Longtime User
ok, let me see.
 
Upvote 0

goomoo

Member
Licensed User
Longtime User
Already done. Thank you roumei .
 

Attachments

  • xCustomListView_example_20211114_done.zip
    205.4 KB · Views: 216
  • Screenshot_20211114_195758_cc.znb.xCustomListView_small.png
    210.7 KB · Views: 270
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…