[Net11] [Android] [ShellRenderer] Label text is not displayed correctly when using VerticalOptions
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
### Description
In the test Issue34143.cs, VerticalOptions = LayoutOptions.Center is used on a VerticalStackLayout containing a Label. But the text is still not properly centered. I have attached a diff image for reference.
| Expected Image | Diff Image |
|----------|----------|
| |
|
To make the issue more visible, I also attached an image using VerticalOptions = LayoutOptions.Start. On Android, the text is not visible in that case. On iOS, it works correctly.
| Actual Image | Expected Image | iOS Image |
|----------|----------|----------|
| |
|
|
### Note
I found this issue during Android Shell Handler testing. The issue occurs with the renderer but does not occur with the handler. We are currently planning to restrict this test on Android as part of PR #34758. Once the issue is resolved in the renderer, the test can be re-enabled.
### Steps to Reproduce
Run this HostApp sample on Android with VerticalOptions = LayoutOptions.Start set on the VerticalStackLayout.
Repo: https://github.com/dotnet/maui/blob/net11.0/src/Controls/tests/TestCases.HostApp/Issues/Issue34143.cs
### Link to public reproduction project repository
_No response_
### Version with bug
11.0.0-preview.4
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
Unknown/Other
### Affected platforms
Android
### Affected platform versions
_No response_
### Did you find any workaround?
_No response_
### Relevant log output
```shell
```
Contributor guide
Research direction
Start with src/Controls/tests/TestCases.HostApp/Issues/Issue34143.cs and run the HostApp sample on Android using VerticalOptions.Start and Center. Compare the ShellRenderer behavior with the handler, then verify that the Label text is visible and correctly positioned for both options so the test can be re-enabled after the renderer fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100