Android: how to draw TextView as focused?
I have a series of Views in a tablelayout. Some are EditTexts, some are TextViews. I would like the TextViews to be focusable in the same way as the EditTexts; meaning, I would like them to be highlighted by the "up" and "down" arrows. TextView.setFocusable(true)
allows them to gain focus from arrow keys, but they do not draw an orange border to indicate their focus like the EditTexts do. Is there an easy way to draw them as focused?
Use a selector as your textColor and/or background and give it different states for state_focused="true" and state_focused="false".
Color State List Resources
链接地址: http://www.djcxy.com/p/24194.html