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

Commit d0c1fc2d authored by Jeremie Boulic's avatar Jeremie Boulic
Browse files

[DocsUI Peek] Initial Peek overlay and view manager

Define the initial Peek fragment, with its associated layout.

If Peek is enabled, the PeekViewManager, instantiated when DocsUI is
launched, loads the PeekFragment (with its inflated view) in its
hidden container.

Flag: com.android.documentsui.flags.use_material3
Flag: com.android.documentsui.flags.use_peek_preview_ro
Test: DocumentsUIGoogleTests:com.android.documentsui.peek.PeekUiTest
Test: DocumentsUIGoogleTests:c.a.d.files.ActionHandlerTest#testShowPeek
Bug: 382163291
Bug: 382163274
Change-Id: I7fdd1afd856803091425b8257b69206746530989
parent 5e1e9d11
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -104,4 +104,12 @@
        </LinearLayout>

    </androidx.drawerlayout.widget.DrawerLayout>

    <!-- Peek overlay -->
    <FrameLayout
        android:id="@+id/peek_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
+7 −0
Original line number Diff line number Diff line
@@ -131,4 +131,11 @@

    </LinearLayout>

    <!-- Peek overlay -->
    <FrameLayout
        android:id="@+id/peek_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
+8 −0
Original line number Diff line number Diff line
@@ -178,4 +178,12 @@
        </LinearLayout>

    </androidx.drawerlayout.widget.DrawerLayout>

    <!-- Peek overlay -->
    <FrameLayout
        android:id="@+id/peek_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2025 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/peek_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/peek_overlay_background"
    android:focusable="false" />
+4 −0
Original line number Diff line number Diff line
@@ -76,4 +76,8 @@
       </shape>
   -->
  <color name="overlay_hover_color_percentage">#14000000</color> <!-- 8% -->

  <!-- Peek overlay static color. Makes the background dimmer with an 80% opacity. This color is not
  intended to be dynamic, and is defined specifically for Peek. -->
  <color name="peek_overlay_background">#CC000000</color> <!-- 80% -->
</resources>
Loading