Comments (9)
Hi,
Useful feature. I will add it to the features queue.
I can't provide any estimations now about it cause there are a lot of other more critical features to implement
So check for updates
from fab.
You Are only developer that answers my issues so quickly.
ThnQ Very Much
from fab.
Thanks)
I'm available the times when not sleeping)
from fab.
Hi,
I would appreciate ANY progressBar visualization as well.
Another (possibly cooler) way to do so could be to use whole button animation. Let say "disable" button (gray) and rotate it with icon inside.
And the most cool way would be to make it really simple ((-: E.g.: To set this fab:progressAnimation="@anim/fab_progress_rotate" in XML and than just programically call "actionButton.startProgress() / stopProgress()"
What do you think ?
from fab.
Hi!
I'm ok with it.
Currently I'm finishing 1.1.0 version and will release it soon. I also have some plans to implement menu in Action Button. So it will take some time
If you have time and wish you can try to implement it (after 1.1.0 release) and send me the pull request
Thanks for contribution
from fab.
Meanwhile I played with this (beware 15 min test - just a test)...
put progressbar behind FAB, change progressBar color programically, rotate FAB and start progressbar, then stop it when finished
<com.software.shell.fab.ActionButton
android:id="@+id/createOrder_button"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/createOrder_layout"
android:layout_alignParentRight="true"
android:layout_marginBottom="-32dp"
android:layout_marginRight="@dimen/padding20"
android:elevation="@dimen/elevation_high"
android:visibility="invisible"
fab:button_color="@color/green"
fab:button_colorPressed="@color/darkGreen"
fab:image="@drawable/ic_send_white_24dp"
fab:show_animation="@anim/fab_fade_in"
tools:visibility="visible"
/>
progressBar = (ProgressBar) view.findViewById(R.id.createOrder_progressBar);
progressBar.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.green), android.graphics.PorterDuff.Mode.MULTIPLY);
actionButton = (ActionButton) view.findViewById(R.id.createOrder_button);
actionButton.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
// Progress like animation
actionButton.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.rotate));
progressBar.setVisibility(View.VISIBLE);
actionButton.setClickable(false);
actionButton.setButtonColor(Color.LTGRAY);
doCreateOrder(v);
}
});
// Initial animation
actionButton.postDelayed(new Runnable() {
@OverRide
public void run() {
actionButton.show();
}
}, 250);
// FINISH operation
progressBar.setVisibility(View.GONE);
actionButton.setClickable(true);
actionButton.setButtonColor(getResources().getColor(R.color.green));
actionButton.clearAnimation();
from fab.
Idea is good. However I think it would be better to draw the progress instead of using the android's ones. This is what actually differs Action Button from another libraries. All elements in this library are indeed drawn in 2D instead of using an existing implementation
We can extend the ActionButton class, override the onDraw(Canvas canvas) method and add additional ones.
from fab.
Any progress? Thanks...
from fab.
In plans, however I can't answer now how much time will it take. I'm planning a great refactoring + new features in the nearest time
from fab.
Related Issues (20)
- Icon is outside the circle HOT 3
- move() method smearing on KitKat with snackbar. HOT 6
- FAB sides are not perfectly round HOT 22
- FAB position not exactly correct HOT 2
- Needs compatible method with new CoordinatorLayout. HOT 2
- xml parsing error while setting the animations HOT 7
- Is the way to have margin 0dp? HOT 2
- Render issue HOT 7
- setSize method doesn't work
- Remove deprecated API, fix unknown API references HOT 7
- Is it possible to use Text and Font_awesome with this library ? HOT 1
- Ripple state reset on UP_ACTION outside of FAB HOT 8
- cant set color of button HOT 5
- Background of the button HOT 1
- Can't render XML HOT 1
- Can Drag? HOT 1
- no resource found logback-android-core HOT 1
- Prefix attributes to avoid collisions with other libraries
- Does the actionButton have some playHideAnimationCompleationListner? HOT 1
- Ripple effect gets interrupted as soon as you release the touch input from the fab HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fab.