Basically you can store any kind of object as tag (and cast it back when calling getTag). This can be a simple ID or some complex data. It's some information which you associate with this view.
In the case of lists and the view holder pattern it's a simple object which contains references to views of the tagged view (group). So you don't have to call findViewById every time when you're updating the content of the view. It's just an performance optimization.
Can we store data of list item in the view tag?
No. Because of view recycling you have (e.g.) 10 views which are reused for 1000 list items. Storing data in the tag makes no sense here. It's better to use an custom data object to store the list item state (probably the same array which contains the displayed data) or you persist it right away on list item change.
See also [setTag documentation.][1]
[1]: http://developer.android.com/reference/android/view/View.html#setTag%28java.lang.Object%29
Basically you can store any kind of object as tag (and cast it back when calling `getTag`). This can be a simple ID or some complex data. It's some information which you associate with this view.
In the case of lists and the *view holder* pattern it's a simple object which contains references to views of the tagged view (group). So you don't have to call `findViewById` every time when you're updating the content of the view. It's just an performance optimization.
*Can we store data of list item in the view tag?*
No. Because of view recycling you have (e.g.) 10 views which are reused for 1000 list items. Storing data in the tag makes no sense here. It's better to use an custom data object to store the list item state (probably the same array which contains the displayed data) or you persist it right away on list item change.
See also [setTag documentation][1].
[1]: http://developer.android.com/reference/android/view/View.html#setTag%28java.lang.Object%29