Android: ListView Display
<p>I have a list View and I'm trying to put the data from a method unto a list view but it's not showing up on the android phone. I've trying almost everything. Please help me.
This is the code for the list...</p>

<pre><code>int[] numbers = new int[5];
CardDataBase database = new CardDataBase(numbers);

ListView list = (ListView)findViewById(R.id.listView1);
List&lt;String&gt; view = database.getFrontSet();
ArrayAdapter &lt; String &gt; listAdapter = new ArrayAdapter &lt; String &gt;( MainActivity.this ,   android . R . layout . simple_list_item_1 , view );
    list.setAdapter(listAdapter);
</code></pre>

<p>The getFrontSet() method should return a list if strings when called. But nothing is shown on the listView on the phone.
The code for the CardDataBase class is also provided, it might also be the problem...</p>

<pre><code>class CardDataBase{

private int card;
private String front;
private String back;
private int[] cards = new int[5];
private String[] fronts = new String[5];
private String[] backs = new String[5];

public CardDataBase(int[] nums)
{
    this.cards = nums; 

    for(int i = 0; i &lt; cards.length; i++)
    {
        fronts[i] = setFront(cards[i], String.valueOf((Object)cards[i]));
        backs[i] = setBack(cards[i], getBack(cards[i]));
    }
}

public String setFront ( int N, String front ) {
    card = N;
    this.front = front;
    return this.front;
}
public String setBack ( int N, String back ) {
    card = N;
    this.back = back;
    return this.back;

}
public List&lt;String&gt; getFrontSet ( ) {
    List&lt;String&gt; list = new ArrayList&lt;String&gt;();
    for(int i = 0; i &lt; cards.length; i ++)
    {
        list.add(fronts[i]);
    }
    return list;
}
}
</code></pre>
