Java files: suppress hard coded text warnings?
•
Java
Because I have to add a separator in textview (e.g., ",...), I will receive a hard coded text warning (don't conceptualize words...)
I've tried supresslint and supresswarnings:
@SuppressWarnings("HardcodedText") @SuppressLint("HardcodedText")
But it doesn't work How to stop these annoying warnings?
Solution
The name of the lint check to suppress is settexti18n, not hardcodedtext
You can also use
//noinspection AndroidLintSetTextI18n
Locate suppression only to the following lines of code, not the entire method or class
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码