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

Commit b2cb6066 authored by Ben Reich's avatar Ben Reich
Browse files

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
parent e94c2737
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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>
+7 −3
Original line number Diff line number Diff line
@@ -210,9 +210,13 @@ public class FilesActivity extends BaseActivity implements AbstractActionHandler
            updateTaskDescription(intent);
        }

        // 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);
    }
+3 −1
Original line number Diff line number Diff line
@@ -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);
        }