question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CollapsingToolbarLayout] I can't tune the size of bar for any number of lines

See original GitHub issue

I’m trying a multiline top app bar collapsing example. In my app I can have a 3line or 2line or even very short one line title, for example (I’ve shorten yours): Screenshot_20200605-112617

I’ve tried to set android:layout_height="wrap_content"

  1. to com.google.android.material.appbar.AppBarLayout
  2. then to com.google.android.material.appbar.CollapsingToolbarLayout
  3. then to androidx.appcompat.widget.Toolbar

but in every case I’m broking all the animation by doing this! Please suggest me how can I make a “wrap_content” like expanding and collapsing toolbar with such a pretty animation?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rovkinmaxcommented, Dec 29, 2020
0reactions
Neznakomeccommented, Dec 29, 2020

Yes, exactly. Make invisible TextView that duplicates the text on CollapsingToolbarLayout

Read more comments on GitHub >

github_iconTop Results From Across the Web

CollapsingToolbarLayout not working properly - Stack Overflow
The problem is that when the toolbar is expanded, the icons are way too high. And when collapsed, they are simply gone. See...
Read more >
Design Support Library (IV): Collapsing Toolbar Layout
First, the collapsing layout specify how it will behave when the content is scrolled using the flags scroll|exitUntilCollapsed , so it will scroll...
Read more >
CollapsingToolbarLayout - Android Developers
Gets whether extra height should be added when the title text spans across multiple lines. boolean, isForceApplySystemWindowInsetTop().
Read more >
Android CollapsingToolbarLayout Example - DigitalOcean
Android CollapsingToolbarLayout is a wrapper for Toolbar which implements a collapsing app bar. It is designed to be used as a direct child ......
Read more >
Collapsing Toolbar With Recyclerview Android Example
Stroppy or sporting, Herschel never fold any thong! ... with android collapsing toolbar layout should work but when collapsed toolbar ... song will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found