androidtelevisionleanback

How to remove padding in HorizontalGridView on Leanback


I'm trying to remove the inner padding of the Presenter's container on leanback which is HorizontalGridView but I still can't figure it out.

I've tried to apply directly the needed padding (0dp) by getting the reference of the HorizontalGridView in the onCreateViewHolder(), at start I can see that the padding is gone but once I scroll down and then back to the row, it is reset to it's initial state. I also tried to override the style's @style/Widget.Leanback.Row.HorizontalGridView paddingTop and paddingBottom but to no avail. I've tried to switch from a Presenter to a RowPresenter and it changed nothing.

Please find attached what I need to remove as padding.

Thank you for taking the time to read my question :)

M


Solution

  • Finally I implemented a RowPresenter() instead of Presenter(), removed it's header and It worked !