<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

    <data>

        <variable
            name="bean"
            type="com.lukouguoji.module_base.bean.FileBean" />
    </data>

    <RelativeLayout
        android:id="@+id/rl"
        android:layout_width="match_parent"
        android:layout_height="150dp"
        android:layout_margin="10dp"
        android:background="@color/white">

        <ImageView
            visible="@{bean.path.length() == 0}"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_centerInParent="true"
            android:src="@drawable/img_add" />

        <ImageView
            android:id="@+id/iv"
            loadImage="@{bean.path}"
            visible="@{bean.path}"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop" />

        <View
            visible="@{bean.canDelete}"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/black_tran10" />

        <ImageView
            android:id="@+id/iv_delete"
            visible="@{bean.canDelete}"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_centerInParent="true"
            android:src="@drawable/img_delete_red" />

    </RelativeLayout>
</layout>