How to store the entire table data in android?
<p>I am storing my sqlite table data in arraylist. In my project I am getting the question and options of that question based on the question id. In my options database table I have 4 columns and 5 rows(since 5 options the number of rows=5)
column1: optionid
column2: quesid
column3: option_description
column4: answer</p>

<p>I am storing this table values in an arraylist. Now I need to pass the arraylist to other page. But in the arraylist only one row of the table is saving at a time. So I want to store all the rows in that arraylist. How can I do that?</p>

<p>My code:</p>

<pre><code>static ArrayList&lt;ArrayList&lt;String&gt;&gt; stringList3;
static ArrayList&lt;String&gt; optionlist;
query2 = "SELECT * FROM 'iapp_options' WHERE question_id = list1.get(0))+";";
stringList3 = new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
stringList3 = dbAdapter.selectRecordsFromDBList(query2, null); 


 for (int i = 0; i &lt; stringList3.size(); i++) {
    optionlist = new ArrayList&lt;String&gt;();
    optionlist = stringList3.get(i);
}
</code></pre>

<p>Now when I am passing this optionlist array to other page the list is containing only the last row of the table. How to store all 5 rows data into that arraylist?
Thanks in Advance </p>
