diff options
author | 2025-03-19 16:24:24 -0700 | |
---|---|---|
committer | 2025-03-19 16:24:24 -0700 | |
commit | 0a9a9f0db4748ddac9b3ff9735fd3b599e9909ee (patch) | |
tree | c038fdddced6db2b7dfd069eeedcf3d0bba38d3b | |
parent | 66c739559d8095630a84c4c9a25fbd7b088b3daf (diff) | |
parent | b2cb60664a194e05fae78cf62a9a7b40f43dd635 (diff) |
Merge "Stop system bar areas from being transparent" into main
3 files changed, 14 insertions, 4 deletions
diff --git a/res/flag(com.android.documentsui.flags.use_material3)/values/themes.xml b/res/flag(com.android.documentsui.flags.use_material3)/values/themes.xml index 314022eea..114d14c88 100644 --- a/res/flag(com.android.documentsui.flags.use_material3)/values/themes.xml +++ b/res/flag(com.android.documentsui.flags.use_material3)/values/themes.xml @@ -79,5 +79,9 @@ <!-- Menu text appearance --> <item name="android:itemTextAppearance">@style/MenuItemTextAppearance</item> + + <!-- System bar colors. --> + <item name="android:statusBarColor">?attr/colorSurfaceContainer</item> + <item name="android:navigationBarColor">?attr/colorSurfaceContainer</item> </style> </resources> 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); } |