FloatingActionMenu


Source link: https://github.com/ArthurGhazaryan/floating-action-menu

Floating-Action-Menu

Floating action menu is a library allowing easily integrate fully customizable FloatingActionButton menu.

Screenshots

Download

Gradle:

compile 'com.github.arthurghazaryan:floatingactionmenu:1.0.0'

Usage

  1. Define a menu in res/menu folder.
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android">
  <item

android:id="@+id/fab_link"

android:icon="@drawable/ic_link_white_24dp"

android:title="" />

<item

android:id="@+id/fab_add"

android:icon="@drawable/ic_add_alarm_white_24dp"

android:title="@string/fab_1" /> </menu>

For each item add only 2 attributes title and icon. 2. Add com.github.ag.floatingactionmenu.OptionsFabLayout view to your layout.

 <com.github.ag.floatingactionmenu.OptionsFabLayout

android:id="@+id/fab_l"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

custom:color="@color/colorAccent"

custom:options_color="@color/colorPrimary"

custom:options_menu="@menu/fab_menu"

custom:src="@drawable/ic_add_white_24dp" />
  1. Set mini fabs colors using setMiniFabsColors method(this is optional,you can define one color for all mini fabs using options_color attribute).
fabWithOptions = (OptionsFabLayout) findViewById(R.id.fab_l);

 //Set mini fab's colors.

fabWithOptions.setMiniFabsColors(

  R.color.colorPrimary,

  R.color.green_fab);
  1. Handle main fab and mini fabs clicks.

 //Set main fab clicklistener.

fabWithOptions.setMainFabOnClickListener(new View.OnClickListener() {

 @Override

 public void onClick(View view) {

  Toast.makeText(MainActivity.this, "Main fab clicked!", Toast.LENGTH_SHORT).show();

 
}

}
);

 //Set mini fabs clicklisteners.

fabWithOptions.setMiniFabSelectedListener(new OptionsFabLayout.OnMiniFabSelectedListener() {

 @Override

 public void onMiniFabSelected(MenuItem fabItem) {

  switch (fabItem.getItemId()) {

case R.id.fab_add:

 Toast.makeText(

getApplicationContext(),

fabItem.getTitle() + " clicked!",

Toast.LENGTH_SHORT).show();

 break;

case R.id.fab_link:

 Toast.makeText(getApplicationContext(),

fabItem.getTitle() + "clicked!",

Toast.LENGTH_SHORT).show();

default:

 break;

  
}

 
}

}
);

Customize

Attrubte Description
options_menu menu that contains mini fabs
options_color sets same color for all mini fabs.Default value is primary color
src main fab drawable
color main fab color
background_color color of background view when menu expanded

Close menu

fabWithOptions.closeOptionsMenu();

Check if menu opened

fabWithOptions.isOptionsMenuOpened();

Resources

android-verticalseekbar is a vertical SeekBar class which supports Android 2.3 - 5.0.

Pretty is a library that enables one to enhance Android layout inflation without boilerplate and knowledge about LayoutInflater internals. Pretty hooks into the Android layout inflation so you could add new attributes to existing View subtypes.

Statically typed programming language targeting the JVM and JavaScript.

100% interoperable with Java™

Spotify Web API Wrapper with Retrofit and OkClients just for Android.

This library includes authentication and account token management feature.

Bee

Bee is a QA/Debug tool that works like a widget in any application. The idea is to add some features/options to developer and QA to configure the app, get some information. Bee works like an extra view when the user presses the bee icon.

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