How do you make a multiple-choice list from the sqlite database in Android? -


I am new to Android programming, and I choose the user wanted to draw a list option from a column of SQLite database. .

How would I go about doing this?

As such, it is to say that the database table is to be read which is called the country, and the column ID, country and capital was.

How do I let the user choose from the list of capitals and return the information in that row to the application?

It seems as if you want to present the user as one of the choices. I ask your database and take the cursor, wrap the cursor in one, and call on the example of a spinner, by giving it a simple curriculum adapter example.

Register to get an event from your spinner. Then when onImemelected () is called, then you should be able to call (position) your simple cursor adapter to get the data for the line selected. GetItem () returns an object, I do not completely believe how you will get back there, but I'm guessing that it will actually be one. I will take action in the debugger to verify that what is the object that is returned to you with the GetItem () call, and goes further from there.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -