blob: bc4f327d7a15d6c63065c651155501a83e9025b1 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright 2019, 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.
*/
-->
<!-- Layout Option: Text preview, with optional title and thumbnail -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_preview_text_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="?android:attr/colorBackground">
<RelativeLayout
android:layout_width="@dimen/chooser_preview_width"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/chooser_edge_margin_normal"
android:paddingRight="@dimen/chooser_edge_margin_normal"
android:layout_marginBottom="@dimen/chooser_view_spacing"
android:id="@+id/content_preview_text_layout">
<TextView
android:id="@+id/content_preview_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:ellipsize="end"
android:fontFamily="@android:string/config_headlineFontFamily"
android:textColor="?android:attr/textColorPrimary"
android:textAlignment="gravity"
android:textDirection="locale"
android:maxLines="2"
android:focusable="true"/>
</RelativeLayout>
<include
android:id="@+id/chooser_action_row"
layout="@layout/chooser_action_row"
android:layout_width="@dimen/chooser_preview_width"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/chooser_view_spacing"
android:layout_gravity="center"
/>
<!-- Required sub-layout so we can get the nice rounded corners-->
<!-- around this section -->
<LinearLayout
android:layout_width="@dimen/chooser_preview_width"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:layout_marginLeft="@dimen/chooser_edge_margin_normal"
android:layout_marginRight="@dimen/chooser_edge_margin_normal"
android:layout_marginBottom="@dimen/chooser_view_spacing"
android:minHeight="80dp"
android:background="@drawable/chooser_content_preview_rounded"
android:id="@+id/content_preview_title_layout">
<view class="com.android.internal.app.ChooserActivity$RoundedRectImageView"
android:id="@+id/content_preview_thumbnail"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_marginRight="16dp"
android:adjustViewBounds="true"
android:layout_gravity="center_vertical"
android:gravity="center"
android:scaleType="centerCrop"/>
<TextView
android:id="@+id/content_preview_title"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="gravity"
android:textDirection="locale"
android:textAppearance="@style/TextAppearance.DeviceDefault.WindowTitle"
android:fontFamily="@android:string/config_headlineFontFamily"/>
</LinearLayout>
</LinearLayout>