title: How can I add Slidingpanelyout programatically?
body: <p>I want to add Slidingpanelayout to my project by code like this:</p>
  
  <pre><code>FrameLayout.LayoutParams fp = new FrameLayout.LayoutParams(
          FrameLayout.LayoutParams.MATCH_PARENT,
          FrameLayout.LayoutParams.MATCH_PARENT);
  
  FrameLayout frame = new FrameLayout(activity);
  </code></pre>
  
  <p>I found this widget <a href="https://github.com/android/platform_frameworks_support/blob/master/v4/java/android/support/v4/widget/SlidingPaneLayout.java" rel="nofollow">Slidingpanelayout.java</a> but I can't figure out how to import it to my project. All tutorials I found just import it through XML layout file.</p>