Introduction

Simple library which enable you to add a drawer(slide-out) navigation to your android application

Informations

Creator
adamrocker
adamrocker
Git URL:
Language
Java
Min SDK:
Android 2.1
License:
Apache License
Created At:
Oct 25, 2012
Last Updated:
Dec 17, 2017
Star:
226
Fork:
136
Watcher count:
30
Tags

Description

SimpleSideDrawer is an android library to add a drawer navigation into your android application. This library has high affinity with other libraries like ActionBarSherlock or etc.

Easy to add your app a side menu

Demo image01 Demo image02

Step1: Add the library

Add the jar library to your application project

Step2: Set up the side menu

Add the 2 lines under the onCreate method in an Activity you want to add the side menu.


protected void onCreate(Bundle data) {
    super.onCreate( data );
    setContentView( R.layout.main );

mSlidingMenu = new SimpleSideDrawer( this ); mSlidingMenu.setLeftBehindContentView( R.layout.behind_menu_left ); }

The behind_menu.xml is the side menu layout. You can add it by calling setBehindeContentView method. That it you have to do for adding the side menu. If you want to handle the widget on the side menu, you just call findViewById method as usual.

Need the right-side?


mSlidingMenu.setRightBehindContentView( R.layout.behind_menu_right );

Step3: Open/Close the side menu

You can easy open/close the side menu.


mSlidingMenu.toggleDrawer();

Of course, a user can close the side menu by dragging the above view.

More info

See my slide share in which I describe the detail of this library. http://www.slideshare.net/adamrocker/simple-side-drawer2

Directory

  • SimpleSideDrawer: The library source code
  • demo: The demo android projects which uses this library
  • library: .jar file for easy to use
  • doc: The document of this library

Lisence

Copyright 2013, adamrocker ( http://www.adamrocker.com ).

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.

Discussion