Android Question ViewImage as an Android Icon efects

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Hi, Im using ViewIMage(s) tu simulate Android icons.
Any way of doing something when the user touchs it?
Like blink or being black and white or something that indicate your touch is working?
Thanks
 

Attachments

  • WhatsApp Image 2018-12-11 at 17.55.05.jpeg
    WhatsApp Image 2018-12-11 at 17.55.05.jpeg
    71.8 KB · Views: 133

Computersmith64

Well-Known Member
Licensed User
Longtime User
Android app icons don't have any tactile response to a touch. The response is to perform an action. Having said that, if you search the forum there are several examples of using an ImageView as a button.

- Colin.
 
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
I think you are wrong, in Android when you touch an icon it becomes gray.
Ive seached the forum but did not found any example of how to do it.
Thanks
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I think you are wrong, in Android when you touch an icon it becomes gray.
Ive seached the forum but did not found any example of how to do it.
Thanks
Android app icons aren't reactive. Icons inside apps may or may not be. For example in some Android versions action bar icons go gray when you tap them & in others they only go gray if you long tap them.

If you want the background of an image to go gray when you tap it, use a bitmap with a transparent background & use ColorDrawable & Canvas to change the background color of the ImageView.

- Colin.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
To add to Colin's comment, some Launcher Apps, specially those that hijack the default OS Launcher, do provide some "reaction"... The likes of GoLauncher do. But, as Collin stated, this is a Launcher App that provides its own "reaction" features to its "icons".

To achieve similar results, you can use an image view alongside with the animation lib to make your "icons" reactive.
 
Upvote 0
Top