108 lines
4.1 KiB
XML
108 lines
4.1 KiB
XML
|
<?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"
|
||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||
|
android:id="@androidprv: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="@androidprv:id/content_preview_text_layout">
|
||
|
|
||
|
<TextView
|
||
|
android:id="@androidprv: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="@androidprv:string/config_headlineFontFamily"
|
||
|
android:textColor="?android:attr/textColorPrimary"
|
||
|
android:textAlignment="gravity"
|
||
|
android:textDirection="locale"
|
||
|
android:maxLines="2"
|
||
|
android:focusable="true"/>
|
||
|
|
||
|
</RelativeLayout>
|
||
|
|
||
|
<TextView
|
||
|
android:id="@+id/reselection_action"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:visibility="gone"
|
||
|
android:text="@string/select_text"
|
||
|
android:gravity="center"
|
||
|
style="@style/ReselectionAction" />
|
||
|
|
||
|
<ViewStub
|
||
|
android:id="@+id/action_row_stub"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content" />
|
||
|
|
||
|
<!-- 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="@androidprv:drawable/chooser_content_preview_rounded"
|
||
|
android:id="@androidprv:id/content_preview_title_layout">
|
||
|
|
||
|
<com.android.intentresolver.widget.RoundedRectImageView
|
||
|
android:id="@androidprv: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="@androidprv: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="@android:style/TextAppearance.DeviceDefault.WindowTitle"
|
||
|
android:fontFamily="@androidprv:string/config_headlineFontFamily"/>
|
||
|
</LinearLayout>
|
||
|
</LinearLayout>
|
||
|
|