mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
[Tabs] Show tooltip with tab text or content description (if tab is icon only) when long press.
PiperOrigin-RevId: 342411547
This commit is contained in:
parent
a12519d009
commit
fd3639092e
@ -2876,7 +2876,7 @@ public class TabLayout extends HorizontalScrollView {
|
||||
}
|
||||
|
||||
final CharSequence contentDesc = tab != null ? tab.contentDesc : null;
|
||||
TooltipCompat.setTooltipText(this, hasText ? null : contentDesc);
|
||||
TooltipCompat.setTooltipText(this, hasText ? text : contentDesc);
|
||||
}
|
||||
|
||||
private void tryUpdateBadgeDrawableBounds(@NonNull View anchor) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user