video_select_item.xml 2.62 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.VideoSelectAdapter">

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

    <FrameLayout
        android:id="@+id/fl_video_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_10"
        android:paddingEnd="@dimen/dp_10"
        android:paddingBottom="@dimen/dp_20">

        <androidx.appcompat.widget.AppCompatCheckBox
            android:id="@+id/iv_video_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>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="@color/black30"
        android:paddingHorizontal="@dimen/dp_15"
        android:paddingVertical="@dimen/dp_10">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_video_select_duration"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_14"
            tools:text="10:00" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_video_select_size"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|end"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_14"
            tools:text="10.24M" />
    </FrameLayout>

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