Android Example [B4X] B4XPages B4XPages_SQLiteLight2 cross-platform project

The attached project is a porting of the B4X_SQLiteLight2 project which is included in the B4X SQLLite database booklet.
It uses as much as possible XUI objects and common code.
Tested with B4A, B4i and B4J.

1592582758699.png
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Takes 1.65 second the first time and 1.41 the second time in Release mode.

I made a few modifications in your program.
1. I commented FillCustomListView in B4XPage_Created to avoid two calls when the program is started.
1. I left it in B4XPage_Appear to get the CustomListview filled when the program comes back from the Edit or Filter page.
 

Attachments

  • B4XPagesSQLiteLight2New.zip
    458.4 KB · Views: 352

Sabotto

Well-Known Member
Licensed User
Hi Klaus. I followed your beautiful example to learn but I have a doubt:
Why, in B4XMainPage (the MainPage) you declare MP as Public, if then to refer to that Mainpage, from within the two pageEdit and pageFilter classes, you have created two other private instances of the MainPage?
B4X:
'in the B4xmainPage
Public MP As B4XMainPage

'in the pageEdit and in pageFilter
Private MP As B4XMainPage
I mean: if inside B4XMainPage I had declared MP as Private instead of Public what would have changed?
Also because I don't understand what the MP declared in the B4XMainPage is for since it is never used.
I hope I was able to explain.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
You can remove it.
The project is a relative old one, i have updated it in the source code of the B4X SQLite Database booklet, but, did not update it here.
The reason was that i expected using MP directly in the other Pages, but it does not work as i expected it to work and forgot to remove this line.
I will update the project in the first post.
There are other SQLite projects in the source code of the B4X SQLite Database booklet.

In the other modules i use MP to shorten the name, and, in the updated projects i directly use B4XPages.MainPage
 
Top