listview of image and text in Android
<p>I have a button and when I click on it, I want it to show a listview with image &amp; text (static text). How can I do this?</p>

<pre><code>My code..
public class category extends ListActivity {
    Button category;
    TextView selection;
    private static final String[] country = { "Iceland", "India", "Indonesia",
         "Iran", "Iraq", "Ireland", "Israel", "Italy", "Laos", "Latvia",
         "Lebanon", "Lesotho ", "Liberia", "Libya", "Lithuania",
         "Luxembourg" };
         private static final String[] curr = { "ISK", "INR", "IDR", "IRR", "IQD",
         "EUR", "ILS", "EUR", "LAK", "LVL", "LBP", "LSL ", "LRD", "LYD",
         "LTL ", "EUR"

         };
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.category);

        category=(Button)findViewById(R.id.category);



        class EfficientAdapter extends BaseAdapter {
             private LayoutInflater mInflater;

             public EfficientAdapter(OnClickListener onClickListener) {
             mInflater = LayoutInflater.from((Context) onClickListener);

             }

             public int getCount() {
             return country.length;
             }

             public Object getItem(int position) {
             return position;
             }

             public long getItemId(int position) {
             return position;
             }

             public View getView(int position, View convertView, ViewGroup parent) {
             ViewHolder holder;
             if (convertView == null) {
             convertView = mInflater.inflate(R.layout.listview, null);
             holder = new ViewHolder();
             holder.text = (TextView) convertView
             .findViewById(R.id.TextView01);
             holder.text2 = (TextView) convertView
             .findViewById(R.id.TextView02);

             convertView.setTag(holder);
             } else {
             holder = (ViewHolder) convertView.getTag();
             }

             holder.text.setText(curr[position]);
             holder.text2.setText(country[position]);

             return convertView;
             }

             class ViewHolder {
             TextView text;
             TextView text2;
             }
             }
        category.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {

                ListView l1 = (ListView) findViewById(R.id.ListView);
                 l1.setAdapter(new EfficientAdapter(this));

            }   

        });

    }   

}
</code></pre>
