Navigation menu for Android (based off Google+ app)

Related tags

Menu RibbonMenu
Overview

RibbonMenu

Navigation menu for Android (based on Google+ app).

RibbonMenu

Usage

Menus are created in xml as normal, adding text and an icon.

In the layout you want to show the menu, add a FrameLayout as the root layout and add the RibbonMenuView set with width and height to match_parent.

In your class you need to implement the iRibbonMenuCallback interface. This is called when you click a menu item and it passes the menu item id from the xml. You then make a reference to the RibbonMenuView and set the callback, set the menu items and add toggleMenu() to your android.R.id.home in your onOptionsItemSelected

The sample activity shows how it should all work.

License

Copyright 2012 David Scott

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.

Comments
  • Theming

    Theming

    I'm using Holo Dark in my application, which makes the text illegible. Adding 'android:theme="@android:style/Theme.Holo.Light"' to the RibbonMenuView does not help and there is no textColor attribute for this View.

    Is there any solution for this? Thanks!

    opened by SanderTuit 2
  • not handle screen rotation

    not handle screen rotation

    1. open (show) the ribbon menu
    2. rotate the device
    3. you can see that the ribbon menu is hidden <- it should be kept in the show state.

    You can fix the problem by adding the following code in RibbonMenuView.

    @Override protected void 
    onRestoreInstanceState(Parcelable state)
    {
        SavedState ss = (SavedState)state;
        super.onRestoreInstanceState(ss.getSuperState());
    
        if (ss.bShowMenu)
            showMenu();
        else
            hideMenu();
    }
    
    @Override protected Parcelable 
    onSaveInstanceState()
    {
        Parcelable superState = super.onSaveInstanceState();
        SavedState ss = new SavedState(superState);
    
        ss.bShowMenu = (rbmOutsideView.getVisibility() != View.GONE);
    
        return ss;
    }
    
    static class SavedState extends BaseSavedState {
        boolean bShowMenu;
    
        SavedState(Parcelable superState) {
            super(superState);
        }
    
        private SavedState(Parcel in) {
            super(in);
            bShowMenu = (in.readInt() == 1);
        }
    
        @Override
        public void writeToParcel(Parcel out, int flags) {
            super.writeToParcel(out, flags);
            out.writeInt(bShowMenu ? 1 : 0);
        }
    
        public static final Parcelable.Creator<SavedState> CREATOR
                = new Parcelable.Creator<SavedState>() {
            public SavedState createFromParcel(Parcel in) {
                return new SavedState(in);
            }
    
            public SavedState[] newArray(int size) {
                return new SavedState[size];
            }
        };
    }
    
    opened by samlu 1
  • CacheColorHint issue

    CacheColorHint issue

    Hi Library looks very nice. I had a problem when using it on a pre-honeycomb device: awful black bleeding through the list whenever it is touched. This also happens on honeycomb+ devices if minSDKversion is set below honeycomb. To get around it, all that's needed is to set the cacheColorHint to the same colour as the background on the ListView: android:cacheColorHint="#303030" android:background="#303030" As described a long time ago, here: http://www.curious-creature.org/2008/12/22/why-is-my-list-black-an-android-optimization/ Annoying problem. Simple fix. There is another small issue with setting the background in your code:

    public void setBackgroundColor(int color){
            rbmListView.setBackgroundResource(color);
    
        }
    

    That's kinda mis-named I think. You are overriding the method to set a colour in order to set a resource instead.

    opened by bramt 1
  • duplicates

    duplicates

    Hi, I like you library very much. Great work here.

    If you have little time you could clean the duplicate packages in this library. Here's a link where the duplicates starts : https://github.com/darvds/RibbonMenu/tree/master/library/src/com

    Again, nice work ! :)

    opened by MrBuBBLs 1
  • Missing license info

    Missing license info

    The project and the source files do not state what license they are available under. Right now, nobody is allowed to do anything with your code, unless they wish to violate your copyright over those files. If that is your intention, that's fine, though you might want to specifically mention in the README that this code is not available under any open source license, just to clear up confusion.

    opened by commonsguy 1
  • Error retriving item id

    Error retriving item id

    @override public void RibbonMenuItemClick(int itemId)

    the itemid return "false".

    to fix it you need to change

    "callback.RibbonMenuItemClick(menuItems.get(position).id);" to "callback.RibbonMenuItemClick(position);"

    LukeMovement.

    opened by lukemovement 0
  • Change this to public

    Change this to public

    so that people can prove whether the menu is visible or not. Hand in hand with this, you might want to include some routine in your sample to check onKeyDown for KEYCODE_BACK so the menu gets closed at this occasion. Otherwise, great!

    opened by Aeefire 0
  • Custom Adapter

    Custom Adapter

    Hello,

    I love Your library, it looks awesome. I would like to dynamically set the icons of menuitems. Right now when I call:

    MenuItem avatar = (MenuItem) mRibbonMenu.findViewById(R.id.ribbon_menu_avatar); avatar.setTitle("hello world");

    I get NullPointerException.

    It would be also nice to be able to set custom adapter for the menu so I can style it like regular layout. Is that possible?

    opened by RafalManka 0
  • App Keeps Crashing

    App Keeps Crashing

    I having some difficulty getting this up and running. I'm new to Android app dev btw. Everything seems to be imported correctly but the app keeps crashing. The app loads if I uncomment this line in the mainActivity onCreate

    getActionBar().setDisplayHomeAsUpEnabled(true);

    Debug mode isn't showing me anything either. Any way you can help me out?

    opened by codezninja 1
  • TAG

    TAG

    Hi there,

    We are using your library in an android app. By the way your library is pretty good.

    Would you be able to create a tag with the latest version so that we can reference it from our project?

    thanks,

    Mauricio

    opened by mzuluaga 0
  • Tried to open sample with Eclipse, does not work

    Tried to open sample with Eclipse, does not work

    When importing the sample into Eclipse and running it, there are errors in scr/com.darvds.ribbonmenu.sample/RibbonsampleActivity.java

    @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(com.darvds.ribbonmenu.sample.R.layout.main);

            rbmView = (RibbonMenuView) findViewById(R.id.ribbonMenuView1);
            rbmView.setMenuClickCallback(this);
            rbmView.setMenuItems(R.menu.ribbon_menu);
    
            getActionBar().setDisplayHomeAsUpEnabled(true);
        }
    

    "R.layout.main" have to be changed to "com.darvds.ribbonmenu.sample.R.layout.main" in order to fix the error bugs

    opened by bitbitbit 1
Owner
David Scott
Android Software Developer
David Scott
Floating Action Menu for Android. Inspired by the Google Plus floating menu

android-floating-action-menu Floating Action Menu for Android. Inspired by the Google Plus floating menu. Demo Setup The simplest way to use this libr

Alessandro Crugnola 242 Nov 10, 2022
Bottom Navigation widget component inspired by the Google Material Design Guidelines at https://www.google.com/design/spec/components/bottom-navigation.html

Material Bottom Navigation Library Lightweight Bottom Navigation library component inspired by the Google Material Design Guidelines at https://www.go

Alessandro Crugnola 1.4k Dec 18, 2022
Classic Power Menu is a Power Menu Replacement for Android 11+

Classic Power Menu is a Power Menu Replacement for Android 11+, with the main aim being restoring power menu options (Device Controls & Quick Access Wallet) on Android 12.

Kieron Quinn 385 Dec 31, 2022
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022
Space Navigation is a library allowing easily integrate fully customizable Google Spaces like navigation to your app.

Space-Navigation-View Introduction Space Navigation is a library allowing easily integrate fully customizable Google [Spaces][1] like navigation to yo

Arman 2k Dec 23, 2022
Android-NewPopupMenu 3.9 0.0 Java is an android library to create popup menu with GoogleMusic app-like style.

Android-NewPopupMenu Android-NewPopupMenu is an android library to create popup menu with GoogleMusic app-like style. Requirements Tested with APIv4 H

u1aryz 159 Nov 21, 2022
You can easily add awesome animated context menu to your app.

ContextMenu You can easily add awesome animated context menu to your app. Check this project on dribbble Check this project on Behance Usage: For a wo

Yalantis 3.8k Dec 28, 2022
** A slide-out menu implementation, which allows users to navigate between views in your app.

MenuDrawer A slide-out menu implementation, which allows users to navigate between views in your app. Most commonly the menu is revealed by either dra

Simon Vig Therkildsen 2.6k Dec 8, 2022
An app that helps you create & remove WSA icon in the start menu

WSA Helper An application that allows you to manager WSA's icons in start menus

LSPosed 142 Dec 24, 2022
an animated circular menu for Android

CircularFloatingActionMenu An animated, customizable circular floating menu for Android, inspired by Path app. Getting Started Requirements API >= 15

OÄŸuz Bilgener 2.7k Dec 24, 2022
A menu which can ... BOOM! - Android

BoomMenu 2.0.0 Comes Finally Approximately 8 months ago, I got an inspiration to creating something that can boom and show menu, which I named it Boom

Nightonke 5.8k Dec 27, 2022
Android Satellite Menu

#Satellite Menu 'Path' has a very attractive menu sitting on the left bottom corner of the screen. Satellite Menu is the open version of this menu. Fo

Siyamed SINIR 1.4k Nov 15, 2022
An android custom view which looks like the menu in Path 2.0 (for iOS).

ArcMenu & RayMenu ArcMenu An android custom view which looks like the menu in Path 2.0 (for iOS). RayMenu About The user experience in Path 2.0 (for i

daCapricorn 1.3k Nov 29, 2022
(UNMAINTAINED) An implemention of Filter Menu concept for android

FilterMenu This is a library project with a custom view that implements concept of Filter Menu(https://dribbble.com/shots/1956586-Filter-Menu) made by

Lin Zhang 824 Nov 28, 2022
Simple and easy to use circular menu widget for Android.

Deprecated This project is no longer maintained. No new issues or pull requests will be accepted. You can still use the source or fork the project to

Anup Cowkur 420 Nov 25, 2022
A multicard menu that can open and close with animation on android

MultiCardMenu A multicard menu that can open and close with animation on android,require API level >= 11 Demo ##Usage <net.wujingchao.android.view.

null 562 Nov 10, 2022
An Android Library that allows users to pull down a menu and select different actions. It can be implemented inside ScrollView, GridView, ListView.

AndroidPullMenu AndroidPullMenu is an Open Source Android library that allows developers to easily create applications with pull menu. The aim of this

Armando TBA 181 Nov 29, 2022
Android Overlay Menu

Overlay Menu Android Overlay Menu Demo: Installation: Add this dependency to your gradle script: compile 'it.sephiroth.android.library.overlaymenu:ove

Alessandro Crugnola 122 Nov 10, 2022