material-components / material-components/material-components-android

[CollapsingToolbarLayout] multiline title position

Open
#3,142 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: TopAppBar
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** When using CollapsingToolbarLayout multiline title, title bounds is sometimes wrong when title is effectively multiline leading title to be positioned upward

Project to reproduce :
[CollaspingToolbarLayout.zip](https://github.com/material-components/material-components-android/files/10228105/CollaspingToolbarLayout.zip)

Issue screenshot :
![image](https://user-images.githubusercontent.com/3678076/207605643-903bc8ef-cd85-4fe0-815b-f254eda26676.png)

Expected screenshot :
![image](https://user-images.githubusercontent.com/3678076/207606435-5c9bcff6-f81d-41c6-90ec-87bb612e2342.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached CollapsingToolbarLayout.zip reproduction project and run the multiline-title case described in the issue. Compare the title bounds and position with the expected screenshot; the work is done when the title remains correctly positioned instead of moving upward when it becomes effectively multiline.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.