I recently updated my android SDK and build tools to API 26 in Android Studio and I directly noticed that Android Studio was marking my view casts as "redundant" when I do something like this:
TextView itemName = (TextView) findViewById(R.id.menuItemName);
After some research, I found that since SDK 26, findViewById
uses Java 8 features to return the same object type, but what I wanted to know is if it is completely safe to remove all casts. Will this cause any issues on Android prior to 26? Any more info on this would be helpful as I didn't find much on the internet. Thanks in advance.