user input

dantheman

Member
Licensed User
Longtime User
Hi, I'm trying to get started on what i thought might be easy. I comprehend most of the material on SQLite and general database work but the material is geared to database entries being made by code. I need to have a way for the end user to select a time from a list, that will stay saved even after the app is closed, only to be changed if the user needs to at some later stage. The list is the 24 hours in a day. What the user decides as a start time and finish time will be used to trigger which of two activities shows next. I've tried a database listview but it gets very messy looking and confusing for the end user. I also thought a map list might be the way to go, but again having the user select the time and it staying set is the problem. Hope this makes sense. I would appreciate any help, thanks.
 

gregwa

Member
Licensed User
Longtime User
Hi, I'm trying to get started on what i thought might be easy. I comprehend most of the material on SQLite and general database work but the material is geared to database entries being made by code. I need to have a way for the end user to select a time from a list, that will stay saved even after the app is closed, only to be changed if the user needs to at some later stage. The list is the 24 hours in a day. What the user decides as a start time and finish time will be used to trigger which of two activities shows next. I've tried a database listview but it gets very messy looking and confusing for the end user. I also thought a map list might be the way to go, but again having the user select the time and it staying set is the problem. Hope this makes sense. I would appreciate any help, thanks.

Looks to me like you are looking for something like a configuration file. You can use the Write/Read map functions.

B4X:
Dim m As Map
   
   m.Initialize
   m.Put("Start","12:00")
   m.Put("End","07:32")
   File.WriteMap(File.DirRootExternal,"MyMap.txt",m)
   m = File.ReadMap(File.DirRootExternal,"MyMap.txt")
 
Upvote 0

dantheman

Member
Licensed User
Longtime User
Thanks so much for your reply. Again though, the times shown on your code are coded by the programmer. I need the app user to select their chosen time. Is a button opening an InputDialog, thereby opening the keyboard for user entry the only way?? I was hoping for a list for the user to select from (just for ease of use and best presentation).:sign0085:
 
Upvote 0

DouglasNYoung

Active Member
Licensed User
Longtime User
What about using the Dialogs library's Time Dialog to allow the user to select the time(s); thereafter you can save them from a map, or database, or any other way you see fit.

Douglas.
 
Upvote 0

dantheman

Member
Licensed User
Longtime User
User input time into SQLite

Thanks for the clue.I've written in the time dialog for the user to select the time but now I'm stumped on that chosen result actually feeding into a database. I've scoured the site but can't find anything on connecting the two pieces to the puzzle.:BangHead: :BangHead:
Any help would be appreciated thanks.
 
Upvote 0
Top