How to set the arraylist values to listview in android?
<p>I need to display my arraylist data in listview. My arraylist is of type              <code>public static ArrayList&lt;ArrayList&lt;String&gt;&gt; ourstringList1</code>. In <strong>my listadapter class I am trying to get the data from arraylist and setting it to tesxtview. But since I need arr.get(i).get(j)..</strong>.I am unable to proceed further.
Please help me regarding this...</p>

<p>My code:
public class testreview extends Activity {</p>

<pre><code>private ListView listViewScore = null;
private ListViewAdapter listViewAdapter = null;
public static ArrayList&lt;ArrayList&lt;String&gt;&gt; ourstringList1 = Select.stringList1;
    private ArrayList&lt;ArrayList&lt;String&gt;&gt; usernameArrLst = ourstringList1;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list);
    listViewScore=(ListView)findViewById(R.id.list);
    usernameArrLst = new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
    listViewAdapter = new ListViewAdapter();
    listViewScore.setAdapter(listViewAdapter);
}

class ListViewAdapter extends BaseAdapter{

    @Override
    public int getCount() {
        // TODO Auto-generated method stub
        if(usernameArrLst==null){
            return 0;
        }

        return usernameArrLst.size();
    }

    @Override
    public Object getItem(int position) {
        // TODO Auto-generated method stub
        return usernameArrLst.get(position);
    }

    @Override
    public long getItemId(int position) {
        // TODO Auto-generated method stub
        return position;
    }

    @Override
    public View getView(int position, View view, ViewGroup parent) {
        // TODO Auto-generated method stub
        View rowView=view;
        if(rowView==null){
            LayoutInflater layoutinflate =LayoutInflater.from(testreview.this);
            rowView=layoutinflate.inflate(R.layout.listrow, parent, false);
        }

        TextView textViewName=(TextView)rowView.findViewById(R.id.tv_case);
        textViewName.setText((CharSequence) usernameArrLst.get(position));

        return rowView;
    }

}
</code></pre>

<p>}</p>

<p>Thanks in advance</p>
