question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabs] Useless tooltip on tab with text

See original GitHub issue

Description: Tooltip is shown even when the tab has text, and tooltip has identical text. Probably caused by https://github.com/material-components/material-components-android/commit/fd3639092e1ffef9dc11bcedf79f32801d85e898, although there is “if tab is icon only” in description, but I don’t see how it could make it “icon only”. 🤷‍♂️

Expected behavior: Tooltip is not shown on tabs which have text, if there’s no contentDescription specified.

Source code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.google.android.material.tabs.TabLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.tabs.TabItem
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Tab 1" />

        <com.google.android.material.tabs.TabItem
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Tab 2" />

    </com.google.android.material.tabs.TabLayout>

</LinearLayout>

Android API version: 30

Material Library version: 1.3.0

Device: API 30 emulator

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
hunterstichcommented, Feb 18, 2021

Looking through the guidelines there is a section about not showing tooltips when they simply restate visible UI text - https://material.io/components/tooltips#placement

I’ll talk bring this up with the team.

0reactions
drchencommented, Sep 1, 2021

Confirmed with the team. So the behavior is working as intended because tabs has limited displaying space. When users enlarge the text scale, we cannot enlarge tabs’ text scale. Instead tooltips can provide larger text for the accessibility purpose. Closing the issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android TabLayout annoying popup (tooltip) on tab title long ...
I am making an android app with an activity that includes tabs using TabLayout. Nothing fancy, just really standard stuff. In fact, so...
Read more >
How I can use not selector in my tabs to show tooltip message ...
I am making a page there are 3 tabs “seeker”, “Owner” and “Admin”. (1) If seeker logs in then “Owner” and “Admin” tabs...
Read more >
Set ToolTip for Tab - AutoIt GUI Help and Support
Really strange, I can't get tabs 5 and 7 to work. They are displaying tabs 1 and 2's tooltips and are not sending...
Read more >
how to you turn of the text box when hovering above a tab
when i hover on a tab there is a text box that shows up and i want to remove it. Details. Setting Up...
Read more >
Tab hovers should be easier to turn off #6606 - GitHub
Description Tab hovers have suddenly appeared in the browser but offer no value. I don't know how this is beneficial.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found