3

I'm trying to create a vertical list of selectable items in Android TV using Leanback RowsSupportFragment. There seems to be some default spacing, shown as black color in attachment, between rows here. I need to remove this spacing. I've looked into some dimens attributes but they are setting the spacing globally while I only require it on a particular screen. How this may be achieved?

enter image description here

Asim Panra
  • 51
  • 2

1 Answers1

1

Try using the setVerticalMargin (or setItemMargin ?) methods of the VerticalGridView widget in RowsSupportFragment:

getVerticalGridView().setVerticalMargin(25);
burakk
  • 1,231
  • 2
  • 22
  • 45