Q:

How to get the touchUP or release event from a layout on Android with Xamarin C#

I really searched for this but i can't find anything that helps me.
I have a Layout that has a .click event, but i need that when my finger is down on it to it's background to get darker and when i release it gets to normal again.
I found this:
Touch Release method in Android
But i can't make it work.
Does anyone knows if there's a way to get this done.

A:

Set a listener:
 _myButton.SetOnTouchListener(this);

Add View.IOnTouchListener to your activity
public class YourActivity : Activity, View.IOnTouchListener

Implement the listener
public bool OnTouch(View v, MotionEvent e)
   {
       switch (e.Action)
       {
           case MotionEventActions.Down:
               _viewX = e.GetX();
               break;
           case MotionEventActions.Move:
               var left = (int) (e.RawX - _viewX);
               var right = (int) (left + v.Width);
               v.Layout(left, v.Top, right, v.Bottom);
               break;
       }
       return true;
   }

full tutorial here:
http://docs.xamarin.com/recipes/android/other_ux/gestures/detect_a_touch/

