Back to project page android-fb-like-slideout-navigation.
The source code is released under:
Apache License
If you think the Android project android-fb-like-slideout-navigation 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.korovyansk.android.sample.slideout; //ww w . ja v a 2s . co m import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.KeyEvent; import com.korovyansk.android.slideout.SlideoutHelper; public class MenuActivity extends FragmentActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSlideoutHelper = new SlideoutHelper(this); mSlideoutHelper.activate(); getSupportFragmentManager().beginTransaction().add(com.korovyansk.android.slideout.R.id.slideout_placeholder, new MenuFragment(), "menu").commit(); mSlideoutHelper.open(); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK){ mSlideoutHelper.close(); return true; } return super.onKeyDown(keyCode, event); } public SlideoutHelper getSlideoutHelper(){ return mSlideoutHelper; } private SlideoutHelper mSlideoutHelper; }