ckurtm / fabbutton Goto Github PK
View Code? Open in Web Editor NEWAndroid Floating ActionButton with a progress indicator ring
Android Floating ActionButton with a progress indicator ring
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
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 ?
hey i wanted to set max value for the progress on run time how can i do that ??
Could you please tell me the size of the image (ic_fab_complete) that you are using.
I set the FAB dimensions to "mini" but the icon which I set is pixelated. I tried using a 24x24 dp icon.
Thank you.
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?
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
With JCenter shutting down, can this library be migrated to Maven Central?
I see you have defined FabButton.Behavior. It's compatible with appear but Snack. I'm digging on it.
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?
how to get current progress programmatically ?
Hello,
is there any way how to add ripple effect when user clicks FabButton?
Thanks.
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.
please add background end color attribute
Currenlty only "src" attribute for png images is supported. For clearer and size-saving design, "srcCompat" attribute for xml vector images support is required.
Gradle err: Could not find mbanje.kurt:fabbutton:1.2.2.
Hi ,
Your github fabButton is very impressive. It's the one of the easiest methods to implement fab animations that i came across.
I am trying to set the background color of the fab button , change the icon image programmatically (using set methods in Activity page) . Is there is any way to do this ?
I tried to set different icons (18,24, 48,36 dp) to the fab buttons but none of them looks promising. It seems every icon is being scaled out to fit in.
or
can you provide the icons link you are referring to , so that i can check whether is there any wrong with my icon collection
Maybe you should override your OnMeasure in CircleImageView to avoid clipping your shadow. Or you can use ShadowDrawableWrapper to draw your shadow just like FloatingActionButtonEclairMr1.
Just Suggestions
@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" }
}
.....
`
not set icon android:src="@drawable/download_icon" and app:fbb_endBitmap="@drawable/complete_icon"
hre is xml
in the name of GOD,
hello, thanks chkurtm for this library,
i want to hide shadow, how can i do it?
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.
Allow us to chose an endBitmap to show when we call showCompleted(). A setEndIcon(@DrawableRes int endDrawableRes) or setEndIcon(Drawable endDrawable) will be good.
Maybe a showCompleted(@DrawableRes int endDrawableRes) or showCompleted(Drawable endDrawable) to let us chose that on the fly (I know I'll need this, maybe someone else will).
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:1.2.2@aar'
Let me know if you need anymore information, I'd like to use this library in my project. Thank you!
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.