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?
Asked
Active
Viewed 879 times
1 Answers
1
Try using the setVerticalMargin
(or setItemMargin
?) methods of the VerticalGridView widget in RowsSupportFragment:
getVerticalGridView().setVerticalMargin(25);

burakk
- 1,231
- 2
- 22
- 45