Skip to content

[Android] Fix improper rendering of ThumbimageSource in Slider#34064

Merged
jfversluis merged 22 commits intodotnet:inflight/currentfrom
NirmalKumarYuvaraj:fix-13258
Mar 5, 2026
Merged

[Android] Fix improper rendering of ThumbimageSource in Slider#34064
jfversluis merged 22 commits intodotnet:inflight/currentfrom
NirmalKumarYuvaraj:fix-13258

Conversation

@NirmalKumarYuvaraj
Copy link
Copy Markdown
Contributor

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Feb 16, 2026

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

On Android, when a custom ThumbImageSource is set on a Slider, the image drawable is applied to the SeekBar at its native size. Because images are typically larger than the expected thumb diameter (20dp per Material Design spec), the thumb appears oversized.

Description of Change

Android only — this PR adds image scaling before applying custom thumb drawables to SeekBar.

Key changes in src/Core/src/Platform/Android/SliderExtensions.cs:

  • UpdateThumbImageSourceAsync: Refactored to call two new helpers (SetThumbDrawable / SetDefaultThumb) instead of inlining the logic.
  • SetThumbDrawable: New method that scales the provided drawable to 20dp × 20dp (Material Design thumb size) by rendering it to a fixed-size Bitmap then wrapping in a BitmapDrawable before calling SeekBar.SetThumb().
  • SetDefaultThumb: New method that restores the platform default thumb drawable (abc_seekbar_thumb_material) and re-applies the theme accent color or custom ThumbColor. Also adds a ResolveAttribute return-value check (previously the result was ignored).
  • Null checks: Updated != null patterns to is not null for consistency.

Note: iOS and MacCatalyst scaling is tracked separately in PR #34184.

Issues Fixed

Fixes #13258

Platforms Tested

Previously closed PR - #27472

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 16, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review February 16, 2026 07:44
Copilot AI review requested due to automatic review settings February 16, 2026 07:44
@sheiksyedm sheiksyedm added this to the .NET 10 SR5 milestone Feb 16, 2026
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.

Pull request overview

This PR updates MAUI Slider thumb image handling to avoid oversized custom thumb images (primarily on Android, and also iOS/macOS), and adds an Issue test case + updated snapshot baselines to validate the visual behavior.

Changes:

  • Android: scale custom thumb drawables to a target dp size before applying to SeekBar.
  • iOS: resize custom thumb images to match the platform default thumb size derived from UISlider geometry.
  • Tests: add Issue13258 UI test page + UITest, and update/add snapshot baselines impacted by the change.

Reviewed changes

Copilot reviewed 4 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Core/src/Platform/Android/SliderExtensions.cs Adds thumb scaling logic and refactors default-thumb restoration/tint behavior.
src/Core/src/Platform/iOS/SliderExtensions.cs Resizes thumb images to the slider’s default thumb size; minor null-check refactors.
src/Controls/tests/TestCases.HostApp/Issues/Issue13258.cs New HostApp reproduction page for thumb image sizing + runtime changes.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13258.cs New screenshot-based UITest for Issue13258.
src/Controls/tests/TestCases.Android.Tests/snapshots/android/SliderShouldChangeThumbImageAndResetIt.png Updated/added Android snapshot baseline impacted by thumb sizing changes.
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/SliderShouldChangeThumbImageAndResetIt.png Updated/added iOS snapshot baseline impacted by thumb sizing changes.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/SliderThumbImageShouldBeScaled.png Adds Mac snapshot baseline for the new Issue13258 test method.
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/SliderShouldChangeThumbImageAndResetIt.png Updated/added Mac snapshot baseline impacted by thumb sizing changes.

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman changed the title Fixed improper rendering of ThumbimageSource in Slider [iOS & Android] Fixed improper rendering of ThumbimageSource in Slider Feb 18, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Feb 21, 2026

Could you please split this PR into 2 separate ones - iOS and Android?

@NirmalKumarYuvaraj NirmalKumarYuvaraj changed the title [iOS & Android] Fixed improper rendering of ThumbimageSource in Slider [Android] Fix improper rendering of ThumbimageSource in Slider Feb 23, 2026
@NirmalKumarYuvaraj
Copy link
Copy Markdown
Contributor Author

Could you please split this PR into 2 separate ones - iOS and Android?

@kubaflo , Created a new PR for iOS - #34184

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Mar 3, 2026

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review SessionAdded missed images · 5e55ae4

Issue: #13258 - [Slider] MAUI Slider thumb image is big on android
PR: #34064 - [Android] Fix improper rendering of ThumbimageSource in Slider
Author: NirmalKumarYuvaraj (Syncfusion partner)
Platforms Affected: Android (PR was iOS changes moved to PR #34184)split
Files Changed: 5 files (2 fix, 3 test)

Issue Summary

The Slider ThumbImageSource renders with an oversized thumb on Android when a custom image is set. The image is applied at its original size instead of being scaled to match the Material Design guideline (20dp diameter).

Key Findings from Discussion

Disagreements / Edge Cases

Topic Detail
PR title now says [Android] but description still mentions iOS Description not updated after split

Files Changed

Fix files:

  • src/Core/src/Platform/Android/SliderExtensions.cs (+69/- Android thumb image scaling logic18)

Test files:

  • src/Controls/tests/TestCases.HostApp/Issues/Issue13258.cs (+ New test page (Android-only)51)
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13258.cs (+ New UI test (Android-only via #if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST)25)
  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/SliderThumbImageShouldBeScaled. New snapshotpng
  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/SliderShouldChangeThumbImageAndResetIt. Updated snapshot (existing Issue25939 test, now reflects properly-sized thumb)png

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34064 Scale custom thumb to 20dp (Material 2) via Bitmap canvas PENDING (Gate) SliderExtensions.cs (+69) Original Android-only PR drawing

Code Review Notes (Preliminary)

  • using System; added but may be unused
  • Double blank line in SetThumbDrawable method
  • ReferenceEquals(seekBar.Thumb, thumbDrawable) optimization check is valid but may never be true since a new BitmapDrawable is created on each call
  • Test only verifies state AFTER button click, not initial state
  • Missing newline at end of both new test files

🚦 Gate — Test Verification
📝 Review SessionAdded missed images · 5e55ae4

** BLOCKED (Environment)Result:**
Platform: android ( test is Android-only via #if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST)required
Mode: Full Verification attempted

Status

  • Android SDK (adb) is not available on this host
  • Test Issue13258.SliderThumbImageShouldBeScaled only runs on iOS/MacCatalyst/Windows are excluded by conditional compilationAndroid
  • Could not run verify-tests-fail-without-fix script

Notes

Gate skipped due to environment blocker (no Android emulator/SDK). Proceeding to Report with code analysis only.


📋 Report — Final Recommendation
📝 Review SessionAdded missed images · 5e55ae4

Final Recommendation: REQUEST CHANGES##

Summary

PR #34064 fixes the oversized slider thumb image on Android by scaling custom ThumbImageSource images to 20dp (Material Design 2 guideline). The core approach is sound, but there are code quality issues and a potential bug that should be addressed before merge.

Note: Gate verification was Android SDK (adb) is unavailable on this host. Code review analysis was performed instead.skipped


Root Cause

When a custom ThumbImageSource is set on a MAUI Slider, Android's SeekBar.SetThumb() receives the raw drawable at its natural size (which can be much larger than the 20dp default thumb). The PR fixes this by rendering the custom drawable into a 20dp 20dp bitmap before applying it as the thumb.


Fix Quality

What the PR does well:

  • Correctly targets the 20dp Material Design 2 size
  • Properly handles the null-image reset path (restores default thumb with color)
  • Adds an IsAlive() check before setting the thumb (avoids crash after view disposal)
  • Improves null checks to use is not null pattern
  • Correctly checks ResolveAttribute return value before using the color (regression fix)

Issues requiring attention:

thumbDrawable.SetBounds() Mutates the Source Drawable1.

thumbDrawable.SetBounds(0, 0, thumbSize, thumbSize);
thumbDrawable.Draw(canvas);

This permanently modifies the bounds of the drawable returned from the image source service. If the service caches this drawable (which MAUI's image services often do), subsequent calls or other consumers of the same drawable will see incorrect bounds.

Fix: Save and restore original bounds, or use Drawable.mutate() to get a copy before modifying:

var originalDrawable = thumbDrawable.Mutate();  // returns a mutable copy
originalDrawable.SetBounds(0, 0, thumbSize, thumbSize);
originalDrawable.Draw(canvas);

ReferenceEquals Optimization is Dead Code2.

if (ReferenceEquals(seekBar.Thumb, thumbDrawable))
    return;

seekBar.Thumb creates a new C# managed peer wrapping the Java object each time it's accessed. thumbDrawable is also a different C# peer. ReferenceEquals always returns false for the early return never executes. Either remove this check or use a meaningful comparison.these

using System; was added but is unused in the file. Remove it.#### 3.

if (thumbSize <= 0)
{
    return;
}


using (Bitmap bitmap = ...

Two blank lines after the early should be one.return

Both src/Controls/tests/TestCases.HostApp/Issues/Issue13258.cs and src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13258.cs are missing a newline at the end of the file.#### 5.

The PR description still describes iOS changes (scaling via UISlider track/thumb rects), but the iOS changes were moved to PR #34184. The description should be updated to accurately reflect that this is Android-only.#### 6.


Test Assessment

  • The test SliderThumbImageShouldBeScaled only verifies state after the button is tapped (which sets coffee.png and clears shopping_cart.png)
  • It doesn't directly verify that the initial avatar.png thumb (the primary bug scenario) is properly scaled
  • The test does usefully verify the runtime change flow
  • The existing SliderShouldChangeThumbImageAndResetIt snapshot (Issue25939) is correctly updated

Platform Notes


📋 Expand PR Finalization Review
Title: ✅ Good

Current: [Android] Fix improper rendering of ThumbimageSource in Slider

Description: ⚠️ Needs Update

Description needs updates. See details below.

✨ Suggested PR Description

[!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

On Android, when a custom ThumbImageSource is set on a Slider, the image drawable is applied to the SeekBar at its native size. Because images are typically larger than the expected thumb diameter (20dp per Material Design spec), the thumb appears oversized.

Description of Change

Android only — this PR adds image scaling before applying custom thumb drawables to SeekBar.

Key changes in src/Core/src/Platform/Android/SliderExtensions.cs:

  • UpdateThumbImageSourceAsync: Refactored to call two new helpers (SetThumbDrawable / SetDefaultThumb) instead of inlining the logic.
  • SetThumbDrawable: New method that scales the provided drawable to 20dp × 20dp (Material Design thumb size) by rendering it to a fixed-size Bitmap then wrapping in a BitmapDrawable before calling SeekBar.SetThumb().
  • SetDefaultThumb: New method that restores the platform default thumb drawable (abc_seekbar_thumb_material) and re-applies the theme accent color or custom ThumbColor. Also adds a ResolveAttribute return-value check (previously the result was ignored).
  • Null checks: Updated != null patterns to is not null for consistency.

Note: iOS and MacCatalyst scaling is tracked separately in PR #34184.

Issues Fixed

Fixes #13258

Platforms Tested

Code Review: ⚠️ Issues Found

Code Review — PR #34064

🔴 Critical Issues

1. ReferenceEquals optimization is non-functional

File: src/Core/src/Platform/Android/SliderExtensions.cs
Method: SetThumbDrawable

// Check if we're setting the same drawable to avoid unnecessary work
if (ReferenceEquals(seekBar.Thumb, thumbDrawable))
{
    return;
}

Problem: In .NET for Android, seekBar.Thumb creates a new managed wrapper object each call, even when it wraps the same underlying Java object. ReferenceEquals compares C# object identity, not Java object identity. This means the check will always return false, so the early-return optimization never fires.

Recommendation: Compare Java handles instead:

if (seekBar.Thumb?.Handle == thumbDrawable.Handle)
{
    return;
}

Or simply remove the optimization if it's not worth the complexity — the bitmap-draw path only runs when the image source changes, which is not a hot path.


🟡 Suggestions

2. TARGET_SIZE naming violates C# conventions

File: src/Core/src/Platform/Android/SliderExtensions.cs

const int TARGET_SIZE = 20; // 10 radius * 2

C# uses PascalCase for constants (TargetSize or ThumbTargetSizeDp), not SCREAMING_SNAKE_CASE (which is a Java/C convention). The comment is also slightly misleading — Material Design's thumb radius is 10dp, so the diameter is 20dp. Suggested alternative:

// Thumb diameter per Material Design spec: https://m2.material.io/components/sliders
const int ThumbDiameterDp = 20;

3. Double blank line in SetThumbDrawable

File: src/Core/src/Platform/Android/SliderExtensions.cs

There is an extra blank line between the if (thumbSize <= 0) guard and the using block:

        if (thumbSize <= 0)
        {
            return;
        }


        using (Bitmap bitmap = ...)  // <-- extra blank line above

Should be a single blank line.

4. Missing newline at end of files

The diff shows \ No newline at end of file for:

  • src/Controls/tests/TestCases.HostApp/Issues/Issue13258.cs
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13258.cs
  • src/Core/src/Platform/Android/SliderExtensions.cs

All three new/modified files are missing the trailing newline. Most editors and tools expect files to end with \n.

5. Test only covers the post-button-tap state

File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13258.cs

The single test method SliderThumbImageShouldBeScaled taps the "Change Thumb Image" button and then calls VerifyScreenshot(). This validates the runtime-change scenario (slider2 gets coffee.png, slider3 gets null). However:

  • There is no test for the initial state (slider1 with avatar.png, slider2 without image, slider3 with shopping_cart.png). This is the primary regression the issue reported.
  • The snapshot file SliderThumbImageShouldBeScaled.png appears to cover the post-tap state. The initial-state regression (oversized thumb before any interaction) is not directly covered.

Consider adding a SliderThumbImageInitialStateShouldBeScaled test that calls VerifyScreenshot() before tapping the button.


✅ Looks Good

  • Refactoring UpdateThumbImageSourceAsync into SetThumbDrawable + SetDefaultThumb helpers improves readability and reduces duplication.
  • SetDefaultThumb adds a previously-missing check on ResolveAttribute's return value before using value.Data — good correctness improvement.
  • The 20dp target size is well-justified with a link to the Material Design spec and the material-components-android source for the dimension value.
  • using blocks for Bitmap and Canvas ensure proper native resource cleanup.
  • Test infrastructure is correctly scoped: PlatformAffected.Android in the host app and TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST in the shared test file.

@kubaflo kubaflo added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 3, 2026
@PureWeen PureWeen modified the milestones: .NET 10 SR5, .NET 10 SR6 Mar 3, 2026
PureWeen and others added 7 commits March 4, 2026 08:56
…#34317)

<!-- 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!

### Description of Change

Add `darc-*` to the `trigger: branches: include:` section in
`ci-uitests.yml` and `ci-device-tests.yml` so that `maui-pr-uitests` and
`maui-pr-devicetests` automatically run when dotnet-maestro pushes
dependency updates to `darc-*` branches.

Previously, these pipelines required manual `/azp run` comments on every
maestro PR.

### Issues Fixed

N/A - CI improvement

### Files Changed

- `eng/pipelines/ci-uitests.yml` - Added `darc-*` to CI trigger branch
filter
- `eng/pipelines/ci-device-tests.yml` - Added `darc-*` to CI trigger
branch filter

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 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 -- 34064

Or

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

@NirmalKumarYuvaraj
Copy link
Copy Markdown
Contributor Author

@kubaflo , Addressed AI review summary. Please let me know , if you have any concerns

@kubaflo kubaflo added the s/agent-suggestions-implemented Maintainer applies when PR author adopts agent's recommendation label Mar 5, 2026
@jfversluis jfversluis changed the base branch from main to inflight/current March 5, 2026 15:08
@jfversluis jfversluis merged commit 0752729 into dotnet:inflight/current Mar 5, 2026
29 checks passed
PureWeen added a commit that referenced this pull request Mar 11, 2026
<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
#34184.

### Issues Fixed

Fixes #13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR #34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - #27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Mar 11, 2026
<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
#34184.

### Issues Fixed

Fixes #13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR #34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - #27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen mentioned this pull request Mar 17, 2026
PureWeen added a commit that referenced this pull request Mar 19, 2026
<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
#34184.

### Issues Fixed

Fixes #13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR #34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - #27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jfversluis pushed a commit that referenced this pull request Mar 20, 2026
### Root Cause of the issue



- The failing test: `SetVisibility(Visibility.Collapsed)` device test on
iOS.

  Why it fails: PR #28983's fix maps Visibility → MapIsRunning in
  ActivityIndicatorHandler, which bypasses the standard
ViewExtensions.UpdateVisibility path. The standard path calls Collapse()
to
add a CollapseConstraint (an NSLayoutConstraint that zeros the view's
size).
The PR's UpdateIsRunning only sets Hidden = true — it never calls
Collapse()
- Crash in the FeatureMatrix Navigation Page Scenario in the iOS 26
PR #34326 added an else block in UpdateBarTextColor() that explicitly
sets BackButtonAppearance = null, BackIndicatorImage = null, and
BackIndicatorTransitionMaskImage = null on the navigation bar when no
custom color is applied. On iOS versions before 26, assigning null to
these properties was treated as "use system defaults." On iOS 26, the
Liquid Glass rendering pipeline reads these properties during push/pop
navigation transitions and throws an exception when it encounters an
explicit null — it expects either an unset property or a valid object.
Since useCustomColor is false by default (no IconColor set), this
crashes on every standard page navigation.
- Setting ThumbTintList = null in the else block removes the tint
entirely, causing the thumb to appear white instead of the default blue,
because SwitchCompat does not re-resolve its theme colors once the tint
list is cleared.
- SetAdjustViewBounds(false) was being applied to all images regardless
of their Aspect value. When this property is false, Android’s ImageView
does not resize itself based on the image’s intrinsic aspect ratio and
instead expands to fill the available space. As a result, an Image
control with the default AspectFit setting ignored its height constraint
and overflowed its container, causing the image to appear taller than
expected in the screenshot test.(LoadAndVerifyGif, ThemeRelated feature
tests)
- PR #29144 changed the group-detection guard in ObservableGroupedSource
(iOS and Android) from is IEnumerable to is ICollection to prevent
strings (which implement IEnumerable<char>) from being treated as
groups.
While the intent was correct, the change was too broad. Custom group
types that implement only IEnumerable<T> were also excluded. As a
result, _groupCount became zero on iOS and _groups remained empty on
Android, causing grouped CollectionView rendering failures and
IndexOutOfRangeException during Add/Remove operations.
- StepperHandler.iOS.cs compiles for both iOS and Mac Catalyst. On Mac
Catalyst / macOS 26, OperatingSystem.IsIOS() and IsIOSVersionAtLeast(26)
both return true, and the screen is always landscape. As a result, the
20pt glass pill compensation was incorrectly applied, inflating
GetDesiredSize(1,1) to width = 21. (Native View Bounding Box is not
empty - device Test failures)
- In PR #33428, the WindowInsetsCompat.Builder block in
MauiWindowInsetListener.ApplyDefaultWindowInsets was simplified to
return insets; to standardize inset handling. This change was unrelated
to the actual fix for #33344, which only required passing the bottom
inset through as unconsumed.
As part of that refactor, top inset consumption was also removed,
changing the prior contract where the top inset was consumed when
appBarHasContent = true. While normal safe-area scenarios worked
correctly, transient layout states (e.g., temporary Height = 0 during
keyboard dismissal, rotation, animation, or dynamic item generation)
triggered a second inset dispatch. In those moments, the top inset
satisfied the overlap condition and was applied to content before
SafeAreaExtensions could normalize it, causing test failures. Bottom
insets did not regress because their overlap condition cannot be met in
the same transient state. (EntryScrollTest,
HorizontalStackLayout_Spacing_WithLandscape,
VerticalStackLayout_Spacing_WithLandscape and so on failures)

### Description of Change



- Handles the three Visibility cases the same way as
ViewExtensions.UpdateVisibility:

`Visible`: Calls Inflate() (restores layout size) and sets Hidden =
false — identical to UpdateVisibility. Additionally starts/stops the
animation based on IsRunning.
`Hidden`: Calls Inflate() (preserves layout space) and sets Hidden =
true — identical to UpdateVisibility. The indicator keeps its layout
footprint but is invisible.
`Collapsed`: Sets Hidden = true and calls Collapse() (zeros out layout
size via constraints) — identical to UpdateVisibility. The indicator is
both invisible and takes up no space.
- Removed the else block entirely. When no custom color is applied,
these properties should remain untouched. The system defaults work
correctly on their own — there is no need to explicitly reset them to
null
- Removed the else block from UpdateThumbColor in SwitchExtensions.cs.
The default thumb color is managed by SwitchCompat internally from the
Material theme, so no explicit reset is needed.
- Restored the correct logic in ImageViewExtensions.UpdateAspect to call
SetAdjustViewBounds based on the image’s Aspect value:
- The guard has been updated from is ICollection to is IEnumerable &&
not string in the ObservableGroupedSource implementations for both iOS
and Android (GroupsCount(), UpdateGroupTracking(), Add(), Remove()).
This change specifically excludes string while allowing legitimate
custom group types that implement only IEnumerable<T>. The fix restores
the behavior for Issue22320 while keeping all Issue29141 scenarios
working correctly.
-Added !OperatingSystem.IsMacCatalyst() to the guard condition in
GetDesiredSize, restricting the 20pt compensation to real iOS 26+ only —
as intended in the original PR comment.
- Restored the original behavior by consuming the top inset when
appBarHasContent = true, while continuing to pass the bottom inset
through unconsumed (the only change required for #33344). This retains
the Android edge-to-edge fix and restores deterministic safe-area
handling.

### Testing related description of change
EditorNoOverlapAfterRotateToLandscape,
EditorNoOverlapAfterRotateToPortrait,
EntryFocusedShouldNotCauseGapAfterRotation Added cropLeft to remove the
navbar on Android and re-saved the image due to entry text changes in
this commit –
8d17a6d,
91047fb.

DrawStringShouldDrawText – The automation ID set to GraphicsView was not
found by Appium on the Windows platform, so a test condition was added
for Windows to take the image directly instead of waiting for the
GraphicsView.

Added the base images for iOS 26 and Mac that were not added previously.

Re-saved the images that failed due to the wrong iOS version image being
added in the PR.

Re-saved the test images that failed due to this fix PR:
#31254 — e.g.,
GraphicsViewFeatureTests and others.
 
Resaved the slider-related test images due to this fix PR —
#34064.

### Issues Fixed




Fixes #34437 



### Tested the behaviour in the following platforms



- [x] iOS
- [x] Mac

---------

Co-authored-by: SyedAbdulAzeem <syedabdulazeem.a@syncfusion.com>
Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
github-actions bot added a commit that referenced this pull request Mar 20, 2026
<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
#34184.

### Issues Fixed

Fixes #13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR #34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - #27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Mar 20, 2026
### Root Cause of the issue



- The failing test: `SetVisibility(Visibility.Collapsed)` device test on
iOS.

  Why it fails: PR #28983's fix maps Visibility → MapIsRunning in
  ActivityIndicatorHandler, which bypasses the standard
ViewExtensions.UpdateVisibility path. The standard path calls Collapse()
to
add a CollapseConstraint (an NSLayoutConstraint that zeros the view's
size).
The PR's UpdateIsRunning only sets Hidden = true — it never calls
Collapse()
- Crash in the FeatureMatrix Navigation Page Scenario in the iOS 26
PR #34326 added an else block in UpdateBarTextColor() that explicitly
sets BackButtonAppearance = null, BackIndicatorImage = null, and
BackIndicatorTransitionMaskImage = null on the navigation bar when no
custom color is applied. On iOS versions before 26, assigning null to
these properties was treated as "use system defaults." On iOS 26, the
Liquid Glass rendering pipeline reads these properties during push/pop
navigation transitions and throws an exception when it encounters an
explicit null — it expects either an unset property or a valid object.
Since useCustomColor is false by default (no IconColor set), this
crashes on every standard page navigation.
- Setting ThumbTintList = null in the else block removes the tint
entirely, causing the thumb to appear white instead of the default blue,
because SwitchCompat does not re-resolve its theme colors once the tint
list is cleared.
- SetAdjustViewBounds(false) was being applied to all images regardless
of their Aspect value. When this property is false, Android’s ImageView
does not resize itself based on the image’s intrinsic aspect ratio and
instead expands to fill the available space. As a result, an Image
control with the default AspectFit setting ignored its height constraint
and overflowed its container, causing the image to appear taller than
expected in the screenshot test.(LoadAndVerifyGif, ThemeRelated feature
tests)
- PR #29144 changed the group-detection guard in ObservableGroupedSource
(iOS and Android) from is IEnumerable to is ICollection to prevent
strings (which implement IEnumerable<char>) from being treated as
groups.
While the intent was correct, the change was too broad. Custom group
types that implement only IEnumerable<T> were also excluded. As a
result, _groupCount became zero on iOS and _groups remained empty on
Android, causing grouped CollectionView rendering failures and
IndexOutOfRangeException during Add/Remove operations.
- StepperHandler.iOS.cs compiles for both iOS and Mac Catalyst. On Mac
Catalyst / macOS 26, OperatingSystem.IsIOS() and IsIOSVersionAtLeast(26)
both return true, and the screen is always landscape. As a result, the
20pt glass pill compensation was incorrectly applied, inflating
GetDesiredSize(1,1) to width = 21. (Native View Bounding Box is not
empty - device Test failures)
- In PR #33428, the WindowInsetsCompat.Builder block in
MauiWindowInsetListener.ApplyDefaultWindowInsets was simplified to
return insets; to standardize inset handling. This change was unrelated
to the actual fix for #33344, which only required passing the bottom
inset through as unconsumed.
As part of that refactor, top inset consumption was also removed,
changing the prior contract where the top inset was consumed when
appBarHasContent = true. While normal safe-area scenarios worked
correctly, transient layout states (e.g., temporary Height = 0 during
keyboard dismissal, rotation, animation, or dynamic item generation)
triggered a second inset dispatch. In those moments, the top inset
satisfied the overlap condition and was applied to content before
SafeAreaExtensions could normalize it, causing test failures. Bottom
insets did not regress because their overlap condition cannot be met in
the same transient state. (EntryScrollTest,
HorizontalStackLayout_Spacing_WithLandscape,
VerticalStackLayout_Spacing_WithLandscape and so on failures)

### Description of Change



- Handles the three Visibility cases the same way as
ViewExtensions.UpdateVisibility:

`Visible`: Calls Inflate() (restores layout size) and sets Hidden =
false — identical to UpdateVisibility. Additionally starts/stops the
animation based on IsRunning.
`Hidden`: Calls Inflate() (preserves layout space) and sets Hidden =
true — identical to UpdateVisibility. The indicator keeps its layout
footprint but is invisible.
`Collapsed`: Sets Hidden = true and calls Collapse() (zeros out layout
size via constraints) — identical to UpdateVisibility. The indicator is
both invisible and takes up no space.
- Removed the else block entirely. When no custom color is applied,
these properties should remain untouched. The system defaults work
correctly on their own — there is no need to explicitly reset them to
null
- Removed the else block from UpdateThumbColor in SwitchExtensions.cs.
The default thumb color is managed by SwitchCompat internally from the
Material theme, so no explicit reset is needed.
- Restored the correct logic in ImageViewExtensions.UpdateAspect to call
SetAdjustViewBounds based on the image’s Aspect value:
- The guard has been updated from is ICollection to is IEnumerable &&
not string in the ObservableGroupedSource implementations for both iOS
and Android (GroupsCount(), UpdateGroupTracking(), Add(), Remove()).
This change specifically excludes string while allowing legitimate
custom group types that implement only IEnumerable<T>. The fix restores
the behavior for Issue22320 while keeping all Issue29141 scenarios
working correctly.
-Added !OperatingSystem.IsMacCatalyst() to the guard condition in
GetDesiredSize, restricting the 20pt compensation to real iOS 26+ only —
as intended in the original PR comment.
- Restored the original behavior by consuming the top inset when
appBarHasContent = true, while continuing to pass the bottom inset
through unconsumed (the only change required for #33344). This retains
the Android edge-to-edge fix and restores deterministic safe-area
handling.

### Testing related description of change
EditorNoOverlapAfterRotateToLandscape,
EditorNoOverlapAfterRotateToPortrait,
EntryFocusedShouldNotCauseGapAfterRotation Added cropLeft to remove the
navbar on Android and re-saved the image due to entry text changes in
this commit –
8d17a6d,
91047fb.

DrawStringShouldDrawText – The automation ID set to GraphicsView was not
found by Appium on the Windows platform, so a test condition was added
for Windows to take the image directly instead of waiting for the
GraphicsView.

Added the base images for iOS 26 and Mac that were not added previously.

Re-saved the images that failed due to the wrong iOS version image being
added in the PR.

Re-saved the test images that failed due to this fix PR:
#31254 — e.g.,
GraphicsViewFeatureTests and others.
 
Resaved the slider-related test images due to this fix PR —
#34064.

### Issues Fixed




Fixes #34437 



### Tested the behaviour in the following platforms



- [x] iOS
- [x] Mac

---------

Co-authored-by: SyedAbdulAzeem <syedabdulazeem.a@syncfusion.com>
Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
github-actions bot added a commit that referenced this pull request Mar 22, 2026
<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
#34184.

### Issues Fixed

Fixes #13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR #34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - #27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
### Root Cause of the issue



- The failing test: `SetVisibility(Visibility.Collapsed)` device test on
iOS.

  Why it fails: PR #28983's fix maps Visibility → MapIsRunning in
  ActivityIndicatorHandler, which bypasses the standard
ViewExtensions.UpdateVisibility path. The standard path calls Collapse()
to
add a CollapseConstraint (an NSLayoutConstraint that zeros the view's
size).
The PR's UpdateIsRunning only sets Hidden = true — it never calls
Collapse()
- Crash in the FeatureMatrix Navigation Page Scenario in the iOS 26
PR #34326 added an else block in UpdateBarTextColor() that explicitly
sets BackButtonAppearance = null, BackIndicatorImage = null, and
BackIndicatorTransitionMaskImage = null on the navigation bar when no
custom color is applied. On iOS versions before 26, assigning null to
these properties was treated as "use system defaults." On iOS 26, the
Liquid Glass rendering pipeline reads these properties during push/pop
navigation transitions and throws an exception when it encounters an
explicit null — it expects either an unset property or a valid object.
Since useCustomColor is false by default (no IconColor set), this
crashes on every standard page navigation.
- Setting ThumbTintList = null in the else block removes the tint
entirely, causing the thumb to appear white instead of the default blue,
because SwitchCompat does not re-resolve its theme colors once the tint
list is cleared.
- SetAdjustViewBounds(false) was being applied to all images regardless
of their Aspect value. When this property is false, Android’s ImageView
does not resize itself based on the image’s intrinsic aspect ratio and
instead expands to fill the available space. As a result, an Image
control with the default AspectFit setting ignored its height constraint
and overflowed its container, causing the image to appear taller than
expected in the screenshot test.(LoadAndVerifyGif, ThemeRelated feature
tests)
- PR #29144 changed the group-detection guard in ObservableGroupedSource
(iOS and Android) from is IEnumerable to is ICollection to prevent
strings (which implement IEnumerable<char>) from being treated as
groups.
While the intent was correct, the change was too broad. Custom group
types that implement only IEnumerable<T> were also excluded. As a
result, _groupCount became zero on iOS and _groups remained empty on
Android, causing grouped CollectionView rendering failures and
IndexOutOfRangeException during Add/Remove operations.
- StepperHandler.iOS.cs compiles for both iOS and Mac Catalyst. On Mac
Catalyst / macOS 26, OperatingSystem.IsIOS() and IsIOSVersionAtLeast(26)
both return true, and the screen is always landscape. As a result, the
20pt glass pill compensation was incorrectly applied, inflating
GetDesiredSize(1,1) to width = 21. (Native View Bounding Box is not
empty - device Test failures)
- In PR #33428, the WindowInsetsCompat.Builder block in
MauiWindowInsetListener.ApplyDefaultWindowInsets was simplified to
return insets; to standardize inset handling. This change was unrelated
to the actual fix for #33344, which only required passing the bottom
inset through as unconsumed.
As part of that refactor, top inset consumption was also removed,
changing the prior contract where the top inset was consumed when
appBarHasContent = true. While normal safe-area scenarios worked
correctly, transient layout states (e.g., temporary Height = 0 during
keyboard dismissal, rotation, animation, or dynamic item generation)
triggered a second inset dispatch. In those moments, the top inset
satisfied the overlap condition and was applied to content before
SafeAreaExtensions could normalize it, causing test failures. Bottom
insets did not regress because their overlap condition cannot be met in
the same transient state. (EntryScrollTest,
HorizontalStackLayout_Spacing_WithLandscape,
VerticalStackLayout_Spacing_WithLandscape and so on failures)

### Description of Change



- Handles the three Visibility cases the same way as
ViewExtensions.UpdateVisibility:

`Visible`: Calls Inflate() (restores layout size) and sets Hidden =
false — identical to UpdateVisibility. Additionally starts/stops the
animation based on IsRunning.
`Hidden`: Calls Inflate() (preserves layout space) and sets Hidden =
true — identical to UpdateVisibility. The indicator keeps its layout
footprint but is invisible.
`Collapsed`: Sets Hidden = true and calls Collapse() (zeros out layout
size via constraints) — identical to UpdateVisibility. The indicator is
both invisible and takes up no space.
- Removed the else block entirely. When no custom color is applied,
these properties should remain untouched. The system defaults work
correctly on their own — there is no need to explicitly reset them to
null
- Removed the else block from UpdateThumbColor in SwitchExtensions.cs.
The default thumb color is managed by SwitchCompat internally from the
Material theme, so no explicit reset is needed.
- Restored the correct logic in ImageViewExtensions.UpdateAspect to call
SetAdjustViewBounds based on the image’s Aspect value:
- The guard has been updated from is ICollection to is IEnumerable &&
not string in the ObservableGroupedSource implementations for both iOS
and Android (GroupsCount(), UpdateGroupTracking(), Add(), Remove()).
This change specifically excludes string while allowing legitimate
custom group types that implement only IEnumerable<T>. The fix restores
the behavior for Issue22320 while keeping all Issue29141 scenarios
working correctly.
-Added !OperatingSystem.IsMacCatalyst() to the guard condition in
GetDesiredSize, restricting the 20pt compensation to real iOS 26+ only —
as intended in the original PR comment.
- Restored the original behavior by consuming the top inset when
appBarHasContent = true, while continuing to pass the bottom inset
through unconsumed (the only change required for #33344). This retains
the Android edge-to-edge fix and restores deterministic safe-area
handling.

### Testing related description of change
EditorNoOverlapAfterRotateToLandscape,
EditorNoOverlapAfterRotateToPortrait,
EntryFocusedShouldNotCauseGapAfterRotation Added cropLeft to remove the
navbar on Android and re-saved the image due to entry text changes in
this commit –
8d17a6d,
91047fb.

DrawStringShouldDrawText – The automation ID set to GraphicsView was not
found by Appium on the Windows platform, so a test condition was added
for Windows to take the image directly instead of waiting for the
GraphicsView.

Added the base images for iOS 26 and Mac that were not added previously.

Re-saved the images that failed due to the wrong iOS version image being
added in the PR.

Re-saved the test images that failed due to this fix PR:
#31254 — e.g.,
GraphicsViewFeatureTests and others.
 
Resaved the slider-related test images due to this fix PR —
#34064.

### Issues Fixed




Fixes #34437 



### Tested the behaviour in the following platforms



- [x] iOS
- [x] Mac

---------

Co-authored-by: SyedAbdulAzeem <syedabdulazeem.a@syncfusion.com>
Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Mar 23, 2026
- The failing test: `SetVisibility(Visibility.Collapsed)` device test on
iOS.

  Why it fails: PR dotnet#28983's fix maps Visibility → MapIsRunning in
  ActivityIndicatorHandler, which bypasses the standard
ViewExtensions.UpdateVisibility path. The standard path calls Collapse()
to
add a CollapseConstraint (an NSLayoutConstraint that zeros the view's
size).
The PR's UpdateIsRunning only sets Hidden = true — it never calls
Collapse()
- Crash in the FeatureMatrix Navigation Page Scenario in the iOS 26
PR dotnet#34326 added an else block in UpdateBarTextColor() that explicitly
sets BackButtonAppearance = null, BackIndicatorImage = null, and
BackIndicatorTransitionMaskImage = null on the navigation bar when no
custom color is applied. On iOS versions before 26, assigning null to
these properties was treated as "use system defaults." On iOS 26, the
Liquid Glass rendering pipeline reads these properties during push/pop
navigation transitions and throws an exception when it encounters an
explicit null — it expects either an unset property or a valid object.
Since useCustomColor is false by default (no IconColor set), this
crashes on every standard page navigation.
- Setting ThumbTintList = null in the else block removes the tint
entirely, causing the thumb to appear white instead of the default blue,
because SwitchCompat does not re-resolve its theme colors once the tint
list is cleared.
- SetAdjustViewBounds(false) was being applied to all images regardless
of their Aspect value. When this property is false, Android’s ImageView
does not resize itself based on the image’s intrinsic aspect ratio and
instead expands to fill the available space. As a result, an Image
control with the default AspectFit setting ignored its height constraint
and overflowed its container, causing the image to appear taller than
expected in the screenshot test.(LoadAndVerifyGif, ThemeRelated feature
tests)
- PR dotnet#29144 changed the group-detection guard in ObservableGroupedSource
(iOS and Android) from is IEnumerable to is ICollection to prevent
strings (which implement IEnumerable<char>) from being treated as
groups.
While the intent was correct, the change was too broad. Custom group
types that implement only IEnumerable<T> were also excluded. As a
result, _groupCount became zero on iOS and _groups remained empty on
Android, causing grouped CollectionView rendering failures and
IndexOutOfRangeException during Add/Remove operations.
- StepperHandler.iOS.cs compiles for both iOS and Mac Catalyst. On Mac
Catalyst / macOS 26, OperatingSystem.IsIOS() and IsIOSVersionAtLeast(26)
both return true, and the screen is always landscape. As a result, the
20pt glass pill compensation was incorrectly applied, inflating
GetDesiredSize(1,1) to width = 21. (Native View Bounding Box is not
empty - device Test failures)
- In PR dotnet#33428, the WindowInsetsCompat.Builder block in
MauiWindowInsetListener.ApplyDefaultWindowInsets was simplified to
return insets; to standardize inset handling. This change was unrelated
to the actual fix for dotnet#33344, which only required passing the bottom
inset through as unconsumed.
As part of that refactor, top inset consumption was also removed,
changing the prior contract where the top inset was consumed when
appBarHasContent = true. While normal safe-area scenarios worked
correctly, transient layout states (e.g., temporary Height = 0 during
keyboard dismissal, rotation, animation, or dynamic item generation)
triggered a second inset dispatch. In those moments, the top inset
satisfied the overlap condition and was applied to content before
SafeAreaExtensions could normalize it, causing test failures. Bottom
insets did not regress because their overlap condition cannot be met in
the same transient state. (EntryScrollTest,
HorizontalStackLayout_Spacing_WithLandscape,
VerticalStackLayout_Spacing_WithLandscape and so on failures)

- Handles the three Visibility cases the same way as
ViewExtensions.UpdateVisibility:

`Visible`: Calls Inflate() (restores layout size) and sets Hidden =
false — identical to UpdateVisibility. Additionally starts/stops the
animation based on IsRunning.
`Hidden`: Calls Inflate() (preserves layout space) and sets Hidden =
true — identical to UpdateVisibility. The indicator keeps its layout
footprint but is invisible.
`Collapsed`: Sets Hidden = true and calls Collapse() (zeros out layout
size via constraints) — identical to UpdateVisibility. The indicator is
both invisible and takes up no space.
- Removed the else block entirely. When no custom color is applied,
these properties should remain untouched. The system defaults work
correctly on their own — there is no need to explicitly reset them to
null
- Removed the else block from UpdateThumbColor in SwitchExtensions.cs.
The default thumb color is managed by SwitchCompat internally from the
Material theme, so no explicit reset is needed.
- Restored the correct logic in ImageViewExtensions.UpdateAspect to call
SetAdjustViewBounds based on the image’s Aspect value:
- The guard has been updated from is ICollection to is IEnumerable &&
not string in the ObservableGroupedSource implementations for both iOS
and Android (GroupsCount(), UpdateGroupTracking(), Add(), Remove()).
This change specifically excludes string while allowing legitimate
custom group types that implement only IEnumerable<T>. The fix restores
the behavior for Issue22320 while keeping all Issue29141 scenarios
working correctly.
-Added !OperatingSystem.IsMacCatalyst() to the guard condition in
GetDesiredSize, restricting the 20pt compensation to real iOS 26+ only —
as intended in the original PR comment.
- Restored the original behavior by consuming the top inset when
appBarHasContent = true, while continuing to pass the bottom inset
through unconsumed (the only change required for dotnet#33344). This retains
the Android edge-to-edge fix and restores deterministic safe-area
handling.

EditorNoOverlapAfterRotateToLandscape,
EditorNoOverlapAfterRotateToPortrait,
EntryFocusedShouldNotCauseGapAfterRotation Added cropLeft to remove the
navbar on Android and re-saved the image due to entry text changes in
this commit –
dotnet@8d17a6d,
dotnet@91047fb.

DrawStringShouldDrawText – The automation ID set to GraphicsView was not
found by Appium on the Windows platform, so a test condition was added
for Windows to take the image directly instead of waiting for the
GraphicsView.

Added the base images for iOS 26 and Mac that were not added previously.

Re-saved the images that failed due to the wrong iOS version image being
added in the PR.

Re-saved the test images that failed due to this fix PR:
dotnet#31254 — e.g.,
GraphicsViewFeatureTests and others.

Resaved the slider-related test images due to this fix PR —
dotnet#34064.

Fixes dotnet#34437

- [x] iOS
- [x] Mac

---------

Co-authored-by: SyedAbdulAzeem <syedabdulazeem.a@syncfusion.com>
Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Mar 24, 2026
- The failing test: `SetVisibility(Visibility.Collapsed)` device test on
iOS.

  Why it fails: PR dotnet#28983's fix maps Visibility → MapIsRunning in
  ActivityIndicatorHandler, which bypasses the standard
ViewExtensions.UpdateVisibility path. The standard path calls Collapse()
to
add a CollapseConstraint (an NSLayoutConstraint that zeros the view's
size).
The PR's UpdateIsRunning only sets Hidden = true — it never calls
Collapse()
- Crash in the FeatureMatrix Navigation Page Scenario in the iOS 26
PR dotnet#34326 added an else block in UpdateBarTextColor() that explicitly
sets BackButtonAppearance = null, BackIndicatorImage = null, and
BackIndicatorTransitionMaskImage = null on the navigation bar when no
custom color is applied. On iOS versions before 26, assigning null to
these properties was treated as "use system defaults." On iOS 26, the
Liquid Glass rendering pipeline reads these properties during push/pop
navigation transitions and throws an exception when it encounters an
explicit null — it expects either an unset property or a valid object.
Since useCustomColor is false by default (no IconColor set), this
crashes on every standard page navigation.
- Setting ThumbTintList = null in the else block removes the tint
entirely, causing the thumb to appear white instead of the default blue,
because SwitchCompat does not re-resolve its theme colors once the tint
list is cleared.
- SetAdjustViewBounds(false) was being applied to all images regardless
of their Aspect value. When this property is false, Android’s ImageView
does not resize itself based on the image’s intrinsic aspect ratio and
instead expands to fill the available space. As a result, an Image
control with the default AspectFit setting ignored its height constraint
and overflowed its container, causing the image to appear taller than
expected in the screenshot test.(LoadAndVerifyGif, ThemeRelated feature
tests)
- PR dotnet#29144 changed the group-detection guard in ObservableGroupedSource
(iOS and Android) from is IEnumerable to is ICollection to prevent
strings (which implement IEnumerable<char>) from being treated as
groups.
While the intent was correct, the change was too broad. Custom group
types that implement only IEnumerable<T> were also excluded. As a
result, _groupCount became zero on iOS and _groups remained empty on
Android, causing grouped CollectionView rendering failures and
IndexOutOfRangeException during Add/Remove operations.
- StepperHandler.iOS.cs compiles for both iOS and Mac Catalyst. On Mac
Catalyst / macOS 26, OperatingSystem.IsIOS() and IsIOSVersionAtLeast(26)
both return true, and the screen is always landscape. As a result, the
20pt glass pill compensation was incorrectly applied, inflating
GetDesiredSize(1,1) to width = 21. (Native View Bounding Box is not
empty - device Test failures)
- In PR dotnet#33428, the WindowInsetsCompat.Builder block in
MauiWindowInsetListener.ApplyDefaultWindowInsets was simplified to
return insets; to standardize inset handling. This change was unrelated
to the actual fix for dotnet#33344, which only required passing the bottom
inset through as unconsumed.
As part of that refactor, top inset consumption was also removed,
changing the prior contract where the top inset was consumed when
appBarHasContent = true. While normal safe-area scenarios worked
correctly, transient layout states (e.g., temporary Height = 0 during
keyboard dismissal, rotation, animation, or dynamic item generation)
triggered a second inset dispatch. In those moments, the top inset
satisfied the overlap condition and was applied to content before
SafeAreaExtensions could normalize it, causing test failures. Bottom
insets did not regress because their overlap condition cannot be met in
the same transient state. (EntryScrollTest,
HorizontalStackLayout_Spacing_WithLandscape,
VerticalStackLayout_Spacing_WithLandscape and so on failures)

- Handles the three Visibility cases the same way as
ViewExtensions.UpdateVisibility:

`Visible`: Calls Inflate() (restores layout size) and sets Hidden =
false — identical to UpdateVisibility. Additionally starts/stops the
animation based on IsRunning.
`Hidden`: Calls Inflate() (preserves layout space) and sets Hidden =
true — identical to UpdateVisibility. The indicator keeps its layout
footprint but is invisible.
`Collapsed`: Sets Hidden = true and calls Collapse() (zeros out layout
size via constraints) — identical to UpdateVisibility. The indicator is
both invisible and takes up no space.
- Removed the else block entirely. When no custom color is applied,
these properties should remain untouched. The system defaults work
correctly on their own — there is no need to explicitly reset them to
null
- Removed the else block from UpdateThumbColor in SwitchExtensions.cs.
The default thumb color is managed by SwitchCompat internally from the
Material theme, so no explicit reset is needed.
- Restored the correct logic in ImageViewExtensions.UpdateAspect to call
SetAdjustViewBounds based on the image’s Aspect value:
- The guard has been updated from is ICollection to is IEnumerable &&
not string in the ObservableGroupedSource implementations for both iOS
and Android (GroupsCount(), UpdateGroupTracking(), Add(), Remove()).
This change specifically excludes string while allowing legitimate
custom group types that implement only IEnumerable<T>. The fix restores
the behavior for Issue22320 while keeping all Issue29141 scenarios
working correctly.
-Added !OperatingSystem.IsMacCatalyst() to the guard condition in
GetDesiredSize, restricting the 20pt compensation to real iOS 26+ only —
as intended in the original PR comment.
- Restored the original behavior by consuming the top inset when
appBarHasContent = true, while continuing to pass the bottom inset
through unconsumed (the only change required for dotnet#33344). This retains
the Android edge-to-edge fix and restores deterministic safe-area
handling.

EditorNoOverlapAfterRotateToLandscape,
EditorNoOverlapAfterRotateToPortrait,
EntryFocusedShouldNotCauseGapAfterRotation Added cropLeft to remove the
navbar on Android and re-saved the image due to entry text changes in
this commit –
dotnet@8d17a6d,
dotnet@91047fb.

DrawStringShouldDrawText – The automation ID set to GraphicsView was not
found by Appium on the Windows platform, so a test condition was added
for Windows to take the image directly instead of waiting for the
GraphicsView.

Added the base images for iOS 26 and Mac that were not added previously.

Re-saved the images that failed due to the wrong iOS version image being
added in the PR.

Re-saved the test images that failed due to this fix PR:
dotnet#31254 — e.g.,
GraphicsViewFeatureTests and others.

Resaved the slider-related test images due to this fix PR —
dotnet#34064.

Fixes dotnet#34437

- [x] iOS
- [x] Mac

---------

Co-authored-by: SyedAbdulAzeem <syedabdulazeem.a@syncfusion.com>
Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
PureWeen added a commit that referenced this pull request Mar 24, 2026
## What's Coming

.NET MAUI inflight/candidate introduces significant improvements across
all platforms with focus on quality, performance, and developer
experience. This release includes 66 commits with various improvements,
bug fixes, and enhancements.


## Activityindicator
- [Android] Implemented material3 support for ActivityIndicator by
@Dhivya-SF4094 in #33481
  <details>
  <summary>🔧 Fixes</summary>

- [Implement material3 support for
ActivityIndicator](#33479)
  </details>

- [iOS] Fix: ActivityIndicator IsRunning ignores IsVisible when set to
true by @bhavanesh2001 in #28983
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] [ActivityIndicator] `IsRunning` ignores `IsVisible` when set to
`true`](#28968)
  </details>

## Button
- [iOS] Button RTL text and image overlap - fix by @kubaflo in
#29041

## Checkbox
- [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set
to null by @Ahamed-Ali in #34284
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] Color of the checkBox control is not properly worked on dynamic
scenarios](#34278)
  </details>

## CollectionView
- [iOS] Fix: CollectionView does not clear selection when SelectedItem
is set to null by @Tamilarasan-Paranthaman in
#30420
  <details>
  <summary>🔧 Fixes</summary>

- [CollectionView not being able to remove selected item highlight on
iOS](#30363)
- [[MAUI] Select items traces are
preserved](#26187)
  </details>

- [iOS] CV2 ItemsLayout update by @kubaflo in
#28675
  <details>
  <summary>🔧 Fixes</summary>

- [CollectionView CollectionViewHandler2 doesnt change ItemsLayout on
DataTrigger](#28656)
- [iOS CollectionView doesn't respect a change to ItemsLayout when using
Items2.CollectionViewHandler2](#31259)
  </details>

- [iOS][CV2] Fix CollectionView renders large empty space at bottom of
view by @devanathan-vaithiyanathan in
#31215
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] [MacCatalyst] CollectionView renders large empty space at
bottom of view](#17799)
- [[iOS/Mac] CollectionView2 EmptyView takes up large horizontal space
even when the content is
small](#33201)
  </details>

- [iOS] Fixed issue where group Header/Footer template was set to all
items when IsGrouped was true for an ObservableCollection by
@Tamilarasan-Paranthaman in #29144
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] Group Header/Footer Repeated for All Items When IsGrouped is
True for ObservableCollection in
CollectionView](#29141)
  </details>

- [Android] Fix CollectionView selection crash with HeaderTemplate by
@NirmalKumarYuvaraj in #34275
  <details>
  <summary>🔧 Fixes</summary>

- [[Bug] [Android] System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index](#34247)
  </details>

## DateTimePicker
- [iOS] Fix TimePicker AM/PM frequently changes when the app is closed
and reopened by @devanathan-vaithiyanathan in
#31066
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] TimePicker AM/PM frequently changes when the app is closed and
reopened](#30837)
- [Maui 10 iOS TimePicker Strange Characters in place of
AM/PM](#33722)
  </details>

- Android TimePicker ignores 24 hour system setting when using Format
Property - fix by @kubaflo in #28797
  <details>
  <summary>🔧 Fixes</summary>

- [Android TimePicker ignores 24 hour system setting when using Format
Property](#28784)
  </details>

## Drawing
- [iOS, Mac, Windows] GraphicsView: Fix Background/BackgroundColor not
updating by @NirmalKumarYuvaraj in
#31254
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS, Mac, Windows] GraphicsView does not change the
Background/BackgroundColor](#31239)
  </details>

- [iOS] GraphicsView DrawString - fix by @kubaflo in
#26304
  <details>
  <summary>🔧 Fixes</summary>

- [DrawString not rendering in
iOS.](#24450)
- [GraphicsView DrawString not rendering in
iOS](#8486)
- [DrawString doesn't work on
maccatalyst](#4993)
  </details>

- [Android] - Fix Shadow Rendering For Transparent Fill, Stroke (Lines),
and Text on Shapes by @prakashKannanSf3972 in
#29528
  <details>
  <summary>🔧 Fixes</summary>

- [Ellipse Transparency Not Rendered When Drawing Arc Inside the Ellipse
Using GraphicsView on
Android](#29394)
  </details>

- Revert "[iOS, Mac, Windows] GraphicsView: Fix
Background/BackgroundColor not updating (#31254)" by @Ahamed-Ali via
@Copilot in #34508

## Entry
- [iOS 26] Fix Entry MaxLength not enforced due to new multi-range
delegate by @kubaflo in #32045
  <details>
  <summary>🔧 Fixes</summary>

- [iOS 26 - The MaxLength property value is not respected on an Entry
control.](#32016)
- [.NET MAUI Entry Maximum Length not working on iOS and
macOS](#33316)
  </details>

- [iOS] Fixed Entry with IsPassword toggling loses previously entered
text by @SubhikshaSf4851 in #30572
  <details>
  <summary>🔧 Fixes</summary>

- [Entry with IsPassword toggling loses previously entered text on iOS
when IsPassword is
re-enabled](#30085)
  </details>

## Essentials
- Fix for FilePicker PickMultipleAsync nullable reference type by
@SuthiYuvaraj in #33163
  <details>
  <summary>🔧 Fixes</summary>

- [FilePicker PickMultipleAsync nullable reference
type](#33114)
  </details>

- Replace deprecated NetworkReachability with NWPathMonitor on iOS/macOS
by @jfversluis via @Copilot in #32354
  <details>
  <summary>🔧 Fixes</summary>

- [NetworkReachability is obsolete on iOS/maccatalyst
17.4+](#32312)
- [Use NWPathMonitor on iOS for Essentials
Connectivity](#2574)
  </details>

## Essentials Connectivity
- Update Android Connectivity implementation to use modern APIs by
@jfversluis via @Copilot in #30348
  <details>
  <summary>🔧 Fixes</summary>

- [Update the Android Connectivity implementation to user modern
APIs](#30347)
  </details>

## Flyout
- [iOS] Fixed Flyout icon not updating when root page changes using
InsertPageBefore by @Vignesh-SF3580 in
#29924
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] Flyout icon not replaced by back button when root page is
changed using
InsertPageBefore](#29921)
  </details>

## Flyoutpage
- [iOS] Flyout Items Not Displayed in RightToLeft FlowDirection in
Landscape - fix by @kubaflo in #26762
  <details>
  <summary>🔧 Fixes</summary>

- [Flyout Items Not Displayed in RightToLeft FlowDirection on iOS in
Landscape Orientation and Hamburger Icon Positioned
Incorrectly](#26726)
  </details>

## Image
- [Android] Implemented Material3 support for Image by @Dhivya-SF4094 in
#33661
  <details>
  <summary>🔧 Fixes</summary>

- [Implement Material3 support for
Image](#33660)
  </details>

## Keyboard
- [iOS] Fix gap at top of view after rotating device while Entry
keyboard is visible by @praveenkumarkarunanithi in
#34328
  <details>
  <summary>🔧 Fixes</summary>

- [Focusing and entering texts on entry control causes a gap at the top
after rotating simulator.](#33407)
  </details>

## Label
- [Android] Support for images inside HTML label by @kubaflo in
#21679
  <details>
  <summary>🔧 Fixes</summary>

- [Label with HTML TextType does not display images on
Android](#21044)
  </details>

- [fix] ContentLabel Moved to a nested class to prevent CS0122 in
external source generators by @SubhikshaSf4851 in
#34514
  <details>
  <summary>🔧 Fixes</summary>

- [[MAUI] Building Maui App with sample content results CS0122
errors.](#34512)
  </details>

## Layout
- Optimize ordering of children in Flex layout by @symbiogenesis in
#21961

- [Android] Fix control size properties not available during Loaded
event by @Vignesh-SF3580 in #31590
  <details>
  <summary>🔧 Fixes</summary>

- [CollectionView on Android does not provide height, width, logical
children once loaded, works fine on
Windows](#14364)
- [Control's Loaded event invokes before calling its measure override
method.](#14160)
  </details>

## Mediapicker
- [iOS/Android] MediaPicker: Fix image orientation when RotateImage=true
by @michalpobuta in #33892
  <details>
  <summary>🔧 Fixes</summary>

- [MediaPicker.PickPhotosAsync does not preserve image
orientation](#32650)
  </details>

## Modal
- [Windows] Fix modal page keyboard focus not shifting to newly opened
modal by @jfversluis in #34212
  <details>
  <summary>🔧 Fixes</summary>

- [Keyboard focus does not shift to a newly opened modal page: Pressing
enter clicks the button on the page beneath the modal
page](#22938)
  </details>

## Navigation
- [iOS26] Apply view margins in title view by @kubaflo in
#32205
  <details>
  <summary>🔧 Fixes</summary>

- [NavigationPage TitleView iOS
26](#32200)
  </details>

- [iOS] System.NullReferenceException at
NavigationRenderer.SetStatusBarStyle() by @kubaflo in
#29564
  <details>
  <summary>🔧 Fixes</summary>

- [System.NullReferenceException at
NavigationRenderer.SetStatusBarStyle()](#29535)
  </details>

- [iOS 26] Fix back button color not applied for NavigationPage by
@Shalini-Ashokan in #34326
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] Color not applied to the Back button text or image on iOS
26](#33966)
  </details>

## Picker
- Fix Picker layout on Mac Catalyst 26+ by @kubaflo in
#33146
  <details>
  <summary>🔧 Fixes</summary>

- [[MacOS 26] Text on picker options are not centered on macOS
26.1](#33229)
  </details>

## Progressbar
- [Android] Implemented Material3 support for ProgressBar by
@SyedAbdulAzeemSF4852 in #33926
  <details>
  <summary>🔧 Fixes</summary>

- [Implement Material3 support for
Progressbar](#33925)
  </details>

## RadioButton
- [iOS, Mac] Fix for RadioButton TextColor for plain Content not working
by @HarishwaranVijayakumar in #31940
  <details>
  <summary>🔧 Fixes</summary>

- [RadioButton: TextColor for plain Content not working on
iOS](#18011)
  </details>

- [All Platforms] Fix RadioButton warning when ControlTemplate is set
with View content by @kubaflo in
#33839
  <details>
  <summary>🔧 Fixes</summary>

- [Seeking clarification on RadioButton + ControlTemplate + Content
documentation](#33829)
  </details>

- Visual state change for disabled RadioButton by @kubaflo in
#23471
  <details>
  <summary>🔧 Fixes</summary>

- [RadioButton disabled UI issue -
iOS](#18668)
  </details>

## SafeArea
- [Android] Fix for TabbedPage BottomNavigation BarBackgroundColor not
extending to system navigation bar by @praveenkumarkarunanithi in
#33428
  <details>
  <summary>🔧 Fixes</summary>

- [[Android] TabbedPage BottomNavigation BarBackgroundColor does not
extend to system navigation bar area in Edge-to-Edge
mode](#33344)
  </details>

## ScrollView
- [Android] ScrollView: Fix HorizontalScrollBarVisibility not updating
immediately at runtime by @SubhikshaSf4851 in
#33528
  <details>
  <summary>🔧 Fixes</summary>

- [Runtime Scrollbar visibility not updating correctly on Android and
macOS platforms.](#33400)
  </details>

- Fixed crash when calling ItemsView.ScrollTo on unloaded CollectionView
by @kubaflo in #25444
  <details>
  <summary>🔧 Fixes</summary>

- [App crashes when calling ItemsView.ScrollTo on unloaded
CollectionView](#23014)
  </details>

## Shell
- [Shell] Update logic for iOS large title display in ShellItemRenderer
by @kubaflo in #33246

- [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5
tabs) by @kubaflo in #27932
  <details>
  <summary>🔧 Fixes</summary>

- [OnAppearing and OnNavigatedTo does not work when using extended
Tabbar (tabbar with more than 5 tabs) on
IOS.](#27799)
- [Shell.BackButtonBehavior does not work when using extended Tabbar
(tabbar with more than 5 tabs)on
IOS.](#27800)
- [Shell TabBar More button causes ViewModel command binding
disconnection on back
navigation](#30862)
- [Content page onappearing not firing if tabs are on the more tab on
IOS](#31166)
  </details>

- [iOS 26] Fix tab bar ghosting when navigating from modal to tabbed
Shell content by @SubhikshaSf4851 in
#34254
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] Tab bar ghosting issue on iOS 26 (liquid
glass)](#34143)
  </details>

- Fix for Shell tab visibility not updating when navigating back
multiple pages by @BagavathiPerumal in
#34403
  <details>
  <summary>🔧 Fixes</summary>

- [Changing Shell Tab Visibility when navigating back multiple pages
ignores Shell Tab
Visibility](#33351)
  </details>

- [iOS/Mac] Fixed OnBackButtonPressed not firing for Shell Navigation
Bar Button by @Dhivya-SF4094 in
#34401
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] OnBackButtonPressed not firing for Shell Navigation Bar
button](#34190)
  </details>

## Slider
- [iOS] Fix for Slider ThumbImageSource is not centered properly on iOS
26 by @HarishwaranVijayakumar in
#34019
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS 26] Slider ThumbImageSource is not centered
properly](#33967)
  </details>

- [Android] Fix improper rendering of ThumbimageSource in Slider by
@NirmalKumarYuvaraj in #34064
  <details>
  <summary>🔧 Fixes</summary>

- [[Slider] MAUI Slider thumb image is big on
android](#13258)
  </details>

## Stepper
- [iOS] Fix Stepper layout overlap in landscape on iOS 26 by
@Vignesh-SF3580 in #34325
  <details>
  <summary>🔧 Fixes</summary>

- [[.NET10] D10 - Customize cursor position - Rotating simulator makes
the button and label
overlap](#34273)
  </details>

## SwipeView
- [iOS] SwipeView: Honor FontImageSource.Color in SwipeItem icon by
@kubaflo in #27389
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS] SwipeView: SwipeItem.IconImageSource.FontImageSource color
value not honored](#27377)
  </details>

## Switch
- [Android] Fix Switch thumb shadow missing when ThumbColor is set by
@Shalini-Ashokan in #33960
  <details>
  <summary>🔧 Fixes</summary>

- [Android Switch Control Thumb
Shadow](#19676)
  </details>

## Toolbar
- [iOS/Mac Catalyst 26] Fix Shell.ForegroundColor not applied to
ToolbarItems by @SyedAbdulAzeemSF4852 in
#34085
  <details>
  <summary>🔧 Fixes</summary>

- [[iOS26] Shell.ForegroundColor is not applied to
ToolbarItems](#34083)
  </details>

- [Android] VoiceOver on Toolbar Item by @kubaflo in
#29596
  <details>
  <summary>🔧 Fixes</summary>

- [VoiceOver on Toolbar
Item](#29573)
- [SemanticProperties do not work on
ToolbarItems](#23623)
  </details>


<details>
<summary>🧪 Testing (11)</summary>

- [Testing] Additional Feature Matrix Test Cases for CollectionView by
@TamilarasanSF4853 in #32432
- [Testing] Feature Matrix UITest Cases for VisualStateManager by
@LogishaSelvarajSF4525 in #34146
- [Testing] Feature Matrix UITest Cases for Clip by @TamilarasanSF4853
in #34121
- [Testing] Feature matrix UITest Cases for Map Control by
@HarishKumarSF4517 in #31656
- [Testing] Feature matrix UITest Cases for Visual Transform Control by
@HarishKumarSF4517 in #32799
- [Testing] Feature Matrix UITest Cases for Shell Pages by
@NafeelaNazhir in #33945
- [Testing] Feature Matrix UITest Cases for Triggers by
@HarishKumarSF4517 in #34152
- [Testing] Refactoring Feature Matrix UITest Cases for CheckBox Control
by @LogishaSelvarajSF4525 in #34283
- Resolve UI test Build Sample failures - Candidate March 16 by
@Ahamed-Ali in #34442
- Fix the failures in the Candidate branch- March 16 by @Ahamed-Ali in
#34453
  <details>
  <summary>🔧 Fixes</summary>

  - [March 16th, Candidate](#34437)
  </details>
- Fixed the iOS 18.5 Candidate failures (March 16,2026) by @Ahamed-Ali
in #34593
  <details>
  <summary>🔧 Fixes</summary>

  - [March 16th, Candidate](#34437)
  </details>

</details>

<details>
<summary>📦 Other (2)</summary>

- Fixed candidate test failures caused by PR #33428. by @Ahamed-Ali in
#34515
  <details>
  <summary>🔧 Fixes</summary>

- [[.NET10] On Android, there's a big space at the top for I, M and N2 &
N3](#34509)
  </details>
- Revert "[iOS] Button RTL text and image overlap - fix (#29041)" in
b0497af

</details>

<details>
<summary>📝 Issue References</summary>

Fixes #2574, Fixes #4993, Fixes #8486, Fixes #13258, Fixes #14160, Fixes
#14364, Fixes #17799, Fixes #18011, Fixes #18668, Fixes #19676, Fixes
#21044, Fixes #22938, Fixes #23014, Fixes #23623, Fixes #24450, Fixes
#26187, Fixes #26726, Fixes #27377, Fixes #27799, Fixes #27800, Fixes
#28656, Fixes #28784, Fixes #28968, Fixes #29141, Fixes #29394, Fixes
#29535, Fixes #29573, Fixes #29921, Fixes #30085, Fixes #30347, Fixes
#30363, Fixes #30837, Fixes #30862, Fixes #31166, Fixes #31239, Fixes
#31259, Fixes #32016, Fixes #32200, Fixes #32312, Fixes #32650, Fixes
#33114, Fixes #33201, Fixes #33229, Fixes #33316, Fixes #33344, Fixes
#33351, Fixes #33400, Fixes #33407, Fixes #33479, Fixes #33660, Fixes
#33722, Fixes #33829, Fixes #33925, Fixes #33966, Fixes #33967, Fixes
#34083, Fixes #34143, Fixes #34190, Fixes #34247, Fixes #34273, Fixes
#34278, Fixes #34437, Fixes #34509, Fixes #34512

</details>

**Full Changelog**:
main...inflight/candidate
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Mar 30, 2026
…t#34064)

<!-- 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!

### Root Cause

On Android, when a custom `ThumbImageSource` is set on a `Slider`, the
image drawable is applied to the `SeekBar` at its native size. Because
images are typically larger than the expected thumb diameter (20dp per
Material Design spec), the thumb appears oversized.

### Description of Change

**Android only** — this PR adds image scaling before applying custom
thumb drawables to `SeekBar`.

Key changes in `src/Core/src/Platform/Android/SliderExtensions.cs`:

- **`UpdateThumbImageSourceAsync`**: Refactored to call two new helpers
(`SetThumbDrawable` / `SetDefaultThumb`) instead of inlining the logic.
- **`SetThumbDrawable`**: New method that scales the provided drawable
to 20dp × 20dp (Material Design thumb size) by rendering it to a
fixed-size `Bitmap` then wrapping in a `BitmapDrawable` before calling
`SeekBar.SetThumb()`.
- **`SetDefaultThumb`**: New method that restores the platform default
thumb drawable (`abc_seekbar_thumb_material`) and re-applies the theme
accent color or custom `ThumbColor`. Also adds a `ResolveAttribute`
return-value check (previously the result was ignored).
- **Null checks**: Updated `!= null` patterns to `is not null` for
consistency.

**Note:** iOS and MacCatalyst scaling is tracked separately in PR
dotnet#34184.

### Issues Fixed

Fixes dotnet#13258

### Platforms Tested

- [x] Android
- [ ] iOS (separate PR dotnet#34184)
- [ ] Windows
- [ ] Mac


Previously closed PR - dotnet#27472

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-slider Slider community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android platform/ios s/agent-changes-requested AI agent recommends changes - found a better alternative or issues 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.

[Slider] MAUI Slider thumb image is big on android

6 participants