Вопрос

I have the following warning (from the Lint) on each TextView with an ID in my XMLs.

Consider making the text value selectable by specifying android:textIsSelectable="true"

Can anyone please explain me why does it suddenly (from ADT 21.1) happening? Why does the Lint thinks that I want each TextView to be selectable?

EDIT: I know it can be ignored, but I don't think it's a solution.

Это было полезно?

Решение

If you make the TextView selectable, users can use copy/paste on it. Obviously the "lint" developers thought that was a good thing, so they warn you if you don't do it. There are lots of lint warnings that are just "suggestions", which is why there are easy ways to turn these warnings off.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top