Skip to content

[Android] Picker: Restore horizontal scrolling for selected text - #37232

Merged
kubaflo merged 8 commits into
dotnet:inflight/currentfrom
kubaflo:kubaflo/fix-picker-horizontal-scroll-36834
Aug 11, 2026
Merged

kubaflo merged 8 commits into
dotnet:inflight/currentfrom
kubaflo:kubaflo/fix-picker-horizontal-scroll-36834

Conversation

@kubaflo

@kubaflo kubaflo commented Aug 9, 2026 •

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

#29068 set the Android Picker's default movement method to null to avoid editable EditText cursor behavior. That also disabled Android's built-in overflow-text scrolling, so long selected values could no longer be dragged horizontally.

Description of Change

Restores horizontal drag scrolling for long selected Picker text on Android while keeping the control read-only and preserving normal tap behavior. This applies to both the standard and Material 3 Picker platform views.

The implementation keeps the Picker's movement method disabled, preserving its existing text layout and D-pad focus navigation, and delegates only touch events to Android's native ScrollingMovementMethod. A gesture filter classifies horizontal and vertical movement against Android's touch slop, including movement first observed on ACTION_UP. When a gesture becomes a drag, the Picker platform view sends its base Android view an ACTION_CANCEL, which clears pressed/prepressed state and pending tap/long-press callbacks before the real scroll event continues.

The filter tracks the active pointer and resets after ACTION_UP or ACTION_CANCEL. Long-click behavior is disabled only on the standard and Material Picker platform views after PickerManager.Init, avoiding behavior changes to DatePicker, TimePicker, and compatibility renderers that share PickerManager.

The hint-only Title case remains out of scope because Android renders the hint separately from selected text.

Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally does not claim to close the issue while the hint-only scenario remains unresolved.

Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an OnTouchListener. This alternative keeps Android's native text-scrolling implementation, avoids occupying the view's single touch-listener slot, and only adds click suppression around native scrolling.

What NOT to Do (for future agents)

  • Do not use ArrowKeyMovementMethod: empirical testing showed that it does not restore touch scrolling and reintroduces cursor-oriented behavior.
  • Do not implement manual scrolling through an OnTouchListener: it owns Android's single listener slot and requires custom alignment, RTL, and scroll-bound handling.
  • Do not clear only View.Pressed to suppress the click: Android scrolling containers can use a prepressed state and pending callbacks, so the complete native touch state must be canceled.
  • Do not classify only ACTION_MOVE or only the X delta: fast swipes may cross slop on ACTION_UP, and vertical movement must not open the dialog.
  • Do not treat the hint-only Title as selected text: Android lays it out separately and this movement method cannot scroll it.

Tests

  • Android Core device tests, Category=Picker, on API 34: 121 run, 119 passed, 2 ignored, 0 failed.
  • Android Core device tests, Category=Picker, on API 35: 121 run, 119 passed, 2 ignored, 0 failed.
  • The Picker movement method remains null, preventing the RTL and horizontal-alignment visual regressions caught by UI-test baselines.
  • The same expanded tests against the previous implementation produced 8 failures because the Picker became long-clickable.
  • With the long-click assertion removed to isolate touch behavior, the previous implementation still produced 4 failures: fast swipes and vertical drags opened both standard and Material Pickers.
  • Coverage includes normal taps, jitter below touch slop, horizontal and vertical drags, a fast swipe with no qualifying MOVE, delayed child pressed state, canceled drag followed by a tap, active-pointer replacement, D-pad focus preservation, read-only properties, and standard/Material platform views.

Evidence

The original empirical comparison, including recordings and screenshots for main, #37067, ArrowKeyMovementMethod, and ScrollingMovementMethod, is in this issue comment.

Initial recording

This is the empirically validated ScrollingMovementMethod variant used as the basis for this PR.

alt-b-scrollingmovementmethod-android-picker-scroll.mp4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c912532c-4649-4359-bbb8-aa0f74d7665e
Copilot AI lite review requested due to automatic review settings August 9, 2026 11:05
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool August 9, 2026 11:06 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🚀 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 -- 37232

Or

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

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool August 9, 2026 11:06 — with GitHub Actions Inactive
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 restores horizontal drag-scrolling for long selected Picker text on Android (standard and Material 3) while keeping the control read-only and preventing a drag gesture from also triggering a click to open the picker.

Changes:

  • Introduces a PickerScrollingMovementMethod wrapper over Android’s ScrollingMovementMethod to enable horizontal scrolling and suppress post-drag clicks.
  • Updates MauiPickerBase and MauiMaterialPickerBase to use the new movement method (cached per control instance).
  • Adds an Android device test covering scroll, tap, drag-without-click, and tap-after-drag for both picker variants.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Core/tests/DeviceTests/Handlers/Picker/PickerHandlerTests.Android.cs Adds device test validating horizontal scrolling and click suppression for standard + Material pickers.
src/Core/src/Platform/Android/PickerScrollingMovementMethod.cs New movement method wrapper to enable scrolling and suppress click after horizontal drag.
src/Core/src/Platform/Android/MauiPicker.cs Enables the new movement method for the standard Android picker platform view.
src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs Enables the new movement method for the Material 3 picker platform view.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool August 9, 2026 11:10 — with GitHub Actions Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c912532c-4649-4359-bbb8-aa0f74d7665e
Copilot AI review requested due to automatic review settings August 9, 2026 11:14
@kubaflo kubaflo changed the title [Android] Restore horizontal scrolling for selected Picker text [Android] Picker: Restore horizontal scrolling for selected text Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Suppressed comments (1)

src/Core/src/Platform/Android/PickerScrollingMovementMethod.cs:27

  • Avoid null-forgiving operators when retrieving touch slop. widget.Context is non-null and ViewConfiguration.Get(...) is used throughout the codebase without null checks; the current ! chain risks hiding a real null and would turn it into an NRE on touch.
			case MotionEventActions.Down:
				_downX = e.GetX();
				_touchSlop = ViewConfiguration.Get(widget.Context!)!.ScaledTouchSlop;
				_isDragging = false;

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Aug 9, 2026
@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Aug 9, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 7 findings

See inline comments for details.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Aug 9, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Aug 9, 2026
Suppress posted Picker clicks in PerformClick after horizontal or vertical drag gestures, including fast swipes that cross touch slop on ACTION_UP. Preserve read-only behavior and expand Android device coverage for standard and Material Pickers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c912532c-4649-4359-bbb8-aa0f74d7665e
Copilot AI review requested due to automatic review settings August 9, 2026 14:28
@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Aug 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
Copilot AI review requested due to automatic review settings August 10, 2026 15:25
@kubaflo

kubaflo commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@MauiBot addressed the current actionable review gap in e805c73d54e: displacement exactly equal to Android touch slop now cancels Picker clicks, with four standard/Material and delayed/non-delayed device-test variants. Direct Android instrumentation passed 125 tests (123 passed, 2 skipped, 0 failed). Older superseded findings have been reconciled; the DatePicker/TimePicker scope expansion remains intentionally out of scope. This is ready for re-review — thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@MauiBot

MauiBot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

AI Review Summary

@kubaflo — new AI review results are available based on commit 11b316a.

Gate Passed Confidence High Platform Android


🗂️ Review Sessions — click to expand

[!WARNING]
This run reviewed commit 11b316a, but the PR advanced to e805c73 while it was running. These results are informational; re-run /review for the current head.


🚦 Gate — Test Before & After Fix

Gate Result: ✅ PASSED

Platform: ANDROID · Base: main · Merge base: f27ca83a

✅ Verified (new API / feature) — this PR adds new API and a test that references it in the same project, so reverting the fix un-compiles the test: there is no valid "fails without the fix" baseline to establish (a compile-coupled baseline). The gate instead verified the fix by a clean build + pass with the fix, so this is a real PASS rather than a non-committal INCONCLUSIVE.

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 PickerHandlerTests (LongSelectedTextScrollsHorizontallyAndRemainsReadOnly, TapJitterClicksButFastSwipeDoesNot, VerticalDragDoesNotClick, CanceledDragDoesNotSuppressNextTap, PointerReplacementWithoutMovementRemainsATap, MovementMethodRemainsDisabled) Category=Picker 🛠️ BUILD ERROR ✅ PASS — 407s
🔴 Without fix — 📱 PickerHandlerTests (LongSelectedTextScrollsHorizontallyAndRemainsReadOnly, TapJitterClicksButFastSwipeDoesNot, VerticalDragDoesNotClick, CanceledDragDoesNotSuppressNextTap, PointerReplacementWithoutMovementRemainsATap, MovementMethodRemainsDisabled): 🛠️ BUILD ERROR · 260s

Error-relevant lines (filtered from the build log):

/home/vsts/work/1/s/src/Core/tests/DeviceTests/Handlers/Picker/PickerHandlerTests.Android.cs(182,22): error CS0246: The type or namespace name 'PickerDragGestureFilter' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Core/tests/DeviceTests/Core.DeviceTests.csproj::TargetFramework=net10.0-android]
Build FAILED.
🟢 With fix — 📱 PickerHandlerTests (LongSelectedTextScrollsHorizontallyAndRemainsReadOnly, TapJitterClicksButFastSwipeDoesNot, VerticalDragDoesNotClick, CanceledDragDoesNotSuppressNextTap, PointerReplacementWithoutMovementRemainsATap, MovementMethodRemainsDisabled): PASS ✅ · 407s

(no coded error found; showing last 1200 chars)

0 07:01:08.753 16248 16412 I DOTNET  : Xml file was written to the provided writer.
      08-10 07:01:08.753 16248 16412 I DOTNET  : === TEST EXECUTION SUMMARY ===
      08-10 07:01:08.753 16248 16412 I DOTNET  : Tests run: 1342 Passed: 90 Inconclusive: 0 Failed: 0 Ignored: 1250 Skipped: 2
info: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmtroe5",
        "exitCode": 0,
        "exitCodeName": "SUCCESS",
        "platform": "android",
        "instrumentationExitCode": 0,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults-e4b3fbb30f434a26a0b44b875d18dd3c.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.core.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
info: Attempting to remove apk 'com.microsoft.maui.core.devicetests'..
info: Successfully uninstalled com.microsoft.maui.core.devicetests
XHarness exit code: 0
  Passed: 13
  Failed: 0
  Skipped: 0
  Total: 13
  Tests completed successfully

⚠️ Failure Details

  • 🛠️ PickerHandlerTests (LongSelectedTextScrollsHorizontallyAndRemainsReadOnly, TapJitterClicksButFastSwipeDoesNot, VerticalDragDoesNotClick, CanceledDragDoesNotSuppressNextTap, PointerReplacementWithoutMovementRemainsATap, MovementMethodRemainsDisabled) without fix: build failed before tests could run
    • /home/vsts/work/1/s/src/Core/tests/DeviceTests/Handlers/Picker/PickerHandlerTests.Android.cs(182,22): error CS0246: The type or namespace name 'PickerDragGestureFilter' could not be found (are you mis...
📁 Fix files reverted (3 files)
  • src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
  • src/Core/src/Platform/Android/MauiPicker.cs
  • src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt

New files (not reverted):

  • src/Core/src/Platform/Android/PickerDragGestureFilter.cs

📋 Pre-Flight — Context & Validation

PR #37232 Pre-Flight

Context

  • PR: [Android] Picker: Restore horizontal scrolling for selected text
  • URL: [Android] Picker: Restore horizontal scrolling for selected text #37232
  • Base: main at merge base f27ca83a
  • PR head: 11b316a13e596c7403689f704c1d95376ad6528f
  • Local review commit: affbf28eb694d2303f0c2bf8f3c25a1422e3d13c
  • Platform: Android
  • Problem: Setting the Android Picker's DefaultMovementMethod to null kept the EditText read-only and avoided cursor/D-pad behavior, but also disabled native horizontal scrolling for long selected values.
  • Scope: Restore drag scrolling for selected text on both standard and Material 3 Picker platform views while preserving ordinary taps, read-only behavior, focus navigation, alignment/RTL behavior, and click suppression during horizontal or vertical drags. Hint-only Title scrolling is explicitly out of scope.

Existing PR Approach

The PR keeps MovementMethod null, overrides OnTouchEvent in both Picker base views, and directly delegates eligible touch events to ScrollingMovementMethod. A new PickerDragGestureFilter tracks touch slop and the active pointer. Once movement is classified as a drag, the Picker dispatches a synthetic ACTION_CANCEL to the base view to clear pressed/prepressed state and pending click or long-press callbacks. Constructors explicitly restore focus/click properties after PickerManager.Init and disable long-click behavior.

Changed files:

  • src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
  • src/Core/src/Platform/Android/MauiPicker.cs
  • src/Core/src/Platform/Android/PickerDragGestureFilter.cs
  • src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
  • src/Core/tests/DeviceTests/Handlers/Picker/PickerHandlerTests.Android.cs

Known rejected directions from the PR's empirical work:

  • ArrowKeyMovementMethod did not restore touch scrolling and reintroduced cursor-oriented behavior.
  • A manual scrolling OnTouchListener occupies Android's single listener slot and requires custom RTL/alignment/bounds handling.
  • Clearing only View.Pressed misses prepressed state and pending callbacks.
  • Classifying only ACTION_MOVE or only horizontal delta misses fast swipes and allows vertical drags to click.

Verification Contract

The gate already passed and must not be rerun. It proved the current fix passes the Android Core Picker category: 90 passed, 2 skipped, 0 failed; the six added methods produced 13 cases. The without-fix state is compile-coupled because a test directly references the new PickerDragGestureFilter.

Use only:

pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -TestFilter "Category=Picker"

Primary and mandatory regression methods covered by that category:

  1. LongSelectedTextScrollsHorizontallyAndRemainsReadOnly
  2. TapJitterClicksButFastSwipeDoesNot
  3. VerticalDragDoesNotClick
  4. CanceledDragDoesNotSuppressNextTap
  5. PointerReplacementWithoutMovementRemainsATap
  6. MovementMethodRemainsDisabled

Each candidate gets one implementation/test pass and at most one focused correction/retest. Do not run any full test suite or repeat gate verification.

Worktree Safety

The checkout contains unrelated pre-existing modifications under .github/, eng/, and skill scripts. Preserve them exactly. Candidate work is limited to the PR's Android Picker source/API/test surface and must be restored with EstablishBrokenBaseline.ps1 -Restore after artifacts are captured.


🔬 Code Review — Deep Analysis

Expert PR Evaluation

Verdict: Approve with changes
Confidence: High for the core touch-cancellation mechanism; medium for nested-scroll interaction.

The submitted fix keeps the Picker's movement method disabled while forwarding touch events to Android's native ScrollingMovementMethod. A per-view gesture filter detects movement beyond touch slop and sends a synthetic ACTION_CANCEL to the base view before continuing the real event, clearing pressed/prepressed state so a drag does not open the Picker. The expert reviewer found this core ordering and state model sound, including fast swipes classified on ACTION_UP, delayed pressed state, pointer replacement, and one cancel per gesture.

Actionable findings

  1. Moderate: PickerDragGestureFilter falls back to touch slop 0 when configuration is unavailable, so any non-zero jitter cancels a click.
  2. Moderate: The constructors redundantly reset Focusable, FocusableInTouchMode, and Clickable immediately after PickerManager.Init; only LongClickable = false is new.
  3. Moderate: Touch handling is duplicated between standard and Material Picker bases, while adjacent DatePicker/TimePicker controls sharing PickerManager are not covered.
  4. Moderate: Nested scrolling behavior is not established; the implementation and tests do not exercise parent interception or the resulting ACTION_CANCEL.
  5. Minor: Synthesized MotionEvent instances are disposed but not explicitly recycled.
  6. Minor: The rationale for keeping DefaultMovementMethod null was removed.
  7. Moderate: Gesture tests use non-intercepting FrameLayout hosts, so they do not cover interaction with a scrolling parent.
  8. Minor: The vertical-drag test does not assert that scroll offsets remain unchanged.

Raw file:line findings are recorded in ../inline-findings.json.


🛠️ Try-Fix — Analysis & Comparison

PR #37232 — Try-Fix Candidates

Candidates run: 2 · Best result: Candidate 1 and Candidate 2 — ✅ Pass

# Approach Result Findings Artifacts
1 Own viewport with Layout-clamped ScrollTo; veto PerformClick ✅ Pass 2 minor try-fix/attempt-1/, try-fix-1/content.md
2 Native BringPointIntoView; intercept drag terminal events in DispatchTouchEvent ✅ Pass 0 try-fix/attempt-2/, try-fix-2/content.md

Candidate 1 (preserved)

PR #37232 — Try-Fix Candidate 1

Result: ✅ Pass · Self-review findings: 2 (0 critical, 0 major, 2 minor) · Test runs used: 1 of 2 permitted (no correction round needed)

Files changed:

File Change
src/Core/src/Platform/Android/PickerDragGestureFilter.cs Rewritten (drag classification + viewport scrolling)
src/Core/src/Platform/Android/MauiPicker.cs +35 / -0 (OnTouchEvent, PerformClick, ctor property re-assert)
src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs +36 / -0 (same, Material 3 view)
src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +2 (MauiPickerBase.OnTouchEvent, MauiPickerBase.PerformClick)

Approach: Own the viewport — scroll the Picker's own scroll offset, arbitrate the click at PerformClick()

Root-cause hypothesis (different from the PR's): The PR assumes the scroll was lost because nothing drives the text machinery on touch, so it re-attaches that machinery (ScrollingMovementMethod.Instance.OnTouchEvent(...)) and then has to undo the side effects of the base gesture after the fact by fabricating an ACTION_CANCEL and re-dispatching it into base.OnTouchEvent.

This candidate treats the Picker as what it actually is: a button whose label is wider than its viewport. The selected value is a rendered, read-only label — the view already owns a scroll offset (ScrollX/ScrollY). So the fix is to move the view's own viewport during a drag using the Layout's line geometry for bounds, and to treat the "no click after a drag" requirement as a click-dispatch concern rather than a touch-pipeline concern: the drag state simply vetoes the next PerformClick().

Implementation:

  • PickerDragGestureFilter (rewritten from scratch) does two things, both pure UI-thread state machine work:
    • ShouldCancelClick(view, e) — touch-slop / active-pointer classification (this API shape is fixed by the existing device test PointerReplacementWithoutMovementRemainsATap). Anchor is captured on DOWN, drag is classified on MOVE and on UP (so a fast swipe whose movement is only visible at UP still counts), the active pointer is re-anchored on POINTER_UP, and CANCEL/DOWN reset the state.
    • ScrollSelectedText(textView, e) — applies the incremental active-pointer delta to View.ScrollTo, clamped to the text Layout's own GetLineLeft(0)/GetLineRight(0)/Height geometry so LTR, RTL and aligned text all clamp correctly, and vertical scrolling is a no-op for the single-line Picker.
  • MauiPickerBase / MauiMaterialPickerBase override OnTouchEvent only to feed the filter (they never fabricate or re-dispatch events, and never touch MovementMethod), and override PerformClick() to veto exactly one click when the gesture was classified as a drag. The veto is cleared on the next ACTION_DOWN, so a canceled drag cannot swallow the following tap.
  • MovementMethod stays null; read-only state (InputTypes.Null, KeyListener == null) is untouched. Focusable/FocusableInTouchMode/Clickable/LongClickable are re-asserted after PickerManager.Init because TextView.setKeyListener(null) resets clickable/focusable — that is a precondition for any fix here, not the strategy.

Different from the existing fix:

PR #37232 This candidate
Scroll source ScrollingMovementMethod.Instance.OnTouchEvent (text machinery) The view's own ScrollTo, clamped by Layout line geometry
Click suppression Fabricate MotionEvent with ACTION_CANCEL and re-dispatch into base.OnTouchEvent Veto the click at PerformClick(); base touch pipeline is never perturbed
Events created Yes (synthetic MotionEvent.Obtain per drag) None
Pressed-state handling Relies on the injected cancel to clear pressed/prepressed + pending callbacks Base view keeps its normal pressed lifecycle; only the click callback is vetoed

Explicitly avoided (previously rejected): ArrowKeyMovementMethod, OnTouchListener-based scrolling, clearing only View.Pressed, MOVE-only or X-only drag classification.

Captured Diff

diff --git a/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs b/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
index 367209bc0f..68b638727b 100644
--- a/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
+++ b/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
@@ -1,5 +1,6 @@
 using Android.Content;
 using Android.Text.Method;
+using Android.Views;
 using AndroidX.Core.Graphics.Drawable;
 using Google.Android.Material.TextField;
 
@@ -11,6 +12,12 @@ internal class MauiMaterialPicker : MauiMaterialPickerBase
 	public MauiMaterialPicker(Context context) : base(context)
 	{
 		PickerManager.Init(this);
+
+		// Setting a null KeyListener resets these, and the Picker still has to behave like a button.
+		Focusable = true;
+		FocusableInTouchMode = false;
+		Clickable = true;
+		LongClickable = false;
 	}
 
 	protected override void Dispose(bool disposing)
@@ -27,6 +34,9 @@ internal class MauiMaterialPicker : MauiMaterialPickerBase
 // TODO: Material3 - make it public in .net 11
 internal class MauiMaterialPickerBase : TextInputEditText
 {
+	readonly PickerDragGestureFilter _dragGestureFilter = new();
+	bool _suppressClick;
+
 	public MauiMaterialPickerBase(Context context) : base(MauiMaterialContextThemeWrapper.Create(context))
 	{
 		if (Background is not null)
@@ -37,5 +47,31 @@ internal class MauiMaterialPickerBase : TextInputEditText
 
 	// MovementMethod handles cursor positioning, scrolling, and text selection (per Android docs).
 	// Since text is readonly, we disable it to avoid unnecessary cursor navigation during keyboard input.
+	// The selected text is instead scrolled by moving this view's own scroll offset.
 	protected override IMovementMethod? DefaultMovementMethod => null;
+
+	public override bool OnTouchEvent(MotionEvent? e)
+	{
+		if (e?.ActionMasked == MotionEventActions.Down)
+			_suppressClick = false;
+
+		if (_dragGestureFilter.ShouldCancelClick(this, e))
+			_suppressClick = true;
+
+		_dragGestureFilter.ScrollSelectedText(this, e);
+
+		return base.OnTouchEvent(e);
+	}
+
+	public override bool PerformClick()
+	{
+		// A drag is not a tap, so veto the click the base view is about to raise.
+		if (_suppressClick)
+		{
+			_suppressClick = false;
+			return false;
+		}
+
+		return base.PerformClick();
+	}
 }
diff --git a/src/Core/src/Platform/Android/MauiPicker.cs b/src/Core/src/Platform/Android/MauiPicker.cs
index 5a3e987934..6a4f1bb8d2 100644
--- a/src/Core/src/Platform/Android/MauiPicker.cs
+++ b/src/Core/src/Platform/Android/MauiPicker.cs
@@ -14,6 +14,12 @@ namespace Microsoft.Maui.Platform
 		public MauiPicker(Context context) : base(context)
 		{
 			PickerManager.Init(this);
+
+			// Setting a null KeyListener resets these, and the Picker still has to behave like a button.
+			Focusable = true;
+			FocusableInTouchMode = false;
+			Clickable = true;
+			LongClickable = false;
 		}
 
 		protected override void Dispose(bool disposing)
@@ -27,6 +33,9 @@ namespace Microsoft.Maui.Platform
 
 	public class MauiPickerBase : AppCompatEditText
 	{
+		readonly PickerDragGestureFilter _dragGestureFilter = new();
+		bool _suppressClick;
+
 		public MauiPickerBase(Context context) : base(context)
 		{
 			if (Background != null)
@@ -35,6 +44,32 @@ namespace Microsoft.Maui.Platform
 
 		// MovementMethod handles cursor positioning, scrolling, and text selection (per Android docs).
 		// Since text is readonly, we disable it to avoid unnecessary cursor navigation during keyboard input.
+		// The selected text is instead scrolled by moving this view's own scroll offset.
 		protected override IMovementMethod? DefaultMovementMethod => null;
+
+		public override bool OnTouchEvent(MotionEvent? e)
+		{
+			if (e?.ActionMasked == MotionEventActions.Down)
+				_suppressClick = false;
+
+			if (_dragGestureFilter.ShouldCancelClick(this, e))
+				_suppressClick = true;
+
+			_dragGestureFilter.ScrollSelectedText(this, e);
+
+			return base.OnTouchEvent(e);
+		}
+
+		public override bool PerformClick()
+		{
+			// A drag is not a tap, so veto the click the base view is about to raise.
+			if (_suppressClick)
+			{
+				_suppressClick = false;
+				return false;
+			}
+
+			return base.PerformClick();
+		}
 	}
 }
\ No newline at end of file
diff --git a/src/Core/src/Platform/Android/PickerDragGestureFilter.cs b/src/Core/src/Platform/Android/PickerDragGestureFilter.cs
index d4401a7fa6..f52fbb2a3c 100644
--- a/src/Core/src/Platform/Android/PickerDragGestureFilter.cs
+++ b/src/Core/src/Platform/Android/PickerDragGestureFilter.cs
@@ -1,18 +1,25 @@
 using Android.Views;
+using Android.Widget;
 using AView = Android.Views.View;
 
 namespace Microsoft.Maui.Platform;
 
+// The Picker renders a read-only label that can be wider than its viewport. Because the Picker has no
+// MovementMethod, nothing moves that viewport during a drag, so this filter tracks the active pointer,
+// moves the view's own scroll offset, and reports when a gesture stopped being a tap.
 sealed class PickerDragGestureFilter
 {
+	const int InvalidPointerId = -1;
+
 	int _touchSlop;
 	int _activePointerId = InvalidPointerId;
 	float _anchorX;
 	float _anchorY;
+	float _lastX;
+	float _lastY;
 	bool _isDrag;
 
-	const int InvalidPointerId = -1;
-
+	// Returns true only on the event where the gesture is first classified as a drag.
 	public bool ShouldCancelClick(AView view, MotionEvent? e)
 	{
 		if (e is null)
@@ -28,16 +35,17 @@ sealed class PickerDragGestureFilter
 				_anchorY = e.GetY(0);
 				_isDrag = false;
 				return false;
+
+			// A fast swipe can report all of its movement on the up event, so classify there too.
 			case MotionEventActions.Move:
+			case MotionEventActions.Up:
 				return TryClassifyDrag(e);
+
 			case MotionEventActions.PointerUp:
-				var cancelClick = TryClassifyDrag(e);
-				ReAnchor(e);
-				return cancelClick;
-			case MotionEventActions.Up:
-				cancelClick = TryClassifyDrag(e);
-				Reset();
-				return cancelClick;
+				var classified = TryClassifyDrag(e);
+				ReAnchorActivePointer(e);
+				return classified;
+
 			case MotionEventActions.Cancel:
 				Reset();
 				return false;
@@ -46,6 +54,53 @@ sealed class PickerDragGestureFilter
 		return false;
 	}
 
+	// Moves the Picker's own scroll offset while a drag is in progress and keeps the pointer position in sync.
+	public void ScrollSelectedText(TextView view, MotionEvent? e)
+	{
+		if (e is null || _activePointerId == InvalidPointerId)
+			return;
+
+		var pointerIndex = e.FindPointerIndex(_activePointerId);
+
+		if (pointerIndex < 0)
+			return;
+
+		var x = e.GetX(pointerIndex);
+		var y = e.GetY(pointerIndex);
+		var action = e.ActionMasked;
+
+		if (_isDrag && (action == MotionEventActions.Move || action == MotionEventActions.Up))
+			ScrollBy(view, _lastX - x, _lastY - y);
+
+		_lastX = x;
+		_lastY = y;
+	}
+
+	static void ScrollBy(TextView view, float deltaX, float deltaY)
+	{
+		var layout = view.Layout;
+
+		if (layout is null || layout.LineCount == 0)
+			return;
+
+		// Every one of these properties crosses the Java/C# bridge, and this runs on every touch move.
+		var currentScrollX = view.ScrollX;
+		var currentScrollY = view.ScrollY;
+		var availableWidth = view.Width - view.CompoundPaddingLeft - view.CompoundPaddingRight;
+		var availableHeight = view.Height - view.CompoundPaddingTop - view.CompoundPaddingBottom;
+
+		// The layout reports where the text actually sits, so alignment and RTL are already accounted for.
+		var minScrollX = (int)global::System.Math.Floor(global::System.Math.Min(0f, layout.GetLineLeft(0)));
+		var maxScrollX = (int)global::System.Math.Ceiling(global::System.Math.Max(0f, layout.GetLineRight(0) - availableWidth));
+		var maxScrollY = global::System.Math.Max(0, layout.Height - availableHeight);
+
+		var scrollX = global::System.Math.Clamp((int)global::System.Math.Round(currentScrollX + deltaX), minScrollX, maxScrollX);
+		var scrollY = global::System.Math.Clamp((int)global::System.Math.Round(currentScrollY + deltaY), 0, maxScrollY);
+
+		if (scrollX != currentScrollX || scrollY != currentScrollY)
+			view.ScrollTo(scrollX, scrollY);
+	}
+
 	bool TryClassifyDrag(MotionEvent e)
 	{
 		if (_isDrag || _activePointerId == InvalidPointerId)
@@ -66,7 +121,9 @@ sealed class PickerDragGestureFilter
 		return true;
 	}
 
-	void ReAnchor(MotionEvent e)
+	// When the finger that started the gesture leaves, keep tracking with a remaining finger instead of
+	// treating the pointer swap as movement.
+	void ReAnchorActivePointer(MotionEvent e)
 	{
 		var actionIndex = e.ActionIndex;
 
diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
index 01d355e5ff..255ed189ba 100644
--- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
+++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
@@ -25,3 +25,5 @@ override Microsoft.Maui.Platform.MauiSwipeRefreshLayout.OnInterceptTouchEvent(An
 override Microsoft.Maui.Platform.MauiWebView.Dispose(bool disposing) -> void
 override Microsoft.Maui.Platform.MauiWebView.OnDetachedFromWindow() -> void
 override Microsoft.Maui.Platform.MauiWebView.OnTouchEvent(Android.Views.MotionEvent? e) -> bool
+override Microsoft.Maui.Platform.MauiPickerBase.OnTouchEvent(Android.Views.MotionEvent? e) -> bool
+override Microsoft.Maui.Platform.MauiPickerBase.PerformClick() -> bool

Test Command and Results

Exact command (the only permitted one, run once):

pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -TestFilter "Category=Picker"

Outcome: Tests run: 121 Passed: 119 Inconclusive: 0 Failed: 0 Ignored: 2 — XHarness exit code 0 (SUCCESS), Android emulator API 30 (emulator-5554). Single pass: no compile-error iteration, no runtime-failure correction round.

Required test Result
LongSelectedTextScrollsHorizontallyAndRemainsReadOnly (4 theory cases) ✅ PASS
TapJitterClicksButFastSwipeDoesNot ✅ PASS
VerticalDragDoesNotClick ✅ PASS
CanceledDragDoesNotSuppressNextTap ✅ PASS
PointerReplacementWithoutMovementRemainsATap ✅ PASS
MovementMethodRemainsDisabled ✅ PASS

Full log: CustomAgentLogsTmp/PRState/37232/PRAgent/try-fix/attempt-1/test-output.log


Expert Self-Review (inline, maui-expert-reviewer rules)

findings_count: 2 — 0 critical, 0 major, 2 minor. One pre-test correction was applied from the Android performance-hot-path rule (cache ScrollX/ScrollY JNI reads in locals on the per-touch-move scroll path).

[
  {
    "path": "src/Core/src/Platform/Android/MauiPicker.cs",
    "line": 62,
    "body": "**[minor] Logic and Correctness** — The click veto is cleared on the next ACTION_DOWN or when it is consumed by PerformClick(). If a drag ends without the base view raising a click (for example the parent steals the gesture and the view only sees ACTION_UP after a drag), a programmatic or accessibility-initiated PerformClick() arriving before the next touch DOWN would be swallowed once. Bounded to a single click and self-healing on the next gesture, so accepted rather than adding more state."
  },
  {
    "path": "src/Core/src/Platform/Android/PickerDragGestureFilter.cs",
    "line": 72,
    "body": "**[minor] Regression Prevention** — _isDrag is intentionally not reset on ACTION_UP (unlike the PR variant) so that ScrollSelectedText can apply the final UP delta and PerformClick can still see the drag when the click callback is posted rather than invoked inline. State is fully reset on the next ACTION_DOWN and on ACTION_CANCEL, so no stale drag can leak into a later gesture."
  }
]

Recorded at CustomAgentLogsTmp/PRState/37232/PRAgent/try-fix/attempt-1/reviewer-findings.json (diff snapshot unchanged after the test loop, so no Step 7.5 refresh was required).


Analysis

Result: Pass

What happened: pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -TestFilter "Category=Picker" built and ran on the Android emulator (API 30, emulator-5554) in a single pass — no compile-error iteration and no correction round was needed. Result: Tests run: 121, Passed: 119, Failed: 0, Ignored: 2, XHarness exit code 0. All six mandated methods reported [PASS]:

  • Long Selected Text Scrolls Horizontally And Remains Read Only (all 4 theory cases: standard/Material × normal/delayed pressed state)
  • Picker Tap Jitter Clicks But Fast Swipe Does Not
  • Picker Vertical Drag Does Not Click
  • Picker Canceled Drag Does Not Suppress Next Tap
  • Picker Pointer Replacement Without Movement Remains A Tap
  • Picker Movement Method Remains Disabled

Why it worked: The selected value is a read-only rendered label, so the missing behavior was never really about the text machinery — it was about nobody moving the view's own viewport. Moving ScrollX/ScrollY directly, clamped to the Layout's own GetLineLeft(0)/GetLineRight(0)/Height geometry, restores horizontal drag scrolling without reinstating any MovementMethod (so MovementMethod stays null and read-only state, InputTypes.Null + null KeyListener, is untouched). Because TextView.setKeyListener(null) resets clickable/focusable, Focusable/FocusableInTouchMode/Clickable/LongClickable are re-asserted after PickerManager.Init — that is a precondition for any fix in this area, not the strategy.

The click side is handled as a dispatch concern rather than a touch-pipeline concern: the drag classifier (touch slop + active pointer, classifying on MOVE and on UP so a fast swipe whose movement is only visible at ACTION_UP still counts) raises a one-shot veto that PerformClick() consumes. That means the base view's pressed/prepressed lifecycle and pending callbacks are never perturbed, so:

  • the delayed-pressed-state host (ShouldDelayChildPressedState() => true) still works, because the posted PerformClick runnable is what gets vetoed, not the prepressed bookkeeping;
  • an ACTION_CANCEL mid-drag cannot leave residue, because the veto is cleared on the next ACTION_DOWN;
  • no synthetic MotionEvent is ever created or re-dispatched.

Self-review: 2 findings, both [minor], both accepted rather than fixed — (1) a programmatic/accessibility PerformClick() arriving after a drag but before the next ACTION_DOWN could be swallowed once (bounded, self-healing); (2) _isDrag is deliberately not reset on ACTION_UP so the final UP delta can scroll and a posted click can still see the drag — full reset happens on the next ACTION_DOWN and on ACTION_CANCEL. One correction was applied before testing, from the Android performance-hot-path rule: ScrollX/ScrollY JNI reads are now cached in locals since the scroll path runs on every touch move.

Insights:

  • The touch-slop/active-pointer classifier is effectively specified by the device test (PointerReplacementWithoutMovementRemainsATap constructs PickerDragGestureFilter directly and asserts ShouldCancelClick returns false for DOWN → POINTER_DOWN → POINTER_UP → UP with no movement), so any candidate must keep that type and semantics. The real design space is how you scroll and how you suppress the click.
  • Classification must happen on ACTION_UP too, not just ACTION_MOVE — the DispatchSwipeWithoutMove regression sends DOWN then UP with no intervening MOVE.
  • The Picker's EditText is implicitly single-line/horizontally-scrolling because PickerManager.Init sets InputType = InputTypes.Null, and TextView.setInputType applies applySingleLine(true, …) for non-multiline types. That is why the layout is wider than the viewport and ScrollX can exceed 0 at all; a wrapped (multi-line) layout would make maxScrollX zero.
  • Vertical clamping falls out for free: single-line means layout.Height <= availableHeight, so maxScrollY is 0 and a vertical drag scrolls nothing while still correctly suppressing the click.

Baseline

Baseline established and restored with .github/scripts/EstablishBrokenBaseline.ps1 only. Worktree restored: src/Core is clean and the 36 pre-existing unrelated modifications under .github/ and eng/ are intact and unmodified.


Candidate 2

PR #37232 — Try-Fix Candidate 2

Result: ✅ Pass · Self-review findings: 0 · Test runs used: 1 of 2 permitted (no correction/retest)

Approach: Native point-reveal scrolling with terminal-event interception

PickerDragGestureFilter tracks touch slop, both axes, the active pointer, and incremental horizontal movement. Instead of calling a MovementMethod or directly setting the viewport, it asks Android TextView.BringPointIntoView to reveal the character beyond the visible edge; Android's native text layout owns scrolling, clamping, alignment, and RTL.

Both Picker bases override DispatchTouchEvent, not OnTouchEvent. After a drag is classified on MOVE or UP, the filter cancels pending input callbacks, clears pressed state, and consumes the remainder of that stream. Consequently the base EditText never receives a terminal UP for a drag, while taps and sub-slop jitter use the untouched native dispatch path. DOWN, UP, and CANCEL reset state; POINTER_UP reanchors to a remaining active pointer. Constructors reassert button semantics after the null key listener changes Android defaults. MovementMethod remains null.

Materially different: The PR re-enters ScrollingMovementMethod and injects a synthetic CANCEL into base OnTouchEvent; candidate 1 manually owns ScrollX/ScrollY and vetoes PerformClick. Candidate 2 uses native point reveal plus terminal touch-stream interception: no MovementMethod, synthetic event, ScrollTo/manual bounds, OnTouchListener, or PerformClick override.

Files Changed

  • src/Core/src/Platform/Android/PickerDragGestureFilter.cs (+159): active-pointer classifier, point reveal, and stream-consumption state.
  • src/Core/src/Platform/Android/MauiPicker.cs (+14): native dispatch hook and post-init button semantics.
  • src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs (+15): matching Material 3 behavior.
  • src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt (+1): MauiPickerBase.DispatchTouchEvent override.

Complete Captured Diff

diff --git a/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs b/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
index 367209bc0f..eae7cd6fb7 100644
--- a/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
+++ b/src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs
@@ -1,5 +1,6 @@
 using Android.Content;
 using Android.Text.Method;
+using Android.Views;
 using AndroidX.Core.Graphics.Drawable;
 using Google.Android.Material.TextField;
 
@@ -11,6 +12,10 @@ internal class MauiMaterialPicker : MauiMaterialPickerBase
 	public MauiMaterialPicker(Context context) : base(context)
 	{
 		PickerManager.Init(this);
+		Focusable = true;
+		FocusableInTouchMode = false;
+		Clickable = true;
+		LongClickable = false;
 	}
 
 	protected override void Dispose(bool disposing)
@@ -27,6 +32,8 @@ internal class MauiMaterialPicker : MauiMaterialPickerBase
 // TODO: Material3 - make it public in .net 11
 internal class MauiMaterialPickerBase : TextInputEditText
 {
+	readonly PickerDragGestureFilter _dragGestureFilter = new();
+
 	public MauiMaterialPickerBase(Context context) : base(MauiMaterialContextThemeWrapper.Create(context))
 	{
 		if (Background is not null)
@@ -38,4 +45,12 @@ internal class MauiMaterialPickerBase : TextInputEditText
 	// MovementMethod handles cursor positioning, scrolling, and text selection (per Android docs).
 	// Since text is readonly, we disable it to avoid unnecessary cursor navigation during keyboard input.
 	protected override IMovementMethod? DefaultMovementMethod => null;
+
+	public override bool DispatchTouchEvent(MotionEvent? e)
+	{
+		if (_dragGestureFilter.ShouldConsumeTouch(this, e))
+			return true;
+
+		return base.DispatchTouchEvent(e);
+	}
 }
diff --git a/src/Core/src/Platform/Android/MauiPicker.cs b/src/Core/src/Platform/Android/MauiPicker.cs
index 5a3e987934..fa885dba91 100644
--- a/src/Core/src/Platform/Android/MauiPicker.cs
+++ b/src/Core/src/Platform/Android/MauiPicker.cs
@@ -14,6 +14,10 @@ namespace Microsoft.Maui.Platform
 		public MauiPicker(Context context) : base(context)
 		{
 			PickerManager.Init(this);
+			Focusable = true;
+			FocusableInTouchMode = false;
+			Clickable = true;
+			LongClickable = false;
 		}
 
 		protected override void Dispose(bool disposing)
@@ -27,6 +31,8 @@ namespace Microsoft.Maui.Platform
 
 	public class MauiPickerBase : AppCompatEditText
 	{
+		readonly PickerDragGestureFilter _dragGestureFilter = new();
+
 		public MauiPickerBase(Context context) : base(context)
 		{
 			if (Background != null)
@@ -36,5 +42,13 @@ namespace Microsoft.Maui.Platform
 		// MovementMethod handles cursor positioning, scrolling, and text selection (per Android docs).
 		// Since text is readonly, we disable it to avoid unnecessary cursor navigation during keyboard input.
 		protected override IMovementMethod? DefaultMovementMethod => null;
+
+		public override bool DispatchTouchEvent(MotionEvent? e)
+		{
+			if (_dragGestureFilter.ShouldConsumeTouch(this, e))
+				return true;
+
+			return base.DispatchTouchEvent(e);
+		}
 	}
 }
\ No newline at end of file
diff --git a/src/Core/src/Platform/Android/PickerDragGestureFilter.cs b/src/Core/src/Platform/Android/PickerDragGestureFilter.cs
new file mode 100644
index 0000000000..5cc2a484b9
--- /dev/null
+++ b/src/Core/src/Platform/Android/PickerDragGestureFilter.cs
@@ -0,0 +1,159 @@
+using Android.Views;
+using Android.Widget;
+using AView = Android.Views.View;
+
+namespace Microsoft.Maui.Platform;
+
+sealed class PickerDragGestureFilter
+{
+	int _touchSlop;
+	int _activePointerId = InvalidPointerId;
+	float _anchorX;
+	float _anchorY;
+	float _lastX;
+	bool _isDrag;
+	bool _consumeGesture;
+
+	const int InvalidPointerId = -1;
+
+	public bool ShouldConsumeTouch(TextView view, MotionEvent? e)
+	{
+		if (e is null)
+			return false;
+
+		var action = e.ActionMasked;
+
+		if (action == MotionEventActions.Down)
+			_consumeGesture = false;
+
+		RevealDraggedText(view, e);
+
+		var dragStarted = ShouldCancelClick(view, e);
+
+		if (dragStarted)
+			_consumeGesture = true;
+
+		var consume = _consumeGesture;
+
+		if (dragStarted)
+		{
+			view.CancelPendingInputEvents();
+			view.Pressed = false;
+		}
+
+		if (action == MotionEventActions.Up || action == MotionEventActions.Cancel)
+			_consumeGesture = false;
+
+		return consume;
+	}
+
+	public bool ShouldCancelClick(AView view, MotionEvent? e)
+	{
+		if (e is null)
+			return false;
+
+		switch (e.ActionMasked)
+		{
+			case MotionEventActions.Down:
+				var context = view.Context;
+				_touchSlop = context is null ? 0 : ViewConfiguration.Get(context)?.ScaledTouchSlop ?? 0;
+				_activePointerId = e.GetPointerId(0);
+				_anchorX = e.GetX(0);
+				_anchorY = e.GetY(0);
+				_lastX = _anchorX;
+				_isDrag = false;
+				return false;
+			case MotionEventActions.Move:
+				return TryClassifyDrag(e);
+			case MotionEventActions.PointerUp:
+				var cancelClick = TryClassifyDrag(e);
+				ReAnchor(e);
+				return cancelClick;
+			case MotionEventActions.Up:
+				cancelClick = TryClassifyDrag(e);
+				Reset();
+				return cancelClick;
+			case MotionEventActions.Cancel:
+				Reset();
+				return false;
+		}
+
+		return false;
+	}
+
+	void RevealDraggedText(TextView view, MotionEvent e)
+	{
+		if (_activePointerId == InvalidPointerId)
+			return;
+
+		var pointerIndex = e.FindPointerIndex(_activePointerId);
+
+		if (pointerIndex < 0)
+			return;
+
+		var x = e.GetX(pointerIndex);
+		var action = e.ActionMasked;
+
+		if (_isDrag && (action == MotionEventActions.Move || action == MotionEventActions.Up))
+		{
+			var deltaX = _lastX - x;
+			var layout = view.Layout;
+
+			if (deltaX != 0 && layout is not null && layout.LineCount > 0)
+			{
+				var availableWidth = view.Width - view.CompoundPaddingLeft - view.CompoundPaddingRight;
+
+				if (availableWidth > 0)
+				{
+					var targetX = deltaX > 0
+						? view.ScrollX + availableWidth + deltaX
+						: view.ScrollX + deltaX;
+					var offset = layout.GetOffsetForHorizontal(0, targetX);
+					view.BringPointIntoView(offset);
+				}
+			}
+		}
+
+		_lastX = x;
+	}
+
+	bool TryClassifyDrag(MotionEvent e)
+	{
+		if (_isDrag || _activePointerId == InvalidPointerId)
+			return false;
+
+		var pointerIndex = e.FindPointerIndex(_activePointerId);
+
+		if (pointerIndex < 0)
+			return false;
+
+		var deltaX = global::System.Math.Abs(e.GetX(pointerIndex) - _anchorX);
+		var deltaY = global::System.Math.Abs(e.GetY(pointerIndex) - _anchorY);
+
+		if (global::System.Math.Max(deltaX, deltaY) <= _touchSlop)
+			return false;
+
+		_isDrag = true;
+		return true;
+	}
+
+	void ReAnchor(MotionEvent e)
+	{
+		var actionIndex = e.ActionIndex;
+
+		if (e.GetPointerId(actionIndex) != _activePointerId || e.PointerCount <= 1)
+			return;
+
+		var newPointerIndex = actionIndex == 0 ? 1 : 0;
+		_activePointerId = e.GetPointerId(newPointerIndex);
+		_anchorX = e.GetX(newPointerIndex);
+		_anchorY = e.GetY(newPointerIndex);
+		_lastX = _anchorX;
+	}
+
+	void Reset()
+	{
+		_activePointerId = InvalidPointerId;
+		_isDrag = false;
+	}
+}
diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
index 01d355e5ff..00b3178d2a 100644
--- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
+++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
@@ -25,3 +25,4 @@ override Microsoft.Maui.Platform.MauiSwipeRefreshLayout.OnInterceptTouchEvent(An
 override Microsoft.Maui.Platform.MauiWebView.Dispose(bool disposing) -> void
 override Microsoft.Maui.Platform.MauiWebView.OnDetachedFromWindow() -> void
 override Microsoft.Maui.Platform.MauiWebView.OnTouchEvent(Android.Views.MotionEvent? e) -> bool
+override Microsoft.Maui.Platform.MauiPickerBase.DispatchTouchEvent(Android.Views.MotionEvent? e) -> bool

Test Command and Results

Exact command (run once; the only test command used):

pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -TestFilter "Category=Picker"

Outcome: Tests run: 121 Passed: 119 Inconclusive: 0 Failed: 0 Ignored: 2; XHarness exit code 0 (SUCCESS) on emulator-5554, Android API 30. No correction or retest was needed.

  • LongSelectedTextScrollsHorizontallyAndRemainsReadOnly: PASS (all 4 standard/Material × delayed-state cases)
  • TapJitterClicksButFastSwipeDoesNot: PASS
  • VerticalDragDoesNotClick: PASS
  • CanceledDragDoesNotSuppressNextTap: PASS
  • PointerReplacementWithoutMovementRemainsATap: PASS
  • MovementMethodRemainsDisabled: PASS

Full output: CustomAgentLogsTmp/PRState/37232/PRAgent/try-fix/attempt-2/test-output.log

Expert Self-Review

findings_count: 0 — clean. The final diff was unchanged after testing. Inline review covered all overarching principles, always-active dimensions, and routed Performance, Public API, Threading, Memory, Android, Gestures, and Accessibility rules.

Analysis

The candidate passed because native point reveal supplies text scrolling without re-enabling cursor/selection machinery or manually computing viewport bounds. Consuming only classified drag streams prevents the base EditText from seeing a click-producing UP; ordinary taps remain native. Canceling pending input callbacks and clearing pressed state at classification handles delayed pressed state, while independent terminal resets prevent suppression from leaking to the next gesture. Active-pointer replacement is reanchored and UP-only movement is classified before dispatch.

Baseline

Established and restored exclusively through .github/scripts/EstablishBrokenBaseline.ps1; unrelated pre-existing worktree changes were preserved. Attempt artifacts: CustomAgentLogsTmp/PRState/37232/PRAgent/try-fix/attempt-2/.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winner: pr-plus-reviewer

The submitted PR has the strongest underlying design: it keeps MovementMethod null, delegates scrolling to Android's native ScrollingMovementMethod, and sends a targeted synthetic ACTION_CANCEL only to the base view when touch slop is crossed. pr-plus-reviewer preserves that proven behavior while restoring the invariant documentation and explicitly recycling synthesized MotionEvent instances.

Candidate comparison

Rank Candidate Required Android Picker validation Assessment
1 pr-plus-reviewer ✅ 121 run, 119 passed, 2 ignored, 0 failed Best balance of correctness and scope. It retains native text layout, alignment, RTL, pressed/prepressed cancellation, fast-swipe classification, and pointer tracking, with the two concrete reviewer improvements applied.
2 pr ✅ Trusted Gate passed; all 13 new regression cases passed Core mechanism is sound, but the synthesized event is not explicitly recycled and the reason DefaultMovementMethod must remain null was removed.
3 try-fix-2 ✅ 121 run, 119 passed, 2 ignored, 0 failed Native point reveal avoids manual bounds, but consuming the drag stream in DispatchTouchEvent and manually clearing pending/pressed state is more invasive than delivering a complete cancel to the base view. BringPointIntoView also changes scrolling from native drag handling to character-point reveal.
4 try-fix-1 ✅ 121 run, 119 passed, 2 ignored, 0 failed Manual ScrollTo bounds and a PerformClick veto pass the tests, but duplicate Android text-layout logic and a stale one-shot veto can suppress a later programmatic/accessibility click.

No candidate failed the required regression tests, so the failure-priority rule does not alter the ranking.

Expert review reconciliation

The expert reviewer confirmed the PR's cancel-before-replay ordering, one-cancel latch, delayed pressed-state handling, ACTION_UP fast-swipe handling, active-pointer replacement, and lack of lifecycle leaks. Raw inline findings are in inline-findings.json.

The consolidated candidate applies the two findings that improve the submitted fix without widening behavior. Other suggestions are not winner requirements:

  • The post-PickerManager.Init focus/click assignments are intentional: Init sets a null key listener after its initial assignments, and Android can reset those button semantics.
  • Expanding the behavior to DatePicker and TimePicker conflicts with this PR's selected-text Picker scope.
  • A valid Android View is constructed with a context, so the zero-slop fallback is defensive-path uncertainty rather than a demonstrated runtime defect.
  • Scrollable-parent interaction and stronger vertical-offset assertions remain coverage opportunities; the focused evidence does not establish a regression, and adding new gesture arbitration in this refinement would exceed the one-pass scope.

Recommendation

Apply pr-plus-reviewer/reviewer.patch to the submitted PR. The required test command passed once from the mandated candidate sandbox, and its build/test paths resolve to /home/vsts/work/_temp/pr-37232-pr-plus-reviewer.


📱 UI Tests — ViewBaseTests

Detected UI test categories: ViewBaseTests

✅ Deep UI tests — 118 passed, 0 failed, 1 skipped across 1 category on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
ViewBaseTests 118/119 (1 skipped) ✓ —
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

🧭 Next Steps — reviewer patch required (pr-plus-reviewer)

The reviewer-enhanced candidate won, so the submitted PR still needs those changes.

Why: The reviewer-enhanced PR preserves the submitted native scrolling and synthetic-cancel design while restoring its key invariant documentation and explicitly recycling synthesized MotionEvent instances. It passed all required Android Picker regressions and introduces less custom touch behavior than either try-fix alternative.

Apply PRAgent/pr-plus-reviewer/reviewer.patch from the CopilotLogs
artifact (or follow the report's Required submitted-PR change), push the update, and run
the review again.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Aug 10, 2026
@kubaflo

kubaflo commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo
kubaflo changed the base branch from main to inflight/current August 11, 2026 13:23
@kubaflo
kubaflo merged commit 69f68a4 into dotnet:inflight/current Aug 11, 2026
169 of 177 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR11 milestone Aug 11, 2026
kubaflo added a commit that referenced this pull request Aug 12, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Aug 27, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 2, 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!

avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.

https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 3, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 3, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 4, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 6, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 7, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 7, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 8, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 8, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 9, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
kubaflo added a commit that referenced this pull request Sep 9, 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

#29068 set the Android Picker's default movement method to `null` to
avoid editable `EditText` cursor behavior. That also disabled Android's
built-in overflow-text scrolling, so long selected values could no
longer be dragged horizontally.

### Description of Change

Restores horizontal drag scrolling for long selected `Picker` text on
Android while keeping the control read-only and preserving normal tap
behavior. This applies to both the standard and Material 3 Picker
platform views.

The implementation keeps the Picker's movement method disabled,
preserving its existing text layout and D-pad focus navigation, and
delegates only touch events to Android's native
`ScrollingMovementMethod`. A gesture filter classifies horizontal and
vertical movement against Android's touch slop, including movement first
observed on `ACTION_UP`. When a gesture becomes a drag, the Picker
platform view sends its base Android view an `ACTION_CANCEL`, which
clears pressed/prepressed state and pending tap/long-press callbacks
before the real scroll event continues.

The filter tracks the active pointer and resets after `ACTION_UP` or
`ACTION_CANCEL`. Long-click behavior is disabled only on the standard
and Material Picker platform views after `PickerManager.Init`, avoiding
behavior changes to DatePicker, TimePicker, and compatibility renderers
that share `PickerManager`.

The hint-only `Title` case remains out of scope because Android renders
the hint separately from selected text.

### Issues Fixed

Addresses the selected-value scenario in #36834. This PR intentionally
does not claim to close the issue while the hint-only scenario remains
unresolved.

### Alternative to #37067

#37067 implements manual gesture tracking and scrolling through an
`OnTouchListener`. This alternative keeps Android's native
text-scrolling implementation, avoids occupying the view's single
touch-listener slot, and only adds click suppression around native
scrolling.

### What NOT to Do (for future agents)

- Do not use `ArrowKeyMovementMethod`: empirical testing showed that it
does not restore touch scrolling and reintroduces cursor-oriented
behavior.
- Do not implement manual scrolling through an `OnTouchListener`: it
owns Android's single listener slot and requires custom alignment, RTL,
and scroll-bound handling.
- Do not clear only `View.Pressed` to suppress the click: Android
scrolling containers can use a prepressed state and pending callbacks,
so the complete native touch state must be canceled.
- Do not classify only `ACTION_MOVE` or only the X delta: fast swipes
may cross slop on `ACTION_UP`, and vertical movement must not open the
dialog.
- Do not treat the hint-only `Title` as selected text: Android lays it
out separately and this movement method cannot scroll it.

### Tests

- Android Core device tests, `Category=Picker`, on API 34: 121 run, 119
passed, 2 ignored, 0 failed.
- Android Core device tests, `Category=Picker`, on API 35: 121 run, 119
passed, 2 ignored, 0 failed.
- The Picker movement method remains `null`, preventing the RTL and
horizontal-alignment visual regressions caught by UI-test baselines.
- The same expanded tests against the previous implementation produced 8
failures because the Picker became long-clickable.
- With the long-click assertion removed to isolate touch behavior, the
previous implementation still produced 4 failures: fast swipes and
vertical drags opened both standard and Material Pickers.
- Coverage includes normal taps, jitter below touch slop, horizontal and
vertical drags, a fast swipe with no qualifying `MOVE`, delayed child
pressed state, canceled drag followed by a tap, active-pointer
replacement, D-pad focus preservation, read-only properties, and
standard/Material platform views.

### Evidence

The original empirical comparison, including recordings and screenshots
for `main`, #37067, `ArrowKeyMovementMethod`, and
`ScrollingMovementMethod`, is in [this issue
comment](#36834 (comment)).

#### Initial recording

This is the empirically validated `ScrollingMovementMethod` variant used
as the basis for this PR.


https://github.com/user-attachments/assets/068ec32b-84e5-496c-8e65-74ac23a422fa

---------
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants