1

I am new to making android apps and was trying to find out if there is a way for a user to add their own custom selections to a Spinner.
For example I want to make a database for keeping track of car maintenance.
So I want the user to be able to add/remove their own cars/trucks as needed to it.

If there is a better way to do this I am open to any suggestions.
I am using eclipse.

Thanks for any help in this matter.

Stylo
  • 47
  • 7
Jason
  • 11
  • 1

1 Answers1

0

So two ways to do this,

First off since you are using a database I would look at using a SimpleCursorAdapter or a Loader to manage the connection and updates to the db, so you don't manually have to refresh the query, and use a SimpleCursorAdapter to power the spinner like this answer https://stackoverflow.com/a/11216746/418505

Or, you could programmatically query the database and then use some UI event hook, like a button click to submit the new car/truck to then update whatever Adapter you have bound to the spinner (make sure you call notifyDataSetChanged)

Community
  • 1
  • 1
Selecsosi
  • 1,636
  • 19
  • 23
  • ok thank you I will look into that. Like I said I'm new to all this so I will definitely have to read up on that. Still learning what half these words mean lol – Jason Jul 13 '13 at 00:33