Hello,
You cannot set padding or height in Snackbar from community toolkit.
But you can popup a Google.Android.Material.Snackbar.Snackbar
from native android like following code.
You can pop up a Google.Android.Material.Snackbar.Snackbar for Android platform and set the padding by layout.SetPadding();
and set height by layout.SetMinimumHeight()
like following code.
#if ANDROID
Google.Android.Material.Snackbar.Snackbar snackbar = Google.Android.Material.Snackbar.Snackbar.Make(Platform.CurrentActivity, Platform.CurrentActivity.FindViewById(Android.Resource.Id.Content), "Your message", Google.Android.Material.Snackbar.Snackbar.LengthShort); ;
Google.Android.Material.Snackbar.Snackbar.SnackbarLayout layout = (Google.Android.Material.Snackbar.Snackbar.SnackbarLayout)snackbar.View;
layout.SetPadding(150, 0, 0, 0); //your custom padding
layout.SetMinimumHeight(200);//your custom height
snackbar.Show();
#endif
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.