I have set a PNG image(image having transparent background) as button background, When I touch the button it shows me X-coordinate and Y-coordinate of the button’s touched posit
Try this
Drawable drawable = button.getBackground(); Bitmap bmp = ((BitmapDrawable) drawable).getBitmap(); int color = bmp.getPixel(x_coordinate, y_coordinate);