You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you specify a long message that does not include line breaks for Snackbar and Toast,
the shape of the corner will change when the screen is rotated. Additionally, the Snackbar
and Toast backgrounds are not redrawn when the screen is rotated, causing messages to
protrude from the background.
I used the code below for validation.
void btnShowSnackbar_Clicked(object sender, EventArgs e)
{
Snackbar snackbar = new Snackbar()
{
Text = "This is Snackbar corner test message. This is test message. This is test message. This is test message. This is test message.",
Action = null,
Anchor = null,
ActionButtonText = string.Empty,
Duration = new TimeSpan(0, 0, 0, 0, 8500),
VisualOptions = new CommunityToolkit.Maui.Core.SnackbarOptions()
{
BackgroundColor = Colors.Red,
TextColor = Colors.White,
CornerRadius = new CornerRadius(5),
}
};
snackbar.Show();
}
void btnShowToast_Clicked(object sender, EventArgs e)
{
Toast toast = new Toast()
{
Text = "This is toast corner test message. This is test message. This is test message. This is test message. This is test message.",
TextSize = 15,
Duration = CommunityToolkit.Maui.Core.ToastDuration.Long
};
toast.Show();
}
Below are the verification results.
[Snackbar]
[Before Rotation]
[After Rotation]
[Toast]
[Before Rotation]
[After Rotation]
From the above, you can see that the Snackbar and Toast backgrounds are not redrawn after screen rotation.
You can also see that the shapes of the Snackbar and Toast corners have changed.
Expected Behavior
The expected result is that the Snackbar and Toast backgrounds will be redrawn even after the screen is rotated, and the corner shapes will not change.
Steps To Reproduce
The steps to reproduce are as follows.
[Steps to reproduce Snackbar]
Launch apps uploaded to GitHub on iOS
Press the Show Snackbar button
Rotate screen from portrait to landscape
In step 3, the background of the Snackbar is not drawn to the intended size and the shape of the corners has changed.
[Steps to reproduce Toast]
Launch apps uploaded to GitHub on iOS
Press the Show Toast button
Rotate screen from portrait to landscape
In step 3, the background of the Toast is not drawn to the intended size and the shape of the corners has changed.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
If you specify a long message that does not include line breaks for Snackbar and Toast,
the shape of the corner will change when the screen is rotated. Additionally, the Snackbar
and Toast backgrounds are not redrawn when the screen is rotated, causing messages to
protrude from the background.
I used the code below for validation.
Below are the verification results.
[Snackbar]
[Toast]
From the above, you can see that the Snackbar and Toast backgrounds are not redrawn after screen rotation.
You can also see that the shapes of the Snackbar and Toast corners have changed.
Expected Behavior
The expected result is that the Snackbar and Toast backgrounds will be redrawn even after the screen is rotated, and the corner shapes will not change.
Steps To Reproduce
The steps to reproduce are as follows.
[Steps to reproduce Snackbar]
In step 3, the background of the Snackbar is not drawn to the intended size and the shape of the corners has changed.
[Steps to reproduce Toast]
In step 3, the background of the Toast is not drawn to the intended size and the shape of the corners has changed.
Link to public reproduction project repository
https://github.com/cat0363/MauiComm-IssueSnackbarToastCorner.git
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: