Android Floating ActionButton with a progress indicator ring

Last update: Jun 5, 2022

FabProgress

Android Circular floating action button with intergrated progress indicator ring As per material design docs

Demo:

Demo apk

FabButton 365 Body Workout

HOW TO ADD TO YOUR PROJECT

Download

Gradle:

dependencies {
        compile 'mbanje.kurt:fabbutton:[email protected]'
}

Usage

  • Use FabButton: (check the demo app included)
    <view
        android:layout_width="@dimen/button_size"
        android:layout_height="@dimen/button_size"
        class="mbanje.kurt.fabbutton.FabButton"
        android:id="@+id/determinate"
        android:layout_gravity="center"
        android:color="#ff6e9cff"
        android:src="@drawable/ic_fab_play"
        android:visibility="visible"
        android:layout_centerInParent="true"
        android:indeterminate="false"
        android:max="100"
        app:fbb_autoStart="true"
        app:fbb_progressColor="#ff170aff"
        app:fbb_progressWidthRatio="0.1"
        app:fbb_endBitmap="@drawable/ic_fab_complete"
        app:fbb_showEndBitmap="true"
        />

Apps using library

alt text

License

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

GitHub

https://github.com/ckurtm/FabButton
Comments
  • 1. Gradle Project Refresh Error (Can't find FabButton library)

    Error:

    Could not find fabbutton.jar (mbanje.kurt:fabbutton:1.2.2).
      Searched in the following locations:
          https://jcenter.bintray.com/mbanje/kurt/fabbutton/1.2.2/fabbutton-1.2.2.jar
    

    The FabButton library cannot be found. I have jcenter() in my app's build.gradle and I'm using the most recent library version: compile 'mbanje.kurt:fabbutton:[email protected]'

    Let me know if you need anymore information, I'd like to use this library in my project. Thank you!

    Reviewed by JimVanG at 2017-01-29 06:17
  • 2. Question : The demo is "365 Body Workout" ?

    That's where I get when pressing the demo link: https://play.google.com/store/apps/details?id=com.peirr.workout.play

    Isn't there a more specific demo?

    Reviewed by AndroidDeveloperLB at 2015-03-15 17:21
  • 3. CircleImageView doesn't resize its source.

    cattura I've got this problem. The CircleImageView doesn't seem to resize the source drawable to its size. I'd use a ScaleType like centerFit if it is actually the problem.

    Reviewed by dadino at 2015-03-04 11:13
  • 4. Fix compatibility with support library v26

    Warning: mbanje.kurt.fabbutton.FabButton$Behavior: can't find referenced field 'int design_fab_in' in program class mbanje.kurt.fabbutton.R$anim Warning: mbanje.kurt.fabbutton.FabButton$Behavior: can't find referenced field 'int design_fab_out' in program class mbanje.kurt.fabbutton.R$anim

    Reviewed by Dimdron at 2017-09-20 13:16
  • 5. Progress is next to button

    I tried to add this button programmatically, and this caused a bug. It separates progress from the button on the layout, when I start to change progress.

    Here is old fab, and on the center here is Progress Fab. device-2016-02-16-171824

    Reviewed by tonyshkurenko at 2016-02-16 15:19
  • 6. Change AndroidManifest.xml

    Android studio gives error while debugging app with the library because of the application tag. (Suggestion: add 'tools:replace="android:label"' to element at AndroidManifest.xml: to override)

    Remove the useless line from androidmanifest.xml

    Reviewed by Swisyn at 2015-03-27 00:34
  • 7. Nullpointer exception setting progress to 100 on a fragment

    When setting the progress for either a determined or undetermined fabbutton to 100, it throws an nullpointer exception:

    E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.NullPointerException at mbanje.kurt.fabbutton.CircleImageView.showCompleted(CircleImageView.java:227) at mbanje.kurt.fabbutton.FabButton.onProgressCompleted(FabButton.java:171) at mbanje.kurt.fabbutton.ProgressRingView.onIndeterminateValuesChanged(ProgressRingView.java:278) at mbanje.kurt.fabbutton.FabUtil$2.onAnimationUpdate(FabUtil.java:63) at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1166) at android.animation.ValueAnimator.animationFrame(ValueAnimator.java:1102) at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1131) at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:616) at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:639) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:766) at android.view.Choreographer.doCallbacks(Choreographer.java:575) at android.view.Choreographer.doFrame(Choreographer.java:541) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:751) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:5751) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850) at dalvik.system.NativeStart.main(Native Method)

    Too reproduce the error, I just narrow it down to:

    @Override
    public void onClick(View v) {
        mButton.showProgress(true);
        mButton.setProgress(100);
    }
    

    It will still throw the same exception.

    Reviewed by funex at 2015-05-19 07:18
  • 8. After completion, the button icon is blocked on the ic_fab_complete one

    When using the determinate progress, on completion it will do a transition to show the complete progress bitmap, but then it will remain on that one. There should be a timer or a method to reset the button drawable

    Reviewed by emanuelet at 2015-03-28 15:51
  • 9. fabButton block onItemClickListener in listView

    Hi, Thanks to this great button. It works well in normal layout, except when i put it in my listView. I found that will lead to onItemClickListener and onItemLongClickListener won't work.
    I have tried to set "android:descendantFocusability="blocksDescendants" and make this button focuseable false, but it didn't work.
    somebody can help me ?

    Reviewed by luckyshane at 2015-03-20 09:59
  • 10. Attribute "..." has already been defined

    When building the project I get this:

    Attribute "progressColor" has already been defined.

    The problem is this attr name is alredy defined by another library. My suggestion is to rename your attrs with a specific prefix, like fb or fab, or else you will have problems with other libraries that use your attrs name.

    Reviewed by dadino at 2015-03-04 09:38
  • 11. twice set complete icon

    here's my code, public void startDeterminate() { button.setIcon(R.drawable.ic_fab_play,R.drawable.ic_fab_complete); button.resetIcon(); currentProgress = 0; button.showProgress(true); button.setProgress(100); }

    For the second time I enter this methed, fabbutton will firstly show complete icon

    Reviewed by luwei2012 at 2015-07-01 08:35
  • 12. How to migrate it AndroidX?

    Hi, I try to use this library in 2020 and I can't. I need to update my app which used this FabButton, bit since november 2020 I need androidX in my project. I cannot make it. Can you help please?

    Reviewed by vadimTovstik at 2020-12-17 11:25
  • 13. Error:(34, 20) Failed to resolve: mbanje.kurt:fabbutton:1.2.4

    @ckurtm : Hi, give me the following error where I'm wrong? I also tried to change compile with implementation, as suggested but does not change anything.

    distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

    build

    buildscript {
        repositories {
            jcenter()
            maven { url "https://maven.google.com" }
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.3'
        }
    }
    
    apply plugin: 'com.android.library'
    
    android {
        compileSdkVersion 27
        buildToolsVersion "27.0.3"
    
        defaultConfig {
            minSdkVersion 16
            targetSdkVersion 27
            versionCode 1
            versionName "1.0"
        }
        lintOptions {
            abortOnError false
        }
    }
    
    repositories {
        mavenCentral()
        maven { url "https://maven.google.com" }
    }
    .....
    

    `

    Reviewed by Angelk90 at 2018-06-29 13:56
  • 14. srcCompat attribute required

    Currenlty only "src" attribute for png images is supported. For clearer and size-saving design, "srcCompat" attribute for xml vector images support is required.

    Reviewed by ZonZonZon at 2018-01-15 06:47
  • 15. Consider publishing as a full Maven artefact

    The current instructions for using this library is to include @aar in the dependency line, because you're publishing it without a POM on the Maven server. This works fine for apps, but for libraries, it makes it harder because Gradle doesn't remember to add @aar for the library's own dependencies.

    Reviewed by paour at 2017-10-02 09:20
Related tags
Floating Action Button for Android based on Material Design specification
Floating Action Button for Android based on Material Design specification

FloatingActionButton Yet another library for drawing Material Design promoted actions. Features Support for normal 56dp and mini 40dp buttons. Customi

Jun 22, 2022
Android library providing an implementation of the Material Design Floating Action Button Speed Dial.
Android library providing an implementation of the Material Design Floating Action Button Speed Dial.

Android library providing an implementation of the Material Design Floating Action Button Speed Dial.

Apr 21, 2022
A simple Floating Action Button that shows an anchored Navigation View
A simple Floating Action Button that shows an anchored Navigation View

Floating Navigation View A simple Floating Action Button that shows an anchored Navigation View and was inspired by Menu Material Fixed created by Tom

Jun 17, 2022
Kotlin Expanding Floating Action button
Kotlin Expanding Floating Action button

Kotlin-Expanding-Floating-Action_button Home Screen As you can see there is only a siongle floating button with + icon Expanding Fab button When we cl

Nov 3, 2021
Floating Action Button But Moveable And Expandalbe

MeFab todo add the maven bacge here Floating Action Button but MOVEABLE and EXPA

Dec 27, 2021
Android Circular Progress Button
Android Circular Progress Button

?? Before using this library, read information below ?? This library is not more supported. If you want to add new feature or fix a bug, grab source

Jun 21, 2022
Android Buttons With Built-in Progress Meters.
Android Buttons With Built-in Progress Meters.

Description Android Buttons With Built-in Progress Meters. Wiki Home Screenshots User Guide Integration The lib is available on Maven Central, you can

Jun 22, 2022
Material progress circle around any FloatingActionButton. 100% Guidelines.
Material progress circle around any FloatingActionButton. 100% Guidelines.

FABProgressCircle Android library to provide a material progress circle around your FloatingActionButton. This component is compatible with any existe

Jun 15, 2022
Base on android-process-button this is the advanced version of the android-process-button.
Base on android-process-button this is the advanced version of the android-process-button.

Rock Button release log Base on android-process-button this is the advanced version of the android-process-button ##Main Features ActionProcessButton

Apr 22, 2022
Circle button widget for Android

DEPRECATED This library is deprecated and no new development is taking place. Consider using a FAB(Floating action button) instead. E.g. the Android D

Jun 22, 2022
FButton - a flat button library for Android
FButton - a flat button library for Android

FButton FButton is a custom Button of Android with "Flat UI" concept. FButton's design get inspiration from designmono. This library is very small and

Jun 20, 2022
Android button which moves in eight direction.
Android button which moves in eight direction.

Moving Button Android button which moves in eight direction. Preview Sample Demo You can download demo movie file here : demo.mov It's also on Youtube

Feb 15, 2022
Button for android with animations for transition and error states.
Button for android with animations for transition and error states.

Transition Button Android Preview Expand animation: Shake animation: Installation Gradle dependencies { implementation 'com.royrodriguez:transitionbu

Jun 15, 2022
AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.
AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.

AwesomeSwitch AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard swi

Jun 2, 2022
Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

Jun 15, 2022
ToggleButton Widget For Android Dev
ToggleButton Widget For Android Dev

ToggleButton ToggleButton Widget For Android Developers @Deprecated !!!项目已经停止维护,新项目移至https://github.com/zcweng/SwitchButton !!! How To Use xml

Jun 15, 2022
Icons, Borders, Radius ... for Android buttons
Icons, Borders, Radius ... for Android buttons

⚠️ This library was made years ago when it wasn't that easy to customize Android buttons like today. I highly recommend you to use Material Design but

Jun 9, 2022
👏 The Medium's Clapping Effect developed in Android
👏 The Medium's Clapping Effect developed in Android

?? MediumClap-Android Built with ❤︎ by Wajahat Karim and contributors A Custom Floating Action Button (FAB) library like clapping effect on Medium ??

May 12, 2022
[] An Android library for an expandable button menu
[] An Android library for an expandable button menu

ExpandableButtonMenu ExpandableButtonMenu is an Android library which implements an expandable button that can be used as a substitute of a fixed size

Aug 16, 2021