• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="@color/chooser_grid_preview_background" >
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:minHeight="@dimen/chooser_content_view_min_height"
36        android:padding="@dimen/chooser_edge_margin_normal"
37        android:background="@drawable/chooser_content_preview_rounded"
38        android:id="@androidprv:id/content_preview_file_layout">
39
40        <ImageView
41            android:id="@+id/content_preview_file_icon"
42            android:layout_width="24dp"
43            android:layout_height="24dp"
44            android:layout_marginEnd="16dp"
45            android:layout_alignParentStart="true"
46            android:layout_centerVertical="true"
47            android:src="@drawable/ic_file_copy"
48            android:scaleType="fitCenter"/>
49
50        <LinearLayout
51            android:layout_width="wrap_content"
52            android:layout_height="wrap_content"
53            android:orientation="vertical"
54            android:layout_centerVertical="true"
55            android:layout_toEndOf="@id/content_preview_file_icon"
56            android:layout_alignParentTop="true"
57            android:layout_alignWithParentIfMissing="true">
58
59            <TextView
60                android:id="@+id/content_preview_filename"
61                android:layout_width="wrap_content"
62                android:layout_height="wrap_content"
63                android:ellipsize="middle"
64                android:gravity="start|top"
65                android:singleLine="true"
66                android:textStyle="bold"
67                android:textColor="@color/content_preview_filename_text_color"
68                android:textSize="@dimen/content_preview_text_size"
69                android:lineHeight="@dimen/content_preview_filename_line_size"
70                android:textAppearance="@style/TextAppearance.ChooserDefault"/>
71
72            <TextView
73                android:id="@+id/content_preview_more_files"
74                android:layout_width="wrap_content"
75                android:layout_height="wrap_content"
76                android:gravity="start|top"
77                android:singleLine="true"
78                android:textColor="@color/content_preview_more_files_text_color"
79                android:textSize="@dimen/content_preview_more_files_text_size"
80                android:lineHeight="@dimen/content_preview_more_files_line_size"
81                android:textAppearance="@style/TextAppearance.ChooserDefault"/>
82
83        </LinearLayout>
84    </RelativeLayout>
85
86    <include layout="@layout/chooser_action_row"/>
87
88</LinearLayout>
89
90