<?xml version="1.0" encoding="utf-8"?>
<com.gh.gamecenter.common.view.LikeView 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:id="@+id/likeView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include
        android:id="@+id/layout_video_detail_base"
        layout="@layout/layout_video_detail_base" />

    <LinearLayout
        android:id="@+id/errorContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerInParent="true"
        android:background="#80000000"
        android:clickable="true"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone"
        tools:visibility="visible">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="视频加载失败"
            android:textColor="@color/divider"
            android:textSize="14sp" />

        <TextView
            android:id="@+id/errorBtn"
            android:layout_width="wrap_content"
            android:layout_height="34dp"
            android:layout_marginTop="24dp"
            android:background="@drawable/border_round_ccc"
            android:gravity="center"
            android:includeFontPadding="false"
            android:paddingLeft="50dp"
            android:paddingRight="50dp"
            android:text="点击重试"
            android:textColor="@color/divider"
            android:textSize="14sp" />

    </LinearLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="72dp"
        android:background="@drawable/bg_video_detail_top" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@drawable/bg_video_detail_bottom"
        android:gravity="bottom"
        android:orientation="vertical">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/containerRl"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:orientation="horizontal">

            <RelativeLayout
                android:id="@+id/videoInfoLl"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/gameContainer"
                app:layout_constraintStart_toStartOf="parent">

                <LinearLayout
                    android:id="@+id/gameNameLl"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:id="@+id/gameName"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom"
                        android:background="@drawable/bg_video_detail_name"
                        android:clickable="true"
                        android:gravity="center_vertical"
                        android:orientation="horizontal"
                        android:paddingLeft="4dp"
                        android:paddingTop="5dp"
                        android:paddingRight="8dp"
                        android:paddingBottom="5dp">

                        <ImageView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:src="@drawable/ic_video_detail_game" />

                        <TextView
                            android:id="@+id/gameNameTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="4dp"
                            android:includeFontPadding="false"
                            android:textColor="@color/white"
                            android:textSize="12sp"
                            android:textStyle="bold"
                            tools:text="地海争霸" />
                    </LinearLayout>


                </LinearLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/userNameLl"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/gameNameLl"
                    android:layout_marginTop="10dp"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/usernameTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLength="13"
                        android:maxLines="1"
                        android:shadowColor="#4D000000"
                        android:shadowDx="0"
                        android:shadowDy="0.5"
                        android:shadowRadius="1"
                        android:textColor="@color/white"
                        android:textSize="14sp"
                        android:textStyle="bold"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toStartOf="@+id/sdv_user_badge"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintHorizontal_chainStyle="packed"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="我的昵称很长很长有十二字" />

                    <com.facebook.drawee.view.SimpleDraweeView
                        android:id="@+id/sdv_user_badge"
                        android:layout_width="16dp"
                        android:layout_height="16dp"
                        android:layout_marginLeft="4dp"
                        android:layout_marginRight="2dp"
                        android:visibility="gone"
                        app:layout_constraintBottom_toBottomOf="@+id/usernameTv"
                        app:layout_constraintEnd_toStartOf="@+id/tv_badge_name"
                        app:layout_constraintStart_toEndOf="@+id/usernameTv"
                        app:layout_constraintTop_toTopOf="@+id/usernameTv"
                        tools:visibility="visible" />

                    <TextView
                        android:id="@+id/tv_badge_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:includeFontPadding="false"
                        android:textColor="@color/white"
                        android:textSize="10sp"
                        android:visibility="gone"
                        app:layout_constraintBottom_toBottomOf="@+id/sdv_user_badge"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toEndOf="@+id/sdv_user_badge"
                        app:layout_constraintTop_toTopOf="@+id/sdv_user_badge"
                        tools:text="答题先锋答题先锋答题先锋答题先锋答题先锋"
                        tools:visibility="visible" />
                </androidx.constraintlayout.widget.ConstraintLayout>

                <TextView
                    android:id="@+id/videoTitleTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/userNameLl"
                    android:layout_marginTop="12dp"
                    android:lineSpacingExtra="4dp"
                    android:shadowColor="#4D000000"
                    android:shadowDx="0"
                    android:shadowDy="0.5"
                    android:shadowRadius="1"
                    android:textColor="@color/white"
                    android:textSize="14sp"
                    tools:text="举例：比如切换之前，当前视频已播放了 ，切换App或者回到手机桌面，在切换回光环助手，要从开始播放" />

                <TextView
                    android:id="@+id/ipRegionTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/videoTitleTv"
                    android:layout_marginTop="12dp"
                    android:textColor="@color/white_alpha_60"
                    android:textSize="@dimen/secondary_size"
                    android:visibility="gone"
                    tools:text="IP属地：广东"
                    tools:visibility="visible" />

                <RelativeLayout
                    android:id="@+id/censoringContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/ipRegionTv"
                    android:layout_marginTop="8dp"
                    android:layout_marginBottom="4dp"
                    android:clickable="true">

                    <ImageView
                        android:id="@+id/censorIv"
                        android:layout_width="15.6dp"
                        android:layout_height="15.6dp"
                        android:src="@drawable/ic_video_detail_question" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8.2dp"
                        android:layout_toRightOf="@id/censorIv"
                        android:alpha="0.6"
                        android:text="视频审核中，详情请点击查看"
                        android:textColor="@color/white"
                        android:textSize="12sp" />

                    <ImageView
                        android:layout_width="8dp"
                        android:layout_height="14dp"
                        android:layout_alignParentRight="true"
                        android:src="@drawable/ic_right_arrow_darker" />
                </RelativeLayout>

            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/gameContainer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:layout_marginRight="16dp"
                android:clickable="true"
                android:visibility="invisible"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/videoInfoLl">

                <com.gh.common.view.GameIconView
                    android:id="@+id/gameIconView"
                    android:layout_width="52dp"
                    android:layout_height="52dp"
                    android:layout_centerHorizontal="true" />

                <com.gh.common.view.DownloadButton
                    android:id="@+id/download_btn"
                    android:layout_width="52dp"
                    android:layout_height="24dp"
                    android:layout_below="@+id/gameIconView"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="4dp"
                    app:download_button_show_progress="false"
                    app:download_button_text_size="12sp" />
            </RelativeLayout>

            <LinearLayout
                android:id="@+id/actionLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginRight="2dp"
                android:layout_marginBottom="20dp"
                android:gravity="center"
                android:orientation="vertical"
                app:layout_constraintBottom_toTopOf="@+id/gameContainer"
                app:layout_constraintEnd_toEndOf="parent">

                <RelativeLayout
                    android:id="@+id/userContainer"
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:clickable="true"
                    android:gravity="center_horizontal">

                    <RelativeLayout
                        android:layout_width="60dp"
                        android:layout_height="60dp">

                        <com.facebook.drawee.view.SimpleDraweeView
                            android:id="@+id/userIconIv"
                            style="@style/frescoCircleStyle"
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:layout_centerInParent="true"
                            app:roundAsCircle="true"
                            app:roundingBorderColor="@color/white"
                            app:roundingBorderWidth="2dp" />

                        <com.facebook.drawee.view.SimpleDraweeView
                            android:id="@+id/userIconBorderIv"
                            android:layout_width="60dp"
                            android:layout_height="60dp"
                            android:layout_centerInParent="true"
                            android:visibility="invisible" />
                    </RelativeLayout>


                    <ImageView
                        android:id="@+id/attentionIv"
                        android:layout_width="16dp"
                        android:layout_height="16dp"
                        android:layout_alignParentBottom="true"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="5dp"
                        android:src="@drawable/ic_video_detail_follow"
                        android:visibility="gone"
                        tools:visibility="visible" />

                    <com.airbnb.lottie.LottieAnimationView
                        android:id="@+id/attentionLottie"
                        android:layout_width="16dp"
                        android:layout_height="16dp"
                        android:layout_alignParentBottom="true"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="5dp"
                        android:visibility="gone"
                        tools:visibility="visible" />
                </RelativeLayout>

                <LinearLayout
                    android:id="@+id/likeContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="14dp"
                    android:gravity="center"
                    android:orientation="vertical"
                    android:paddingTop="4dp"
                    android:paddingBottom="12dp">

                    <ImageView
                        android:id="@+id/likeIv"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:src="@drawable/ic_video_detail_like" />

                    <TextView
                        android:id="@+id/likeCountTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        android:includeFontPadding="false"
                        android:textColor="@color/white"
                        android:textSize="12sp"
                        tools:text="1.0W" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/commentContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:gravity="center"
                    android:orientation="vertical"
                    android:paddingTop="4dp"
                    android:paddingBottom="12dp">

                    <ImageView
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:src="@drawable/ic_video_detail_comments" />

                    <TextView
                        android:id="@+id/commentCountTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        android:includeFontPadding="false"
                        android:textColor="@color/white"
                        android:textSize="12sp"
                        tools:text="1.0W" />
                </LinearLayout>


                <LinearLayout
                    android:id="@+id/shareContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:gravity="center"
                    android:orientation="vertical"
                    android:paddingTop="4dp"
                    android:paddingBottom="4dp">

                    <ImageView
                        android:id="@+id/shareIv"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:src="@drawable/ic_video_detail_share" />

                    <TextView
                        android:id="@+id/shareCountTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        android:includeFontPadding="false"
                        android:text="0"
                        android:textColor="@color/white"
                        android:textSize="12sp"
                        tools:text="1.0W" />
                </LinearLayout>
            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <RelativeLayout
            android:id="@+id/watchedContainer"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:background="@color/bg_21282E_alpha_40"
            android:paddingLeft="16dp"
            android:paddingRight="8dp"
            android:visibility="gone"
            tools:visibility="visible">

            <TextView
                android:id="@+id/watchedTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:drawableRight="@drawable/ic_video_detail_jump_arrow"
                android:drawablePadding="4dp"
                android:text="暂无关注up主动态，前往 “推荐” 查看更多视频"
                android:textColor="@color/text_3682C2"
                android:textSize="12sp" />

            <ImageView
                android:id="@+id/closeIv"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:scaleType="centerInside"
                android:src="@drawable/ic_video_detail_close" />
        </RelativeLayout>

        <LinearLayout
            android:id="@+id/layout_bottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:visibility="gone"
            tools:visibility="visible">

            <ImageView
                android:id="@+id/volume"
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:layout_marginLeft="16dp"
                android:padding="5dp"
                android:src="@drawable/ic_game_detail_volume_on"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/current"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                android:text="00:00"
                android:textColor="@color/white"
                android:textSize="12sp" />

            <SeekBar
                android:id="@+id/progress"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_weight="1.0"
                android:background="@null"
                android:clickable="true"
                android:max="100"
                android:maxHeight="1dp"
                android:minHeight="1dp"
                android:progressDrawable="@drawable/video_detail_seek_progress"
                android:thumb="@drawable/video_seek_thumb" />

            <TextView
                android:id="@+id/total"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="8dp"
                android:text="00:00"
                android:textColor="@color/white"
                android:textSize="12sp" />

            <ImageView
                android:id="@+id/fullscreen"
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:layout_marginRight="16dp"
                android:padding="5dp"
                android:src="@drawable/ic_game_detail_enter_full_screen" />
        </LinearLayout>

        <ProgressBar
            android:id="@+id/bottom_progressbar"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:max="100"
            android:progressDrawable="@drawable/progressbar_video_detail" />

        <View
            android:id="@+id/placeholderView"
            android:layout_width="match_parent"
            android:layout_height="54dp"
            android:visibility="gone" />
    </LinearLayout>
</com.gh.gamecenter.common.view.LikeView>
