code: public void initializeView() {
      checkFragmentConsistency();
      checkSupportFragmentManagerConsistency();
  
      inflate(getContext(), R.layout.draggable_panel, this);
      draggableView = (DraggableView) findViewById(R.id.draggable_view);
      draggableView.setTopViewHeight(topFragmentHeight);
      draggableView.setFragmentManager(fragmentManager);
      draggableView.attachTopFragment(topFragment);
      draggableView.setXTopViewScaleFactor(xScaleFactor);
      draggableView.setYTopViewScaleFactor(yScaleFactor);
      draggableView.setTopViewMarginRight(topFragmentMarginRight);
      draggableView.setTopViewMarginBottom(topFragmentMarginBottom);
      draggableView.attachBottomFragment(bottomFragment);
      draggableView.setDraggableListener(draggableListener);
      draggableView.setHorizontalAlphaEffectEnabled(enableHorizontalAlphaEffect);
      draggableView.setClickToMaximizeEnabled(enableClickToMaximize);
      draggableView.setClickToMinimizeEnabled(enableClickToMinimize);
      draggableView.setTouchEnabled(enableTouchListener);
    }
docs: Apply all the custom view configuration and inflate the main widgets. The view won't be
  visible if this method is not called.
  <p/>
  FragmentManager, top Fragment and bottom Fragment have to be configured before initialize this
  view. If not, this method will throw and IllegalStateException.