robinmanuelthiel / flexbutton

Flexible button control for Xamarin.Forms
MIT License
240 stars 34 forks source link

[enhancement] Debounce & isBusy & Activity Indicator? #43

Closed Phenek closed 6 years ago

Phenek commented 6 years ago

hello,

It will be great to add an activity indicator for Async Task on the middle of the Button that make invisible Label and Image.

Maybe we could implement two sort of Bool One IsBusy (true or false) bindable property for debouncing One ShowLoader (true or false) bindable property (that show the activity indicator when busy)

(Without debouncing, pressing the button multiple times may cause unpredictable results)

It will help also for: #42 with a common isBusy bool for his grouped buttons.

I can make a Pull request, but waiting for your expectation and your Go.

Let me know

robinmanuelthiel commented 6 years ago

How would debouncing differ from the IsEnabled flag? Can't I just use this for async calls? Or do I miss a point here?

MyFlexButton.IsEnabled = false;
var result = await Something.RunAsync();
MyFlexButton.IsEnabled = true;
robinmanuelthiel commented 6 years ago

A loading indicator within a button sounds interesting, but sounds like a lot of work to make it flexible/customizable. If you already have an idea or a need, I am happy to take a look at code in a PR!

Phenek commented 6 years ago

48

There is an issue on the activityIndicator.Color Property on iOS with Xamarin.forms 3.0. it's set to default Gray Color, Otherwise it works great.

Let me know