Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off warnings for @string resource in eclipse for the Android SDK

I know it's 'technically' not the best practice to be hard coding strings; but I can deal with it later - right now I just want to get the shell of my projects finished and I'm incredibly OCD about warnings in my code - is there any way to turn this off?

If my title wasn't specific enough take this as an example:

        <Button android:id="@+id/aboutBtn"
        style="@style/DashboardButton"
        android:textColor="#ffffff"
        android:text="About Vezign"
        android:onClick="aboutClick"
        android:drawableTop="@drawable/about_icon" />

The android:text="" line would be flagged as a warning for not using strings.xml and referencing it as such.

Preferably something that would turn it off for all future references; and not something I need to type (e.g. @Suppress Warnings)

Thanks!

like image 238
TJ Biddle Avatar asked Jan 22 '12 01:01

TJ Biddle


1 Answers

 Preferences > Android > Lint Error Checking > 

Scroll down to internationalization

change the severity of "HardcodedText" to 'information' or 'ignore'

like image 180
Blundell Avatar answered Nov 25 '22 17:11

Blundell