I am very new to Android development so please excuse any naivety.
I have created a list view on my activity:
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/textView"
android:layout_toEndOf="@+id/textView" />
I have extracted all the date from my sqllite table:
public Cursor getAll()
{
SQLiteDatabase database = getReadableDatabase();
Cursor cursor = database.rawQuery("select * from todos",null);
return cursor;
}
(At least I think I have, Im not sure how to test if there is data in there, if the database exists, if the table exists etc as I don't know how to view the database).
How do I populate the list view with the rows from my table?