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

[CollapsingToolbarLayout] no functionality for setting fontFeatureSettings in setExpandedTitleTextAppearance(),setCollapsedTitleTextAppearance()

Open
#2,534 1 comment 0 reactions 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.**
I have using a material prominent toolbar with CollapsingToolbarLayout(https://material.io/components/app-bars-top#anatomy) in my project.

I am using this font at the moment and I need to set a fontFeatureSetting for this collapsingToolbar title when collapsed/expanded.
However, it doesn't seem like there is a functionality for that provided until now. All I can see that is available are
`textColorHint; textColorLink; shadowColor; fontFamily; textStyle; typeface; textAllCaps; shadowDx; shadowDy; shadowRadius; hasLetterSpacing; textSize; `

**Describe the solution you'd like**

I would like to set fontFeatureSettings in a way that is for materialToolbar.
`@style/TextAppearance.Toolabar`
->
```

<item name="android:fontFeatureSettings">""</item>

```
so for, collapsingLayoutToolbar
`@style/TextAppearance.Toolabar`

or programatically (at the moment textAppearnce style with fontFeatureSetting is not doing anything at the moment with this)

`mToolbar.setCollapsedTitleTextAppearance(R.style.TextAppearance_Toolabar)`

**Additional context**
com.google.android.material:material:1.4.0 also tried 1.5.0 as well

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 at CollapsingToolbarLayout's setExpandedTitleTextAppearance and setCollapsedTitleTextAppearance entry points, then trace how the XML title text appearance is applied in expanded and collapsed states. Done means android:fontFeatureSettings works for both title appearances, including when configured through the programmatic setters.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.