Got it solved, not the way I would like it but at least it's a step in the right direction. I've got two separate images, one for when the button is not pressed and another for when it is. All I do is change the image when it is clicked on, I have had to cheat and make the white background of the green cross the same colour as the selected button. This gives a bit of a strange effect when releasing the mouse button but it's hardly noticable.
- Code: Select all
mZoomIn.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO change image to show highlight
if (event.getAction() == MotionEvent.ACTION_DOWN)
{
//set the image to 'button clicked'
mZoomIn.setImageResource(R.drawable.zoom_in2);
}
else if (event.getAction() == MotionEvent.ACTION_UP)
{
//set the image to 'button released'
mZoomIn.setImageResource(R.drawable.zoom_in);
}
return false;
}
});
We can stop the framework showing the amber/orange colour around our images if we want by returning true, I assume this means "We've handled the button press no need for the framework to worry about any further action

"