Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] ListView ContextActions in modal page #26854

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Dec 29, 2024

Description of Change

Android does not natively support applying an Action Mode to a DialogFragment. When startActionMode or startSupportActionMode is invoked, the Action Mode is associated with the Activity hosting the Fragment. This creates a usability issue because the DialogFragment often covers the navigation bar, which is where context actions are typically displayed. As a result, users may perceive that no action has been initiated. Furthermore, if the DialogFragment is closed while the context action is still active, the navigation bar remains in the context menu state, causing confusion.

To address this limitation, I propose intercepting the creation of the ActionMode when the FragmentManager detects a modal fragment. Instead of relying on the default implementation, we can introduce a custom solution that uses an action sheet within the modal navigation class. This ensures that context actions are visually and functionally tied to the DialogFragment, improving the overall user experience.

Issues Fixed

Fixes #21261

Before After
Screen.Recording.2024-12-30.at.00.40.43.mov
Screen.Recording.2024-12-30.at.00.38.36.mov

Copy link
Contributor

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@rmarinho
Copy link
Member

rmarinho commented Jan 3, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] ListView ContextActions don't show up in modal page
2 participants