i want to have a glow effect for an image view on its touch event..
is it possible to have it without changing the image itself?
i mean i do not want to change the bitmap or background of the image view, just want to show a selection type..something like selecting an icon on the desktop.
thanks for the reply Erel !
does imageView.background, imageView.bitmap and imgaeView.setBackgroundImge are doing the same thing.
I mean is there something background and foreground for an image view.
e.g. making some parts of foreground image transparent, or by using transparent image will show background color or background image in transparent areas.
i hope I am able to explain my requirements.
ImageView doesn't have a Touch event, but Panels do. For graphics you can work on panels like on imageViews.
e.g. making some parts of foreground image transparent, or by using transparent image will show background color or background image in transparent areas.
Thanks for the suggestion..i afraid this will not make the loading of the activity very slow...
Klaus, the problem for me is the no of views.. my screen size is 800x480 and there are about 30 icons of 48x48 pox on the activity for which i want to have a glow effect on click and it should be permanent untill the next click...
so only i was looking for a best approach via discussions..coz, having more and more superimposed views may increase the loading time for the activity and change of screen/activity as well.
i am trying to do this by loading already glowing images no click image now..this way i have to have two images per icon.
any suggestions are welcome..i m just learning and you are an expert.
Is there a reason to use ImageViews and not Buttons ?
In your case you could use ToggleButtons and define a different image for each state, an example is here. The advantage is that you set the two images for the button once, the image change depending on the button state is done by the OS.
Exept working with two images, I don't know of any other graphic effect that could do what you want to do.
Is there a reason to use ImageViews and not Buttons ?
In your case you could use ToggleButtons and define a different image for each state, an example is here. The advantage is that you set the two images for the button once, the image change depending on the button state is done by the OS.
Exept working with two images, I don't know of any other graphic effect that could do what you want to do.
no..i m not bound to use imageView only..will surely try the toggleButtons and will let you know the experience with it. well.. i need three images per view..
on state, off state and just selected state...i guess its possible with toggleButton as well...timebeing you can say that i've created my own toggleButton using imageview by changin images.
but if os can do it for me then nothing better than that.
ToggleButtons have only 2 states ON or OFF (state.checked or state.inchecked)
I don't know of any button having 3 states.
I'm afraid that you need to play with different images in the click events.
Buttons or ImageViews.