Understanding ListView

Omar

Member
Licensed User
Longtime User
I just purchased B4A even though I'm very new to programming but this seems to be a good platform to learn and I was interested in developing for Android devices.

I am sorry for the very basic question but I am still trying to grasp the syntax and layout of B4A. In particular I am trying to understand the ListView command as I have been able to use this from the example but I wanted to know how I can store data within the application itself and load that into the ListView.

Will appreciate any help on this.
 
Thanks Erel.

Appreciate your help. Yes, I did review the ListView tutorial, I was actually looking to store the data in the program file itself rather than load up from an external file.

If this is not possible I will use the List option, thanks again.
 
Upvote 0
Hello,

I proceeded with the external file option and am using the File.ReadList to input the data with the following:

NamesList = File.ReadList(File.DirDefaultExternal, "list.txt")

I have also added in my "list.txt" file into the project through the Files tab but I keep getting an error message stating:

Last Exception jave.io.FileNotFoundException...

On the emulator is also states "Program paused on line: 24 NamesList = File.ReadList(File.DirDefaultExternal, "list.txt")"

I really cannot understand why this is occurring and will appreciate any help with this.
 
Upvote 0
Sorry please ignore the above.

I have just figured out I should have used File.DirAssets instead of File.DirDefaultExternal

Man do I feel foolish now :sign0104:
 
Upvote 0
I feel foolish now
Is Foolish enjoying it? :).

Seriously, don't worry about it. We all make errors and wrong assumptions while learning (and even long after :(), it's part of the process. Don''t let it put you off asking for more advice next time you are stuck.
 
Upvote 0
Is Foolish enjoying it? :).

Seriously, don't worry about it. We all make errors and wrong assumptions while learning (and even long after :(), it's part of the process. Don''t let it put you off asking for more advice next time you are stuck.


Thank you!

I appreciate your kind words :)
 
Upvote 0
Back
Top