MaterialArcMenu


Source link: https://github.com/saurabharora90/MaterialArcMenu

Material Arc Menu

An android custom view which allows you to have a arc style-menu on your pages and adheres to the material design specifications.

It inserts a FAB menu on the bottom left or bottom right of the screen and allows you to control the menu options.

It also implements the CoordinatorLayout Behaviour to work with Snackbar.

Change-logs

Check out the Release Notes for the change-logs in each release.

Demo

Usage

Add a dependency to your build.gradle:

dependencies {
 compile 'com.sa90.materialarcmenu:library:1.5.0' 

}

and include the com.sa90.materialarcmenu.ArcMenu as a viewgroup (with the sub-menu's as child) in your layout. The menu (floating action button) has a margin of 16dp (customizable) added to it by default to follow the material design guidelines. Example:

<com.sa90.materialarcmenu.ArcMenu
  android:id="@+id/arcMenu"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_gravity="bottom|end"
  app:menu_scr="@drawable/ic_dialog_dialer"
  app:menu_open="arc_left">

<android.support.design.widget.FloatingActionButton

android:id="@+id/fab1"

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_email"

android:layout_height="wrap_content" />

<android.support.design.widget.FloatingActionButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_alert"

android:layout_height="wrap_content" />

<android.support.design.widget.FloatingActionButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_info"

android:layout_height="wrap_content" />

<android.support.design.widget.FloatingActionButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_map"

android:layout_height="wrap_content" />  </com.sa90.materialarcmenu.ArcMenu> 

The sub-menu's (child) can be anything. Here is an ImageButton example:

<com.sa90.materialarcmenu.ArcMenu
  android:id="@+id/arcMenu"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_gravity="bottom|start"
  app:menu_color="@color/colorPrimaryDark"
  app:menu_radius="200dp"
  app:menu_ripple_color="@color/darker_gray"
  app:menu_scr="@drawable/ic_dialog_dialer"
  app:menu_open="arc_right">

<ImageButton

android:id="@+id/ib1"

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_email"

android:layout_height="wrap_content" />

<ImageButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_alert"

android:layout_height="wrap_content" />

<ImageButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_info"

android:layout_height="wrap_content" />

<ImageButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_map"

android:layout_height="wrap_content" />

<ImageButton

android:layout_width="wrap_content"

android:src="@drawable/ic_dialog_dialer"

android:layout_height="wrap_content" />  </com.sa90.materialarcmenu.ArcMenu> 

Customization

Currently the library offers the following customization options:

  • menu_scr: Controls the FAB Menu's image
  • menu_color: Controls the background color of the FAB Menu. Default to the colorAccent
  • menu_ripple_color: Controls the ripple color of the FAB Menu. Defaults to colorControlHighlight
  • menu_radius: Controls the radius of the arc
  • menu_elevation: Controls elevation (shadow cast) of the FAB Menu. Default to 6dp.
  • menu_margin: Controls the margin applied to the FAB Menu. Currently the same margin is applied to all four corners (defaults to 16dp).
  • menu_open: Controls which side of the FAB menu is the arc menu displayed on. Currently supports one of arc_left, arc_right , arc_top_left or arc_top_right
  • menu_animation_time: Controls the animation time to transition the menu from close to open state and vice versa. The time is represented in milli-seconds
  • fabSize: Sets the size of the FAB icon used in the ArcMenu. Can be either mini or normal

API

Currently the library offers the following API's

  • toggleMenu: Open or close the menu depending on its current state.
  • setRadius: Set the radius of the arc menu.
  • isMenuOpened: Returns whether the menu is opened or closed.
  • setAnimationTime: Controls the animation time to transition the menu from close to open state and vice versa. The time is represented in milli-seconds
  • setStateChangeListener: Allows you to listen to the state changes of the Menu, i.e. onMenuOpened and onMenuClosed events

License

Copyright 2015 Saurabh Arora  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. 

Resources

Persian calendar view for android.

Kotlin Android Library, that makes preference usage simple and fun.

If you want to add route maps feature in your apps you can use DrawRouteMaps to make you work more easier. This is lib will help you to draw route maps between two point LatLng.

Pay your attention to our new library that makes it possible to read, edit and write CSV files. If you use Android-based device, you can easily use our library for implementation of all aforementioned actions. In addition, you will be able to change rows and columns, display the picture via link, and align the required data. It will surely help you cope with your tasks faster and make your output higher. AdaptiveTableLayout library is at your disposal.

A simple scene manager for Android. CoffeeScene allows to switch the current scene of an Activity, ViewGroup and Fragment (v4 supported). This library can be usefull if you want to switch from a spinner loader to your main content or a placeholder for example.

Android fields validation library based on data binding adapters.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes