Android Question B4xTable images on the left side of the table or in between

Enthousiastic

Member
Licensed User
Longtime User
Hello .

I created a database for my books, having as an example the one with the flags (https://www.b4x.com/android/forum/threads/b4x-b4xtable-with-custom-cells-layout.102352/).
Ιhave two issues :

a) When I want to put the FrontCover & BackCover column-photos on the left of the table before the "A/A" field, the program works perfectly (lines 124 & 126 in the main activity). However, when I put them at the end on the right of the table, it gives me the error " Error occurred on line: 249 (Main) java.io.FileNotFoundException: /data/user/0/b4a.example/files/virtual_assets (Is a directory) "
b) Also how can I put the FrontCover & BackCover column-photos after the " Publisher " field or in the middle of the B4xTable table.
Saving the photos as BLOB in the database, in my humble opinion, is not beneficial because the database currently has 1000 records books and more will be added.

Your advice - opinion is critical for me
many thanks
Enthousiastic
 

Attachments

  • MyBooks.zip
    106.4 KB · Views: 73

Enthousiastic

Member
Licensed User
Longtime User
Sorry Klaus, when B4a created the zip file it didn't include the database. I'm sending it alone because if I recreate the entire file with the database, it tells me the file is too large. Many ... many thanks again.
 

Attachments

  • rbbook10a.zip
    2.3 KB · Views: 71
Upvote 0

Enthousiastic

Member
Licensed User
Longtime User
Hello again , I reduced the database entries so that the file could be loaded. Thank you all forum again.
 

Attachments

  • MyBooks.zip
    107.5 KB · Views: 74
Upvote 0

klaus

Expert
Licensed User
Longtime User
I tested your last project and get the following:

- I get an error 'File not found in line 40 in the DBUtils module where it tries to save on File.DirDefultExternal.
File.DirDefultExternal is no more accessible with the Google limitations.
Your DBUtils module is an old one the latest one is now an internal library.

- Then, i deleted the DBUtils module and checked it in the Libraries Manager Tab.
The program starts and shows during a very short time a kind of table and then throws an error 'File not found' in line 249 in the Main module.
B4X:
iv.SetBitmap(xui.LoadBitmapResize(File.DirAssets, row.Get("FRONT COVER")  ,  iv.Width, iv.Height, True))
I added Log(row.Get("FRONT COVER")) just before above line and a braekpoint on line 249.
And row.Get("FRONT COVER") is empty.
Looking at the content of the row.Map i get this:

1744110947844.png


This means that your table is not filled correctly !?
The first two columns are COVERS and BCOVERS, which are defined at line 79 and 87.
But you do not fill those, why ?
What are these two columns for ?

I am not familiar with B4XTable.
 
Upvote 0
Top