title: Left to right and right to left android sliding panel
body: <p>I saw a couple libraries that can do this, but i would like to avoid them if possible. I managed to do left to right, but i couldn't find out how to do on both directions. so here is my code:</p>
  
  <pre><code>    final SlidingPaneLayout slidingPaneLayout = SlidingPaneLayout.class.cast(root.findViewById(R.id.slidingpanelayout));
      slidingPaneLayout.setPanelSlideListener(new SlidingPaneLayout.PanelSlideListener() {
  
          @Override
          public void onPanelSlide(View view, float v) {
          }
  
          @Override
          public void onPanelOpened(View view) {
  
              switch (view.getId()) {
                  case R.id.fragment_secondpane:
                      getSupportFragmentManager().findFragmentById(R.id.fragment_firstpane).setHasOptionsMenu(true);
                      getSupportFragmentManager().findFragmentById(R.id.fragment_secondpane).setHasOptionsMenu(false);
                      break;
                  default:
                      break;
              }
          }
  
          @Override
          public void onPanelClosed(View view) {
  
              switch (view.getId()) {
                  case R.id.fragment_secondpane:
                      getSupportFragmentManager().findFragmentById(R.id.fragment_firstpane).setHasOptionsMenu(false);
                      getSupportFragmentManager().findFragmentById(R.id.fragment_secondpane).setHasOptionsMenu(true);
                      break;
                  default:
                      break;
              }
          }
      });
  </code></pre>
  
  <p>is there a way to make sliding panels on both left to right and right to left directions so that i will have 3 fragments, without any libraries? </p>