1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4* Copyright 2019, The Android Open Source Project
5*
6* Licensed under the Apache License, Version 2.0 (the "License");
7* you may not use this file except in compliance with the License.
8* You may obtain a copy of the License at
9*
10*     http://www.apache.org/licenses/LICENSE-2.0
11*
12* Unless required by applicable law or agreed to in writing, software
13* distributed under the License is distributed on an "AS IS" BASIS,
14* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15* See the License for the specific language governing permissions and
16* limitations under the License.
17*/
18-->
19<!-- Layout Option: File preview, icon, filename, copy-->
20<LinearLayout
21    xmlns:android="http://schemas.android.com/apk/res/android"
22    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
23    android:id="@androidprv:id/content_preview_file_area"
24    android:layout_width="match_parent"
25    android:layout_height="wrap_content"
26    android:orientation="vertical"
27    android:background="?androidprv:attr/materialColorSurfaceContainer">
28
29    <RelativeLayout
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        android:layout_gravity="center"
33        android:layout_marginHorizontal="@dimen/chooser_edge_margin_normal"
34        android:layout_marginBottom="8dp"
35        android:padding="@dimen/chooser_edge_margin_normal"
36        android:background="@drawable/chooser_content_preview_rounded"
37        android:id="@androidprv:id/content_preview_file_layout">
38
39        <ImageView
40            android:id="@+id/content_preview_file_icon"
41            android:layout_width="24dp"
42            android:layout_height="24dp"
43            android:layout_marginEnd="16dp"
44            android:layout_alignParentStart="true"
45            android:layout_centerVertical="true"
46            android:src="@drawable/ic_file_copy"
47            android:scaleType="fitCenter"/>
48
49        <LinearLayout
50            android:layout_width="wrap_content"
51            android:layout_height="wrap_content"
52            android:orientation="vertical"
53            android:layout_centerVertical="true"
54            android:layout_toEndOf="@id/content_preview_file_icon"
55            android:layout_alignParentTop="true"
56            android:layout_alignWithParentIfMissing="true">
57
58            <TextView
59                android:id="@+id/content_preview_filename"
60                android:layout_width="wrap_content"
61                android:layout_height="wrap_content"
62                android:ellipsize="middle"
63                android:gravity="start|top"
64                android:singleLine="true"
65                android:textStyle="bold"
66                android:textColor="?androidprv:attr/materialColorOnSurface"
67                android:textSize="12sp"
68                android:lineHeight="16sp"
69                android:textAppearance="@style/TextAppearance.ChooserDefault"/>
70
71            <TextView
72                android:id="@+id/content_preview_more_files"
73                android:layout_width="wrap_content"
74                android:layout_height="wrap_content"
75                android:gravity="start|top"
76                android:singleLine="true"
77                android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
78                android:textSize="12sp"
79                android:lineHeight="16sp"
80                android:textAppearance="@style/TextAppearance.ChooserDefault"/>
81
82        </LinearLayout>
83    </RelativeLayout>
84
85    <include layout="@layout/chooser_action_row"/>
86
87</LinearLayout>
88
89