summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author Ben Reich <benreich@google.com> 2025-03-19 17:28:10 +1100
committer Ben Reich <benreich@google.com> 2025-03-19 17:28:10 +1100
commitb2cb60664a194e05fae78cf62a9a7b40f43dd635 (patch)
tree9b389de99316f1f711f96f59d971369f684956e1 /src
parente94c273794af1b165da86f6034d978a125e26379 (diff)
Stop system bar areas from being transparent
On phones the layout is inset to accomodate for the system bars. When material 3 is enabled, the path bar is moved to the bottom of the window. When this happens there is a gap created from the inset where it is made a transparent colour that effectively shows the scrolling grid / list view. Stop that behaviour and set the default color in M3 to be the background colour. Fix: 403481518 Test: m DocumentsUIGoogle on bluejay and verify bottom bar Flag: com.android.documentsui.flags.use_material3 Change-Id: Icb565c80bbb30a6e84486319c1d6914c81bbf03a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/documentsui/files/FilesActivity.java10
-rw-r--r--src/com/android/documentsui/picker/PickActivity.java4
2 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/documentsui/files/FilesActivity.java b/src/com/android/documentsui/files/FilesActivity.java
index 50e266d38..cb8708f0b 100644
--- a/src/com/android/documentsui/files/FilesActivity.java
+++ b/src/com/android/documentsui/files/FilesActivity.java
@@ -210,9 +210,13 @@ public class FilesActivity extends BaseActivity implements AbstractActionHandler
updateTaskDescription(intent);
}
- // Set save container background to transparent for edge to edge nav bar.
- View saveContainer = findViewById(R.id.container_save);
- saveContainer.setBackgroundColor(Color.TRANSPARENT);
+ // When the use_material3 flag is on, the file path bar is at the bottom of the layout and
+ // hence the edge to edge nav bar is no longer required.
+ if (!isUseMaterial3FlagEnabled()) {
+ // Set save container background to transparent for edge to edge nav bar.
+ View saveContainer = findViewById(R.id.container_save);
+ saveContainer.setBackgroundColor(Color.TRANSPARENT);
+ }
presentFileErrors(icicle, intent);
}
diff --git a/src/com/android/documentsui/picker/PickActivity.java b/src/com/android/documentsui/picker/PickActivity.java
index 68a797397..4f875072e 100644
--- a/src/com/android/documentsui/picker/PickActivity.java
+++ b/src/com/android/documentsui/picker/PickActivity.java
@@ -224,9 +224,11 @@ public class PickActivity extends BaseActivity implements ActionHandler.Addons {
} else if (mState.action == ACTION_OPEN_TREE ||
mState.action == ACTION_PICK_COPY_DESTINATION) {
PickFragment.show(getSupportFragmentManager());
- } else {
+ } else if (!isUseMaterial3FlagEnabled()) {
// If PickFragment or SaveFragment does not show,
// Set save container background to transparent for edge to edge nav bar.
+ // However when the use_material3 flag is on, the file path bar is at the bottom of the
+ // layout and hence the edge to edge nav bar is no longer required.
View saveContainer = findViewById(R.id.container_save);
saveContainer.setBackgroundColor(Color.TRANSPARENT);
}