Integrating "SlidingMenu" and Swiping in Android
<p>I am trying to do something like Google/Youtube Application where by clicking <br/> the action bar at the top will inflate a menu on the left side of the screen.</p>

<p>In addition to that, I am also using the Scrollable Tabs + Swipe navigation type right off 
the bat. I've done some research on Google and found the slidingmenu library but I have no clue on how to start integrating those to together.</p>

<p><br/></p>

<p>Right now I have the default class of the Swipe navigation and the class which extends SlidingActivity as follows:</p>

<p><br/></p>

<p>public class Home extends FragmentActivity {</p>

<pre><code>static int POSITION;
SectionsPagerAdapter mSectionsPagerAdapter;
ViewPager mViewPager;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getActionBar().setDisplayUseLogoEnabled(false);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    getActionBar().setDisplayShowHomeEnabled(true);
    setContentView(R.layout.home);

    // Create the adapter that will return a fragment for each of the three
    // primary sections of the app.
    mSectionsPagerAdapter = new SectionsPagerAdapter(
            getSupportFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager = (ViewPager) findViewById(R.id.pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.home, menu);

    return true;
}

/**
 * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
 * one of the sections/tabs/pages.
 */
public class SectionsPagerAdapter extends FragmentPagerAdapter {

    public SectionsPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        // getItem is called to instantiate the fragment for the given page.
        // Return a DummySectionFragment (defined as a static inner class
        // below) with the page number as its lone argument.
        POSITION = position;
        Fragment fragment = new DummySectionFragment();

        Bundle args = new Bundle();
        args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);
        fragment.setArguments(args);

        return fragment;
    }

    @Override
    public int getCount() {
        // The number of pages
        return 5;
    }

    String[] Modules = { "IT1111-AV", "IT1431-AV", "IT1161-AX",
            "IT1432-AV", "IT631-AV" };

    @Override
    public CharSequence getPageTitle(int position) {
        Locale l = Locale.getDefault();

        for (int i = 0; i &lt; Modules.length; i++) {
            if (i == position) {
                return Modules[i];
            }

        }

        return null;
    }
}

/**
 * A dummy fragment representing a section of the app, but that simply
 * displays dummy text.
 */
public static class DummySectionFragment extends Fragment {
    /**
     * The fragment argument representing the section number for this
     * fragment.
     */
    public static final String ARG_SECTION_NUMBER = "section_number";



    public DummySectionFragment() {

    }



    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        if (POSITION == 2) {
            View rootView = inflater.inflate(R.layout.fragment_home_dummy,
                    container, false);
            TextView dummyTextView = (TextView) rootView
                    .findViewById(R.id.section_label);
            dummyTextView.setText("YOLO");
            return rootView;
        }
        View rootView = inflater.inflate(R.layout.fragment_home_dummy,
                container, false);
        TextView dummyTextView = (TextView) rootView
                .findViewById(R.id.section_label);
        dummyTextView.setText(Integer.toString(getArguments().getInt(
                ARG_SECTION_NUMBER))
                + "HELLO");
        return rootView;
    }




}
</code></pre>

<p>}</p>

<p><br/><br/>
Sliding Activity class:
<br/><br/>
public class Slide extends SlidingActivity{</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    setBehindContentView(R.layout.activity_menu);

getSlidingMenu().setBehindOffset(100);
}
</code></pre>

<p>}</p>

<p><br/></p>

<p>So is that an easy way to integrate these two together? I am new in Android development, so please guide me!</p>
