<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="100dp"
    android:layout_margin="2dp"
    android:layout_height="100dp">

    <ImageView
        android:id="@+id/attachmentPreview"
        android:scaleType="centerCrop"
        android:layout_width="match_parent"
        android:src="@drawable/file"
        android:layout_height="match_parent" />

    <ImageView
        android:layout_gravity="top|right"
        android:background="#99CC0000"
        android:src="@drawable/ic_action_navigation_close"
        android:id="@+id/btnRemoveAttachment"
        android:layout_width="wrap_content"
        android:padding="3dp"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/attachmentFileName"
        android:layout_gravity="bottom"
        android:textColor="#ffffff"
        android:padding="4dp"
        android:background="#99000000"
        android:singleLine="true"
        android:ellipsize="middle"
        android:fontFamily="@string/font_condensed"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</FrameLayout>