I want to show setName column as a list view how it is possible in android.
I am share my code.
private String lv_arr[];
String selectList = "select setName from Displaysettings";
DBConnect conn1 = new DBConnect(getApplicationContext(), "colorCode");
conn1.execNonQuery(selectList);
lv1=(ListView)findViewById(R.id.ListView01);
lv1.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 , lv_arr));
thanks in advance.
you can try something like this:
So, you should convert your conn1.execNonQuery(selectList) result to a string array
Update:
Or you can use a cursor adapter, if your conn1.execNonQuery return a cursor.
For example (some lines are delete to make it clear)
I hope this helps you