How to sort a customized listview alphabatically?
<p>I have a customlist view with an ImageView and a textview. I am retrieving that list view by this method:</p>

<pre><code>private List&lt;Currency&gt; getModel() {
        List&lt;Currency&gt; list = new ArrayList&lt;Currency&gt;();
        for (int i = 0; i &lt; countryCode.length; i++) {

            list.add(get(countryCode[i], flag[i]));
        }


        return list;
    } 
</code></pre>

<p>this method returns a list of an image and a textview in a particular list item, and I am setting this in a adapter to show it in a listview. But how can I sort this list by alphabetically comparing with the text of that text view in the list? I have tried this</p>

<pre><code>Collections.sort(list, new Comparator&lt;String&gt;() {
        @Override
        public int compare(String s1, String s2) {
            return s1.compareToIgnoreCase(s2);
        }
    });
</code></pre>

<p>but this method only works for string types list, but my list is not in string type? What to do?</p>
