简体   繁体   中英

Android image part onclick

I have a big image as this one this

Can I have that in Android if somebody click on "Pest" just Pest changes its Background color ? My goal is to have a separate onClickListener for all county and they can change their background.

Can I achieve it in Android? Thank You !

Firstly, this seems more like a graphics design issue.

Secondly, it is definitely doable. I would suggest some form of Photoshop to split the bigger image in sub-images. Once you have your 10 images (random number, but I suppose you get the ieda) that together form the bigger image (that should 100% be achievable with a Photoshop like software), then you can apply the onClickListener to each image. This will produce the effect you are looking for.

I believe you know how to do that and you might not need the code (as I have seen in your comments). All you need is that Photoshop like software that will do all the work for you.

Meanwhile, I will quickly search about the best software to crop those images. If you have Photoshop that might prove quite good, I guess.

Maybe this (there are tons out there):

https://graphicdesign.stackexchange.com/questions/3205/i-need-to-slice-one-image-into-50-different-images-automatically

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM