Android Lint Warnings suggest change

Mark Suppress Warnings

It’s good practice to mark some warnings in your code. For example, some deprecated methods is need for your testing, or old support version. But Lint checking will mark that code with warnings. For avoiding this problem, you need use annotation @SuppressWarnings.

For example, add ignoring to warnings to deprecated methods. You need to put warnings description in annotation also:

@SuppressWarnings("deprecated");
public void setAnotherColor (int newColor) {
    getApplicationContext().getResources().getColor(newColor)
}

Using this annotation you can ignore all warnings, including Lint, Android, and other. Using Suppress Warnings, helps to understand code correctly!

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents