Questions tagged [android-collapsingtoolbarlayout]

CollapsingToolbarLayout is a wrapper for Toolbar that provides several visual effects that are bind to the content scroll events.

CollapsingToolbarLayout is a ViewGroup that serves as a wrapper for Toolbar providing several visual effects to it. The class is part of the library.

The effects provided by the class include

  • Collapsing title
  • Content scrim
  • Status bar scrim
  • Parallax scrolling children
  • Pinned position children

For the correct behavior the CollapsingToolbarLayout has to be direct child of AppBarLayout placed within a CoordinatorLayout that contains a vertically scrollable View with app:layout_behavior parameter specified. The effects are bind to the vertical scrolling of this View.

For more information visit class reference or the Android developers blog.

1241 questions
27
votes
4 answers

Unable to scroll AppBarLayout and collapsing toolbar with NestedScrollView smoothly

I am working on one android app in which I am using CoordinatorLayout, AppBarLayout and CollapsingToolbarLayout to use the collapse toolbar functionality. I am using NestedScrollView in layout to expand and collapse AppBarLayout in same layout. When…
27
votes
3 answers

Set starting height of CollapsingToolbarLayout

I want to be able to scroll on the ImageView inside the CollapsingToolbarLayout. So how that would be possible, and How to set a starting height of that Image view? My ImageView height is 280p, at the start of the activity I want to show 200p and…
27
votes
7 answers

Collapsing toolbar and nestedscrollview not scrolling smoothly

Nested scroll view scrolls smoothly on scrolling down but on scroll up it is sluggish.Collapsing toolbar(with an image view and framelayout) upon scrolling up doesn't renders its content(remains blank). I have tried every flag in collapsing…
27
votes
3 answers

Android CollapsingToolbarLayout with custom View

I'm following the Cheesesquare example project to understand the new design material library. I'm wondering if there's a way to use a custom view (like Telegram) with ImageView, title and subtitle instead of the simple Title provided by…
27
votes
6 answers

Design lib - CoordinatorLayout/CollapsingToolbarLayout with GridView/listView

This might be silly question but I didn't understand Design lib well. I am following this reference to create below layout. The Blue area should work as parallax when I scroll the GridView. But when I scroll grid View nothing happens in…
26
votes
2 answers

Show view when toolbar collapses

I have an activity with a CoordinatorLayout, AppBarLayout, CollapsingToolbarLayout and Toolbar. So, basically, a view that collapses when scrolling a RecyclerView. What I need to do is to show a custom view when the view of the expanded layout is…
26
votes
6 answers

Stop CollapsingToolbar from collapsing after NestedScrollView runs out of content to scroll

In Android, how can I get the CollapsingToolbar to stop collapsing if the NestedScrollView runs out of content to scroll? This functionality currently exists in the Contacts app on Android 5.1.1. However, in my code when the NestedScrollView stops…
26
votes
3 answers

CollapsingToolbarLayout setTitle() does not update unless collapsed

With the new Design Library, we're supposed to set the toolbar title on the CollapsingToolbarLayout, not the Toolbar itself(at least when using the collapsing toolbar). But setTitle() only updates the title in the following specific…
25
votes
3 answers

Detecting when AppBarLayout/CollapsingToolbarLayout is completely expanded

I have a fragment that uses the new CoordinatorLayout/AppBarLayout/CollapsingToolbarLayout paradigm, and I'd like to be able to detect when the collapsing toolbar is fully expanded so that I can perform an operation on the entire fragment it's in,…
24
votes
3 answers

CollapsingToolbarLayout without shadow in expanded state

CollapsingToolbarLayout from appcompat shows shadow in collapsed state, but when expanded (or expanding in process) shadow disappear My example code https://github.com/NaikSoftware/CollapsingToolbarWithImageAndTabs/tree/master/app Layout
Nickolay Savchenko
  • 1,474
  • 16
  • 28
24
votes
4 answers

AppBarLayout take space after setVisibility(View.GONE)

I want to hide my AppBarLayout for adding a view dynamically which will take the height of the screen. For this, i want to remove a view temporaly by setting the visibility of my AppBarLayout to GONE. The view is not visible, but take space in the…
23
votes
10 answers

Error inflating class CollapsingToolbarLayout

My CollapsingToolbarLayout crashes because of Error inflating class android.support.design.widget.CollapsingToolbarLayout. I updated the android studio last weekend. Before the updated, it works fine. After I updated it, it crashed. However, I tried…
23
votes
5 answers

CollapsingToolbarLayout not showing Title

In my case, the toolbar disappears when I scroll through the list. I am using a CollapsingToolbarLayout and I need to set the title text. But in my case the title text is not showing, even though I've set it (See code below). What is wrong? Layout…
GPPSoft
  • 480
  • 1
  • 6
  • 15
23
votes
6 answers

Scrolling is not working with CoordinatorLayout + parallax image + BottomSheetLayout

Introduction I have an activity, which implements a common pattern with parallax header image and scrolling content using CoordinatorLayout, AppBarLayout and CollapsingToolbarLayout. My xml layout looks like…
23
votes
2 answers

CollapsingToolbarLayout and hide toolbar while scrolling

I am trying to create some combined layout using CoordinatorLayout and also CollapsingToolbarLayout. In the first state, when we on the most top page, and didn't scrolled yet, I want the toolbar to expend as shown below (yes, i did it): In the…
1 2
3
82 83