code: public void addSwipeListener(SwipeListener listener) {
          if (mListeners == null) {
              mListeners = new ArrayList<SwipeListener>();
          }
          mListeners.add(listener);
      }
docs: Add a callback to be invoked when a swipe event is sent to this view.
  
  @param listener the swipe listener to attach to this view