So at the moment I have a simple reminder app that you enter some details, select a data and time and then the app reminds you on the selected date/time.
I now want to be able to add functionality to select categories which I want to select from a spinner, which is populated from separate database table – I will be adding a class to add new categories.
Is an sqlite database the best way of doing this or is there an easier alternative? I assume I will need to make foreign keys/triggers?
Any advice is much appreciated.
Yes, I think the best way is to use sqlite3, especially if you’re mutating data.
Spinner is an
AdapterViewlikeListVieworGridView, so you can just use aCursorAdapter(or possiblySimpleCursorAdapter) to populate it with data from your database.This looks like a decent tutorial for creating a
SimpleCursorAdapter. In your own code you would callspinner.setAdapter(mySimpleCursorAdapter);