Skip to content

Commit fd36390

Browse files
committed
[Tabs] Show tooltip with tab text or content description (if tab is icon only) when long press.
PiperOrigin-RevId: 342411547
1 parent a12519d commit fd36390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/java/com/google/android/material/tabs/TabLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2876,7 +2876,7 @@ private void updateTextAndIcon(
28762876
}
28772877

28782878
final CharSequence contentDesc = tab != null ? tab.contentDesc : null;
2879-
TooltipCompat.setTooltipText(this, hasText ? null : contentDesc);
2879+
TooltipCompat.setTooltipText(this, hasText ? text : contentDesc);
28802880
}
28812881

28822882
private void tryUpdateBadgeDrawableBounds(@NonNull View anchor) {

0 commit comments

Comments
 (0)