Coordinator Layout doesn’t work with LinearLayouts

I have been playing around with the Coordinator layout for the last few days, and I was disappointed to learn that it doesn’t work with ListViews :( Unless you are only targeting Lollipop devices or hire there is not much you can do apart from redesigning your application to remove the ListView and replace it with a RecyclerView.

If you are only targeting Lollipop devices or higher you can call setNestedScrollingEnabled() method on the list view itself.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
listView.setNestedScrollingEnabled(true);
}

Some people have attempted to implement the NestedScrollingChild class with ListView, but I have not been able to find any posts about this being successfully achieved.

If anyone has managed to get Coordinator Layouts to work with ListView’s please leave a comment :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.