-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] Fixed TransformProperties issue when a wrapper view is present #29228
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
314f32b
Fixed the scaling issues with the Image in Android image
Ahamed-Ali 864e57b
Fixed transform properties not applying correctly when view is wrappe…
Ahamed-Ali 50f888c
Included the test sample and test case for the issue
Ahamed-Ali f564a70
Added verifyscreenshot
Ahamed-Ali e1b2ad6
Updated the fix with wrapperView Updated only to the transformProperties
Ahamed-Ali 619d8b7
Added iOS image
Ahamed-Ali 0fecc80
Optimized the code
Ahamed-Ali 3a95019
Committed the pending snap of mac and windows
Ahamed-Ali 200a598
Resaved the correct image
Ahamed-Ali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file added
BIN
+25.7 KB
...ls/tests/TestCases.Android.Tests/snapshots/android/ImageShouldScaleProperly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+575 Bytes
(100%)
...estCases.Android.Tests/snapshots/android/PropertiesShouldBeCorrectlyApplied.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 7432, "Android Image.Scale produces wrong layout", PlatformAffected.Android)] | ||
| public class Issue7432 : ContentPage | ||
| { | ||
| public Issue7432() | ||
| { | ||
| var grid = new Grid | ||
| { | ||
| BackgroundColor = Colors.Gray | ||
| }; | ||
|
|
||
| var image = new Image | ||
| { | ||
| Source = "dotnet_bot.png", | ||
| BackgroundColor = Colors.Red, | ||
| WidthRequest = 100, | ||
| HeightRequest = 100, | ||
| HorizontalOptions = LayoutOptions.Center, | ||
| VerticalOptions = LayoutOptions.Center, | ||
| Scale = 0.5, | ||
| AutomationId = "Image" | ||
| }; | ||
|
|
||
| grid.Children.Add(image); | ||
|
|
||
| Content = grid; | ||
| } | ||
| } |
Binary file added
BIN
+8.62 KB
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ImageShouldScaleProperly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue7432.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
| public class Issue7432 : _IssuesUITest | ||
| { | ||
| public Issue7432(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "Android Image.Scale produces wrong layout"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Image)] | ||
| public void ImageShouldScaleProperly() | ||
| { | ||
| App.WaitForElement("Image"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
Binary file added
BIN
+8.79 KB
...rols/tests/TestCases.WinUI.Tests/snapshots/windows/ImageShouldScaleProperly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.5 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ImageShouldScaleProperly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.