tags:

views:

202

answers:

1

I have a LinearLayout that contains three TextViews. I want to highlight a TextView or the whole Layout when user clicks on the TextView. Is they any way to make it happen?

Thanks.

A: 

There are a number of ways of doing this.

The simplest way of doing this is by playing around with various View attributes such as android:focusable, android:focusableInTouchMode, android:clickable, and TextView attributes such as android:selectAllOnFocus.

You could also customize the appearance of your views by setting their backgrounds to StateListDrawables (a.k.a. <selector> drawables).

Roman Nurik