How I can multiline the expanded title of CollapsingToolbarLayout?

前端 未结 5 1388
暖寄归人
暖寄归人 2021-02-03 20:13

My problem is the next. I would use relatively large texts as CollapsingToolbarLayout title so I need to show it as multiline mode. When I try to change text appearance through

5条回答
  •  离开以前
    2021-02-03 20:48

    Checkout this library multiline-collapsingtoolbar.

    multiline-collapsingtoolbar is a replacement for CollapsingToolbarLayout from the Android Design Support Library which can deal with multiline titles (currently hard-coded to a maximum of 3 lines) in the expanded state. When collapsing the toolbar, the lower lines of the title fade away to leave only the top line visible.

    As the Design Support Library, it should be compatible with API 7 (Android 2.1) and above

提交回复
热议问题