Joined July 2018
·

Andre Breizman

You can use setTag() and getTag() method with key and value concept.
Example:
holder.btnplus.setTag(R.integer.btnplusview, convertView);
holder.btn
plus.setTag(R.integer.btnpluspos, position);

Here, first parameter is key and second is value.

You can use below to get the tag
View tempview = (View) holder.btnplus.getTag(R.integer.btnplusview);
Integer pos = (Integer) holder.btn
plus.getTag(R.integer.btnpluspos);

Full and Nice example reference is available at: https://demonuts.com/listview-button/

You can use this method for multiple views like button, textview, checkbox etc. in the same row item of the listview.

Wow very good question. It increased my knowledge

Achievements
1 Karma
0 Total ProTip Views