0

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?

4

2 回答 2

1

我建议使用 getDrawable() 方法:

http://developer.android.com/reference/android/widget/ImageView.html#getDrawable()

于 2013-08-10T09:15:58.987 回答
0
   if(!yourImageView.getDrawable().equals(null)){
    // the View is displaying some image
     } else {
      //no image
     }
于 2013-08-09T20:01:24.037 回答