Listview with image in android,when i click an item it should appear
<p>in listview i like to display one image,but when i click an item it should appear,if i click the same it should disappear,if i click some other item also it should disappear,only cureent item image should appear. </p>

<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
            View itemView = super.getView(position, convertView, parent);
                       return itemView;            }
    } listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            public void onItemClick(AdapterView&lt;?&gt; listView, View itemView, int position, long id) {
                ImageView imageView = (ImageView) itemView.findViewById(R.id.img);
                                        itemToggled[position] = ! itemToggled[position];
                   imageView.setImageResource(itemToggled[position] ? R.drawable.checked : R.drawable.empty);   }}});       
</code></pre>
