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

Android Collapsing Toolbar not using inertia like Google Play App does

I'm using the Android Design Support Library to create an Activity with a Collapsible Toolbar with a nice fading effect, just like Google Play or Whatsapp's Contact profile. I will put the activity layout at the end but bear in mind this is just the…
dbar
  • 1,740
  • 1
  • 16
  • 20
11
votes
1 answer

Android AppBarLayout pushes ViewPager down

I have below xml file which has 1)Toolbar 2)TabLayout 3)Custom View and 4) ViewPager. When i put Toolbar, TabLayout, Custom View inside AppBarLayout, it pushes ViewPager down as like this: xml:
10
votes
2 answers

How to reduce horizontal space between navigation icon and title in a jetpack compose `TopAppBar`?

I'm making an app bar in jetpack compose but I'm having spacing issues between the navigation icon and the title. This is my compose function: @Composable fun DetailsAppBar(coin: Coin, backAction: () -> Unit) { TopAppBar( navigationIcon…
Pierre Vieira
  • 2,252
  • 4
  • 21
  • 41
10
votes
2 answers

Androidx scrolling view behavior not working

After switching to androidx the following code stopped working. The TextView below the Toolbar used to scroll with the content, but now it doesn't. I managed to make it work only when I set the same scrollFlags to Toolbar, but I would like to keep…
10
votes
3 answers

ANDROID: Error inflating class android.support.design.widget.AppBarLayout

I added a toolbar to my layout and now I get this error when running: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/mainactivity.MainActivity}: android.view.InflateException: Binary XML file line #9: Binary XML…
CJR
  • 3,174
  • 6
  • 34
  • 78
10
votes
3 answers

SwipeRefreshLayout in AppBarLayout not wrapping content

I am trying to implement pull to refresh but I'm having an issue with SwipeRefreshLayout not wrapping the child view's height. In the view preview and in a live build it appears to have 0 height. The layout as as…
10
votes
3 answers

NestedScrollView with webView only scrolling NestedScrollView

Below is my code to handle the correct behaviour of my apps actionBar/toolbar/tabBar and nestedScrollView with a ViewPager (webView) inside it. The ViewPager is basically a normal webView. Everything works fine except my ViewPager can't be scrolled…
10
votes
5 answers

Collapsing Toolbar Layout always expanded when returned from fragment

I have 2 fragments (Fragment A and Fragment B) both with collapsing toolbar layouts and corresponding recyclerviews within a coordinatorlayout. If I scroll up in my recyclerview (so the CollapsingToolbarLayout has collapsed) and then open Fragment B…
10
votes
1 answer

How to remove top and bottom padding from android.support.v7.widget.Toolbar?

I am trying to place a SlidingTabLayout inside my android.support.v7.widget.Toolbar but for some reason there is extra top and bottom padding in portrait layout. As shown in this screenshot: In landscape layout the android.support.v7.widget.Toolbar…
10
votes
2 answers
10
votes
1 answer

Translucent gradient status bar on Android Lollipop presented in Material Design

I would like to make something like this for Android 5.0 and above? How can I implement this? I can not found any solution on StackOverFlow or on android developer site. I suggested that I can make status bar transparent and draw gradient…
Sergei Vasilenko
  • 2,313
  • 2
  • 27
  • 38
10
votes
1 answer

Nested RecyclerView issue with AppBarLayout

My activity contains an AppBarLayout provided by the design library 23.0.1, it hides when I scroll up. I have a RecyclerView with each child item containing a RecyclerView too, basically a nested RecyclerView going on. My issue is that when I touch…
10
votes
3 answers

AppBarLayout with recyclerView in nested fragment

As images are always better than words, I present to you my current layout. The toolbar/tabs is in an activity.xml with a viewPager, and the recyclerView is inside a fragment within the viewPager. So you can swipe right/left to see other content. My…
9
votes
2 answers

AppBarLayout inflating error after migrating to AndroidX

When migrating to AndroidX I faced this problem: Java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mandarine.android/com.mandarine.android.features.root.RootActivity}: android.view.InflateException: Binary XML file line #18:…
Morozov
  • 4,968
  • 6
  • 39
  • 70
9
votes
1 answer

How to put a custom view/layout pinned in CollapsingToolbarLayout ?

Background The support/design library allows to have a nice resize-as-you-scroll effect, using AppBarLayout and CollapsingToolbarLayout…
android developer
  • 114,585
  • 152
  • 739
  • 1,270