Xamarin.Plugin.FAB icon indicating copy to clipboard operation
Xamarin.Plugin.FAB copied to clipboard

Command and its can execute does not affect disabled colors

Open tominurmiainen opened this issue 8 years ago • 2 comments

It would nice if Command's CanExecute will affect visually to the disabled state of the button. If canexecute returns false the button won't do anything so that part works, but its should be disabled as well.

tominurmiainen avatar Oct 26 '16 09:10 tominurmiainen

Actually it seems that the disabled / enabled colors does not correctly affect to the ui. When I disable the button it will change its color but enabling won't change the color back to normal. This has been tested with real devices with android 5 (Lollipop), 6 (Marshmallow). This can be verified with the FAB sample app...

tominurmiainen avatar Nov 07 '16 07:11 tominurmiainen

In Android's viewrenderer / UpdateEnabled function: it seems that calling only UpdateBackgroundColor() does not do anything when setting back to enabled, but if you call SetBackgroundColors before UpdateBackgroundColors it seems to work as expected. I could do a pull request but I'm not sure will this be correct way to resolve this issue.

tominurmiainen avatar Nov 07 '16 08:11 tominurmiainen