gecko-dev/mobile
Tom Klein e9ce8f8488 Bug 1321002 - Reduce total space at top and bottom of tabs grid panels. r=sebastian
Previously for the spacing at the top and bottom of the tabs grid panel we had
the total desired vertical spacing set on the RecyclerView padding, but then
there was also an additional half spacing coming from the ItemDecoration padding
in the top and bottom rows.  Here we decrease the RecyclerView vertical padding
to account for the ItemDecoration vertical padding.

The alternative route of keeping full RecyclerView padding and then having the
ItemDecoration adjust itself depending on its position turned out to not "just
work": for example, if span count is three and you have four tabs, then the
first three tabs have half padding along their bottoms (since there are two
rows), but then when you close tab 4, there's now only one row and so the three
tabs should have no padding along their bottoms (since the RecyclerView already
has its own full padding), *but only tab 3 gets its ItemDecoration updated
automatically*, so it gets 0 bottom padding, but its row still has other tabs
with half bottom padding, so a) there's still too much bottom padding in that
row coming from tabs 1 and 2, and b) tab 3 sits too far down in its space
because it doesn't have the bottom padding that tabs 1 and 2 do.

That issue could be fixed by updating all ItemDecorations after each close, but
the patch here is both simpler and leads to less runtime work.

MozReview-Commit-ID: 2WeZ6QdfIF4

--HG--
extra : rebase_source : 85aec8adfdaacac7062827e273cf697c09167d63
2016-11-28 14:58:09 -06:00
..
android Bug 1321002 - Reduce total space at top and bottom of tabs grid panels. r=sebastian 2016-11-28 14:58:09 -06:00
locales Bug 1285281 - Update Qwant icon to our guidelines. r=florian 2016-07-18 13:57:59 -05:00