Skip to content

NO MAINTAINCE!! android-sidemenu is a library to create a Fly-In-Menu for your app like Facebook or Twitter.

Notifications You must be signed in to change notification settings

maddeye/android-sidemenu

Repository files navigation

Android Sidemenu (Yet another Fly-in-Menu)


What is it

Android Sidemenu is a Facebook like fly-in-menu.

Screenshots

Overlay

Toggle Button

Drag

Version

1.0.0(Release)

Android Version

Android 2.2 API Level 8 or higher

How to use it

Right click on your project and choose Properties (You also can press Alt+Enter), then click on Android in the list on the left. At the bottom you find the used libraries. There you add the Sidemenu project.

Activity where you want the menu

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.suse.android.sidemenu.SidemenuActivity;

public class SidemenuSampleActivity extends Sidemenu[List|Tab]Activity {
    
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        setBehindContentView(R.layout.main2);
        
        ((Button)this.findViewById(R.id.btn_toggle)).setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                        toggle();
                }
        });
        
        setBehindOffset(60);
        setBehindScrollScale(0.5f);
    }
}

with setContentView you set the main screen layout (the screen with the white background) and with setBehindContentView you set the menu layout (grey background).

toggle() open/close the menu. You also can open the menu when you drag the left border.

Documentation


General

  • setContentView(int) : void

    • Set the main content layout.
  • setContentView(View) : void

    • Set the main content layout.
  • setContentView(View, LayoutParams) : void

    • Set the main content layout.
  • setBehindContentView(int) : void

    • Set the sidemenu layout.
  • setBehindContentView(View) : void

    • Set the sidemenu layout.
  • setBehindContentView(View, LayoutParams) : void

    • Set the sidemenu layout.
  • isOpened() : boolean

    • (true) Sidemenu is opened.
    • (false) Sidemenu is closed.
  • setBehindOffset(int) : void

    • Set the distance to the margin on the right side.
  • setBehindScroolScale(int) : void

    • Set the speed of the scroll animation.
  • toggle() : void

    • Open/Close the sidemenu.
  • showMenu() : void

    • Get the sidemenu to the foreground.
  • showContent() : void

    • Get the content to the foreground.

Every Activity own the standard methods of the superclass.

=============

Authors

License

Copyright © 2011 SUSE LINUX Products GmbH.

Android-Sidemenu is licensed under the MIT license. See MIT-LICENSE for details.

About

NO MAINTAINCE!! android-sidemenu is a library to create a Fly-In-Menu for your app like Facebook or Twitter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages