Simple question, but I can't find an answer. How can I collapse or expand the CollapsingToolbarLayout
programmatically?
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
Using Support Library v23, you can call appBarLayout.setExpanded(true/false)
.
Further reading: AppBarLayout.setExpanded(boolean)