Simple and easy to use circular menu widget for Android.

Overview

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 suit your needs.

Android Wheel Menu

Example Image

Usage

First download the jar and add it to your project. The exact instructions to include the jar will depend on your specific development environment, IDE etc. You can also add wheel-menu-library as a library project and reference it directly without adding the jar.

Include wheel menu in your layout:

<com.anupcowkur.wheelmenu.WheelMenu
android:id="@+id/wheelMenu"
android:layout_width="300dp"
android:layout_height="300dp" />

Initialize the wheel menu in your activity:

wheelMenu = (WheelMenu) findViewById(R.id.wheelMenu);

//set the no of divisions in the wheel, default is 1
wheelMenu.setDivCount(12);

//set the drawable to be used as the wheel image. If you
//don't set this, you'll get a  NullPointerException.
wheelMenu.setWheelImage(R.drawable.wheel);

That's it!

Now, to get the currently selected position simply call:

wheelMenu.getSelectedPosition();

or, you can set a listener to monitor change events like so:

wheelMenu.setWheelChangeListener(new WheelMenu.WheelChangeListener() {
@Override
public void onSelectionChange(int selectedPosition) {
      //do your thing
    }
});

wheel positions will start from 0.

####snap-to-center

This flag is set to true by default. If true, crossing into a division will cause the wheel to auto-align itself to the center of the division. Otherwise, the wheel will just hang around wherever the user left it. You can change it by calling:

wheelMenu.setSnapToCenterFlag(false)

####Changing the top position

You can also make any arbitrary div in the wheel to be the "top" postion by calling

wheelMenu.setAlternateTopDiv(int);

For instance, if you call wheelMenu.setAlternateTopDiv(6) then the sixth div will now be considered as the "top" and all calculations from that point on will reflect this. This can be useful in situations such as when you want the bottom div or right div of the wheel to be the selected position.

A caveat with this is that you have to call this method after the call to setDivCount(int) . If you call it before, then your new top position will be ignored and the top will still be 0.

Sample

Check out the sample application to see it in action!

Contributing

Contributions welcome via Github pull requests.

License

This project is licensed under the MIT License. Please refer the License.txt file.

You might also like...
Android-NewPopupMenu 3.9 0.0 Java  is an android library to create popup menu with GoogleMusic app-like style.
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

A menu which can ... BOOM! - Android
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

Android Satellite Menu
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

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

(UNMAINTAINED) An implemention of  Filter Menu concept for android
(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

Navigation menu for Android (based off Google+ app)
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

Implementation of
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

Android Overlay Menu
Android Overlay Menu

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

A floating menu library for Android.
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

Comments
  • This resolves issues 3 and 4.

    This resolves issues 3 and 4.

    setOffsetAngle adds the ability to add an angle (p) from the top and have the point of selection be moved along the wheell menu. It also returns selected values according to the divCount, starting at 0.

    opened by alexismo 0
  • 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
Releases(v1.0)
Owner
Anup Cowkur
Anup Cowkur
🚀 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
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
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
FMenu: A simple plugin that permits to open a menu by swapping the item to the secondary hand

FutureTeam - FMenu FMenu is a simple plugin that permits to open a menu by swapp

FutureTeam 1 Feb 16, 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
:fire: The powerful and easiest way to implement modern material popup menu.

PowerMenu ?? The powerful and easiest way to implement modern material popup menu. PowerMenu can be fully customized and used for popup dialogs. Downl

Jaewoong Eum 1k Dec 29, 2022
A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design

Metaball-Menu A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design ScreenShot Us

AbYsMeL 198 Sep 15, 2022
💧 A customizable jetpack compose dropdown menu with cascade and animations

Dropdown ?? A customizable jetpack compose dropdown menu with cascade and animations. Who's using Dropdown? ?? Check out who's using Dropdown Include

Ranbir Singh 192 Jan 4, 2023