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

[CollapsingToolbarLayout] Margin for collapsed Title

Open
#1,983 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Is your feature request related to a problem? Please describe.**

On `CollapsingToolbarLayout` one can define margins for the expanded Title, and even multi-line property for the collapsed Title. However given my custom curved background I need to define side margins for a collapsed title so it wraps nicely on screen with lower density.

**Describe the solution you'd like**

Be able to define `start` and `end` margins for collapsed title property on `CollapsingToolbarLayout`.

**Describe alternatives you've considered**

I've tried to play around with TextAppearance for the collapsed title style, and both padding and margin properties on the `CollapsingToolbarLayout` itself to no avail.

**Additional context**

None.

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 by locating the CollapsingToolbarLayout implementation and its collapsed-title handling, then compare it with the existing expanded-title margin properties. Define the expected start and end margin behavior for the collapsed title and verify that the title wraps correctly with those margins.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
design, mobile
Issue type
Feature
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.