-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] Fixed Setting a Label visible after having had focus on a InputView will increase the Label's height #29210
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
7 commits
Select commit
Hold shift + click to select a range
ae6b47d
Fixed the Label Measurement issue in Android
Ahamed-Ali 44390c8
Included the test sample and case
Ahamed-Ali 2f60649
Committed the fix changes and included the images
Ahamed-Ali 4cca0a3
Committed the test sample changes
Ahamed-Ali 4fba867
Android image added
Ahamed-Ali 1819210
Updated the mac image
Ahamed-Ali 58f977c
Modified the review changes
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
There are no files selected for viewing
Binary file added
BIN
+18.2 KB
...ols/tests/TestCases.Android.Tests/snapshots/android/LabelShouldSizeProperly.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,37 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 29194, "[Android][Label] Setting a Label visible after having had focus on a InputView will increase the Label's height", PlatformAffected.Android)] | ||
| public class Issue29194 : ContentPage | ||
| { | ||
| public Issue29194() | ||
| { | ||
| var mySwitch = new Switch() { AutomationId = "Switch" }; | ||
|
|
||
| var label = new Label | ||
| { | ||
| Text = "Hello, World!", | ||
| BackgroundColor = Colors.Red, | ||
| AutomationId = "Label" | ||
| }; | ||
|
|
||
| label.SetBinding(Label.IsVisibleProperty, new Binding(nameof(Switch.IsToggled), source: mySwitch)); | ||
|
|
||
| var verticalStack = new VerticalStackLayout | ||
| { | ||
| Children = | ||
| { | ||
| label, | ||
| mySwitch, | ||
| new UITestEntry() {AutomationId = "Entry",IsCursorVisible=false}, | ||
| } | ||
| }; | ||
|
|
||
| var scrollView = new ScrollView | ||
| { | ||
| Content = verticalStack | ||
| }; | ||
|
|
||
| Content = scrollView; | ||
|
|
||
| } | ||
| } |
Binary file added
BIN
+7.91 KB
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/LabelShouldSizeProperly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29194.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,23 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
| public class Issue29194 : _IssuesUITest | ||
| { | ||
| public Issue29194(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "[Android][Label] Setting a Label visible after having had focus on a InputView will increase the Label's height"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Label)] | ||
| public void LabelShouldSizeProperly() | ||
| { | ||
| App.WaitForElement("Entry"); | ||
| App.Tap("Entry"); | ||
| App.Tap("Switch"); | ||
| App.WaitForElement("Label"); | ||
| App.DismissKeyboard(); | ||
| VerifyScreenshot(); | ||
| } | ||
| } |
Binary file added
BIN
+6.37 KB
...trols/tests/TestCases.WinUI.Tests/snapshots/windows/LabelShouldSizeProperly.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
+21.5 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelShouldSizeProperly.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.