image_select_item.xml 1.54 KB
<?xml version="1.0" encoding="utf-8"?>
<com.hjq.widget.layout.RatioFrameLayout 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"
    app:sizeRatio="1:1"
    tools:context="com.studymachine.www.ui.adapter.ImageSelectAdapter">

    <com.hjq.widget.view.ScaleImageView
        android:id="@+id/iv_image_select_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:scaleType="centerCrop"
        tools:src="@drawable/logo" />

    <FrameLayout
        android:id="@+id/fl_image_select_check"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end"
        android:paddingStart="@dimen/dp_20"
        android:paddingTop="@dimen/dp_3"
        android:paddingEnd="@dimen/dp_3"
        android:paddingBottom="@dimen/dp_20">

        <androidx.appcompat.widget.AppCompatCheckBox
            android:id="@+id/iv_image_select_check"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:clickable="false"
            android:focusable="false"
            android:focusableInTouchMode="false"
            app:buttonCompat="@drawable/checkbox_selector" />

    </FrameLayout>

</com.hjq.widget.layout.RatioFrameLayout>