Android: SQLite and ListViews?

You can still use a ListActivity. The magic is to set the id of your ListView to "@android:id/list". However, ListActivity is just a convenience.

You can get the same result by creating an adapter (look at ArrayAdapter or SimpleCursorAdapter) and connecting it to the ListView by hand.

Ah, I was wondering how I could use a list Activity. Thanks, this answers it kinda. Just after posting the solution I found how to do it...its always the way.....! – Tom Nov 18 '09 at 22:40.

I think you can use a SimpleCursorAdapter for this. I think the Notepad tutorial uses it. If you need more complicated things, it's just a matter of you implementing your own view adapter.

Here's sample code that shows you how to do it.

CheckDB = SQLiteDatabase. OpenDatabase(myPath, null, SQLiteDatabase. //database does't exist yet.

* system folder, from where it can be accessed and handled.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions