How to correctly populate records from SQLite in ListActivity?

Java.lang. RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id. List This error is complaining that the ListView in your view file (R.layout.

Areas_layout) has not been given the correct id. Your ListView XML must look like this: ListView android:id="@android:id/list"… Try doing that and see if it solves your problem: Edit Thanks for sharing your layout code, the problem seems to be that you have your list row xml layout in the same layout file as your main content view. You need to keep them seperate In your R.layout.

Areas_layout file just have your linearlayout and your listview then have a seperate xml file for your row which would look something like this:? Xml version="1.0" encoding="utf-8"? > My_list_row, c, display, to).

Java.lang. RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id. List' This error is complaining that the ListView in your view file (R.layout.

Areas_layout) has not been given the correct id. Your ListView XML must look like this: You would then pass the list row to your SimpleCursorAdapter: mAdapter = new SimpleCursorAdapter(this, R.layout. My_list_row, c, display, to).

Ok I've solved the problem I added the listview and the layout looks like this: So basically textView is above listview. Thx for the help mate!

See my edited post above. It's good practice to keep your list row xml seperate from the content view that your ListView is in. Glad you got it sorted, good luck with it – m6tt Jun 7 '10 at 9:42.

Db = SQLiteDatabase. OpenDatabase(myPath, null, SQLiteDatabase. String display = new String { db.

Int to = new int { R.id.

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