<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
    android:id="@+id/layout"
    tools:context=".ui.fragmnt.ProfileFragment">






    <!-- 第一行: 左边文字，右边控件 -->
    <TextView
        android:id="@+id/titleText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:paddingStart="15dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        android:text="@string/library"
        android:textColor="#ffffff"
        android:textSize="24sp"
        app:layout_constraintEnd_toStartOf="@id/settingsIcon"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/settingsIcon"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_margin="16dp"
        android:visibility="gone"
        android:src="@drawable/ic_launcher_background"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.cardview.widget.CardView
        android:id="@+id/like_song"
        android:layout_width="0dp"
        android:layout_height="160dp"
        android:layout_marginStart="15dp"
        android:layout_marginTop="15dp"
        app:cardBackgroundColor="@color/library_color"
        app:cardCornerRadius="16dp"
        app:layout_constraintHorizontal_weight="1"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@id/view"
        app:layout_constraintTop_toBottomOf="@id/titleText">

        <RelativeLayout
            android:id="@+id/relayout_like"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:layout_width="80dp"
                android:layout_height="80dp"
                android:src="@drawable/im_place"
                android:layout_centerInParent="true"
                android:id="@+id/like_default"/>

            <ImageView
                android:id="@+id/like_covert"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop" />

            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/library_view"
                android:layout_marginTop="-10dp"
                android:layout_alignParentBottom="true"
                android:layout_alignTop="@id/im"/>

            <ImageView
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_marginStart="15dp"
                android:layout_marginBottom="15dp"
                android:layout_alignParentBottom="true"
                android:id="@+id/im"
                android:src="@drawable/icon_liked_white"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"
                android:text="@string/like_song"
                android:id="@+id/tv_like_size"
                android:layout_toEndOf="@id/im"
                android:layout_alignTop="@id/im"
                android:layout_alignBottom="@id/im"
                android:layout_marginStart="12dp"
                android:layout_alignParentBottom="true"
                android:textSize="15sp"/>



        </RelativeLayout>
    </androidx.cardview.widget.CardView>


    <View
        android:id="@+id/view"
        android:layout_width="20dp"
        android:layout_height="20dp"
        app:layout_constraintLeft_toRightOf="@id/like_song"
        app:layout_constraintRight_toLeftOf="@id/download_song"
        app:layout_constraintTop_toTopOf="@id/like_song" />


    <androidx.cardview.widget.CardView
        android:id="@+id/download_song"
        android:layout_width="0dp"
        android:layout_height="160dp"
        android:layout_marginEnd="15dp"
        app:cardBackgroundColor="@color/library_color"
        app:cardCornerRadius="16dp"
        app:layout_constraintHorizontal_weight="1"
        app:layout_constraintLeft_toRightOf="@id/view"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@id/like_song">

        <RelativeLayout
            android:id="@+id/relayout_download"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:id="@+id/download_default"
                android:layout_width="80dp"
                android:layout_height="80dp"
                android:layout_centerInParent="true"
                android:src="@drawable/im_place" />

            <ImageView
                android:id="@+id/download_covert"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:scaleType="centerCrop" />

            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/library_view"
                android:layout_marginTop="-10dp"
                android:layout_alignParentBottom="true"
                android:layout_alignTop="@id/download_im"/>

            <ImageView
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_marginStart="15dp"
                android:layout_marginBottom="15dp"
                android:layout_alignParentBottom="true"
                android:id="@+id/download_im"
                android:src="@drawable/ic_download"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"
                android:text="@string/download_song"
                android:layout_toEndOf="@id/download_im"
                android:layout_alignTop="@id/download_im"
                android:layout_alignBottom="@id/download_im"
                android:layout_marginStart="12dp"
                android:id="@+id/tv_download_size"
                android:layout_alignParentBottom="true"
                android:textSize="15sp"/>

        </RelativeLayout>

    </androidx.cardview.widget.CardView>


</androidx.constraintlayout.widget.ConstraintLayout>
