How can we create a collapsing toolbar
layout like Yahoo News Digest application ?
Asked
Active
Viewed 382 times
4

N Kaushik
- 2,198
- 18
- 29
-
1Maybe you can use this tutorial. It helped me before. http://antonioleiva.com/collapsing-toolbar-layout/ – oalpayli Dec 28 '15 at 10:22
-
this tutorial is on creating a layout with square/rectangular shaped . i.e. default one that is provided by google. But yahoo news app is not using this . check this : https://play.google.com/store/apps/details?id=com.yahoo.mobile.client.android.atom&hl=en – N Kaushik Dec 28 '15 at 10:28
-
What's the exact thing you wanna do? You wanna implement the `CollapsingToolbarLayout` with the bottom edge not parallel to the toolbar, or you wanna replicate the way Yahoo News Digest works (because it's not the `CollapsingToolbarLayout` the Yahoo app is using)? – Bartek Lipinski Dec 28 '15 at 12:08
-
Mainly I want to implement collapsingToolbarLayout with bottom edge not parallel to the toolbar. (if it is possible) . It will be also helpful if you can describe the method that yahoo is using (without CollapsingToolbarLayout as you have mentioned). – N Kaushik Dec 28 '15 at 12:36
-
Check this out. It might useful to you. http://stackoverflow.com/questions/32101891/collapsing-toolbar-how-to-adapt-custom-layout-instead-of-default-imageview – Swanand Mar 10 '16 at 11:44
1 Answers
1
Have you tried adding app:behavior_overlapTop="50dp"
to your scrolling view? (This is the default behavior. Code can be found here.)
Apparently, it should support that attribute to make the scrolling view overlap your app bar.
Start by implementing the square collapsing toolbar as you can find in many other guides and then set that parameter.
If that does not work, you could write your own Behavior
I guess, inspiring from the one I linked you (which is the default AppBarLayout
behavior that allow the coordinator layout to collapse the top part.
To make the image not square you need to use a semi-transparent image or edit it by code.

Daniele Segato
- 12,314
- 6
- 62
- 88