Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ramotion/circle-menu-android
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Android UI library made by @Ramotion
https://github.com/Ramotion/circle-menu-android
android java library
Last synced: about 1 month ago
JSON representation
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Android UI library made by @Ramotion
- Host: GitHub
- URL: https://github.com/Ramotion/circle-menu-android
- Owner: Ramotion
- License: mit
- Created: 2017-09-20T08:31:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T23:01:09.000Z (over 2 years ago)
- Last Synced: 2024-10-29T17:42:02.476Z (about 1 month ago)
- Topics: android, java, library
- Language: Java
- Homepage: https://www.ramotion.com/android-mobile-app-development-library-for-arranging-ui-menu-in-a-circle/
- Size: 887 KB
- Stars: 1,889
- Watchers: 56
- Forks: 271
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - Ramotion/circle-menu-android - :octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Android UI library made by @Ramotion (Java)
- Android-Awesome-Resources - Circle-menu-android
README
CIRCLE MENU [JAVA]
A simple, elegant UI menu with a circular layout and material design animations
___
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
Stay tuned for the latest updates:
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Ramotion)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/42eb7b00b93645c0812c045ab26cb3b7)](https://www.codacy.com/app/dvg4000/circle-menu-android?utm_source=github.com&utm_medium=referral&utm_content=Ramotion/circle-menu-android&utm_campaign=Badge_Grade)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)## Requirements
- Android 4.1 Jelly Bean (API lvl 16) or greater
- Your favorite IDE## Installation
Just download the package from [here](http://central.maven.org/maven2/com/ramotion/circlemenu/circle-menu/0.3.2/circle-menu-0.3.2.aar) and add it to your project classpath, or just use the maven repo:Gradle:
```groovy
implementation 'com.ramotion.circlemenu:circle-menu:0.3.2'
```
SBT:
```scala
libraryDependencies += "com.ramotion.circlemenu" % "circle-menu" % "0.3.2"
```
Maven:
```xmlcom.ramotion.circlemenu
circle-menu
0.3.2```
## Basic usage
Place the `CircleMenuView` in your layout and set the icons and colors of the buttons, as shown below.
```xml
app:button_colors="@array/colors"
app:button_icons="@array/icons"
```Example of arrays `colors` and `icons` in `res\values\buttons.xml`:
```xml
@drawable/ic_home_white_24dp
@drawable/ic_search_white_24dp
@drawable/ic_notifications_white_24dp
@drawable/ic_settings_white_24dp
@drawable/ic_place_white_24dp
@android:color/holo_blue_light
@android:color/holo_green_dark
@android:color/holo_red_light
@android:color/holo_purple
@android:color/holo_orange_light
```
Or use the constructor
```java
CircleMenuView(@NonNull Context context, @NonNull List icons, @NonNull List colors)
```
to add `CircleMenuView` and configure the buttons programmatically (in the code).Next, connect the event handler `CircleMenuView.EventListener` as shown below,
and override the methods you need.```java
final CircleMenuView menu = (CircleMenuView) findViewById(R.id.circle_menu);
menu.setEventListener(new CircleMenuView.EventListener() {
@Override
public void onMenuOpenAnimationStart(@NonNull CircleMenuView view) {
Log.d("D", "onMenuOpenAnimationStart");
}@Override
public void onMenuOpenAnimationEnd(@NonNull CircleMenuView view) {
Log.d("D", "onMenuOpenAnimationEnd");
}@Override
public void onMenuCloseAnimationStart(@NonNull CircleMenuView view) {
Log.d("D", "onMenuCloseAnimationStart");
}@Override
public void onMenuCloseAnimationEnd(@NonNull CircleMenuView view) {
Log.d("D", "onMenuCloseAnimationEnd");
}@Override
public void onButtonClickAnimationStart(@NonNull CircleMenuView view, int index) {
Log.d("D", "onButtonClickAnimationStart| index: " + index);
}@Override
public void onButtonClickAnimationEnd(@NonNull CircleMenuView view, int index) {
Log.d("D", "onButtonClickAnimationEnd| index: " + index);
}
});
```You can use `open(boolean animate)` and `close(boolean animate)` methods,
to open and close menu programmaticallyHere are the attributes you can specify through XML or related setters:
* `button_icons` - Array of buttons icons.
* `button_colors` - Array of buttons colors.
* `icon_menu` - Menu default icon.
* `icon_close` - Menu closed icon.
* `icon_color` - Menu icon color.
* `duration_ring` - Ring effect duration.
* `duration_open` - Menu opening animation duration.
* `duration_close` - Menu closing animation duration.
* `distance` - Distance between center button and buttons
## 🗂 Check this library on other language:
## 📄 License
Circle Menu Android is released under the MIT license.
See [LICENSE](./LICENSE) for details.This library is a part of a selection of our best UI open-source projects
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
## 📱 Get the Showroom App for Android to give it a try
Try this UI component and more like this in our Android app. Contact us if interested.