Android Question customlistview

Tata Mapassa

Active Member
Licensed User
Longtime User
Hello, I have a sqlite database with 1 table (Test) and 3 fields (ID, Label, Date). I want each time the application is started to display a customlistview (Icon, label) of all the records with only the Date field corresponding to today's date?
If possible that the label is of a different color from one recording to another?

THANKS
 
I have a sqlite database with 1 table (Test) and 3 fields (ID, Label, Date). I want each time the application is started to display a customlistview
Upload a small project with your code and what you want to achieve. It will make easier to help you
 
Upvote 0
Sorry, I just see a B4XTable showing the data. Where's your xCustomListView?

Here an example based on the CLV's original example.
 

Attachments

Upvote 0
Have you tried my example?
 
Upvote 0
Yes, I initially adapted my code to display data with customlistview by following the example but the app crashes.....
 
Upvote 0
What error do you get?
 
Upvote 0
I use the application directly on an Android smartphone after sending the APK from the PC to the phone via Bluetooth.
 

Attachments

  • Capture d'écran 2024-03-31 231619.png
    Capture d'écran 2024-03-31 231619.png
    131.9 KB · Views: 473
Upvote 0
Hi:

Please, check how to make sql queries. My comment "'Modify the query to select just date = today" is not literal

Check DateTime docs too
Your query should be something like

Code:
"SELECT ID, Info, Date FROM Test Where Date = '" & DateTime.Date(DateTime.Now) & "'"
 
Upvote 0
Back
Top