15

Is it possible to make CollapsingToolbarLayout's expanded title text wraps across several lines (similar to TextView.maxLines attribute)?

Sokolov
  • 2,223
  • 2
  • 18
  • 28

2 Answers2

3

I did this with help from this library

https://github.com/opacapp/multiline-collapsingtoolbar

add the library to your project and replace the CollapsingToolbarLayout with net.opacapp.multilinecollapsingtoolbar.CollapsingToolbarLayout

0

I posted a solution on Android CollapsingToolbarLayout with custom View.

You can add the TextView, instead of a title inside your CollapsingToolbarLayout and change size/transition/color etc. with the help of the onOffsetChangeListner.

Community
  • 1
  • 1
Ciron
  • 226
  • 2
  • 6