I started by creating BitMap and rotating the canvas / matrix, however this was not a good solution. Finally, just replacing the available ones has ended if the conditions are met. I have to say that this is an ExpandableListView where the cells are reused when drawing.
if (isExpanded) { ImageView view = (ImageView) convertView.findViewById(R.id.ImageView); view.setImageResource(R.drawable.quickactions_button_normal_down); } if (!isExpanded) { ImageView view = (ImageView) convertView.findViewById(R.id.ImageView); view.setImageResource(R.drawable.quickactions_button_normal); }
I'm usually not an Android developer, but I'm really surprised that you can animate the rotation, but not statically set the rotation of the picture. Logically, the first is a subset of the second, and not vice versa.
source share