-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Fixed the SwipeView items were not displayed properly #27399
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,27 @@ | |||
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS | |||
// On Catalyst, Swipe actions not supported in Appium. | |||
//Unable to capture a screenshot with the swipe open in windows, as SwipeRightToLeft does not fully open the SwipeItems and instead closes them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a bug could you confirm and create a new issue? If create a new issue, please add the link to it in the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a created the 27436 bug report and added the link in the test case.
@@ -0,0 +1,27 @@ | |||
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS | |||
// On Catalyst, Swipe actions not supported in Appium. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will include a specific swipe action using the Appium Mac Driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/rebase |
8dc318a
to
98e0352
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue27367 : _IssuesUITest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jsuarezruiz ,
The test fails because the CI takes a screenshot before the swipe is fully completed, resulting in a slight visual difference. Adding a WaitForElement
before VerifyScreenshot resolves the issue.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Issue 1:
On right swipe, the text is not visible on Android.
Issue 2:
On left swipe, the text is not centered and remains at the start position on Android.
Root Cause of the issues
MeasureSpecMode.AtMost
causes the TextView to be rendered with a small size based on its content, resulting in improper display when swiping right on items and misalignment when swiping left.Description of Change
MeasureSpecMode.Exactly
, ensuring the TextView is rendered with the specified SwipeItemWidth, thereby resolving both issues.Regressed PR
Issues Fixed
Fixes #27367
Tested the behaviour in the following platforms
Screenshot
SwipeViewTextIssue.mov
SwipeViewTextFix.mov