Slidingmenu to implement app slide-off function

Source: Internet
Author: User

//Side Pull Final Slidingmenu menu=New Slidingmenu (This); Menu.setmode (Slidingmenu.left);//Set the menu sliding mode, the menu appears on the left side of left_right on both sides have right menu.settouchmodeabove (slidingmenu.touchmode_margin);//Set the area of the slide this is the edge Touchmode_fullscreen this is set to full screen area can slide Touchmode_none can't slide//Menu.setshadowdrawable (R.drawable.shadow);//Set Shadow Picture//Menu.setsecondaryshadowdrawable (R.drawable.shadowright);//Shaded picture on the right menu//Menu.setshadowwidthres (R.dimen.shadow_width);//Sets the width of the shadow picture Menu.setbehindwidth (300);//Side Pull Page Width//Menu.setbehindoffsetres (R.dimen.slidingmenu_offset);//slidingmenu is drawn menu.setbehindoffset ( Span style= "color: #800080;" >150); // remainder page width menu.setfadedegree ( 0.35f); //this,slidingmenu.sliding_content); // Slidingmenu is attached to activity menu.setsecondarymenu (r.layout.menu_frame2); // Set the right menu Menu.setmenu (R.layout.left_cela); // Set the layout file on the left menu           

//This is to give the main page a control to listen let him click on the Show Side drop menu
Tiouxiang.setonclicklistener (New Onclicklistener () {

@Override
public void OnClick (View v) {
//TODO auto-generated method stub
Click Show Side Drop Menu
Menu.showmenu ();
}
});

Slidingmenu to implement app slide-off function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.