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

Commit 9f7e9a8c authored by Jeremie Boulic's avatar Jeremie Boulic
Browse files

[DocsUI Peek] Default 'no preview' display

Bug: 382163558
Flag: com.android.documentsui.flags.use_material3
Flag: com.android.documentsui.flags.use_peek_preview_ro
Test: DocumentsUIGoogleTests:com.android.documentsui.peek.PeekUiTest
Change-Id: I7a8f955c6ca4992f82bdcb70a8d359dc77cbe298
parent c6c97f12
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
  int option_menu_settings;
  int option_menu_show_hidden_files;
  int option_menu_sort;
  int peek_container;
  int root_menu_eject_root;
  int root_menu_open_in_new_window;
  int root_menu_paste_into_folder;
+23 −0
Original line number Diff line number Diff line
<!-- 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportHeight="960"
    android:viewportWidth="960">
    <path
        android:fillColor="?attr/colorOnSurfaceVariant"
        android:pathData="M240,880q-33,0 -56.5,-23.5T160,800v-640q0,-33 23.5,-56.5T240,80h320l240,240v480q0,33 -23.5,56.5T720,880L240,880ZM520,360v-200L240,160v640h480v-440L520,360ZM240,160v200,-200 640,-640Z" />
</vector>
+23 −0
Original line number Diff line number Diff line
<!-- 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="240dp"
    android:height="240dp"
    android:viewportHeight="240"
    android:viewportWidth="240">
    <path
        android:fillColor="?attr/colorSurfaceDim"
        android:pathData="M97.79,27.33C98.89,26.43 99.44,25.98 99.94,25.6C111.81,16.65 128.19,16.65 140.05,25.6C140.56,25.98 141.11,26.43 142.21,27.33C142.71,27.73 142.95,27.94 143.2,28.13C148.78,32.51 155.62,35 162.73,35.22C163.04,35.23 163.35,35.23 163.99,35.24C165.42,35.26 166.13,35.27 166.76,35.3C181.62,36.05 194.17,46.55 197.49,61.02C197.63,61.64 197.76,62.34 198.02,63.73C198.14,64.36 198.2,64.67 198.27,64.97C199.72,71.91 203.36,78.21 208.66,82.93C208.89,83.14 209.13,83.35 209.61,83.76C210.69,84.69 211.23,85.15 211.7,85.58C222.6,95.68 225.44,111.78 218.66,124.99C218.37,125.55 218.02,126.17 217.33,127.41C217.02,127.97 216.86,128.24 216.71,128.52C213.35,134.76 212.09,141.92 213.1,148.94C213.15,149.24 213.2,149.56 213.3,150.18C213.53,151.59 213.65,152.29 213.73,152.91C215.57,167.65 207.38,181.8 193.67,187.57C193.09,187.82 192.42,188.07 191.09,188.57C190.49,188.8 190.2,188.91 189.91,189.02C183.31,191.66 177.73,196.33 173.99,202.35C173.82,202.62 173.66,202.89 173.34,203.44C172.61,204.66 172.24,205.27 171.9,205.8C163.82,218.26 148.43,223.85 134.21,219.49C133.6,219.3 132.93,219.07 131.59,218.6C130.99,218.39 130.69,218.28 130.39,218.19C123.64,215.97 116.36,215.97 109.61,218.19C109.31,218.28 109.01,218.39 108.41,218.6C107.07,219.07 106.39,219.3 105.79,219.49C91.57,223.85 76.18,218.26 68.1,205.8C67.75,205.27 67.39,204.66 66.66,203.44C66.34,202.89 66.18,202.62 66.01,202.35C62.27,196.33 56.69,191.66 50.09,189.02C49.8,188.91 49.5,188.8 48.91,188.57C47.58,188.07 46.91,187.82 46.33,187.57C32.62,181.8 24.43,167.65 26.27,152.91C26.35,152.29 26.47,151.59 26.7,150.18C26.8,149.56 26.85,149.24 26.89,148.94C27.91,141.92 26.64,134.76 23.28,128.52C23.14,128.24 22.98,127.97 22.67,127.41C21.97,126.17 21.62,125.55 21.34,124.99C14.56,111.78 17.4,95.68 28.3,85.58C28.76,85.15 29.31,84.69 30.39,83.76C30.87,83.35 31.11,83.14 31.34,82.93C36.64,78.21 40.28,71.91 41.73,64.97C41.8,64.67 41.86,64.36 41.97,63.73C42.24,62.34 42.37,61.64 42.51,61.02C45.83,46.55 58.38,36.05 73.24,35.3C73.87,35.27 74.58,35.26 76.01,35.24C76.64,35.23 76.96,35.23 77.27,35.22C84.37,35 91.22,32.51 96.8,28.13C97.05,27.94 97.29,27.73 97.79,27.33Z" />
</vector>
+11 −7
Original line number Diff line number Diff line
@@ -23,19 +23,23 @@
    android:background="@color/peek_overlay_scrim"
    android:clickable="true"
    android:focusable="false">

    <com.android.documentsui.peek.RenderView
        android:id="@+id/peek_preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <!-- Text and icons using android:white because the underlying black scrim doesn't dynamically
    change colour. -->
    <com.google.android.material.appbar.MaterialToolbar
        android:id="@+id/peek_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/space_extra_small_4"
        android:paddingEnd="@dimen/space_extra_small_4"
        android:background="@color/peek_topbar_scrim"
        app:titleMarginStart="@dimen/space_extra_small_2"
        app:titleTextAppearance="?attr/textAppearanceTitleMedium"
        app:titleTextColor="@android:color/white"
        android:paddingEnd="@dimen/space_extra_small_4"
        android:paddingStart="@dimen/space_extra_small_4"
        app:navigationContentDescription="@string/a11y_peek_navigation_icon"
        app:navigationIcon="@drawable/ic_arrow_back"
        app:navigationIconTint="@android:color/white" />
        app:navigationIconTint="@android:color/white"
        app:titleMarginStart="@dimen/space_extra_small_2"
        app:titleTextAppearance="@style/PeekTopBarTitleText" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+35 −0
Original line number Diff line number Diff line
<!-- 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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/peek_preview_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:contentDescription="@string/peek_no_preview"
        android:src="@drawable/peek_no_preview_shape" />

    <com.google.android.material.textview.MaterialTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:drawablePadding="@dimen/space_small_1"
        android:drawableTop="@drawable/ic_draft"
        android:text="@string/peek_no_preview"
        android:textAppearance="@style/PeekNoPreviewLabelText" />
</FrameLayout>
Loading