问题
I am working with CollapsingToolbarLayout
.
I don't know any methods to pin title in Toolbar.
Is there any simple way to achieve this?
回答1:
This solution works for me.
<android.support.design.widget.CollapsingToolbarLayout
app:titleEnabled="false"
...
>
回答2:
You have to set its title manually in code.
CollapsingToolbarLayout collapsingToolbar =
(CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
collapsingToolbar.setTitle("Title");
来源:https://stackoverflow.com/questions/32051529/collapsingtoolbarlayout-without-title-animation