Android Tutorial [B4X] Cross platform Editable B4XTable + Form Example

Status
Not open for further replies.
SS-2019-04-11_15.50.04.png


This example demonstrates several things:
  • Cross platform code and files, similar to the way XUI2D games are organized:
    • All the logic is implemented in a class named EditableTable. The module is located in the projects parent folder.
    • The two asset files (list of animals - source; and the preferences dialog template) are stored in the Shared Files folder and are copied when needed with a #CustomBuildAction command. You can see it in the EditableTable class. Note that if you want to update those files then you need to update the files in the Shared Files folder. The project specific files will be updated automatically.
  • Using B4XTable and B4XPreferencesDialog to create an editable table. Table features:
    • Add new items.
    • Edit existing items.
    • Delete existing items.
    • Duplicate existing items.
    • Data is saved when the app closes to a CSV file.
    • Saved data is loaded when the app starts.
Dependencies:

- B4XPreferencesDialog v1.30+: https://www.b4x.com/android/forum/threads/103842/#content

The B4A, B4i and B4J projects are attached.

B4J example of a table with inline editing: https://www.b4x.com/android/forum/threads/b4xtable-with-inline-editing.112686/#post-702660
 

Attachments

  • Project.zip
    194.2 KB · Views: 1,898
Last edited:

jimmyF

Active Member
Licensed User
Longtime User
Save it anywhere you want, I believe.

Add SQLite to your app, create the database, and save and read the data.
or
Add jRDC2 to read and save the data on a server.

Both SQLite and jRDC2 are searchable items on the forum.

Let us know how it works out.

-j
 

GMan

Well-Known Member
Licensed User
Longtime User
I got ths message when compiling:

B4X:
....
Fehlerbeschreibung: Unbekanntes Mitglied: daysinweekcolor
Fehler in Zeile: 309
DateTemplate.DaysInWeekColor = xui.Color_Gray
Word: daysinweekcolor
 

GMan

Well-Known Member
Licensed User
Longtime User
Jo, stupid me ... was 1.9

How can i create another query window ?
 
Status
Not open for further replies.
Top