@Override
  public boolean dispatchTouchEvent(MotionEvent ev) {
    int x = (int) ev.getX();
    int y = (int) ev.getY();
    if (pointToPosition(x, y) == AdapterView.INVALID_POSITION
        && ev.getAction() == MotionEvent.ACTION_DOWN
        && mOnEmptySpaceClickListener != null) {
      mOnEmptySpaceClickListener.onEmptySpaceClick();
    }
    return super.dispatchTouchEvent(ev);
  }
Handle click event on the empty space of the list.
java/com/google/android/apps/authenticator/util/EmptySpaceClickableDragSortListView.java