catchthecows/AndroidImageMap

adding button functuality to areas

Opened this issue · 1 comments

I want that areas to act like button to show different image or go to a different class or activity instead of showing bubbles. But i cant figure it out. whatever i tried gives an error or just a black screen when app is running. any advice?

It seems that the way to do it is to override onScreenTapped() to not draw bubbles (and probably not check for a bubble to be clicked) but do the stuff you want it to do. Unfortunately the method seems to be package-private by default, so it is not straightforward to override it. Of course it is possible to monkey-patch the source code of the library to make that method protected. I suggest also sending a pull request for the onScreenTapped() method to become protected so one could subclass ImageMap and override its functionality.