Reputation: 131
I want to check if an imageview is displaying a certain image, how do I do that? Or maybe just if it has an image at all?
Upvotes: 0
Views: 7469
Reputation: 2149
I would recommend using the getDrawable()-method:
http://developer.android.com/reference/android/widget/ImageView.html#getDrawable()
Upvotes: 1
Reputation: 11608
if(!yourImageView.getDrawable().equals(null)){
// the View is displaying some image
} else {
//no image
}
Upvotes: 0