list view instead of filling whole screen
<p>I have trying  to create a list with items. I do not want the list will fill the whole screen. I really tries to create a list its width and height will be nearly equal size of the longest list item and number of items on the list respectively. In other words; </p>

<p>if I have one item, on android I will see </p>

<pre><code>------------------------
     |      |
     | 1    |





------------------------
</code></pre>

<p>If I have 2 items</p>

<pre><code>------------------------
     |      |
     | 1    |
     | 2    |




------------------------
</code></pre>

<p>If I have item with name "lll" and "llllllllll",</p>

<pre><code>------------------------
     |               |
     | lll           |
     | llllllllll    |




------------------------
</code></pre>

<p>My layout is </p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
 &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp" &gt;
 &lt;/TextView&gt;
</code></pre>

<p>What part should I change in order to get what I have told at above ?</p>

<p>EDIT:</p>

<pre><code> String[] values = new String[] { "1", "2", "3","4","5","6","7","8","9","10","11","12","13","14" };
 ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
            android.R.layout.simple_expandable_list_item_1, values);
        setListAdapter(adapter);
</code></pre>
