<?xml version="1.0" encoding="utf-8"?>
<ch.threema.app.ui.CheckableFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/content_frame"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:padding="@dimen/media_gallery_grid_item_padding">

	<FrameLayout
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:layout_margin="1dp"
		android:duplicateParentState="true"
		android:stateListAnimator="@animator/selector_gallery_image">

	<ch.threema.app.ui.SquareImageView
		android:id="@+id/image_view"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:duplicateParentState="true"
		android:scaleType="centerCrop"/>

	<ch.threema.app.ui.ControllerView
		android:id="@+id/play_button"
		android:layout_width="24dp"
		android:layout_height="24dp"
		android:layout_gravity="center"
		android:visibility="gone"/>

	<ProgressBar
		android:id="@+id/progress_decoding"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_gravity="center"
		android:visibility="gone"/>

	<LinearLayout
		android:id="@+id/filename_container"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_gravity="bottom"
		android:background="#0C000000"
		android:duplicateParentState="true"
		android:gravity="center_horizontal"
		android:orientation="vertical"
		android:paddingBottom="4dp"
		android:paddingLeft="4dp"
		android:paddingRight="4dp"
		android:paddingTop="4dp"
		android:visibility="gone">

		<TextView
			android:id="@+id/text_filename"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:ellipsize="middle"
			android:fontFamily="sans-serif-condensed"
			android:maxLines="2"
			android:gravity="center_horizontal"
			android:layout_gravity="center_horizontal"
			android:textAlignment="center"
			android:textColor="?attr/textColorSecondary"
			android:textSize="12sp"/>

	</LinearLayout>

	</FrameLayout>

	<ch.threema.app.ui.CheckableView
		android:id="@+id/check_box"
		android:layout_width="24dp"
		android:layout_height="24dp"
		android:layout_gravity="top|left"
		android:layout_margin="6dp"
		android:background="@drawable/selector_grid_checkbox_invisible"
		android:duplicateParentState="true"/>

</ch.threema.app.ui.CheckableFrameLayout>
