2

我正在开发应用程序并在我的项目自定义视图中使用 SlidingUpPanelLayout (https://github.com/umano/AndroidSlidingUpPanel)在我的情况下,其中一个功能时刻面板必须不可拖动(如果内容全屏模式)。我怎样才能做到这一点?

谢谢

4

3 回答 3

5

使用slidingUpPanelLayout.setTouchEnabled(false); 禁用拖动。

于 2016-11-03T10:51:51.187 回答
0

当您不希望面板能够滑动时,请使用 setSlidingEnabled(false)。这也可以防止拖动。

于 2014-02-14T07:02:28.320 回答
0

我的解决方案:

 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);
        }
    }
于 2014-02-14T19:17:26.560 回答