Android Satellite Menu

Overview

#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.

For the ones who didnt see path, the menu consists of a main button on the left bottom of the screen. When the user clicks on this button, a number of buttons are popped out of this button. I have resembled this structure to a planet and satellites and thats why I gave the name of this project.

The menu uses built-in animations of Android platform.

Works in API Level 7 (2.1) and above.

Licenced with LGPL.

##Usage

Add the component definition to your view xml as in the following example:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sat="http://schemas.android.com/apk/res/android.view.ext"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <android.view.ext.SatelliteMenu
        android:id="@+id/menu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|left" 
        android:layout_margin="8dp"
        sat:satelliteDistance="170dp"
        sat:mainImage="@drawable/ic_launcher"
        sat:totalSpacingDegree="90"
        sat:closeOnClick="true"
        sat:expandDuration="500"/>

</FrameLayout>

The attributes are:

  • satelliteDistance The distance of items from the center button
  • totalSpacingDegree The degree between the first and the last item.
  • closeOnClick Defines if the menu shall collapse after clicking on a menu item.
  • expandDuration The duration of expand and collapse operations in milliseconds.

After defining the view in XML, some menu items can be added from code:

SatelliteMenu menu = (SatelliteMenu) findViewById(R.id.menu);
List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
items.add(new SatelliteMenuItem(4, R.drawable.ic_1));
items.add(new SatelliteMenuItem(4, R.drawable.ic_3));
items.add(new SatelliteMenuItem(4, R.drawable.ic_4));
items.add(new SatelliteMenuItem(3, R.drawable.ic_5));
items.add(new SatelliteMenuItem(2, R.drawable.ic_6));
items.add(new SatelliteMenuItem(1, R.drawable.ic_2));

Each menu item takes the ID of the item and the drawable resource for the item.

In order to listen clicks on items:

menu.setOnItemClickedListener(new SateliteClickedListener() {
  public void eventOccured(int id) {
    Log.i("sat", "Clicked on " + id);
  }
});

The click event gives the ID of the item which was defined when adding it.

Comments
  • SetOnClickListener on only the button?

    SetOnClickListener on only the button?

    It seems like it should be easy, but adding a click listener to the menu only works when you click around it (the amount of space it takes up when opened)... Is there a way to do something, eg a Toast, only when the user clicks the menu button itself? 现在看来似乎应该很容易,但增加点击监听器菜单只能当你周围单击(空间量它打开时占用)...有没有办法做一些事情,用户点击,只有当菜单按钮本身?

    opened by conzorz 2
  • always on Top

    always on Top

    Hi! You can leave this menu always visible? I'm using in a layout that contains a ExpandableListView that is populated dynamically via code. Depending on the number of items that have ExpandableListView, the menu disappears. I'm using fullscreen layout without ActionBar.

    Help?

    opened by jccalbuquerque 0
  • the itemclickEvent should be after the itemIn animation

    the itemclickEvent should be after the itemIn animation

    your code is that when ClickAnimation starts ,the clickEvent is triggered. I change it into AnimationEnd(),but the UE is still uncomfortable. I think probably the most comfortable way is : ItemClickAnimation---ItemInAnimation---ItemClickEvent

    opened by amberkira 0
  • Satellite menu with Right and Left alignment options

    Satellite menu with Right and Left alignment options

    Hello,

    This are the changes that I have done in menu to align it to left or right by option. Right now both alignment is for bottom only and I am working for top alignment also.

    1. alignement in XML

    sat:alignment="left" =>This new option will decide the alignment of the menu. But satellite view must have parent view in xml and that must be aligning as same as the satellite menu. =>I have put satellite menu in LinearLayout and LinearLayout parent is main layout that is RelativeLayout

    1. OnItemClickLisner new view object is also now passed. => This is because If user want to use some local variable in Item click than he have to make it final. But now by using the SetTag and GetTag method he can have that variable in Item click listner without making it final.

    Hope It will help all.

    opened by MushahidK 0
  • Setting up in gradle project missing

    Setting up in gradle project missing

    Hi,

    There is no proper guideline for setting up and using this wonderful library in Gradle build system. Please provide proper guidelines for it.

    I tried the forked version https://github.com/yongjhih/android-satellite-menu. But in xml layout it throws

      Unexpected namespace "sat" found for tag android.view.ext.SatelliteMenu....
    
    
    opened by sincerekamal 0
Owner
Siyamed SINIR
Padawan @ Somewhere
Siyamed SINIR
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
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
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
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
Navigation menu for Android (based off Google+ app)

RibbonMenu Navigation menu for Android (based on Google+ app). Usage Menus are created in xml as normal, adding text and an icon. In the layout you wa

David Scott 487 Nov 24, 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
Implementation of "Side Navigation" or "Fly-in app menu" pattern for Android (based on Google+ app)

Android SideNavigation Library Implementation of "Side Navigation" or "Fly-in app menu" pattern for Android (based on Google+ app). Description The Go

Evgeny Shishkin 319 Nov 25, 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
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Google 2.7k Dec 27, 2022
A powerful & customizable menu implementation for android.

A powerful & customizable menu implementation for android. It supports any level of nested menu structures along with custom header and footer views, and much more. Follow the steps below to import the library to your project. You will also find some sample codes.

Nowrose Muhammad Ragib 5 Nov 8, 2022
Side menu with some categories to choose.

Side Menu Side menu with some categories to choose. Check this project on dribbble. Check this project on Behance. God bless Ukraine! Sample Sample &

Yalantis 5.2k Dec 23, 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
imitate Tumblr's menu, dragging animations look like a snake

android-snake-menu imitate Tumblr's menu, dragging animations look like a snake unexpected episode I found another repository some time ago which impl

stone 586 Nov 10, 2022