Skip to content

[Android] Fix Label with MaxLines truncating text in horizontal ScrollView#34279

Merged
PureWeen merged 7 commits intodotnet:mainfrom
Vignesh-SF3580:fix-34120
Mar 5, 2026
Merged

[Android] Fix Label with MaxLines truncating text in horizontal ScrollView#34279
PureWeen merged 7 commits intodotnet:mainfrom
Vignesh-SF3580:fix-34120

Conversation

@Vignesh-SF3580
Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

PR #33281 added a GetDesiredSize() override in LabelHandler.Android.cs to fix issue #31782 (WordWrap labels reporting full constraint width instead of actual text width). The fix computes the longest wrapped line and returns that as the desired width.

This causes a regression when MaxLines is set on the label:

  1. GetDesiredSize() is called at the full available width — text wraps cleanly within MaxLines limit
  2. The fix returns the shorter "longest line" width
  3. The label is arranged at that narrower width
  4. At the narrower width, the same text needs more lines — exceeding MaxLines → text is clipped

Description of Change

The GetDesiredSize() override now uses a double-measurement strategy:

  1. Entry guard: Only applies the width-narrowing when Ellipsize == null (no active truncation).
  2. Compute candidate width: Finds the widest rendered line as before.
  3. Safety check (only when MaxLines is explicitly set): Re-measures the TextView at exactly the narrowed pixel width. If the re-measurement shows the text would now exceed MaxLines, the original full width is returned instead.
  4. Narrow when safe: If the re-measurement confirms the same or fewer lines, the narrowed width is returned — preserving the [Android] Unexpected Line Breaks in Android, Label with WordWrap Mode Due to Trailing Space. #31782 alignment fix even for labels with explicit MaxLines.

This avoids both regressions:

  • Labels without MaxLines behave as before (alignment fix preserved, no second measure).
  • Labels with MaxLines that have line-count headroom also get the alignment fix.

Issues Fixed

Fixes #34120

Tested platforms

  • Android
  • Windows
  • iOS
  • Mac

Files Changed in this PR:

File Change
src/Core/src/Handlers/Label/LabelHandler.Android.cs Double-measurement fix (~20 lines)
src/Controls/tests/TestCases.HostApp/Issues/Issue34120.cs New UI test HostApp page
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34120.cs New NUnit UI test

Regression Reference:

Screenshots

Before After
image image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 27, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34279

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34279"

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 27, 2026
@Vignesh-SF3580 Vignesh-SF3580 added the community ✨ Community Contribution label Feb 27, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review February 27, 2026 15:12
Copilot AI review requested due to automatic review settings February 27, 2026 15:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Mar 4, 2026

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review SessionUpdate LabelHandler.Android.cs · c91b66b

Issue: #34120 - [.NET 10] N3_Navigation - Some monkey names are truncated.
PR: #34279 - [Android] Fix Label with MaxLines truncating text in horizontal ScrollView
Platforms Affected: Android only (platform/android label on both issue and PR)
Files Changed: 1 implementation file, 2 test files, 3 snapshot files

Issue Summary

Root Cause (from PR)

GetDesiredSize() override in PR #33281 narrows width to longest wrapped line. At narrower width, the same text re-wraps into more lines, exceeding MaxLines → text is clipped/truncated.

PR Fix Strategy

  1. Entry guard: Only narrow when Ellipsize == null (no active truncation)
  2. When MaxLines is set, re-measure at narrowed width
  3. If re-measure shows more lines than MaxLines allows, return original full width
  4. Fail-safe: if Layout is null after re-measure, return original size

Changed File Classification

Fix files:

  • src/Core/src/Handlers/Label/LabelHandler.Android.cs

Test files:

  • src/Controls/tests/TestCases.HostApp/Issues/Issue34120.cs
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34120.cs
  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/LabelNotTruncatedWithMaxLines.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/LabelNotTruncatedWithMaxLines.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelNotTruncatedWithMaxLines.png

Test type: UI Tests (HostApp + Shared.Tests screenshot test)

Prior Agent Reviews

Two prior reviews were blocked by environment issues (ANDROID_HOME missing, fix-file detection mismatch). This session imports all findings from a successful prior review that completed all phases.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34279 Double-measurement with MaxLines safety check ✅ PASS (Gate) LabelHandler.Android.cs Original PR

🚦 Gate — Test Verification
📝 Review SessionUpdate LabelHandler.Android.cs · c91b66b

Result: ✅ PASSED
Platform: Android
Mode: Full Verification

  • Tests FAIL without fix ✅ (truncation reproduced — LabelNotTruncatedWithMaxLines screenshot differs)
  • Tests PASS with fix ✅ (label text displayed correctly within MaxLines=2)

Test: Issue34120.LabelNotTruncatedWithMaxLines — screenshot verification against snapshots/android/LabelNotTruncatedWithMaxLines.png

Note: Gate was verified in a prior agent session. PureWeen (MAUI team member) approved the PR on 2026-03-04 after reviewing the implementation.


🔧 Fix — Analysis & Comparison
📝 Review SessionUpdate LabelHandler.Android.cs · c91b66b

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix (claude-sonnet) Pre-check lineCount < MaxLines + Ellipsize == null ✅ PASS 1 file Simplest; zero extra measurements; small theoretical edge-case gap
2 try-fix (claude-opus) Width-adjustment buffers (Math.Ceiling, GetLineMax) ❌ FAIL 1 file DIP↔pixel round-trip makes width adjustments unreliable
3 try-fix (gpt-5.2) Skip narrowing when inside HorizontalScrollView ✅ PASS 1 file Too narrow in scope — bug could occur outside ScrollView
4 try-fix (gpt-5.3-codex) StaticLayout simulation for non-mutating validation ❌ FAIL 1 file Same DIP precision issue as attempt 2
5 try-fix (gemini) Skip narrowing entirely when MaxLines is set ✅ PASS 1 file Too aggressive — loses alignment fix for all MaxLines labels
PR PR #34279 Double-measurement with MaxLines safety re-check ✅ PASS (Gate) 1 file + tests Most robust; handles all edge cases; small measurement overhead

Cross-Pollination

Model Round New Ideas? Details
explore (round 2) 2 No (variations only) Paint-based validation (similar to failed attempt 4), deferred PlatformArrange narrowing (adds complexity)

Exhausted: Yes — all reasonable approach categories explored (pre-check, width adjustment, context check, simulation, skip entirely, re-measurement)

Approach Comparison

Key Insight: Two fundamental strategies work:

  1. Guard-based (attempts 1, 3, 5): Don't narrow when truncation is likely. Trade: may skip narrowing unnecessarily.
  2. Verify-based (PR): Narrow, then verify. Trade: extra measurement pass but guaranteed correctness.

Width-adjustment approaches (attempts 2, 4) are provably insufficient due to DIP↔pixel precision loss in the measurement→arrangement pipeline.

Selected Fix: PR's fix

Reason: The PR's double-measurement approach is the most robust:

  • Handles ALL edge cases including the theoretical scenario where lineCount < MaxLines at full width but lineCount > MaxLines at narrowed width
  • The extra measurement cost is negligible (one re-measure only when MaxLines is explicitly set AND width would narrow)
  • The Ellipsize == null guard avoids the re-measure entirely for labels with active truncation

Attempt 1 is a strong simpler alternative but has a small theoretical gap. For a framework-level handler, the PR's extra safety check is worth the small cost.


📋 Report — Final Recommendation
📝 Review SessionUpdate LabelHandler.Android.cs · c91b66b

✅ Final Recommendation: APPROVE

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Context gathered, prior blocked reviews imported
Gate ✅ PASSED Android: tests FAIL without fix, PASS with fix
Try-Fix ✅ COMPLETE 5 attempts (3 passing, 2 failing), PR's fix selected as best
Report ✅ COMPLETE PR finalization verified

Summary

PR #34279 fixes a regression from PR #33281 where GetDesiredSize() width-narrowing for WordWrap labels causes text truncation when MaxLines is set. The fix uses a double-measurement strategy: when narrowing would apply to a label with explicit MaxLines, it re-measures at the candidate width and returns the original width if re-wrapping would exceed MaxLines.

Root Cause

PR #33281 added GetDesiredSize() override to return actual text width instead of full available width for non-Fill aligned wrapping labels. This narrowing causes re-wrapping at arrangement time, and when MaxLines is set, the additional lines are clipped.

Fix Quality

Excellent. The PR's approach is the most robust of all 6 candidates explored:

  • 3 simpler alternatives passed tests but have scope limitations (too narrow, too aggressive, or theoretical edge-case gaps)
  • 2 width-adjustment approaches failed (DIP↔pixel precision loss is fundamental)
  • The double-measurement approach guarantees correctness with negligible overhead (re-measure only when MaxLines is set AND width would narrow)
  • Well-commented code explains the rationale for each guard
  • Ellipsize == null entry guard avoids unnecessary work

PR Finalization

  • Title: ✅ Accurate — [Android] Fix Label with MaxLines truncating text in horizontal ScrollView
  • Description: ✅ Exemplary — includes root cause, fix strategy, regression provenance, tested platforms, screenshots
  • Tests: ✅ Adequate — UI test reproduces exact bug scenario with screenshot verification
  • Code quality: ✅ Good — well-structured, defensive, consistent with codebase patterns

Selected Fix: PR's fix

PR's double-measurement approach is preferred over simpler alternatives because it handles all edge cases at framework-handler level where correctness must be guaranteed.

Human Review

PureWeen (MAUI team member) approved this PR on 2026-03-04 after reviewing the implementation.


📋 Expand PR Finalization Review
Title: ✅ Good

Current: [Android] Fix Label with MaxLines truncating text in horizontal ScrollView

Description: ✅ Excellent

Description needs updates. See details below.

Code Review: ✅ Passed

Code Review — PR #34279

File: src/Core/src/Handlers/Label/LabelHandler.Android.cs


🟡 Medium: Re-measurement Leaves View in Modified State on Bail-out Path

Location: LabelHandler.Android.cs, lines 55–66

PlatformView.Measure(
    MeasureSpecMode.AtMost.MakeMeasureSpec(narrowedPx),
    MeasureSpecMode.Unspecified.MakeMeasureSpec(0));

var measuredLayout = PlatformView.Layout;

if (measuredLayout is null || measuredLayout.LineCount > PlatformView.MaxLines)
{
    return size; // Narrowing causes truncation (or unverifiable); return original size
}

Observation:
When the safety check determines that narrowing would exceed MaxLines, the code returns size (the original full width). However, at this point PlatformView.Measure() has already been called with narrowedPx. The TextView's internal layout state is now computed for the narrowed width, while we return a size indicating the view should be arranged at the full original width.

In practice this resolves itself: MAUI's layout pass will call Measure() again with the correct constraint before PlatformArrange. However, between GetDesiredSize returning and the next Measure() call, the view is in an inconsistent state (measured at narrowed width, but reported desired size is full width). This could theoretically cause issues if any code reads PlatformView.Layout in that window.

Recommendation:
This is low-risk in normal MAUI layout flows, but adding a re-measure back to the original constraint before returning would be defensive:

if (measuredLayout is null || measuredLayout.LineCount > PlatformView.MaxLines)
{
    // Restore measurement state to the original constraint before returning
    PlatformView.Measure(
        MeasureSpecMode.AtMost.MakeMeasureSpec((int)Context.ToPixels(size.Width)),
        MeasureSpecMode.Unspecified.MakeMeasureSpec(0));
    return size;
}

This is a non-blocking suggestion. The current behavior is acceptable in the typical MAUI layout flow.


🟡 Low: iOS Snapshot Files for an Android-only Test

Files:

  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelNotTruncatedWithMaxLines.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/LabelNotTruncatedWithMaxLines.png

Observation:
The Issue34120 HostApp page is decorated with PlatformAffected.Android, which indicates the bug only manifests on Android. However, the NUnit test (LabelNotTruncatedWithMaxLines) has no platform guard ([Category(UITestCategories.Label)] only), which means it runs on all platforms including iOS.

The iOS snapshot files capture a "correct" state on iOS (where the bug never existed), which is harmless. But it means the test CI gates iOS screenshots that don't test any real behavior — they will pass trivially on iOS but add snapshot maintenance overhead.

Recommendation (non-blocking):
If the test is Android-specific, consider whether a platform guard is appropriate. The existing pattern for Android-only tests is:

// In the NUnit test, add before the assertion:
// if (App.GetTestDevice() != TestDevice.Android)
//     Assert.Ignore("This fix is Android-specific.");

Alternatively, removing the iOS/mac snapshot files (and not running the test on those platforms) would reduce noise. The current state is acceptable.


✅ Looks Good

  • Ellipsize == null guard — Correct. When a TruncateAt strategy is active, the narrowing optimization is skipped entirely. This prevents interaction between two competing layout adjustments.

  • PlatformView.MaxLines != int.MaxValue sentinel — Correct. Android's default when MaxLines is not set is Integer.MAX_VALUE. Using int.MaxValue as the "no limit" sentinel matches Android internals.

  • measuredLayout is null fail-safe — Good defensive code. TextView.Layout can return null before a view has been laid out; the null guard prevents an NPE and correctly falls back to the safe (original) size.

  • MeasureSpecMode.AtMost for re-measure — Correct choice. AT_MOST mirrors the constraint passed during a normal layout pass within a ScrollView child, so the re-measurement accurately predicts actual wrapping behavior.

  • Outer PlatformView?.Layout is Layout layout null check — The existing pattern safely skips the optimization if the layout is null, and the new MaxLines safety check also null-checks PlatformView.Layout after the extra Measure(). Consistent and correct.

  • Test page structure — The Issue34120 HostApp reproduces the exact real-world scenario reported in the issue: a horizontal ScrollView containing a HorizontalStackLayout of Border cards with Image + Label(MaxLines=2). This is an accurate regression test.

  • No API surface change — The fix is entirely internal to GetDesiredSize. No public APIs changed. No PublicAPI.Unshipped.txt updates needed.


@kubaflo kubaflo added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 4, 2026
@Vignesh-SF3580
Copy link
Copy Markdown
Contributor Author

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review Sessionadded test images. · 17f6f15
Issue: #34120 - [.NET 10] N3_Navigation - Some monkey names are truncated. PR: #34279 - [Android] Fix Label with MaxLines truncating text in horizontal ScrollView Platforms Affected: Android (issue + PR label platform/android) Files Changed: 1 implementation file, 2 test files, 3 snapshot files

Issue Summary

PR Discussion Summary

  • PR comments: only automated dogfood comment.
  • Reviews: one bot review with tool error (no actionable technical feedback).
  • Inline code review comments: none.
  • Prior structured agent review comment: none detected.

Reviewer Disagreements / Open Threads

File:Line Reviewer Says Author Says Status
N/A No technical review disagreement recorded N/A ✅ NONE

Edge Cases to Check (from issue/PR context)

Changed File Classification

Fix files

  • src/Core/src/Handlers/Label/LabelHandler.Android.cs

Test files

  • src/Controls/tests/TestCases.HostApp/Issues/Issue34120.cs
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34120.cs
  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/LabelNotTruncatedWithMaxLines.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/LabelNotTruncatedWithMaxLines.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelNotTruncatedWithMaxLines.png

Test type: UI Tests (HostApp + Shared.Tests issue test)

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #34279 Android Label desired-size safety re-measure for explicit MaxLines before narrowing width ⏳ PENDING (Gate) LabelHandler.Android.cs, Issue34120 HostApp/Shared tests, snapshots Original PR
🚦 Gate — Test Verification
📝 Review Sessionadded test images. · 17f6f15
Result: ❌ FAILED (BLOCKED) Platform: android Mode: Full Verification

  • Retry policy followed: one retry attempted ✅
  • Attempt 1 blocker: fix-file auto-detection included non-existent file from unrelated branch noise
  • Attempt 2 blocker: Android test environment missing (ANDROID_HOME/ANDROID_SDK_ROOT not exported)
  • Tests FAIL without fix: observed, but blocked by infrastructure setup
  • Tests PASS with fix: not achieved (same infrastructure blocker)

Blocker Details

OpenQA.Selenium.UnknownErrorException: Android SDK environment not configured for local Appium/device test execution.

Gate Outcome

Gate could not be completed reliably on required platform (android) due to environment blocker after one retry. Per autonomous execution rules, Gate is marked failed/blocked and workflow proceeds with documented partial review.

🔧 Fix — Analysis & Comparison
📝 Review Sessionadded test images. · 17f6f15

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #34279 Android Label desired-size safety re-measure for explicit MaxLines before narrowing width ❌ NOT VERIFIED (Gate Blocked) src/Core/src/Handlers/Label/LabelHandler.Android.cs + Issue34120 tests/snapshots Gate blocked by missing Android SDK environment

Phase 3 Status

  • Round 1 (multi-model try-fix): SKIPPED
  • Cross-pollination loop: SKIPPED

Exhausted: No Selected Fix: PR's fix (provisional) - No competing alternatives were empirically testable because Gate did not pass and Android test environment blocker prevented reliable continuation.

Skip Reason

Post-gate phase requires Gate = ✅ PASSED. Gate remained blocked after one retry on required platform (android), so try-fix exploration was skipped per autonomous blocker policy.

📋 Report — Final Recommendation
📝 Review Sessionadded test images. · 17f6f15

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Context, issue, labels, files, discussion documented
Gate ❌ FAILED (BLOCKED) Required android full verification blocked by environment (ANDROID_HOME/ANDROID_SDK_ROOT missing) after one retry
Fix (try-fix) ⏭️ SKIPPED Gate prerequisite not met; skipped per autonomous blocker policy
Report ✅ COMPLETE PR finalization analysis completed

PR Finalization (Title/Description)

  • Title: Good and accurate — [Android] Fix Label with MaxLines truncating text in horizontal ScrollView

  • Description: High quality and consistent with diff.

    • Includes required NOTE block ✅
    • Clearly documents root cause, fix strategy, issue link, and tested platforms ✅
    • Matches implementation and test additions ✅

Code Review Findings

✅ Looks Good

  • Android handler change is scoped to LabelHandler.Android.cs and guarded with Ellipsize == null + MaxLines safety re-measure.
  • Regression test coverage added with Issue34120 HostApp page + Shared UI test.
  • PR explanation aligns with implementation intent and constraints.

🟡 Suggestions (non-blocking)

  • Consider adding a short inline comment clarifying why MeasureSpecMode.AtMost is used for the narrowed-width re-measurement (future maintainability).

Why REQUEST CHANGES

  • This recommendation is driven by verification incompleteness, not by a proven logic defect in the PR.
  • Gate requirement mandated android full verification via verify-tests-fail-without-fix; environment blocker prevented reliable PASS result.
  • Please rerun Gate in a properly configured Android environment (or CI path that can execute this script fully) and update with pass/fail evidence.

📋 Expand PR Finalization Review

Addressed the concerns raised in the AI summary by adding an inline comment to clarify the use of MeasureSpecMode.AtMost and updating the logic to fail safely when Layout is null, ensuring the width is narrowed only when it’s verified to be safe.

@kubaflo kubaflo added s/agent-suggestions-implemented Maintainer applies when PR author adopts agent's recommendation s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates labels Mar 4, 2026
@PureWeen PureWeen added s/agent-approved AI agent recommends approval - PR fix is correct and optimal and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels Mar 4, 2026
@PureWeen
Copy link
Copy Markdown
Member

PureWeen commented Mar 4, 2026

/azp run maui-pr-uitests, maui-pr-devicetests

PureWeen
PureWeen previously approved these changes Mar 4, 2026
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@kubaflo kubaflo added s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) and removed s/agent-gate-failed AI could not verify tests catch the bug labels Mar 5, 2026
@PureWeen
Copy link
Copy Markdown
Member

PureWeen commented Mar 5, 2026

/azp run maui-pr-uitests, maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen merged commit 538463e into dotnet:main Mar 5, 2026
157 of 161 checks passed
kubaflo pushed a commit that referenced this pull request Mar 28, 2026
…nd layout options (#34533)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, a Label with LineBreakMode="WordWrap" placed inside a
width-constrained layout may clip text on the right side instead of
wrapping correctly. This behavior occurs depending on the combination
of Flow

### Root Cause
PR #33281 introduced a GetDesiredSize() override in
LabelHandler.Android.cs to address issue #31782, where WordWrap labels
reported the full width constraint instead of the actual text width. The
fix narrowed the measured width by computing the longest wrapped line
and returning that value as the desired width.

However, narrowing the width without proper verification could cause
additional line wrapping, leading to text clipping or incorrect layout,
especially in RTL or bidirectional text scenarios.

Later, PR #34279 restricted this logic to run only when the MaxLines
property is explicitly set. As a result, when MaxLines is not defined,
the width-narrowing verification is skipped, which can again cause
incorrect wrapping and text clipping in certain alignment and layout
configurations.

### Description of Change
Improved the logic in LabelHandler.Android.cs so that when measuring a
Label's desired size, the code now always checks if narrowing the width
would cause the text to wrap into more lines than the original
measurement. This prevents truncation or clipping of text.

### Validated the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac

### Issues Fixed:
Fixes #34459 

### Screenshots
| Before  | After |
|---------|--------|
|  <img height=600 width=300
src="https://github.com/user-attachments/assets/44222872-0093-4a97-af81-49b0e1be4aab">
|  <img height=600 width=300
src="https://github.com/user-attachments/assets/27361bd2-8922-4b83-8d70-3d24b27fe9e1"> 
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-label Label, Span community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) s/agent-suggestions-implemented Maintainer applies when PR author adopts agent's recommendation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[.NET 10] N3_Navigation - Some monkey names are truncated.

6 participants