An extension of ResideMenu

Overview

Folder-ResideMenu

=========== A Special Drawer.

An extension of AndroidResideMenu


Screenshot

Please waiting for loading the images...

Examples Examples

Usage

init ResideMenu: write these code in Activity onCreate()

        // attach to current activity;
        resideMenu = new ResideMenu(this);
        resideMenu.setBackground(R.drawable.menu_background);
        resideMenu.attachToActivity(this);

        // create menu items;
        String titles[] = { "Home", "Gallery", "Calendar", "Settings" };
        int icon[] = { R.drawable.icon_home, R.drawable.icon_profile, R.drawable.icon_calendar, R.drawable.icon_settings };

        for (int i = 0; i < titles.length; i++){
            ResideMenuItem item = new ResideMenuItem(this, icon[i], titles[i]);
            item.setOnClickListener(this);
            resideMenu.addMenuItem(item,  ResideMenu.DIRECTION_LEFT); // or  ResideMenu.DIRECTION_RIGHT
        }
*On some occasions, the slipping gesture function for locking/unlocking menu, may have conflicts with your widgets, such as viewpager. By then you can add the viewpager to ignored view, please refer to next chapter – Ignored Views.**

open/close menu

resideMenu.openMenu(ResideMenu.DIRECTION_LEFT); // or ResideMenu.DIRECTION_RIGHT
resideMenu.closeMenu();

listen in the menu state

    resideMenu.setMenuListener(menuListener);
    private ResideMenu.OnMenuListener menuListener = new ResideMenu.OnMenuListener() {
        @Override
        public void openMenu() {
            Toast.makeText(mContext, "Menu is opened!", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void closeMenu() {
            Toast.makeText(mContext, "Menu is closed!", Toast.LENGTH_SHORT).show();
        }
    };

Ignored Views

On some occasions, the slipping gesture function for locking/unlocking menu, may have conflicts with your widgets such as viewpager.By then you can add the viewpager to ignored view.

        // add gesture operation's ignored views
        FrameLayout ignored_view = (FrameLayout) findViewById(R.id.ignored_view);
        resideMenu.addIgnoredView(ignored_view);

So that in ignored view’s workplace, the slipping gesture will not be allowed to operate menu.


Issue

If you use a GridView/ListView/ScrollView, open/close menu may cause focus change,for example, GridView may auto scroll to top. If you don't want this,check the code in Sample->GalleryFragment

        mGridView.setFocusable(false);
        view.setFocusable(false);

Thanks to

@specialcyci AndroidResideMenu


License

Copyright 2015 Dean Ding

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.

Developed By

Dean [email protected]

Weibo:http://weibo.com/u/2699012760

You might also like...
Convenience extension methods for android's auto-generated /res folder R. class.

Android Resource Extensions Convenience extension methods for android's auto-generated /res folder R. class. Basically everything in your res/ and /as

Air Native Extension (iOS and Android) for the Facebook mobile SDK

Air Native Extension for Facebook (iOS + Android) This is an AIR Native Extension for the Facebook SDK on iOS and Android. It has been developed by Fr

Android form edit text is an extension of EditText that brings data validation facilities to the edittext.
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.

Android Form EditText Android form edit text is an extension of EditText that brings data validation facilities to the edittext. Example App I built a

A tool that facilitates working with Spans on TextViews or any extension of them (EditTexts, Buttons...).
A tool that facilitates working with Spans on TextViews or any extension of them (EditTexts, Buttons...).

AwesomeText Working with Spans is ugly and difficult to manage, it's like working with a goblin of Moria. Don't understand the Spans? With AwesomeText

AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

AutoscaleEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. Latest Version How to use

An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Simple extension for account suggestion and auto completion.

AccountAutoCompleteEditText Just a simple implementation for use of auto complete text view with device account suggestion Usage Just simply put an cu

A collection of useful Kotlin extension for Android

karamba A collection of useful Kotlin extension for Android Install Add to gradle in allprojects maven { url 'https://jitpack.io' } then add this com

An android ViewPager extension allowing infinite scrolling

NO LONGER MAINTAINED LoopingViewPager An android ViewPager extension allowing infinite scrolling. You can use it with "standart" PagerAdapter (inflati

The MultiViewPager is an extension of the support-v4 library's ViewPager that allows the pages to be wider or narrower than the ViewPager itself. It takes care of aligning the pages next to each other, and always keeping the selected page centered.
A collection of useful extension methods for Android

Kotlin Jetpack A collection of useful extension methods for Android Arguments Bindings Preferences Bindings Resources Bindings Arguments Bindings publ

🧩 A basic compose chrome extension template
🧩 A basic compose chrome extension template

🧩 compose-chrome-extension-template A basic compose chrome extension template on top of compose web 🏃 Run ./gradlew jsBrowserRun 📦 Install Create

A set of extension properties on Int, Long, Double, and Duration, that makes it easier to work with Kotlin Duration

Kotlin Duration Extensions Gradle Groovy repositories { mavenCentral() } implementation 'com.eygraber:kotlin-duration-extensions:1.0.1' Kotlin rep

Upsert DSL extension for Exposed, Kotlin SQL framework

Exposed Upsert Upsert DSL extension for Exposed, Kotlin SQL framework. Project bases on various solutions provided by community in the official "Expos

Most used extension methods for Kotlin

Extensify Most used extension methods for Kotlin Download Step 1. Add the JitPack repository to your build file allprojects { repositories {

An extension to the built in Android Battery Saver

Buoy An extension to the built in Android Battery Saver Description The built-in Android battery saver mode is actually quite powerful. The only disap

A kotlin library of extension functions that add smalltalk style methods to objects.

KtTalk A kotlin library of extension functions that add smalltalk style methods to objects. Motivation Smalltalk is a pure OO language in which everyt

An ActivityScenario extension and a Junit4 TestRule to simulate changing the font size on a device/emulator, as it would be done by going to Settings display Font size

FontSizeActivityScenario and FontSizeTestRule An ActivityScenario and a Junit4 TestRule to be used together with its org.junit.runners.Parameterized.

java.time Kotlin extension functions library.
java.time Kotlin extension functions library.

Java Time Kotlin extension functions. Background Java Time became integrated to the JDK as of Java 8. It was a huge improvement over its Date predeces

Comments
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • changeFragment

    changeFragment

    that great!but change fragment need to re-instantiated for using "replace()" in the sample;

    We could use show() and hide() to replace rplace() !

    opened by alicance 0
Owner
Dean Ding
Dean Ding
An extension of ResideMenu

Folder-ResideMenu =========== A Special Drawer. An extension of AndroidResideMenu Screenshot Please waiting for loading the images... Usage init Resid

Dean Ding 372 Oct 7, 2022
An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu

ResideLayout An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu. Can be used on Android 1.6(I haven't try it.)

Yang Hui 392 Oct 12, 2022
Support extension to use Android ViewBinding quickly and smooth transform from kotlin-synthetic-extension.

ViewBinding Delegate Extension Support extension to use Android ViewBinding quickly and smooth transform from kotlin-synthetic-extension. Binding inst

Cuong V. Nguyen 3 Dec 13, 2021
Reactive Extension (Rx) Adaptor for Netty

Project Status 2018-02-014 1.0.x will be the RxNetty-2 update. It is currently pending an RFC for API changes. 0.5.x is the current release branch. Th

ReactiveX 1.4k Dec 27, 2022
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Haruki Hasegawa 5.2k Dec 23, 2022
UltraViewPager is an extension for ViewPager to provide multiple features in a single ViewPager.

UltraViewPager 中文文档 ProjectUltraViewPager is a ViewPager extension that encapsulates multiple features, mainly to provide a unified solution for multi

Alibaba 5k Dec 20, 2022
RxJava 2.x extension to provide meaningful Stack Traces

RxJava2Debug A library to make StackTraces involving RxJava2 more meaningful (they will always point to your code!). Rationale If you use RxJava2, you

Mikel 668 Dec 15, 2022
An extension of EditText with pin style written in Kotlin

pin-edittext An extension of EditText with pin style Usage Include PinCodeEditText in your layout XML <com.oakkub.android.PinEditText android:layo

Metas Kerdwat 15 May 28, 2021
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Haruki Hasegawa 5.2k Dec 23, 2022