2

i'm develop app & use in my project custom view SlidingUpPanelLayout (https://github.com/umano/AndroidSlidingUpPanel) In my case at one of functions moment panel must be don't draggable (in case that content is in full screen mode). How i can make this?

Thanks

a.black13
  • 2,157
  • 4
  • 19
  • 20

3 Answers3

5

Use slidingUpPanelLayout.setTouchEnabled(false); to disable the dragging.

Shahab Rauf
  • 3,651
  • 29
  • 38
0

Use the setSlidingEnabled(false) when you don't want the panel to be able to slide. This also prevents dragging.

  • Hi, thanks for answer. I try setSlidingEnabled(false), but it's doesn't work. I found solution. I change drawView layout params as like height – a.black13 Feb 14 '14 at 12:55
0

My solution:

 public void changeFullScreenMode(int visible) {
        if (visible == View.VISIBLE) {
            isFullScreen = true;
            getSupportActionBar().hide();
            dragViewLayParams = drawView.getLayoutParams();
            dragViewLayParams.height = 0;
            drawView.setLayoutParams(dragViewLayParams);
        } else {
            isFullScreen = false;
            getSupportActionBar().show();
            dragViewLayParams = drawView.getLayoutParams();
            dragViewLayParams.height = absoluteDragViewHeight;
            drawView.setLayoutParams(dragViewLayParams);
        }
    }
a.black13
  • 2,157
  • 4
  • 19
  • 20