SuavePirate/Xamarin.Forms.Controls.FloatingActionButton

Change the image size when the fab button heightrequest or widthrequest changes to smaller

mcferdev opened this issue · 1 comments

I am trying to change dinamically the size of the button, but the image inside disappear when decrease the size to half.

So this is a weird issue in the native renderers that are slightly out of my control. The Android FAB doesn't scale the images well, and that's because the specs for the FAB at material.io specify that they shouldn't change, and on iOS it's due to the built in padding of the button.

What you can do as a workaround (especially while I'm trying to fix this very broken control and migrate it into the actual Xamarin.Forms repo) is to just adjust the scale of the control. So set the Width/Height Request to 50, then the scale to whatever. Check out more on that here https://developer.xamarin.com/api/property/Xamarin.Forms.VisualElement.Scale/