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

Commit a23fb34d authored by Kelvin Kwan's avatar Kelvin Kwan
Browse files

Show briefcase icon on work files when cross profile is supported.

Bug: 149771764
Test: manual
Test: atest DocumentsUIGoogleTests:com.android.documentsui.dirlist.IconHelperTest
Change-Id: I695d9cb54cfc73f063aba977add48d3d6e270ae9
parent b89e9a7a
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2020 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="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <path
      android:fillColor="@color/briefcase_icon_color"
      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"/>
</vector>
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2020 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="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <path
      android:fillColor="@android:color/white"
      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"/>
</vector>
+23 −8
Original line number Diff line number Diff line
@@ -76,17 +76,32 @@
            android:layout_weight="1"
            android:orientation="horizontal" >

            <TextView
                android:id="@android:id/title"
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="12dp"
                android:layout_weight="0.4"
                android:layout_marginEnd="12dp"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/icon_briefcase"
                    android:layout_height="@dimen/briefcase_icon_size"
                    android:layout_width="@dimen/briefcase_icon_size"
                    android:layout_marginEnd="@dimen/briefcase_icon_margin"
                    android:layout_gravity="center_vertical"
                    android:src="@drawable/ic_briefcase"
                    android:contentDescription="@null"/>

                <TextView
                    android:id="@android:id/title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="middle"
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                    android:textAppearance="@android:style/TextAppearance.Material.Subhead"
                    android:textColor="?android:attr/textColorPrimary"/>
            </LinearLayout>

            <TextView
                android:id="@+id/file_type"
+8 −0
Original line number Diff line number Diff line
@@ -78,6 +78,14 @@

            </FrameLayout>

            <ImageView
                android:id="@+id/icon_briefcase"
                android:layout_height="@dimen/briefcase_icon_size"
                android:layout_width="@dimen/briefcase_icon_size"
                android:layout_marginEnd="@dimen/briefcase_icon_margin"
                android:src="@drawable/ic_briefcase"
                android:contentDescription="@null"/>

            <TextView
                android:id="@android:id/title"
                android:layout_width="wrap_content"
+12 −1
Original line number Diff line number Diff line
@@ -142,12 +142,23 @@
                    android:paddingTop="8dp"
                    android:paddingEnd="12dp">

                    <ImageView
                        android:id="@+id/icon_briefcase"
                        android:layout_height="@dimen/briefcase_icon_size"
                        android:layout_width="@dimen/briefcase_icon_size"
                        android:layout_marginEnd="@dimen/briefcase_icon_margin"
                        android:layout_alignTop="@android:id/title"
                        android:layout_alignBottom="@android:id/title"
                        android:gravity="center_vertical"
                        android:src="@drawable/ic_briefcase"
                        android:contentDescription="@null"/>

                    <TextView
                        android:id="@android:id/title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentTop="true"
                        android:layout_alignParentStart="true"
                        android:layout_toEndOf="@+id/icon_briefcase"
                        android:singleLine="true"
                        android:ellipsize="end"
                        android:textAlignment="viewStart"
Loading