Questions tagged [android-appbarlayout]

AppBarLayout is a vertical LinearLayout which implements many of the features of material designs app bar concept, namely scrolling gestures.

AppBarLayout is a vertical which implements many of the features of material designs app bar concept, namely scrolling gestures.

Check the official layout documentation for additional details.

More Info

830 questions
14
votes
5 answers
14
votes
1 answer

How to capture the scroll event in CoordinateLayout in Android

I have two toolbars( one set as "enterAlways" and the other is "scroll") and a recyclerview in a coordinatelayout, what I wanted to achieve is to capture scroll event when the recyclerview has not been scrolled, which means when the toolbar which…
Qing
  • 1,401
  • 2
  • 21
  • 41
13
votes
5 answers

CollapsingToolbarLayout expand only when at the top

I have some problems with AppBarLayout and CollapsingToolbarLayout. This is what currently happens: https://www.youtube.com/watch?v=z4yD8rmjSjU The downwards scrolling motion is exactly what I want. However when I scroll up again, the orange bar…
13
votes
1 answer

Tab Layout only collapsing on fling, not on slow scroll

for the below layout, when I scroll the content up on a page within the viewpager... if I keep my finger on the screen and scroll up slowly, the tab layout doesn't collapse into the toolbar but if I fling the content up, it does. Any ideas…
13
votes
4 answers

How to add pull to refresh in AppBarLayout

I find most of the material is about discussing adding "pull to refresh" in the area below AppBarLayout, such as SwipeRefreshLayout, I wonder how to do this in the AppBarLayout, which means: When pull down, the pull-to-refresh indicator appeaars in…
mianlaoshu
  • 2,342
  • 3
  • 27
  • 48
13
votes
2 answers

Fling smoothly AppBarLayout with NestedScrollView using AppBarLayout.Behavior

I have an AppBarLayout and NestedScrollView. I want the NestedScrollView whenever it scroll down, the AppBarLayout should also expand gracefully, without the NestedScrollView stop right before the AppBarLayout Expand; a second Flight/Scroll is…
Elye
  • 53,639
  • 54
  • 212
  • 474
13
votes
3 answers

Toolbar scrolling under status bar

I am trying to learn CoordinatorLayout and its features. I have used it in conjunction with AppBarLayout. My xml is as…
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

Lollipop AppBarLayout/Toolbar missing overscroll animation

using the most basic example with AppBarLayout and Toolbar, I cannot see the overscroll animation (the glow from bottom nor top) when trying to scroll more. However, if you fling the content, it will show it. Here is the code…
user654628
  • 1,429
  • 1
  • 17
  • 37
12
votes
1 answer

Programmatically hide / show android support design TabLayout inside AppBarLayout

I want to programmatically hide / show the TabLayout in my AppBarLayout. Simply setting visibility to VISIBLE and GONE is not enough, as I want to animate the changes and reclaim the space with my content while the tab retreats and leave the space…
12
votes
4 answers

CoordinatorLayout with Toolbar and fragment

I'm using the layout below, The CoordinatorLayout holds inside it AppBarLayout (With Toolbar and TabLayout inside it) and a placeholder RelativeLayout, so I could add and replace fragments on it. I'm experiencing margin errors, the fragments I add…
11
votes
4 answers

How to add pull to refresh in Coordinator layout

I have an AppBar and RecyclerView in CoordiantorLayout. SwipeToRefresh has to be fullscreen but RecyclerView not scrolling down then.
11
votes
4 answers

How to make AppBarLayout background transparent

I'm trying to make a search fragment similar to the one in the Play Store: My AppBarLayout has a CardView in it, and the background is set to transparent:
joharei
  • 578
  • 1
  • 5
  • 22
11
votes
1 answer

Can I setup app global custom styles for android-support-design widgets?

I would like to define custom styles for some widgets from Android Support Design (like AppBarLayout, TextInputLayout, FAB...) and set up these styles as default for my project, as I can do with EditText and other system widgets. For exemple:
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…