diff options
author | 2025-03-12 06:05:11 +0000 | |
---|---|---|
committer | 2025-03-12 06:05:48 +0000 | |
commit | 001a2db3839ce06d93a3a7c452b966fa5d9f7491 (patch) | |
tree | 254cf14ff3eb5afb6bc332a65ffe9ca062c232bf /src | |
parent | 10d62a35f21e66c4eae67e03b2001b890b4a3f0a (diff) |
[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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java b/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java index 8989853a0..8be400924 100644 --- a/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java +++ b/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java @@ -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. |