Slidingmenu Slip Side Slip

Source: Internet
Author: User

Slidingmenu menu = new Slidingmenu (this); Create an implementation individually
Menu.setmode (Slidingmenu.left); Set left Slide
To set the layout for the slide menu
Menu.setmenu (R.layout.leftmenu);
Setting the mode of the touch screen
Menu.settouchmodeabove (Slidingmenu.touchmode_fullscreen);//3 slide out the menu mode
Menu.setshadowwidthres (R.dimen.shadow_width);
Menu.setshadowdrawable (R.drawable.shadow); 5 is a gradient shape file

Sets the width of the sliding portion of the content page to 80DP when the slide menu is open
Menu.setbehindoffsetres (R.dimen.slidingmenu_offset);
Sets the degree of change in the fade-out effect to 1.0 is black when off
Menu.setfadedegree (0.2f);

Attach Slidingmenu to the activity and slide out full screen
Menu.attachtoactivity (this, slidingmenu.sliding_content);

Shadow.xml File Settings

<?xml version= "1.0" encoding= "Utf-8"?>
<shape xmlns:android= "Http://schemas.android.com/apk/res/android" >

<gradient
Android:centercolor= "#11000000"
Android:endcolor= "#33000000"
Android:startcolor= "#00000000"/>

</shape>

Slidingmenu Slip Side Slip

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.