android - (Design Support Library) CollapsingToolbarLayout -- Toolbar not getting pinned on collapse -


i'm having trouble integrating design support library application. reason, toolbar collapses collapsingtoolbarlayout, , not leave pinned in cheesesquare example chris banes. https://github.com/chrisbanes/cheesesquare

i didn't different layout. in fact, replaced styles his, , dropped in layout. wonder if using toolbar, instead of android.support.v7.widget.toolbar causing this.

here problem.

the problem

here xml of appbar section.

<android.support.design.widget.coordinatorlayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/main_content"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true">       <android.support.design.widget.appbarlayout         android:id="@+id/appbar"         android:layout_width="match_parent"         android:layout_height="@dimen/detail_backdrop_height"         android:theme="@style/themeoverlay.appcompat.dark.actionbar"         android:fitssystemwindows="true">          <android.support.design.widget.collapsingtoolbarlayout             android:id="@+id/collapsing_toolbar"             android:layout_width="match_parent"             android:layout_height="match_parent"             app:layout_scrollflags="scroll|exituntilcollapsed"             android:fitssystemwindows="true"             app:contentscrim="?attr/colorprimary"             app:expandedtitlemarginstart="48dp"             app:expandedtitlemarginend="64dp">              <imageview                 android:id="@+id/backdrop"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:fitssystemwindows="true"                 app:layout_collapsemode="parallax" />              <toolbar                 android:id="@+id/toolbar"                 android:layout_width="match_parent"                 android:layout_height="?attr/actionbarsize"                 app:popuptheme="@style/themeoverlay.appcompat.light"                 app:layout_collapsemode="pin" />          </android.support.design.widget.collapsingtoolbarlayout>      </android.support.design.widget.appbarlayout>      ...  </android.support.design.widget.coordinatorlayout> 

your intuition correct: collapsingtoolbarlayout rely on using support toolbar - uses set minimum height of collapsingtoolbarlayout (among many other things). should switch using support version of toolbar ensure best experience collapsingtoolbarlayout.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -