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

Commit 09cc250a authored by Bo Majewski's avatar Bo Majewski Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI, Search]: Introduce V2 of the breadcrumb." into main

parents 5f94fd05 0ae22a8a
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -138,6 +138,7 @@
}
}
-keep class com.android.documentsui.R$layout {
-keep class com.android.documentsui.R$layout {
  int apps_row;
  int apps_row;
  int breadcrumb_view_v2;
  int directory_header;
  int directory_header;
  int files_activity;
  int files_activity;
  int fixed_layout;
  int fixed_layout;
@@ -228,6 +229,15 @@
  public android.graphics.drawable.Drawable getChipIcon();
  public android.graphics.drawable.Drawable getChipIcon();
}
}


# This is used in the unit test.
-keep class com.android.documentsui.breadcrumbs.BreadcrumbController {
  public void setVisible(boolean);
}
-keep class com.android.documentsui.breadcrumbs.BreadcrumbView {
  public void setVisible(boolean);
  public boolean performPathItemClick(int);
}

-keep class com.android.documentsui.util.Material3Config {
-keep class com.android.documentsui.util.Material3Config {
  static int getRes(int);
  static int getRes(int);
  static void overrideMappingForTest(java.util.Map);
  static void overrideMappingForTest(java.util.Map);
+29 −0
Original line number Original line 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.
-->

<!-- An item representing a folder in the breadcrumb. -->
<com.google.android.material.textview.MaterialTextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:paddingHorizontal="@dimen/breadcrumb_item_padding_horizontal"
    android:paddingVertical="@dimen/breadcrumb_item_padding_vertical"
    android:maxWidth="@dimen/breadcrumb_item_max_width"
    android:gravity="center_vertical"
    android:maxLines="1"
    android:ellipsize="end"
    android:textAppearance="@style/BreadcrumbTextM3"
    android:background="@drawable/breadcrumb_item_background_m3" />
+22 −0
Original line number Original line 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.
-->

<!-- An item representing a separator between path elements in the breadcrumb. -->
<ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/breadcrumb_item_arrow_size"
    android:layout_height="@dimen/breadcrumb_item_arrow_size"
    android:src="@drawable/ic_breadcrumb_arrow"/>
+32 −0
Original line number Original line 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.
-->

<!-- Represents the breadcrumb container view that holds components that make a breadcrumb path. -->
<HorizontalScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/breadcrumb_horizontal_scroll_view"
    android:visibility="visible"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <LinearLayout
        android:id="@+id/breadcrumb_path_holder"
        android:layout_width="match_parent"
        android:layout_height="@dimen/breadcrumb_height"
        android:gravity="center_vertical"
        android:orientation="horizontal" />

</HorizontalScrollView>
+7 −0
Original line number Original line Diff line number Diff line
@@ -88,6 +88,13 @@
                    android:background="?attr/colorSurfaceBright"
                    android:background="?attr/colorSurfaceBright"
                    android:paddingHorizontal="@dimen/breadcrumb_padding_horizontal" />
                    android:paddingHorizontal="@dimen/breadcrumb_padding_horizontal" />


                <com.android.documentsui.breadcrumbs.BreadcrumbView
                    android:id="@+id/breadcrumb_view_v2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?attr/colorSurfaceBright"
                    android:paddingHorizontal="@dimen/breadcrumb_padding_horizontal" />

                <androidx.coordinatorlayout.widget.CoordinatorLayout
                <androidx.coordinatorlayout.widget.CoordinatorLayout
                    android:id="@+id/container_save"
                    android:id="@+id/container_save"
                    android:layout_width="match_parent"
                    android:layout_width="match_parent"
Loading