Android ListView Filtering Without Repeatedly Instantiating ArrayAdapters
<p>I have a ListView filled with twitter tweets. I made a custom Tweet class so I could store a special type number. So, I have the Tweet class and custom ArrayAdapter:</p>

<pre><code>class Tweet {
    private int typeNumber; // My unique type number which does not come from Twitter
    private String message;
    // ... other tweet data
}

class TweetsAdapter extends ArrayAdapter&lt;Tweet&gt; {
   private ArrayList&lt;Tweet&gt; tweets;

   TweetsAdapter(Context context, int textViewResourceId, ArrayList&lt;Tweet&gt; tweets) {
       super(context, textViewResourceId, tweets);
       this.tweets = tweets;
   }

   public View getView(int position, View convertView, ViewGroup parent) {
     // Inflate my own view and set my own tweet row information
   }
}
</code></pre>

<p>There is a nav bar which has 4 Buttons representing the 4 special type numbers.
I want to display a filtered tweet ListView when a person clicks on one of the type number buttons without destroying the data in the ArrayAdapter.</p>

<p>One approach I came up with is to break up my main tweets ArrayList into sub-ArrayLists and set a new ArrayAdapter with the corresponding sub-ArrayList on the ListView every time you click one of the Buttons. That seems inefficient to instantiate a new ArrayAdapter every time.</p>

<p>Is there a better way to display a filtered ListView while maintaining all the tweet data on the ArrayAdapter(I also tried looking at the filter class and it seems to destroy the data on the adapter to "filter")?</p>
