Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b029bc3 authored by Cassy Chun-Crogan's avatar Cassy Chun-Crogan
Browse files

[DocsUI M3] Set spacing for grid items and outer grid bounds

This CL fixes the spacing both between items and between the
outer items and the grid bounds when there's a perfect fit.

A follow up Cl will handle distributing extra space.

Update the size of the items to be 144 x 116.

There needs to be 16 dp between items so set the margin of each
item to be 8 dp. Also remove the padding on the items as the
spacing betweens is now purely defined within the margins.

There also needs to be padding on the edges of the grid as defined in figma.
This is the space between the outer items and the grid bounds and it is
difference for compact vs expanded windows. Since we don't want the 8 dp
margin to be added in addition to this outer padding, subtract the
margin from the outer padding.

Also in updateLayout() make sure to calculate the padding on the edges
of the grid (the mRecView padding) before calculating to the column
count. Previously the column count was based on the old padding.

See bug for demo and diagrams.

Bug: 404978549
Test: m DocumentsUIGoogle && manual inspection
Flag: com.android.documentsui.flags.use_material3
Change-Id: Ia2c737c25c045191378b16305dab0fab80179862
parent 92254810
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment