Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is scrim in collapsibletoolbarlayout?

Tags:

android

I read collapsible toolbar layout on developers android. There is a term scrim used there. What is it?

like image 808
user3542307 Avatar asked Jun 19 '16 20:06

user3542307


1 Answers

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!

like image 172
Ferdous Ahamed Avatar answered Oct 04 '22 00:10

Ferdous Ahamed