112 lines
4.6 KiB
XML
112 lines
4.6 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!-- Copyright (C) 2021 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.
|
||
|
-->
|
||
|
|
||
|
<FrameLayout
|
||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:focusable="true">
|
||
|
|
||
|
<com.google.android.material.card.MaterialCardView
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:elevation="0dp"
|
||
|
android:duplicateParentState="true"
|
||
|
app:cardElevation="0dp"
|
||
|
app:cardCornerRadius="0dp"
|
||
|
app:strokeWidth="0dp">
|
||
|
|
||
|
<FrameLayout
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content">
|
||
|
|
||
|
<com.android.providers.media.photopicker.ui.SquareImageView
|
||
|
android:id="@+id/icon_thumbnail"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:scaleType="centerCrop"
|
||
|
android:contentDescription="@null"/>
|
||
|
|
||
|
<FrameLayout
|
||
|
android:id="@+id/overlay_gradient"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="@dimen/picker_item_gradient_height"
|
||
|
android:background="@drawable/picker_item_gradient"/>
|
||
|
|
||
|
<ImageView
|
||
|
android:id="@+id/icon_gif"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="end|top"
|
||
|
android:scaleType="fitCenter"
|
||
|
android:src="@drawable/ic_gif"
|
||
|
android:contentDescription="@null"/>
|
||
|
|
||
|
<ImageView
|
||
|
android:id="@+id/icon_motion_photo"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="end|top"
|
||
|
android:layout_marginEnd="@dimen/picker_item_badge_margin"
|
||
|
android:layout_marginTop="@dimen/picker_item_badge_margin"
|
||
|
android:scaleType="fitCenter"
|
||
|
android:src="@drawable/ic_motion_photo"
|
||
|
android:contentDescription="@null"/>
|
||
|
|
||
|
<LinearLayout
|
||
|
android:id="@+id/video_container"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_gravity="end|top"
|
||
|
android:layout_marginEnd="@dimen/picker_item_badge_margin"
|
||
|
android:layout_marginTop="@dimen/picker_item_badge_margin"
|
||
|
android:orientation="horizontal"
|
||
|
android:contentDescription="@null">
|
||
|
|
||
|
<TextView
|
||
|
android:id="@+id/video_duration"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginEnd="@dimen/picker_item_badge_text_margin"
|
||
|
android:layout_gravity="center_vertical"
|
||
|
android:textColor="@android:color/white"
|
||
|
android:textSize="@dimen/picker_item_badge_text_size"/>
|
||
|
|
||
|
<ImageView
|
||
|
android:id="@+id/icon_video"
|
||
|
android:layout_width="wrap_content"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:scaleType="fitCenter"
|
||
|
android:src="@drawable/ic_play_circle_filled"
|
||
|
android:contentDescription="@null"/>
|
||
|
</LinearLayout>
|
||
|
</FrameLayout>
|
||
|
|
||
|
</com.google.android.material.card.MaterialCardView>
|
||
|
|
||
|
<ImageView
|
||
|
android:id="@+id/icon_check"
|
||
|
android:layout_height="@dimen/picker_item_check_size"
|
||
|
android:layout_width="@dimen/picker_item_check_size"
|
||
|
android:layout_marginStart="@dimen/picker_item_check_margin"
|
||
|
android:layout_marginTop="@dimen/picker_item_check_margin"
|
||
|
android:src="@drawable/picker_item_check"
|
||
|
android:layout_gravity="top|start"
|
||
|
android:scaleType="fitCenter"/>
|
||
|
|
||
|
</FrameLayout>
|