Loading res/flag(com.android.documentsui.flags.use_material3)/color/briefcase_icon_color.xml 0 → 100644 +23 −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. --> <!-- Though there's only one state here but we can't declare this as a normal color variable in colors.xml, it will trigger an attribute resolve error. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="?attr/colorSecondary" /> </selector> res/flag(com.android.documentsui.flags.use_material3)/drawable/ic_briefcase.xml +11 −4 Original line number Diff line number Diff line Loading @@ -17,9 +17,16 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> android:viewportWidth="960" android:viewportHeight="960"> <!-- ic_briefcase is just a fallback drawable, the code logic loads the icon from the system first and if it fails, this drawable will be used. So we always need an android:tint attribute specified on the layout file (which overshadows the "white" color below), otherwise the icon loaded from the system won't have the correct icon color. That's why we just put "white" here, it will never be used. --> <path android:fillColor="?android:attr/colorAccent" android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"/> android:fillColor="@android:color/white" android:pathData="M160,840Q127,840 103.5,816.5Q80,793 80,760L80,320Q80,287 103.5,263.5Q127,240 160,240L320,240L320,160Q320,127 343.5,103.5Q367,80 400,80L560,80Q593,80 616.5,103.5Q640,127 640,160L640,240L800,240Q833,240 856.5,263.5Q880,287 880,320L880,760Q880,793 856.5,816.5Q833,840 800,840L160,840ZM400,240L560,240L560,160Q560,160 560,160Q560,160 560,160L400,160Q400,160 400,160Q400,160 400,160L400,240Z"/> </vector> res/flag(com.android.documentsui.flags.use_material3)/layout-w900dp/item_doc_list.xml +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background" Loading Loading @@ -101,7 +100,7 @@ android:layout_marginEnd="@dimen/briefcase_icon_margin" android:layout_gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="@color/doc_list_item_badge_icon_color" android:tint="@color/briefcase_icon_color" android:contentDescription="@string/a11y_work"/> <com.google.android.material.textview.MaterialTextView Loading res/flag(com.android.documentsui.flags.use_material3)/layout/item_doc_grid.xml +19 −14 Original line number Diff line number Diff line Loading @@ -85,6 +85,21 @@ android:scaleType="center" android:src="@drawable/ic_check_circle" /> <com.google.android.material.imageview.ShapeableImageView android:id="@+id/icon_profile_badge" android:layout_width="@dimen/briefcase_icon_grid_size" android:layout_height="@dimen/briefcase_icon_grid_size" android:layout_marginBottom="@dimen/briefcase_icon_grid_margin" android:layout_marginEnd="@dimen/briefcase_icon_grid_margin" android:layout_gravity="bottom|end" android:contentDescription="@string/a11y_work" android:gravity="center_vertical" android:background="?attr/colorSurfaceContainerLowest" app:shapeAppearance="?attr/shapeAppearanceCornerExtraSmall" app:contentPadding="@dimen/briefcase_icon_grid_padding" android:src="@drawable/ic_briefcase" android:tint="@color/briefcase_icon_color" /> <FrameLayout android:id="@+id/preview_icon" android:layout_width="@dimen/button_container_size" Loading Loading @@ -134,17 +149,7 @@ android:gravity="center" android:orientation="horizontal"> <ImageView android:id="@+id/icon_profile_badge" android:layout_width="@dimen/briefcase_icon_size" android:layout_height="@dimen/briefcase_icon_size" android:layout_marginEnd="@dimen/briefcase_icon_margin" android:contentDescription="@string/a11y_work" android:gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="?android:attr/colorAccent" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -162,7 +167,7 @@ android:gravity="center" android:orientation="horizontal"> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/details" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -172,7 +177,7 @@ android:textAlignment="viewStart" android:textAppearance="@style/ItemCaptionText" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/bullet" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -182,7 +187,7 @@ android:textAlignment="viewStart" android:textAppearance="@style/ItemCaptionText" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading res/flag(com.android.documentsui.flags.use_material3)/layout/item_doc_list.xml +29 −30 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/item_root" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -82,15 +81,10 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" android:orientation="horizontal" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/list_item_icon_size"> <LinearLayout android:layout_width="wrap_content" android:layout_height="0dp" android:layout_weight="1"> <ImageView android:id="@+id/icon_profile_badge" android:layout_height="@dimen/briefcase_icon_size" Loading @@ -98,9 +92,14 @@ android:layout_marginEnd="@dimen/briefcase_icon_margin" android:layout_gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="@color/doc_list_item_badge_icon_color" android:tint="@color/briefcase_icon_color" android:contentDescription="@string/a11y_work" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textview.MaterialTextView android:id="@android:id/title" android:layout_width="wrap_content" Loading @@ -110,11 +109,9 @@ android:textAlignment="viewStart" android:textAppearance="@style/FileItemLabelText" /> </LinearLayout> <LinearLayout android:id="@+id/line2" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:baselineAligned="false" android:gravity="center_vertical" Loading @@ -132,6 +129,8 @@ </LinearLayout> </LinearLayout> <FrameLayout android:id="@+id/preview_icon" android:layout_width="@dimen/list_item_icon_size" Loading Loading
res/flag(com.android.documentsui.flags.use_material3)/color/briefcase_icon_color.xml 0 → 100644 +23 −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. --> <!-- Though there's only one state here but we can't declare this as a normal color variable in colors.xml, it will trigger an attribute resolve error. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="?attr/colorSecondary" /> </selector>
res/flag(com.android.documentsui.flags.use_material3)/drawable/ic_briefcase.xml +11 −4 Original line number Diff line number Diff line Loading @@ -17,9 +17,16 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> android:viewportWidth="960" android:viewportHeight="960"> <!-- ic_briefcase is just a fallback drawable, the code logic loads the icon from the system first and if it fails, this drawable will be used. So we always need an android:tint attribute specified on the layout file (which overshadows the "white" color below), otherwise the icon loaded from the system won't have the correct icon color. That's why we just put "white" here, it will never be used. --> <path android:fillColor="?android:attr/colorAccent" android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"/> android:fillColor="@android:color/white" android:pathData="M160,840Q127,840 103.5,816.5Q80,793 80,760L80,320Q80,287 103.5,263.5Q127,240 160,240L320,240L320,160Q320,127 343.5,103.5Q367,80 400,80L560,80Q593,80 616.5,103.5Q640,127 640,160L640,240L800,240Q833,240 856.5,263.5Q880,287 880,320L880,760Q880,793 856.5,816.5Q833,840 800,840L160,840ZM400,240L560,240L560,160Q560,160 560,160Q560,160 560,160L400,160Q400,160 400,160Q400,160 400,160L400,240Z"/> </vector>
res/flag(com.android.documentsui.flags.use_material3)/layout-w900dp/item_doc_list.xml +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background" Loading Loading @@ -101,7 +100,7 @@ android:layout_marginEnd="@dimen/briefcase_icon_margin" android:layout_gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="@color/doc_list_item_badge_icon_color" android:tint="@color/briefcase_icon_color" android:contentDescription="@string/a11y_work"/> <com.google.android.material.textview.MaterialTextView Loading
res/flag(com.android.documentsui.flags.use_material3)/layout/item_doc_grid.xml +19 −14 Original line number Diff line number Diff line Loading @@ -85,6 +85,21 @@ android:scaleType="center" android:src="@drawable/ic_check_circle" /> <com.google.android.material.imageview.ShapeableImageView android:id="@+id/icon_profile_badge" android:layout_width="@dimen/briefcase_icon_grid_size" android:layout_height="@dimen/briefcase_icon_grid_size" android:layout_marginBottom="@dimen/briefcase_icon_grid_margin" android:layout_marginEnd="@dimen/briefcase_icon_grid_margin" android:layout_gravity="bottom|end" android:contentDescription="@string/a11y_work" android:gravity="center_vertical" android:background="?attr/colorSurfaceContainerLowest" app:shapeAppearance="?attr/shapeAppearanceCornerExtraSmall" app:contentPadding="@dimen/briefcase_icon_grid_padding" android:src="@drawable/ic_briefcase" android:tint="@color/briefcase_icon_color" /> <FrameLayout android:id="@+id/preview_icon" android:layout_width="@dimen/button_container_size" Loading Loading @@ -134,17 +149,7 @@ android:gravity="center" android:orientation="horizontal"> <ImageView android:id="@+id/icon_profile_badge" android:layout_width="@dimen/briefcase_icon_size" android:layout_height="@dimen/briefcase_icon_size" android:layout_marginEnd="@dimen/briefcase_icon_margin" android:contentDescription="@string/a11y_work" android:gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="?android:attr/colorAccent" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -162,7 +167,7 @@ android:gravity="center" android:orientation="horizontal"> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/details" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -172,7 +177,7 @@ android:textAlignment="viewStart" android:textAppearance="@style/ItemCaptionText" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/bullet" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -182,7 +187,7 @@ android:textAlignment="viewStart" android:textAppearance="@style/ItemCaptionText" /> <TextView <com.google.android.material.textview.MaterialTextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading
res/flag(com.android.documentsui.flags.use_material3)/layout/item_doc_list.xml +29 −30 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/item_root" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -82,15 +81,10 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" android:orientation="horizontal" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/list_item_icon_size"> <LinearLayout android:layout_width="wrap_content" android:layout_height="0dp" android:layout_weight="1"> <ImageView android:id="@+id/icon_profile_badge" android:layout_height="@dimen/briefcase_icon_size" Loading @@ -98,9 +92,14 @@ android:layout_marginEnd="@dimen/briefcase_icon_margin" android:layout_gravity="center_vertical" android:src="@drawable/ic_briefcase" android:tint="@color/doc_list_item_badge_icon_color" android:tint="@color/briefcase_icon_color" android:contentDescription="@string/a11y_work" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textview.MaterialTextView android:id="@android:id/title" android:layout_width="wrap_content" Loading @@ -110,11 +109,9 @@ android:textAlignment="viewStart" android:textAppearance="@style/FileItemLabelText" /> </LinearLayout> <LinearLayout android:id="@+id/line2" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:baselineAligned="false" android:gravity="center_vertical" Loading @@ -132,6 +129,8 @@ </LinearLayout> </LinearLayout> <FrameLayout android:id="@+id/preview_icon" android:layout_width="@dimen/list_item_icon_size" Loading