android - How to suppress lint on specific line/string in resources xml files? -


on android, suppress lint on specific string value or specific line on string.xml or other resources files.

<string name="suppress_lint_string">suppress string</string>  <string name="dont_suppress_lint_string">don\'t suppress string</string> 

i perform specific lint suppressing on specific strings , specific parts of layouts examples missing translations specific strings doesn't matter between languages.

if want suppress specific rules in specific strings without suppressing whole file, can use annotations.

strings.xml

<?xml version="1.0" encoding="utf-8"?> <resources>          <!--suppress missingtranslation -->     <string name="suppress_lint_string">ignore translation</string>     ...  </resources> 

you can substitute missingtranslation other lint rule.

http://tools.android.com/tips/lint/suppressing-lint-warnings


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -