MCPcopy Index your code
hub / github.com/TangKe/SlideMenu

github.com/TangKe/SlideMenu @1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1 ↗ · + Follow
125 symbols 256 edges 15 files 35 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SlideMenu(Demo)

SlideMenu is a open source android library provide slide effect to the layout and show the hidden menu behind the layout

Setup

To enable fantasitic feature in your project with the following simple steps: 1. Download the project from GitHub 2. Import it to your Eclipse workspace 3. Set your project properties, then add a android project library, and select SlideMenu

Usage

Use the SlideMenu as a View as usual, Java and XML are both supported

Java example:

public class SlideMenuActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        SlideMenu slideMenu = new SlideMenu(this);
        setContentView(slideMenu);

        // Setup the content
        View contentView = new View(this);
        slideMenu.addView(contentView, new SlideMenu.LayoutParams(
                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
                LayoutParams.ROLE_CONTENT));

        // Setup the primary menu
        View primaryMenu = new View(this);
        slideMenu.addView(primaryMenu, new SlideMenu.LayoutParams(300,
                LayoutParams.MATCH_PARENT, LayoutParams.ROLE_PRIMARY_MENU));

        // Setup the secondary menu
        View secondaryMenu = new View(this);
        slideMenu.addView(secondaryMenu, new SlideMenu.LayoutParams(300,
                LayoutParams.MATCH_PARENT, LayoutParams.ROLE_SECONDARY_MENU));
    }
}

XML layout example:

<com.aretha.slidemenu.SlideMenu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:slidemenudemo="http://schemas.android.com/apk/res-auto"
    android:id="@+id/slideMenu"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    slidemenudemo:primaryShadowDrawable="reference"
    slidemenudemo:primaryShadowWidth="dimension"
    slidemenudemo:secondaryShadowWidth="dimension"
    slidemenudemo:sencondaryShadowDrawable="reference"
    slidemenudemo:slideDirection="left|right" >

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidemenudemo:layout_role="content" />

    <View
        android:layout_width="200dip"
        android:layout_height="match_parent"
        slidemenudemo:layout_role="primaryMenu" />

    <View
        android:layout_width="300dip"
        android:layout_height="match_parent"
        slidemenudemo:layout_role="secondaryMenu" />

</com.aretha.slidemenu.SlideMenu>

NOTE: the children of SlideMenu must be specified layout_role attribute, otherwise the SlideMenu will throw a Exception. SlideMenu must be the root of layout. * primaryShadowWidth the shadow width above primary menu, left side of content * secondaryShadowWidth the shadow width above secondary menu, right side of content * primaryShadowDrawable the shadow drawable above primary menu, left side of content * sencondaryShadowDrawable the shadow drawable above secondary menu, right side of content * slideDirection specified the slide direction of SlideMenu, left, right, left|right

Author

Tang Ke tang.ke@me.com

Trello

Please visit this board to see the plan of this repo

License

Copyright (c) 2011-2013 Tang Ke

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

ScrollDetector (Interface)
@author Tank [7 implementers]
SlideMenu/src/com/aretha/slidemenu/utils/ScrollDetectors.java
OnSlideStateChangeListener (Interface)
(no doc) [2 implementers]
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
ScrollDetectorFactory (Interface)
(no doc)
SlideMenu/src/com/aretha/slidemenu/utils/ScrollDetectorFactory.java

Core symbols most depended-on inside this repo

setSlideRole
called by 18
SlideMenuDemo/src/com/aretha/slidemenudemo/BaseSlideMenuActivity.java
smoothScrollContentTo
called by 7
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
addView
called by 6
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
removeViewFromParent
called by 6
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
invalidateViewVisibility
called by 6
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
isOpen
called by 5
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
setCurrentState
called by 5
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java
close
called by 4
SlideMenu/src/com/aretha/slidemenu/SlideMenu.java

Shape

Method 103
Class 19
Interface 3

Languages

Java100%

Modules by API surface

SlideMenu/src/com/aretha/slidemenu/SlideMenu.java61 symbols
SlideMenu/src/com/aretha/slidemenu/utils/ScrollDetectors.java17 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/activity/SlideMenuCallbackActivity.java7 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/activity/SlideMenuAttributeActivity.java7 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/ActivityListAdapter.java6 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/BaseSlideMenuActivity.java5 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/widget/DragableFragmentPagerAdapter.java4 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/DemoBundleActivity.java4 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/activity/SlideMenuWithWebView.java3 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/fragment/BaseListFragment.java2 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/activity/SlideMenuWithViewPager.java2 symbols
SlideMenuDemo/src/com/aretha/slidemenudemo/activity/SlideMenuWithHorizontalScrollViewAndViewPager.java2 symbols

For agents

$ claude mcp add SlideMenu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact