Android Question How to make it the best way (table)?

bsnqt

Active Member
Licensed User
Longtime User
Hi all,

Please have a look at the pictures attached. They are from an apk - a medical dictionary with a lot of records, and when the user select a record, it will display the information. They have some tables (some with colors) inside the text view (?). I wonder how can I do those tables in the best way?

1) Store a picture (of the table) in our .db? then how can I insert the picture inside the text?
2) or store the information of the tables in the database, then build a custom table inside the view? How can I do so, if the tables can be very different (different columns and rows, colors,...) from record to record?

(P/S. In Windows mobile, I used to do it with a Webview, not sure I can do here)

Thank you!
 

Attachments

  • Screenshot_2014-05-19-22-27-56.png
    Screenshot_2014-05-19-22-27-56.png
    298.7 KB · Views: 131
  • Screenshot_2014-05-19-22-27-37.png
    Screenshot_2014-05-19-22-27-37.png
    328.3 KB · Views: 125
Last edited:

DonManfred

Expert
Licensed User
Longtime User
1 is definetyvely the wrong way. Use the fields/data from your db and build your own table with informations.

>How can I do it if the tables can be very different from record to record?

All records of one sql-statement have the same count of fields in the resultset.
The number of fields are known. So you should be able to build a table dynamically

You can use a webview in b4a too btw...
 
Upvote 0

bsnqt

Active Member
Licensed User
Longtime User
1 is definetyvely the wrong way. Use the fields/data from your db and build your own table with informations.

>How can I do it if the tables can be very different from record to record?

All records of one sql-statement have the same count of fields in the resultset.
The number of fields are known. So you should be able to build a table dynamically

You can use a webview in b4a too btw...

Thanks for your very quick reply DonManfred...

But the tables' columns and rows as well as their position are very different from record to record (depending on the record contents). Please have a look at the new picture attached. How can I insert it in the webview on a right place?
 

Attachments

  • 1.png
    1.png
    250.9 KB · Views: 162
Upvote 0
Top