Using windowTranslucentStatus with CollapsingToolbarLayout

There has now been an update to the design library. I’m guessing that the issue posted above was a bug. If you update the design library to the latest version this issue no longer occurs. I have now removed all fitsSystemWindows=”true” except for the ImageView (as that needs to display under the status bar). I … Read more

no resource id found for app:layout_scrollflags from CollapsingToolbarLayout

only importing the design library jar file is not enough. You need to import resource of android-design-library project while the jar file only contains class files. Do as I say: import android-design-library project. The project is at “sdk/extras/android/support/design/“. And set it as a library project if it is not. import the above project into your … Read more

Prevent CollapsingToolbarLayout collapse if not needed

To implement such behaviour in Cheesesquare example just modify android:layout_height param of the NestedScrollView to wrap_content. It will prevent scrolling by content if it is small enough to fit on the screen. And to prevent scrolling by CollapsingToolbarLayout you should programmatically set layout_scrollFlags parameter to the AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP value. Here described how you can do this.