Reputation: 2157
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
Upvotes: 2
Views: 2235
Reputation: 3931
Use slidingUpPanelLayout.setTouchEnabled(false); to disable the dragging.
Upvotes: 5
Reputation: 2157
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);
}
}
Upvotes: 0
Reputation: 51
Use the setSlidingEnabled(false) when you don't want the panel to be able to slide. This also prevents dragging.
Upvotes: 0