You can use selectors like below ,based on the state of imageview it will
show the corresponding image.

selector.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/home_btn_starred_pressed"/>
    <item android:state_focused="false" android:state_pressed="true"
android:drawable="@drawable/home_btn_starred_pressed"/>
    <item android:state_focused="true"
android:drawable="@drawable/home_btn_starred_selected"/>
    <item android:state_focused="false" android:state_pressed="false"
android:drawable="@drawable/home_btn_starred_default"/>
</selector>



you have to set "src" of imageview , which you need glow effect to
@drawable/selector in the xml .

chekout the below link :

http://android-journey.blogspot.com/2009/12/android-selectors.html

On Tue, Nov 29, 2011 at 3:12 PM, Ali Chousein <ali.chous...@gmail.com>wrote:

> I would override the onTouchEvent method of ImageView and in it change
> the related picture to a one with glow effect.
>
> -------------------------------------------------
> Ali Chousein
> Weather-Buddy
> http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
> Geo-Filtered Assistant
> http://geo-filtered-assistant.blogspot.com
> https://marketplace.cisco.com/apphq/store/products/994
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to