<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!-- Represents a single item in the Photo Picker. -->
<view class="org.chromium.components.browser_ui.photo_picker.PickerBitmapView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/border"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
<ImageView
android:id="@+id/bitmap_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/scrim"
android:layout_width="64dp"
android:layout_height="64dp"
android:background="@drawable/file_picker_scrim"
tools:ignore="ContentDescription"
android:visibility="gone" />
<LinearLayout
android:id="@+id/video_controls_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_gravity="end"
android:visibility="gone">
<TextView
android:id="@+id/video_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginEnd="3dp"
style="@style/TextAppearance.TextMedium.Primary.Baseline.Light"/>
<ImageView
android:id="@+id/small_play_button"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="6dp"
android:contentDescription="@string/accessibility_play_video"
app:srcCompat="@drawable/ic_play_circle_filled_white_24dp" />
</LinearLayout>
</FrameLayout>
<ImageView
android:id="@+id/large_play_button"
android:layout_width="@dimen/photo_picker_play_button_size"
android:layout_height="@dimen/photo_picker_play_button_size"
android:layout_gravity="center"
android:contentDescription="@string/accessibility_play_video"
android:visibility="gone"
app:srcCompat="@drawable/ic_play_circle_filled_white_24dp" />
<ImageView
android:id="@+id/selected"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="4dp"
android:layout_marginStart="4dp"
tools:ignore="ContentDescription"
android:visibility="gone"
app:srcCompat="@drawable/checkmark_blue" />
<ImageView
android:id="@+id/unselected"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="6dp"
android:layout_marginStart="6dp"
android:background="@drawable/circle_white"
tools:ignore="ContentDescription"
android:visibility="gone" />
<!-- Special tiles, that give access to the camera and gallery -->
<LinearLayout
android:id="@+id/special_tile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:visibility="gone">
<ImageView
android:id="@+id/special_tile_icon"
android:adjustViewBounds="true"
android:layout_width="48dp"
android:layout_height="48dp"
tools:ignore="ContentDescription"
android:tint="@color/photo_picker_tile_bg_color" />
<TextView
android:id="@+id/special_tile_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/photo_picker_label_gap"
android:gravity="center"
android:textAppearance="@style/TextAppearance.PhotoPickerSpecialTile" />
</LinearLayout>
</view>