sephiroth74 / android-target-tooltip

Create Toast like tooltips, but targets can be specified, plus custom properties and features
MIT License
1.5k stars 278 forks source link

How can I set the textSize for the tooltip? #105

Open sac-sha opened 6 years ago

Dagzo commented 4 years ago

Hello @androidlab. It has become late, but I hope this helps.

To change textSize, you need to make custom style like below.

    <style name="TooltipLayout">
        <item name="ttlm_textStyle">@style/TooltipText</item>
    </style>

    <style name="TooltipText">
        <item name="android:textSize">20sp</item>
    </style>

then set this style programmatically.

Tooltip.Builder(context)
        .styleId(R.style.TooltipLayout)
        ...