How to Solve this warning Casting 'findViewById(R.id.catImageView)' to 'ImageView' is redundant less... (Ctrl+F1) This inspection reports unnecessary cast expressions.enter image description here
Asked
Active
Viewed 256 times
0
-
2Possible duplicate of [No need to cast the result of findViewById?](https://stackoverflow.com/questions/44902651/no-need-to-cast-the-result-of-findviewbyid) – Markus Kauppinen Dec 11 '18 at 16:06
-
[Edit] the question and show the [mcve] and the whole formatted text of the warning or errors. – Dec 11 '18 at 16:09
1 Answers
0
Use this, ImageView imageView = findViewById(R.id.catImageView); which works same but removes your warning..

NaveenKadiyala
- 21
- 1
- 5