material-components / material-components/material-components-android
[TopAppBar] Collapsing Toolbar SpannableString title not animating properly when collapsing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** When a SpannableString is set as the title of Collapsing toolbar, when collapsing the TopAppBar the fade in animation of the title works only for the non-colored part of the text, colored text just appears without any animation.
**Expected behavior:** SpannableString title should animate properly.
**Source code:**
```kotlin
val appName = "App Name".parseAsHtml()
binding.collapsingToolbarLayout.title = appName
```
**Android API version:** 31
**Material Library version:** 1.9.0-alpha02
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided Kotlin SpannableString example on CollapsingToolbarLayout/TopAppBar using Android API 31 and Material Library 1.9.0-alpha02. Inspect the title collapse and fade-in behavior; done means the colored and non-colored portions of the SpannableString title animate consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100