title: Dynamic UI with sliding menu and actionbarsherlock
body: <p>Trying to achieve a dynamic UI with <a href="https://github.com/jfeinstein10/SlidingMenu" rel="noreferrer">facebook like sliding menu</a> and <a href="http://actionbarsherlock.com/" rel="noreferrer">actionbarsherlock</a>
  .First i have look into android documentation which introduce fragment to handle dynamic button. But with no luck and a week time , i still can't get it to work anyhow , i guess is my misunderstand on android concept.The slidingbar and actionbarsherlock work without any problem.</p>
  
  <p>I have a HomeScreen.java which contain all my menu and presetation stage
  and so far i have created a pagerAdapter1.java that extends FragmentPagerAdapter
  , and three example fragment class that handle my work which is task1.java,task2.java
  ,task3.java simple enough</p>
  
  <p>here is part of my code
  HomeScreen.java</p>
  
  <pre><code>import com.actionbarsherlock.view.Menu;
  import com.actionbarsherlock.view.MenuItem;
  import com.slidingmenu.lib.SlidingMenu;
  import com.slidingmenu.lib.app.SlidingFragmentActivity;
  public class HomeScreen extends SlidingFragmentActivity {
      public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_home_screen);
              setBehindContentView(R.layout.menu_frame);
      }
  </code></pre>
  
  <p>PagerAdapter1.java</p>
  
  <pre><code>public class PagerAdapter1 extends FragmentPagerAdapter  {
  
      private List&lt;Fragment&gt; fragments;
      public PagerAdapter1(FragmentManager fm, List&lt;Fragment&gt; fragments) {
          super(fm);
          this.fragments = fragments;
      }
  
      public Fragment getItem(int position) {
          return this.fragments.get(position);
      }
  
      public int getCount() {
          return this.fragments.size();
      }
  
  }
  </code></pre>
  
  <p>and three task1.java,2,3</p>
  
  <pre><code>    import android.support.v4.app.Fragment;
      public class Tab1Fragment extends Fragment{
  
  onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                  Bundle savedInstanceState) {
              if (container == null) {
                  return null;
              }
              return (LinearLayout)inflater.inflate(R.layout.tab_frag1_layout, container, false);
          }
  </code></pre>
  
  <p>I think its better to explain my problem with picture</p>
  
  <p>A homescreen which is a presetation stage , whenever user click on menu , this page will change to the page he want</p>
  
  <p><img src="https://i.stack.imgur.com/8tRcD.png" alt="homescreen"></p>
  
  <p>and this is my menu</p>
  
  <p><img src="https://i.stack.imgur.com/lAmpH.png" alt="menu_frame"></p>
  
  <p>My problem is how do i include this 3 fragment into my homescreen ? i have tried so many tutorial but it doesn't work in my situation.Most tutorial are creating fragment with code, i just want to include my 3 task into it</p>