What is scrim in collapsibletoolbarlayout?

Scrim: A thing that conceals or obscures something.

As per Android CollapsingToolbarLayout:

Content scrim: A full-bleed scrim which is show or hidden when the scroll position has hit a certain threshold. You can change this via setContentScrim(Drawable).

You can use drawable as a scrim on top of the CollapsingToolbarLayouts content when it has been scrolled sufficiently off screen.

app:contentScrim="YOUR_TOOLBAR_COLOR"

Status bar scrim: A scrim which is show or hidden behind the status bar when the scroll position has hit a certain threshold. You can change this via setStatusBarScrim(Drawable). This only works on LOLLIPOP devices when we set to fit system windows.

You can use drawable as a scrim for the status bar content when the CollapsingToolbarLayout has been scrolled sufficiently off screen.

app:statusBarScrim="YOUR_STATUSBAR_COLOR"

Hope this will help!

Tags:

Android