Questions tagged [coordinator-layout]

An Android Layout used as a container for a specific interaction with one or more child views

An Android Layout used as a container for a specific interaction with one or more child views

See: https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html

145 questions
64
votes
4 answers

ConstraintLayout vs Coordinator layout?

What to implement: ConstraintLayout or CoordinatorLayout for proper material design in android ?
64
votes
5 answers

Toolbar will not collapse with Scrollview as child of CoordinatorLayout

I am trying to follow the Google Docs on using the CoordinatorLayout but i am having an issue with the ScrollView inside the CoordinatorLayout. Basically, the Toolbar normally would collapse with a RecyclerView or a Listview when scrolling down. Now…
63
votes
14 answers

Need to disable expand on CollapsingToolbarLayout for certain fragments

I have a AppCompatActivity that controls replacing many fragments. Here is my layout for…
47
votes
1 answer

Android: CoordinatorLayout and SwipeRefreshLayout

I try to implement auto hiding toolbar feature from the new support library 22.2.0. Without SwipeRefreshLayout is working fine: But when I re add this layout, toolbar overlap the recyclerview: Code:
Tomas
  • 4,252
  • 5
  • 27
  • 37
40
votes
8 answers

Espresso, scrolling not working when NestedScrollView or RecyclerView is in CoordinatorLayout

It looks like CoordinatorLayout breaks the behaviour of Espresso actions such as scrollTo() or RecyclerViewActions.scrollToPosition(). Issue with NestedScrollView For a layout like this one:
28
votes
8 answers

Android CoordinatorLayout + AppbarLayout + Viewpager always scrolling

I have a classic layout with a ToolBar on the top, a TabLayout below it, and a ViewPager switching tabs from the TabLayout. When content in the ViewPager is scrollable, the ToolBar should scroll out of sight, and the TabLayout should follow and…
Kenneth
  • 3,767
  • 8
  • 36
  • 59
27
votes
8 answers

RuntimeException: Could not inflate Behavior subclass

I new in android and I've troubles with FloatingActionButton behaivors My custom behavoir class: public class ScrollingFABBehavior extends FloatingActionButton.Behavior { private static final String TAG = "ScrollingFABBehavior"; public…
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…
24
votes
3 answers

Is it a good practice to wrap all layouts in CoordinatorLayout?

I'm thinking of a way to implement Android Snackbars in my app. Basically, I want to be able to show Snackbar from anywhere in the app. As I found out, android.support.design.widget.Snackbar performs the best when put in…
24
votes
3 answers

FloatingActionButton default margin not working in lollipop

I am displaying FloatingActionButton along with a Recyclerview in a CoordinatorLayout, when the FAB is clicked a row would be added in Recyclerview. Now the problem is the FAB has margin when i tested in API 15 but when I test in API 22(lollipop…
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…
22
votes
4 answers

CoordinatorLayout and AppBarLayout elevation

I've created an AppBar layout like this
Kata Lune
  • 411
  • 1
  • 4
  • 11
19
votes
7 answers

CoordinatorLayout content child overlaps BottomNavigationView

I'm trying to use a CoordinatorLayout with a BottomNavigationView, an AppBarLayout, and a ViewPager. Here is my layout:
Ted Hopp
  • 222,293
  • 47
  • 371
  • 489
19
votes
3 answers

CoordinatorLayout leaves empty space at the bottom after scrolling

I am trying to implement Google's newest design tricks with CoordinatorLayout and have problems with scrolling and parallax effect. After Activity is displayed, everything looks ok but the problem occurs when I try to scroll. It seems the bottom…
18
votes
5 answers

BottomNavigationView overlapping FrameLayout in CoordinatorLayout

The following is my layout xml. The problem now is that the BottomNavigationView is overlapping the FrameLayout. I wanted the FrameLayout to stretch to the top of the BottomNavigationView. I tried with trick such as adding paddingBottom in the…
hjchin
  • 844
  • 1
  • 7
  • 20
1
2 3
9 10