Back to project page mint.
The source code is released under:
GNU General Public License
If you think the Android project mint listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.slidingmenu.example; //w w w .j ava2s. co m import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.slidingmenu.lib.SlidingMenu; public class AttachExample extends FragmentActivity { private SlidingMenu menu; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.attach); // set the Above View setContentView(R.layout.content_frame); getSupportFragmentManager() .beginTransaction() .replace(R.id.content_frame, new SampleListFragment()) .commit(); // configure the SlidingMenu menu = new SlidingMenu(this); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setShadowWidthRes(R.dimen.shadow_width); menu.setShadowDrawable(R.drawable.shadow); menu.setBehindOffsetRes(R.dimen.slidingmenu_offset); menu.setFadeDegree(0.35f); menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT); menu.setMenu(R.layout.menu_frame); getSupportFragmentManager() .beginTransaction() .replace(R.id.menu_frame, new SampleListFragment()) .commit(); } @Override public void onBackPressed() { if (menu.isMenuShowing()) { menu.showContent(); } else { super.onBackPressed(); } } }