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

Commit bffcb840 authored by Jeremie Boulic's avatar Jeremie Boulic Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI Peek] Metadata sheet container" into main

parents 250d3bb4 b36d5d5a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@
  int option_menu_show_hidden_files;
  int option_menu_sort;
  int peek_container;
  int peek_preview_container;
  int root_menu_eject_root;
  int root_menu_open_in_new_window;
  int root_menu_paste_into_folder;
@@ -224,3 +225,8 @@
  static void overrideMappingForTest(java.util.Map);
  static void setEnabledForTest(boolean);
}

# The SideSheetBehavior state is not directly accessed from DocumentsUI, but is used in tests
-keep class com.google.android.material.sidesheet.SideSheetBehavior {
  public int getState();
}
+19 −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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <corners android:radius="@dimen/peek_metadata_sheet_corner_radius" />
</shape>
 No newline at end of file
+31 −17
Original line number Diff line number Diff line
@@ -24,12 +24,17 @@
    android:clickable="true"
    android:focusable="false">

    <FrameLayout
        android:id="@+id/peek_preview_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <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. -->
        <!-- 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"
@@ -42,4 +47,13 @@
            app:navigationIconTint="@android:color/white"
            app:titleMarginStart="@dimen/space_extra_small_2"
            app:titleTextAppearance="@style/PeekTopBarTitleText" />
    </FrameLayout>

    <FrameLayout
        android:id="@+id/peek_metadata_container"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        app:coplanarSiblingViewId="@id/peek_preview_container"
        app:layout_behavior="com.google.android.material.sidesheet.SideSheetBehavior" />
</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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/peek_metadata_sheet_width"
    android:layout_height="match_parent"
    android:layout_margin="@dimen/space_small_1"
    android:background="@drawable/peek_metadata_sheet_background"
    android:backgroundTint="?attr/colorSurfaceContainerHigh"
    android:orientation="vertical"/>
+3 −0
Original line number Diff line number Diff line
@@ -307,4 +307,7 @@
    <dimen name="job_progress_item_status_separator_margin">@dimen/space_extra_small_2</dimen>
    <dimen name="job_progress_item_buttons_margin_start">@dimen/space_extra_small_2</dimen>
    <dimen name="job_progress_item_buttons_margin_top">@dimen/space_extra_small_1</dimen>

    <dimen name="peek_metadata_sheet_width">320dp</dimen>
    <dimen name="peek_metadata_sheet_corner_radius">16dp</dimen>
</resources>
Loading