What type of list-adapter are you using? Some predefined types of adapters 
(like the CursorAdapter and maybe the ArrayAdapter as well), already use the 
'tag' attribute of each list-item view (i.e. the view that the getView 
method returns). If you're using the 'tag' attribute as well for your own 
purposes (convertView/lView's getTag and setTag methods), you may run into 
conflicts. I think one of these conflicts just manifested itself in your app 
through this ClassCastException.

Instead of using the getTag and setTag methods on the list-item views, use 
them one of list-item's child-views instead (e.g. the ImageView embedded in 
it).

...
View lView = listView.getChildAt(i);
View taggedView= lView.findViewById(R.id.list_item_image_view);
Integer tagValue = (Integer)taggedView.getTag();
...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to