Reputation: 51
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?
Upvotes: 3
Views: 1231
Reputation: 1291
Try using the setVerticalMargin
(or setItemMargin
?) methods of the VerticalGridView widget in RowsSupportFragment:
getVerticalGridView().setVerticalMargin(25);
Upvotes: 1