How to check which image is set in imageview android
问题 I have a star image in action bar. When I click on it, then the image should change to ON star. This is working fine. But how to know whether image is at ON state or OFF state.I want something that, if the image is at OFF mode and user taps on ON star, then it should set to ON star image. Initially, the image is set to OFF mode. So for this, I've wrote give line to turn on as user tap on it : v.setBackgroundResource(android.R.drawable.star_big_on); Guys pls suggest me for OFF mode if star