[英]How do I check if an image view has an image uploaded from the gallery in Android Studio?
我已经检查过 imageView.getdrrawable()==null,但是 imageview 已经包含源图像,所以它返回 true? 如何检查这个?
使用 getDrawable() 方法,如果它返回 null 则没有分配
if( mImageView.getDrawable() != null){
//Image Assigned
}else{
//nothing assigned
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.