Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 12, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

utkarsh2827 and others added 13 commits December 30, 2025 23:18
Test: tested locally
Bug: NA
Change-Id: I395d2626dc7ca05b49720f4c37e37859873a3030
1.2.0-beta01 was never released and fixes are needed for 1.2.0-alpha02 (e.g. for b/453531977) before launching the beta.

Bug: 452265486
Bug: 474393509
Test: None
Relnote: N/A
Change-Id: Ib5d8f5580de812e243a0d112c471f0df14d300e3
…ionToolbar

Key changes:
- **Gesture Differentiation**: Implements `AnnotationToolbarTouchHandler` to intelligently distinguish between long-press-to-drag gestures and scrolling.
- **OnToolbarDragListener**: Defines a new interface to relay drag events (start, move, end, cancel) to external coordinators.
- **ToolbarDockState**: Defines a contract for components that support docking, standardizing how the toolbar reports and updates its position (START, END, BOTTOM).

Bug: b/472376731
Test: ./gradlew :pdf:pdf-ink:connectedAndroidTest
Change-Id: I5f3a72192a66c03f84c06fe7391d396266968b03
Introduces a new drag-and-drop system for the AnnotationToolbar, allowing it to be repositioned and docked to the sides or bottom of the screen.

Key changes:

-   **Docking Logic:** A `ToolbarDockState` interface  define the possible docking locations (`START`, `END`, `BOTTOM`). The `AnnotationToolbar` now manages its layout based on its `dockState`, rearranging its children for horizontal or vertical orientation.

-   **Scrollable Tool Tray:** The main tool tray is now wrapped in a `ScrollView` to ensure all tools are accessible in constrained spaces, such as in landscape orientation.

Bug: b/472376731
Test: ./gradlew :pdf:pdf-ink:connectedAndroidTest
Change-Id: I75ee6642631e7142123e833e4bb9611fcf680a99
Introduces a `ToolbarCoordinator` layout to manage the drag, drop, and snapping behavior of the `AnnotationToolbar`.

Key changes:
- `ToolbarCoordinator`: A new `FrameLayout` that acts as a parent container. It is now responsible for handling drag gestures, moving the toolbar, and snapping it to the final docked position.
- `AnchorManager`: A new helper class that manages the visibility and highlighting of the anchor point views (`START`, `END`, `BOTTOM`) during a drag operation. It calculates the closest anchor to provide visual feedback and determine the final drop target.

Bug: b/472376731
Test: ./gradlew :pdf:pdf-ink:connectedAndroidTest
Change-Id: I84fa1d5bc7ff8e54b090bac1b2bd97ffea0bc251
Wasn't including RootLayoutElement.
Wasn't collecting intents.

Test: Existing, and stacked diff which enables
Change-Id: I2984d305390bd13f364b2e72cfee7fd6dd85723d
…ment

This CL targets following changes:
- Integrates ToolbarCoordinator in EditablePdfViewerFragment, which manages drag and drop feature of annotation toolbar.
- Injects toolbar view in toolbar coordinator and listen for orientation changes to update mask path for ink view. This disallows strokes to be drawn above toolbar.

Bug: b/472376277
Test: ./gradlew :pdf:pdf-ink:connectedAndroidTest
Change-Id: I81ba4443d82f5b14f8142e6e8c3363fa595920e2
androidx.xr.glimmer.benchmark depends on xr:glimmer:test-utils which
already has the implementation of GlimmerRule. As part of this CL,
GlimmerRule replaced the one from test-utils.

Test: N/A
Change-Id: I4d12ea6624f6bf9c2a55d991da8cd4d249c3e467
* changes:
  feat(fragment): Integrate ToolbarCoordinator in EditablePdfViewerFragment
  feat(view): Add ToolbarCoordinator for drag-and-drop management
  feat(view): Make AnnotationToolbar draggable and dockable
  feat(view): Implement robust drag-and-drop touch handling for AnnotationToolbar
@pull pull bot locked and limited conversation to collaborators Jan 12, 2026
@pull pull bot added the ⤵️ pull label Jan 12, 2026
@pull pull bot merged commit 7f39db9 into MaxMood96:androidx-main Jan 12, 2026
2 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants