Пример #1
0
    @Override
    public void onDragFloatView(View floatView, Point floatPoint, Point touchPoint) {
      super.onDragFloatView(floatView, floatPoint, touchPoint);

      final int first = lv.getFirstVisiblePosition();
      final int lvDivHeight = lv.getDividerHeight();

      View div = lv.getChildAt(mDivPos - first - 1);

      if (div != null) {
        if (mDraggedPos >= mDivPos) {
          // don't allow floating View to go above section divider
          final int limit = div.getBottom() + lvDivHeight;
          if (floatPoint.y < limit) {
            floatPoint.y = limit;
          }
        }
      }
    }