'How to remove TabLayout tooltip?

I´m currently working on adding a tablayout to my XML but I can´t figure out how to remove the tooltip when doing a longpress on the tab. Does anyone know? Here´s an image of what it looks like https://imgur.com/a/Gk4q3B0 . It´s a WIP so it looks weird now

Here´s the tablayout

    <com.google.android.material.tabs.TabLayout
        android:id="@+id/tl_crypto_detail"
        android:layout_width="match_parent"
        app:layout_constraintTop_toBottomOf="@id/topSeparator"
        android:layout_marginHorizontal="15dp"
        android:tooltipText=""
        app:tabIndicatorColor="#FFFFFF"
        app:tabTextColor="#FFFFFF"
        android:layout_height="wrap_content"/>


Solution 1:[1]

You could do it manually, by setting the TooltipText to null for every tab.

Kotlin:

for (i in 0 until tabLayout.tabCount) {
    tabLayout.getTabAt(i)?.view?.let { tabView ->
        TooltipCompat.setTooltipText(tabView, null)
    }
}

Java:

for (int i = 0; i < tatabLayoutbs.getTabCount(); i++) {
    if (tabLayout.getTabAt(i) != null) {
       TooltipCompat.setTooltipText(tabLayout.getTabAt(i).view, null);
    }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohamed Magdy