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
12
votes
2 answers

Fading the whole layout as scrolled up in collapsing bar layout android

Below is the code of my coordinator layout. It works well.
Asad AndyDev
  • 481
  • 5
  • 23
12
votes
1 answer

CollapsingToolbarLayout: custom contentScrim similar to Facebook

I want to create a custom contentScrim for my collapsingToolbarLayout. My collapsingToolbarLayout has an imageview inside. When it scrolls, in theory the imageview is suppose to fade out and my scrim color is suppose to fade in. We all know we can…
Simon
  • 19,658
  • 27
  • 149
  • 217
12
votes
1 answer

AppBarLayout + TabLayout + CollapsingToolbarLayout + SwipeToRefresh

I met a lot of issues related with my problem but nobody I found wanted the behaviour I'm looking for. I want a view pager with tabs and app bar, when the contained fragments are scrollable and are scrolled (toward bottom), I want the app bar to…
12
votes
2 answers

webview height grows indefinitely inside a nestedScrollView

This is my layout. When i load google.com, the webview's height keeps growing indefinitely. The onSizeChange function of the webview keeps getting called and i can see the webview keeps expanding indefinitely. I've tried 22.2.1 and 23.1.0 of the…
12
votes
2 answers

Android Toolbar collapseMode issue

I have an Issue making " toolbar with Title text " Not to Collapse while scrolling upwards in CollapsingToolbarLayout. I have tried a few tweaks, by using app:layout_collapseMode="none" as attribute in my android.support.v7.widget.Toolbar but its…
Tosin Onikute
  • 3,883
  • 6
  • 38
  • 61
12
votes
6 answers
12
votes
4 answers

CollapsingToolbarLayout should not collapse when RecyclerView is empty

I am using following layout in my project.Its working fine but CollapsingToolbarLayout is collapsing even when RecyclerView is empty or RecyclerView has very few items. Behaviour that i want is, CollapsingToolbarLayout should collapse only when…
11
votes
2 answers

Collapsing Toolbar Layout is not expanded at first time and pin doesn't work

I have a bottom sheet in my app and I want to use of Collapsing Toolbar Layout in it. but when I open bottom sheet Collapsing Toolbar Layout will disappear and I have to scroll down to see it. And another problem is about pin mode that doesn't work…
Ehsan
  • 2,676
  • 6
  • 29
  • 56
11
votes
2 answers

Android BottomSheet adapt/shrink related map view

Trying to mimic the current google maps Bar at the bottom. I failed so hard and tried so much; CollapsingToolbar, BottomSheet, custom libs. What I want: Making the map view adapt it's size and camera when the BottomSheet is sliding, so that the…
11
votes
1 answer

Collapsible Toolbar - Make Fragment Footer Always Visible in Android

I am making an app that has a ProfilePage with three fragments - About | Posts | Gallery, and I am using a collapsible toolbar with user's image. My second and third fragment will have a footer that should always be visible, but this is what I…
11
votes
1 answer

Issue with CoordinatorLayout and ImageView that adjusts width while scrolling

I'm attempting to put an ImageView in a CollapsingToolbarLayout in which it takes up the full screen on load and as you scroll the content, the 16x9 resolution image width resizes until the image takes up the full width of the screen. At that…
11
votes
1 answer

Collapsing toolbar is collapsed by default

I have a problem with CollapsingToolbar. The problem in that by default I need to have collapsed toolbar when Activity just has been created. If I do that through the code with appBarLayout.setExpanded(false, false) in onCreate() method, I see…
Near1999
  • 1,547
  • 2
  • 18
  • 37
11
votes
4 answers

Android - Remove shadow between Toolbar and TabLayout

I'm trying to make a layout with CollapsingToolbarLayout. But I do not get one thing. I want to remove the shadow between Toolbar and TabLayout. I've tried several ways and I have not managed to remove the shadow. Can anybody help me? Thank…
11
votes
2 answers

Hide floating button when collapsing toolbar is collapsed

I have a coordinator layout containing a collapsing toolbar, a nestedscrollview and a floating button. My floating button is placed at the bottom right end of the collapsing toolbar. I want the button to disappear when the collapsing toolbar is…
11
votes
1 answer

Collapsing Toolbar Like Google Play Store

I want to implement a collapsing toolbar like google Play Store. I have achieved functionality somewhat but that is only working for portrait Screen. Here is a sample of screenshot of what i was able to do. Now what i want to do is when i change my…