any idea?

On 10月18日, 下午11时45分, Farproc <[email protected]> wrote:
> Thank you very much!
> Background works fine!!! But I want the text color of a View inverted
> (white->black, etc) when pressed/focused.
> I think there is a handy way to do so, but what is it ...
>
> On 10月15日, 下午6时23分, RS <[email protected]> wrote:
>
>
>
> > You'll have to provide background as a multi state drawable xml like
> > res/drawable/my_multi_state_bg.xml
> > Following is a sample xml.
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <selector xmlns:android="http://schemas.android.com/apk/res/android";>
> >     <item android:state_focused="true" android:state_pressed="true"
> >                 android:drawable="@drawable/some_orange_color_or_png" />
> >     <item android:state_focused="false" android:state_pressed="true"
> >                 android:drawable="@drawable/some_white_color_or_png" />
> >     <item android:drawable="@drawable/transparent_bg" />
> > </selector>
>
> > Point to that as in android:background="@drawable/my_multi_state_bg"
> > or through java code wherever u please.
>
> > stae_focused, state_pressed are used in this example.
> > There is another state_selected .. try combinations of true, false for
> > each.
>
> > On Oct 15, 10:50 am, Farproc <[email protected]> wrote:
>
> > > When we touch a Button in android, the button highlighted(background
> > > turns yellow). This visual change is very friendly to users. I want
> > > the same effect on aViewobject(for example a TextView or ImageView)
> > > but I can't figure it out. Somebody help me?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to