Tuesday, April 9, 2013

[android help] Hide warnings in layout files

android - Hide warnings in layout files - Stack Overflow




















I updated Eclipse and SDK and now in every xml file the TextViews have the warning "Consider making the text value selectable by specifying android:textIsSelectable="true"".


Is it possible to hide the warnings, I hate to have my project with a lot of yellow exclamation marks.





























Go to the propeties of your project. Go to Android Lint Preferences. Search for SelectableText and change the severity to ignore.


You can also do this in Eclipse preferences for all projects.























There is a good reason for this warning. By just disabling it, you are basically ignoring user interface guidelines of Android and you are not using the full potential of the user interface of your app. Therefore looking at each text view and explicitly setting this attribute to either false or true will increase the quality of your app.






















The selected answer is the correct one...


However should you decide to go with Lint be aware that not every android target supports this tag.


I discovered this the hard way when I followed it's advice and received "No resource identifier found for attribute 'textIsSelectable' in package 'android'" as an error when it tried to compile the layout XML values.


Note I was targeting Android 2.2




















default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...