{"id":13410854,"url":"https://github.com/Clans/FloatingActionButton","last_synced_at":"2025-03-14T16:33:07.263Z","repository":{"id":29101996,"uuid":"32631353","full_name":"Clans/FloatingActionButton","owner":"Clans","description":"Android Floating Action Button based on Material Design specification","archived":true,"fork":false,"pushed_at":"2019-07-11T20:43:07.000Z","size":3389,"stargazers_count":5226,"open_issues_count":231,"forks_count":1136,"subscribers_count":173,"default_branch":"master","last_synced_at":"2024-04-30T08:21:03.831Z","etag":null,"topics":["android","floatingactionbutton"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-21T12:36:16.000Z","updated_at":"2024-04-25T20:44:00.000Z","dependencies_parsed_at":"2022-07-16T10:16:22.314Z","dependency_job_id":null,"html_url":"https://github.com/Clans/FloatingActionButton","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clans%2FFloatingActionButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clans%2FFloatingActionButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clans%2FFloatingActionButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clans%2FFloatingActionButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clans","download_url":"https://codeload.github.com/Clans/FloatingActionButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610506,"owners_count":20318970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","floatingactionbutton"],"created_at":"2024-07-30T20:01:09.791Z","updated_at":"2025-03-14T16:33:06.753Z","avatar_url":"https://github.com/Clans.png","language":"Java","readme":"# WARNING! FURTHER DEVELOPMENT AND SUPPORT IS DISCONTINUED.\n# FloatingActionButton\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.clans/fab/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.clans/fab) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Clans%2FFloatingActionButton-blue.svg?style=flat)](http://android-arsenal.com/details/1/1684)\n\nYet another implementation of [Floating Action Button](http://www.google.com/design/spec/components/buttons.html#buttons-floating-action-button) for Android with lots of features.\n\n# Requirements\nThe library requires Android **API Level 14+**.\n\n# Demo\nWatch a short **[Demo Video](https://youtu.be/XngUY3PN1IQ)** on YouTube or try it using **[Android simulator in the browser](https://appetize.io/app/ffreudbwmyedw5trzhyjknd2jg)** on Appetize.io.  \nSample APK can be found in **[Releases](https://github.com/Clans/FloatingActionButton/releases)** section.\n\n# Screenshots\n![Main screen](/screenshots/main_screen.png) ![Menu closed](/screenshots/menu_closed.png) ![Menu default opened](/screenshots/menu_default_opened.png) ![Menu custom opened](/screenshots/menu_custom_opened.png) ![Menu mini opened](/screenshots/menu_mini_opened.png) ![Menu right opened](/screenshots/menu_right_opened.png) ![Menu down opened](/screenshots/menu_down_opened.png) ![Progress background](/screenshots/progress_background.png) ![Progress no background](/screenshots/progress_no_background.png)\n\n# Features\n- Ripple effect on Android Lollipop devices\n- Option to set custom **normal**/**pressed**/**ripple** colors\n- Option to set custom shadow color and offsets\n- Option to disable shadow for buttons and (or) labels\n- Option to set custom animations\n- Option to set custom icon drawable\n- Support for **normal** `56dp` and **mini** `40dp` button sizes\n- Custom FloatingActionMenu icon animations\n- Option to expand menu up and down\n- Option to show labels to the left and to the right of the menu\n- Option to show circle progress on `FloactinActionButton`\n- Option to add button to the `FloatingActionMenu` programmatically\n- Option to dim the `FloatinActionMenu`'s background\n- *Option to remove all buttons from the `FloatingActionMenu`*\n- *Option to set a label for the `FloatingActionMenu`'s button*\n\n# Usage\nAdd a dependency to your `build.gradle`:\n```\ndependencies {\n    compile 'com.github.clans:fab:1.6.4'\n}\n```\nAdd the `com.github.clans.fab.FloatingActionButton` to your layout XML file.\n```XML\n\u003cFrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:fab=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003cListView\n        android:id=\"@+id/list\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n\n    \u003ccom.github.clans.fab.FloatingActionButton\n        android:id=\"@+id/fab\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|right\"\n        android:layout_marginBottom=\"8dp\"\n        android:layout_marginRight=\"8dp\"\n        android:src=\"@drawable/ic_menu\"\n        fab:fab_colorNormal=\"@color/app_primary\"\n        fab:fab_colorPressed=\"@color/app_primary_pressed\"\n        fab:fab_colorRipple=\"@color/app_ripple\"/\u003e\n\n\u003c/FrameLayout\u003e\n```\nYou can set an icon for the **FloatingActionButton** using `android:src` xml attribute. Use drawables of size `24dp` as specified by [guidlines](http://www.google.com/design/spec/components/buttons.html#buttons-floating-action-button). Icons of desired size can be generated with [Android Asset Studio](http://romannurik.github.io/AndroidAssetStudio/icons-generic.html).\n\n### Floating action button\nHere are all the **FloatingActionButton**'s xml attributes with their **default values** which means that you don't have to set all of them:\n```XML\n\u003ccom.github.clans.fab.FloatingActionButton\n        android:id=\"@+id/fab\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|right\"\n        android:layout_marginBottom=\"8dp\"\n        android:layout_marginRight=\"8dp\"\n        android:src=\"@drawable/your_icon_drawable\"\n        app:fab_colorNormal=\"#DA4336\"\n        app:fab_colorPressed=\"#E75043\"\n        app:fab_colorRipple=\"#99FFFFFF\"\n        app:fab_showShadow=\"true\"\n        app:fab_shadowColor=\"#66000000\"\n        app:fab_shadowRadius=\"4dp\"\n        app:fab_shadowXOffset=\"1dp\"\n        app:fab_shadowYOffset=\"3dp\"\n        app:fab_size=\"normal\"\n        app:fab_showAnimation=\"@anim/fab_scale_up\"\n        app:fab_hideAnimation=\"@anim/fab_scale_down\"\n        app:fab_label=\"\"\n        app:fab_progress_color=\"#FF009688\"\n        app:fab_progress_backgroundColor=\"#4D000000\"\n        app:fab_progress_indeterminate=\"false\"\n        app:fab_progress_max=\"100\"\n        app:fab_progress=\"0\"\n        app:fab_progress_showBackground=\"true\"/\u003e\n```\nAll of these **FloatingActionButton**'s attributes has their corresponding getters and setters. So you can set them **programmatically**.\n\n### Floating action menu\nHere are all the **FloatingActionMenu**'s xml attributes with their **default values** which means that you don't have to set all of them:\n```XML\n\u003ccom.github.clans.fab.FloatingActionMenu\n        android:id=\"@+id/menu\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_marginRight=\"10dp\"\n        android:layout_marginBottom=\"10dp\"\n        android:layout_marginLeft=\"10dp\"\n        fab:menu_fab_size=\"normal\"\n        fab:menu_showShadow=\"true\"\n        fab:menu_shadowColor=\"#66000000\"\n        fab:menu_shadowRadius=\"4dp\"\n        fab:menu_shadowXOffset=\"1dp\"\n        fab:menu_shadowYOffset=\"3dp\"\n        fab:menu_colorNormal=\"#DA4336\"\n        fab:menu_colorPressed=\"#E75043\"\n        fab:menu_colorRipple=\"#99FFFFFF\"\n        fab:menu_animationDelayPerItem=\"50\"\n        fab:menu_icon=\"@drawable/fab_add\"\n        fab:menu_buttonSpacing=\"0dp\"\n        fab:menu_labels_margin=\"0dp\"\n        fab:menu_labels_showAnimation=\"@anim/fab_slide_in_from_right\"\n        fab:menu_labels_hideAnimation=\"@anim/fab_slide_out_to_right\"\n        fab:menu_labels_paddingTop=\"4dp\"\n        fab:menu_labels_paddingRight=\"8dp\"\n        fab:menu_labels_paddingBottom=\"4dp\"\n        fab:menu_labels_paddingLeft=\"8dp\"\n        fab:menu_labels_padding=\"8dp\"\n        fab:menu_labels_textColor=\"#FFFFFF\"\n        fab:menu_labels_textSize=\"14sp\"\n        fab:menu_labels_cornerRadius=\"3dp\"\n        fab:menu_labels_colorNormal=\"#333333\"\n        fab:menu_labels_colorPressed=\"#444444\"\n        fab:menu_labels_colorRipple=\"#66FFFFFF\"\n        fab:menu_labels_showShadow=\"true\"\n        fab:menu_labels_singleLine=\"false\"\n        fab:menu_labels_ellipsize=\"none\"\n        fab:menu_labels_maxLines=\"-1\"\n        fab:menu_labels_style=\"@style/YourCustomLabelsStyle\"\n        fab:menu_labels_position=\"left\"\n        fab:menu_openDirection=\"up\"\n        fab:menu_backgroundColor=\"@android:color/transparent\"\n        fab:menu_fab_label=\"your_label_here\"\n        fab:menu_fab_show_animation=\"@anim/my_show_animation\"\n        fab:menu_fab_hide_animation=\"@anim/my_hide_animation\"\u003e\n\n        \u003ccom.github.clans.fab.FloatingActionButton\n            android:id=\"@+id/menu_item\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:src=\"@drawable/ic_star\"\n            fab:fab_size=\"mini\"\n            fab:fab_label=\"Menu item 1\" /\u003e\n\n    \u003c/com.github.clans.fab.FloatingActionMenu\u003e\n```\n\nIf you're using custom style for labels - other labels attributes will be ignored.\n\nLabels shadow preferences depends on their corresponding **FloatingActionButtons**' shadow preferences.\n\nFor more usage examples check the **sample** project.\n\n# Changelog\nPlease see the [Changelog](https://github.com/Clans/FloatingActionButton/wiki/Changelog) page to see what's recently changed.\n\n# Credits\nI used [android-floating-action-button](https://github.com/futuresimple/android-floating-action-button) library by Jerzy Chalupski as a base for development.\n\n# License\n```\nCopyright 2015 Dmytro Tarianyk\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["Java","FAB","\u003ca name=\"FAB\"\u003eFAB\u003c/a\u003e"],"sub_categories":["Personal Blog"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClans%2FFloatingActionButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FClans%2FFloatingActionButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClans%2FFloatingActionButton/lists"}