CollapsingToolbarLayout currently only allows for a single line title. However, in the expanded state, there would be enough space to display multiple lines.
Multiple app developers (such as WhatsApp) have already built their own custom views as a replacement for CollapsingToolbarLayout to solve this issue. However, these are mostly closed-source, use different, inconsistent animations when expanding and collapsing, and/or are not usable as a drop-in replacement for CollapsingToolbarLayout because they have a different API.
We (@raphaelm and I, with help from some contributors) have built an open-source library that tries to solve this problem. It is based directly on the original CollapsingToolbarLayout/CollapsingTextHelper classes from the Design Support Library with only a few code changes and an additional maxLines attribute. In addition to that, we feel that the animation we use is more smooth than the one from e.g. WhatsApp.

However, we had to copy quite a lot of files (basically all the classes that are referenced from CollapsingToolbarLayout) from the original support library when creating this library because they are package-private and therefore not accessible from our classes or because we needed access to private fields, which is not possible when extending a class. For this reason, it is quite tedious to keep our library up-to-date with changes from the support library.
Would you be interested in adopting our changes into the original library, e.g through a pull request? Or are you already working on the same feature?
There are some bugs in our library that occur when using text shadows or transparent text that we have not worked on ourselves because we don't use those features in our app, but they should be quite straightforward to resolve.
What鈥檚 the current status on this one? The Material guidelines state that multiple lines should be used and that the code for Android was readily available, however it doesn鈥檛 feature this option.

We are still struggling to update our multiline-collapsingtoolbar library to support Android 9 and the new Material Components and AndroidX libraries, because the @RestrictTo annotations prevent us from accessing many classes that we previously used from the Support Libraries. Thus, the only solution is be to finally implement this functionality into the main Material Components libraries...
guys, any plan to add such support in material components library?
Added this as a feature request on https://issuetracker.google.com/issues/136120586
It seems they can accept PRs. https://issuetracker.google.com/issues/136120586
@johan12345 It'd be awesome if this makes part of material.components !
Yep, we saw this already, one of the comments came from @raphaelm. I will try to implement this as a PR.
Brilliant. I can lend a hand if needed.
So is this feature already available in com.google.android.material:material:1.2.0-alpha03 ?
@ArcherEmiya05 Not as far as I can see - the last change to CollapsingToolbarLayout in the library was 5 months ago. See the PR #413 for the latest updates.
@ArcherEmiya05 Not as far as I can see - the last change to CollapsingToolbarLayout in the library was 5 months ago. See the PR #413 for the latest updates.
So there is no way to do this without needing to create your own xml layout?
Why is it already in the guidelines then? Just really confuse.
So there is no way to do this without needing to create your own xml layout?
There is, you can use our fork of the Material Components library until it's merged. But it might cause incompatibilities with other libraries that depend on the Material Components library and we will provide no support.
Why is it already in the guidelines then? Just really confuse.
Well, I'm not from Google, so I can't really answer that. The Material Components library doesn't have implementations for all the things that show up in the guidelines, but I guess something needs to be added to the guidelines first before an implementation can be included.
Most helpful comment
What鈥檚 the current status on this one? The Material guidelines state that multiple lines should be used and that the code for Android was readily available, however it doesn鈥檛 feature this option.