Вопрос

I have this image:enter image description here

And in Android I want to drag on the image and get the x and y. But only on the dark part (but a imageview/button is a rectangle). So a sort of round OnTouchListener.

How can I manage to do this?

Это было полезно?

Решение

You able to do it by Get touched pixel color of ImageView.

So, Step you need:

 1. Get touched pixel color.

 2. Compare touched pixel color with your image color . it is black. 

So, you able to touched position in your desire image view position or not.

Thanks

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top