Get Your Act Together with CoordinatorLayout

Dave Smith · 27K views · 2015 · 1:15:29

Open on YouTube

Software (other)UX & UI designtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it in Android layout questions and answers about CoordinatorLayout, collapsing toolbars and nested scrolling, as a demo of the effect or an explanation of the mechanism.

Recommended by 1 people across 1 different months, 2015 to 2018.

What it is

A 75-minute conference-style talk by Dave Smith on Android's CoordinatorLayout. It explains how layout behaviors work, including nested scrolling and collapsing toolbars, and shows how to write custom behaviors.

What people said

Recommends Lucem · 2018-07 · Stack Overflow · on “New android studio rendering issue with 'coordinatorLayoutStyle'”

First, update your project to use the latest build version. This helps fix a lot of problems when it comes to most Android views. Second, go to your style and add this line of code to fix the first error <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item> Third, the children of CoordinaterLayout must be constrained, if you are new to this layout, you can switch to RelativeLayout or you can use the design view to add constraints. View the official documentation here [LINK] A helpful video on constraints HERE [this video]

Cites Ced · 2015-12 · Stack Overflow · on “Recyclerview + viewpager, make toolbar collapse”

I have a recyclerview inside a viewpager. I also have Tabs above that and a toolbar. I'd like to collapse those (or one of those I have to try it out) when I move the recyclerView down. Basically the same as here [this video] . I'm having trouble to get this to work. Here is what I have: <android.support.design.widget.CoordinatorLayout xmlns:android=" [LINK] " xmlns:app=" [LINK] " xmlns:tools=" [LINK] " android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context="com.cedric.testdesign.MainActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/A

Cites GVillani82 · 2016-03 · Stack Overflow · on “How to implement 'quick return' with scrollview in android”

Basically you need to use the Nested Scrolling (added in API 21). This feature allows a child (the scrolling one) to communicate with its parent (typically the CoordinatorLayout ). However, in order to have the Nested Scrolling, you need that: Parent view must implement NestedScrollingParent [LINK] interface Child view must implement NestedScrollingChild [LINK] interface CoordinatorLayout implements NestedScrollingParent , but unfortunally, ScrollView does not implement NestedScrollingChild interface. So, YOU CAN'T HAVE A NESTED SCROLLING USING SCROLLVIEW (before API 21: look the EDIT section on the bottom). However you can use a NestedScrollView that basically is a ScrollView that implement