How to display rows extracted from sqlite table in listview or any similar view
<p><img src="https://i.stack.imgur.com/5RaYX.png" alt="*for example [image is attached]**"></p>

<p>sample values are colomn1, colomn2.
After fetching values I should display them row by row.
Please help me here.</p>

<p><a href="https://i.stack.imgur.com/XT3kx.png" rel="nofollow noreferrer">sample table</a></p>

<pre><code> public ArrayList&lt;String&gt; getAllData(){
    ArrayList&lt;String&gt; array_list = new ArrayList&lt;String&gt;();
    //hp=new HashMap();
    SQLiteDatabase db=this.getReadableDatabase();
    Cursor res=db.rawQuery("select * from spendlist", null);
    res.moveToFirst();
    if (res != null &amp;&amp; res.moveToFirst() ){
        while (!res.isAfterLast()) {
            array_list.add(res.getString(res.getColumnIndex(SPEND_LIST_COLUMN_DESC)));
            res.moveToNext();
        }
    }
    return array_list;
}
</code></pre>

<p>above code i am using to fetch data to populate it i am using</p>

<pre><code> ArrayList array_list = mydb.getAllData();
    ArrayAdapter arrayAdapter=new ArrayAdapter(this,android.R.layout.simple_list_item_1, array_list);

    obj = (ListView)findViewById(R.id.listView1);
    obj.setAdapter(arrayAdapter);
</code></pre>

<p>Now I want to fetch all data instead one column and populate it</p>