On Thu, Nov 19, 2009 at 10:16 AM, n179911 <[email protected]> wrote: > Hi, > > I have a LinearLayout with 2 text View as its children. > How can I make the children of LinearLayout to change foreground color > (in this case, the text color of the text view) when the linearlayout > has focus? > > <LinearLayout> > <TextView android:id="@+id/name" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:textAppearance="?android:attr/textAppearanceSmall" > android:textColor="?android:attr/textColorInverse" > /> > <TextView android:id="@+id/value" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:textAppearance="?android:attr/textAppearanceSmall" > android:textColor="?android:attr/textColorInverse" > /> > > </LinearLayout> > Thank you.
> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en Use hasFocus() (create the LinearLayout object using findViewById())whether the Liear layout has focus or not then it returns true if it has foucused, then use setTextColor() to set text color(you can find this in text view).. -- Regards www.androidguru.com Surnrises -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

