Swap
Swap

Reputation: 490

Android - How to implement Google Newsstand like layout?

I'm trying to clone the “view article" fragment layout of Google Newsstand app. It has an ImageView on the top that shrinks to become a Toolbar when we scroll downwards, just below the ImageView lies a TextView that contains the text content of the article. While creating the layout itself is pretty easy, implementing the special kind of scroll effect that shrinks the ImageView into a Toolbar is pretty tricky. Since, most of the updated Google Apps containing material design(e.g. - Play Store, Google+, etc.) contains similar kind of layouts, I was wondering if there's any widget/custom library available for the same. If so, what is it called and how to implement it?

Here's what the layout looks like:

layout

Upvotes: 0

Views: 1178

Answers (2)

Suleiman19
Suleiman19

Reputation: 742

This is called the 'Flexible Space with Image' pattern. It is a popular scrolling technique. The new Android Design Support Library enables you to implement this with ease. This post should help you make it.

Upvotes: 0

Joaquin Iurchuk
Joaquin Iurchuk

Reputation: 5617

You can use libraries like NotBoringActionBar or Header2ActionBar, but, as the babe says, they're Action Bars and in Lollipop they are deprecated.

Anyways, you can find them on GitHub.

Upvotes: 1

Related Questions