• 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:paddingBottom="@dimen/chooser_view_spacing"
28    android:background="?android:attr/colorBackground">
29
30  <LinearLayout
31      android:layout_width="@dimen/chooser_preview_width"
32      android:layout_height="wrap_content"
33      android:layout_gravity="center"
34      android:orientation="horizontal"
35      android:paddingLeft="@dimen/chooser_edge_margin_normal"
36      android:paddingRight="@dimen/chooser_edge_margin_normal"
37      android:layout_marginBottom="@dimen/chooser_view_spacing"
38      android:id="@androidprv:id/content_preview_file_layout">
39
40    <com.android.intentresolver.widget.RoundedRectImageView
41          android:id="@androidprv:id/content_preview_file_thumbnail"
42          android:layout_width="75dp"
43          android:layout_height="75dp"
44          android:layout_marginRight="16dp"
45          android:adjustViewBounds="true"
46          android:layout_gravity="center_vertical"
47          android:gravity="center"
48          android:scaleType="centerCrop"/>
49    <ImageView
50        android:id="@androidprv:id/content_preview_file_icon"
51        android:layout_width="36dp"
52        android:layout_height="36dp"
53        android:layout_marginRight="16dp"
54        android:adjustViewBounds="true"
55        android:layout_gravity="center_vertical"
56        android:gravity="center"
57        android:scaleType="fitCenter"
58        android:visibility="gone"/>
59    <TextView
60        android:id="@androidprv:id/content_preview_filename"
61        android:layout_width="0dp"
62        android:layout_weight="1"
63        android:layout_height="wrap_content"
64        android:layout_gravity="center_vertical"
65        android:ellipsize="middle"
66        android:gravity="start|top"
67        android:paddingRight="24dp"
68        android:singleLine="true"
69        android:textAppearance="@style/TextAppearance.ChooserDefault" />
70  </LinearLayout>
71
72  <TextView
73      android:id="@+id/reselection_action"
74      android:layout_width="match_parent"
75      android:layout_height="wrap_content"
76      android:visibility="gone"
77      android:text="@string/select_files"
78      android:gravity="center"
79      style="@style/ReselectionAction" />
80
81  <ViewStub
82      android:id="@+id/action_row_stub"
83      android:layout_width="match_parent"
84      android:layout_height="wrap_content" />
85
86</LinearLayout>
87
88