title: Add a gradient color to swipe gesture
body: <p>Right now I can handle swipe gestures fine with the posted code.  But I want to add a background color for the transition as the user swipes from one direction to another.  Very similar to the way the stock contacts app does it.  I know I will have to use a GestureOverlay but I can't figure out how to link that with my current code.  Is it possible, or is there an easier way to do this?</p>
  
  <pre><code>    // inside my onCreate method
      View view = getLayoutInflater().inflate(R.layout.gesture_overlay, null);
      GestureOverlayView gestureOverlayView = new GestureOverlayView(this);
      gestureOverlayView.addView(view);
  
  
      mGestureDetector = new GestureDetector(new MyGestureDetector());
      mGestureListener = new View.OnTouchListener() {
          public boolean onTouch(View view, MotionEvent event) {
              mLongPress = false;
              return mGestureDetector.onTouchEvent(event);
          }
      };
  
      // mListView.setOnItemClickListener(this);
      mListView.setOnTouchListener(mGestureListener);
  }
  
  
  class MyGestureDetector extends SimpleOnGestureListener {
      private static final int SWIPE_MIN_DISTANCE       = 120;
      private static final int SWIPE_MAX_OFF_PATH       = 200;
      private static final int SWIPE_THRESHOLD_VELOCITY = 200;
  
      @Override
      public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
      if (Math.abs(e1.getY() - e2.getY()) &gt; SWIPE_MAX_OFF_PATH) {
          return false;
      }
      // right to left swipe
      if (e1.getX() - e2.getX() &gt; SWIPE_MIN_DISTANCE
              &amp;&amp; Math.abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY) {
          return true;
      } else
          if (e2.getX() - e1.getX() &gt; SWIPE_MIN_DISTANCE
                  &amp;&amp; Math.abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY) {
              return true;
          }
  
      return false;
  }
  </code></pre>
  
  <p>}</p>
  
  <p><img src="https://i.stack.imgur.com/wkeDM.png" alt="enter image description here"></p>