5

What's the right way to remove the last divider with recyclerview?

if you do it with dividerItemDecoration it seems awkward, I thought it was built in but it isn't if you do it with view in row_whatever.xml it is awkward.

A R
  • 1,412
  • 2
  • 14
  • 29
nAndroid
  • 862
  • 1
  • 10
  • 25
  • Try with android:footerDividersEnabled="false" if this is not working put android:layout_height="wrap_content" as height of the recyclerview – Stefanija Sep 26 '17 at 22:52
  • 2
    @Merian android:footerDividersEnabled="false" is for listviews not recyclerciew. – lostintranslation Oct 31 '17 at 16:19
  • Possible duplicate of [RecyclerView remove divider / decorator after the last item](https://stackoverflow.com/questions/46215810/recyclerview-remove-divider-decorator-after-the-last-item) – Shady Boshra Jul 08 '18 at 23:31
  • this is one of the little things flutter gets right, having a listview.separated() built in.. – nAndroid Jun 23 '20 at 16:56

1 Answers1

0

Use MaterialDividerItemDecoration and set isLastItemDecorated to false

Milan Maji
  • 363
  • 1
  • 5
  • 9