Clear custom ListAdapter
<p>I have a problem with my adapter. All works fine but i have a problem with clearing my list.</p>

<p>I clear it like this:</p>

<pre><code>public void onResetClicked(View v) {
    Log.d(TAG, "reset button clicked");
    m_stopwatchService.reset();

        alist.clear();
    }
</code></pre>

<p>It doesn't work.</p>

<p><strong>EDIT</strong></p>

<p>It works but I can not re-create the list.</p>

<pre><code>public void onResetClicked(View v) {
    Log.d(TAG, "reset button clicked");
    m_stopwatchService.reset();

        alist.clear();
        listView.setAdapter(null);
    }
</code></pre>

<p>It is a stopwatch. My adapter creates lap. When I press the "Reset Button" wants to clean the list of my laps.</p>

<p><strong>EDIT2</strong></p>

<p>I solved my problem.</p>

<p>I called it like this :</p>

<pre><code>listView.setAdapter(null);
        listView.setAdapter(adapter);
</code></pre>
