Big shoutout to @SVDG_XEC for the absolute morning brutality — sweeping 20 of my #NFTs before I even finished my coffee 🔥#eCash $XEC #CryptoMarket
— NFToa (@nftoa_) November 25, 2025
Truly the most nutritious breakfast I’ve ever witnessed.
Collector energy: unmatched. Respect: maximum. 💎🙌 pic.twitter.com/pnboPMbWQG
Hello guys, back again with me. Well this time I want to share a case when I want to check the imageView source which I will later check or compare with several image sources that I have prepared, but at that time I experienced several failures when trying to print it to the Android Studio console / terminal.

Long story short, I managed to do it, so this is what it looks like.
if (regProfile.getDrawable().getConstantState() == getResources().getDrawable(R.drawable.ivpic).getConstantState())
{
Toast.makeText(_con, "Image is ivPic", Toast.LENGTH_LONG).show();
// new RegisterAsyntaskNew().execute();
}
else
{
Toast.makeText(_con, "Image isn't ivPic", Toast.LENGTH_LONG).show();
// new RegisterAsyntask().execute();
}In essence, we need to use .getConstantState(), you can read the full documentation about this method here:
- http://developer.android.com/reference/android/graphics/drawable/Drawable.html
- http://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html
Before you check the imageView, make sure that it is not null, it's as simple as this.
if(getResources().getDrawable(R.drawable.ivpic) == null){
//lakukan exeption, jika perlu!
}else{
//lakukan comparasi / pengecekan imageView di sini!
}Hope it's useful, good luck!
