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

Commit 001a2db3 authored by Cassy Chun-Crogan's avatar Cassy Chun-Crogan
Browse files

[DocsUI M3] Remove the break between folders and files

Folders always appear before files and a visual break between them
was introduced in ag/836035. For example, if there is one folder and
several files, the folder appears on the first row and the rest of the
files are displayed below it.

In Material3 we want to display the items continuously, so remove this
break.

See bug for attached screenshots.

Bug: 401108520
Test: m DocumentsUIGoogle && manual inspection
Flag: com.android.documentsui.flags.use_material3
Change-Id: Idd51a10699fe1dad8101c3573afa5d19a04b6c88
parent 10d62a35
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.documentsui.dirlist;

import static com.android.documentsui.util.FlagUtils.isUseMaterial3FlagEnabled;

import android.os.UserManager;
import android.view.ViewGroup;

@@ -207,6 +209,11 @@ final class DirectoryAddonsAdapter extends DocumentsAdapter {
            return;
        }

        if (isUseMaterial3FlagEnabled()) {
            // Do not add a visual break between folders and documents in Material3.
            return;
        }

        // Walk down the list of IDs till we encounter something that's not a directory, and
        // insert a whitespace element - this introduces a visual break in the grid between
        // folders and documents.