code: private void enableResizeContentPanel(boolean enable) {
          if (enable) {
              //activate the resizeFunction
              DisplayMetrics displaymetrics = getContent().getContext().getResources().getDisplayMetrics();
              final int screenWidth = displaymetrics.widthPixels;
  
              ViewGroup.LayoutParams lp = getContent().getLayoutParams();
              lp.width = screenWidth - getSecondWidth();
              getContent().setLayoutParams(lp);
  
              if (mCrossFadeSlidingPaneLayout != null) {
                  mCrossFadeSlidingPaneLayout.setPanelSlideListener(new SlidingPaneLayout.PanelSlideListener() {
                      @Override
                      public void onPanelSlide(View panel, float slideOffset) {
                          ViewGroup.LayoutParams lp = getContent().getLayoutParams();
                          lp.width = (int) (screenWidth - getSecondWidth() - ((getFirstWidth() - getSecondWidth()) * slideOffset));
                          getContent().setLayoutParams(lp);
  
                          if (mPanelSlideListener != null) {
                              mPanelSlideListener.onPanelSlide(panel, slideOffset);
                          }
                      }
  
                      @Override
                      public void onPanelOpened(View panel) {
                          if (mPanelSlideListener != null) {
                              mPanelSlideListener.onPanelOpened(panel);
                          }
                      }
  
                      @Override
                      public void onPanelClosed(View panel) {
                          if (mPanelSlideListener != null) {
                              mPanelSlideListener.onPanelClosed(panel);
                          }
                      }
                  });
              }
          } else {
              //reset the resizeFunction
              ViewGroup.LayoutParams lp = getContent().getLayoutParams();
              lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
              getContent().setLayoutParams(lp);
  
              if (mCrossFadeSlidingPaneLayout != null) {
                  mCrossFadeSlidingPaneLayout.setPanelSlideListener(mPanelSlideListener);
              }
          }
      }
docs: a small helper class to enable resizing of the content panel / or keep the default behavior