I have a ListView in my Android app that shows items from a string-array in my strings.xml. The app I am making is a basic project management app, and I have two activities: the main ListView, and the task addition view that has a some buttons, EditTexts, date pickers, etc. I would like to add an item to the string-array each time that the user adds a task with the task name, and then when the user presses that entry, a Toast comes up with the due date. How would I go about doing this?
Thanks.
(I would put my code here, but unfortunately the formatting is completely messed up when I copy and paste.)
Clarification:
User goes to Task Addition page from main view.
User types in Name, Date, Etc.
Name appears in ListView of tasks.
Can I post a zip of all my code since I have 6 or 7 files?
I don’t think you can make edits to anything in your res folder at runtime, including the strings.xml. You are going to need to store your tasks in some other manner. You can use an SQLite database or Shared Preferences or write a file to internal or external storage. Which will work best depends on what exactly you are trying to accomplish. Perhaps if you could elaborate on what you are doing, or even post some of the code that you are currently using we could make a more specific suggestion.