Skip to content

Preserve custom long-click listeners on navigation items#5089

Open
sorinc03 wants to merge 1 commit into
material-components:masterfrom
sorinc03:fix/navigationbar-pre-o-long-click-listener
Open

Preserve custom long-click listeners on navigation items#5089
sorinc03 wants to merge 1 commit into
material-components:masterfrom
sorinc03:fix/navigationbar-pre-o-long-click-listener

Conversation

@sorinc03
Copy link
Copy Markdown

Summary

  • avoid re-installing pre-O TooltipCompat long-click handling when a custom NavigationBarItemView long-click listener is present
  • keep the existing L/M tooltip guard and platform tooltip behavior on O+
  • add a Robolectric regression for a custom listener surviving a title refresh on API 24

Fixes #1368.

Test plan

  • ./gradlew :lib:testDebugUnitTest --tests com.google.android.material.navigation.NavigationBarItemViewTest
  • ./gradlew :lib:lintDebug
  • git diff --check

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 31, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BottomNavigationView item's long click handling

1 participant