<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:focusable="true"
    android:focusableInTouchMode="true"
    android:orientation="vertical">

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

    <com.gh.gamecenter.common.view.NoScrollFocusScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="@color/background_white">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/video_poster"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:scaleType="centerCrop"
                app:actualImageScaleType="centerCrop"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:placeholderImage="@color/text_292929"
                app:viewAspectRatio="1.78" />

            <View
                android:id="@+id/video_poster_mask"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:background="@color/black_alpha_30"
                app:layout_constraintBottom_toBottomOf="@+id/video_poster"
                app:layout_constraintEnd_toEndOf="@+id/video_poster"
                app:layout_constraintStart_toStartOf="@+id/video_poster"
                app:layout_constraintTop_toTopOf="@+id/video_poster"
                app:viewAspectRatio="1.78" />

            <com.gh.gamecenter.common.view.CircleProgressBar
                android:id="@+id/upload_progress"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_marginLeft="13dp"
                app:layout_constraintBottom_toBottomOf="@+id/video_poster_patch_hint"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="@+id/video_poster_patch_hint"
                app:normal_color="@color/white_alpha_40"
                app:show_progress="false"
                app:stroke_width="2" />

            <ImageView
                android:id="@+id/upload_button"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:scaleType="centerInside"
                android:src="@drawable/upload_pause"
                app:layout_constraintBottom_toBottomOf="@+id/upload_progress"
                app:layout_constraintEnd_toEndOf="@+id/upload_progress"
                app:layout_constraintStart_toStartOf="@+id/upload_progress"
                app:layout_constraintTop_toTopOf="@+id/upload_progress" />

            <LinearLayout
                android:id="@+id/upload_status_container"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="9dp"
                android:gravity="center_vertical"
                android:orientation="vertical"
                app:layout_constraintBottom_toBottomOf="@+id/video_poster_patch_hint"
                app:layout_constraintStart_toEndOf="@+id/upload_progress"
                app:layout_constraintTop_toTopOf="@+id/video_poster_patch_hint">

                <TextView
                    android:id="@+id/upload_status"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:includeFontPadding="false"
                    android:textColor="@color/white_alpha_80"
                    android:textSize="12sp"
                    tools:text="视频上传中..." />

                <TextView
                    android:id="@+id/upload_speed"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:includeFontPadding="false"
                    android:text="0Kb/s 预计还需0秒"
                    android:textColor="@color/white_alpha_40"
                    android:textSize="10sp" />
            </LinearLayout>

            <TextView
                android:id="@+id/video_poster_patch_hint"
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginRight="12dp"
                android:layout_marginBottom="12dp"
                android:background="@drawable/video_upload_poster_patch_background"
                android:gravity="center"
                android:paddingLeft="16dp"
                android:paddingRight="16dp"
                android:text="换封面"
                android:textColor="@color/white"
                android:textSize="12sp"
                app:layout_constraintBottom_toBottomOf="@id/video_poster"
                app:layout_constraintRight_toRightOf="@id/video_poster" />

            <TextView
                android:id="@+id/game_name_hint"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingLeft="20dp"
                android:paddingTop="16dp"
                android:paddingRight="16dp"
                android:paddingBottom="16dp"
                android:textColor="@color/text_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/video_poster"
                tools:text="选择游戏*" />

            <TextView
                android:id="@+id/game_name"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:gravity="center_vertical"
                android:text="请选择游戏～"
                android:textColor="@color/text_body"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="@id/game_name_hint"
                app:layout_constraintLeft_toRightOf="@id/game_name_hint"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/game_name_hint" />

            <View
                android:id="@+id/game_name_line"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_name_hint" />

            <TextView
                android:id="@+id/game_title_hint"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingLeft="20dp"
                android:paddingTop="16dp"
                android:paddingRight="16dp"
                android:paddingBottom="14dp"
                android:textColor="@color/text_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="@id/game_title"
                tools:text="标题*" />

            <EditText
                android:id="@+id/game_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@null"
                android:gravity="top"
                android:hint="请填写视频标题～"
                android:lineSpacingExtra="4dp"
                android:minLines="3"
                android:paddingTop="16dp"
                android:paddingRight="20dp"
                android:paddingBottom="24dp"
                android:textColor="@color/text_title"
                android:textColorHint="@color/text_body"
                android:textSize="14sp"
                app:layout_constraintLeft_toRightOf="@id/game_title_hint"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_name_line" />

            <TextView
                android:id="@+id/title_counter"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="20dp"
                android:layout_marginBottom="14dp"
                android:text="0/100"
                android:textColor="@color/text_body"
                android:textSize="12dp"
                app:layout_constraintBottom_toBottomOf="@id/game_title"
                app:layout_constraintRight_toRightOf="@id/game_title" />

            <View
                android:id="@+id/game_title_line"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_title" />

            <TextView
                android:id="@+id/game_category_hint"
                android:layout_width="wrap_content"
                android:layout_height="60dp"
                android:gravity="center"
                android:paddingLeft="20dp"
                android:paddingRight="16dp"
                android:textColor="@color/text_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_title_line"
                tools:text="分类*" />

            <com.google.android.flexbox.FlexboxLayout
                android:id="@+id/game_category"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:paddingBottom="16dp"
                app:flexDirection="row"
                app:flexWrap="wrap"
                app:layout_constraintHeight_default="spread"
                app:layout_constraintLeft_toRightOf="@id/game_category_hint"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/game_category_hint">

                <View
                    android:layout_width="0dp"
                    android:layout_height="44dp" />

            </com.google.android.flexbox.FlexboxLayout>

            <View
                android:id="@+id/game_category_line"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_category" />

            <TextView
                android:id="@+id/game_tag_hint"
                android:layout_width="0dp"
                android:layout_height="60dp"
                android:gravity="center"
                android:paddingLeft="20dp"
                android:paddingRight="16dp"
                android:text="标签"
                android:textColor="@color/text_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="@id/game_category_hint"
                app:layout_constraintTop_toBottomOf="@id/game_category_line" />

            <com.google.android.flexbox.FlexboxLayout
                android:id="@+id/game_tag"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:paddingBottom="16dp"
                app:flexDirection="row"
                app:flexWrap="wrap"
                app:layout_constraintHeight_default="spread"
                app:layout_constraintLeft_toRightOf="@id/game_tag_hint"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/game_tag_hint">

                <View
                    android:layout_width="0dp"
                    android:layout_height="44dp" />

            </com.google.android.flexbox.FlexboxLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/activityFlexbox"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginRight="20dp"
                android:paddingBottom="16dp"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="@+id/game_tag"
                app:layout_constraintTop_toBottomOf="@+id/game_tag"
                tools:visibility="visible">

                <ImageView
                    android:id="@+id/chooseActivityIv"
                    android:layout_width="wrap_content"
                    android:layout_height="28dp"
                    android:background="@drawable/bg_upload_video_choose_activity_enable"
                    android:paddingLeft="12dp"
                    android:paddingRight="12dp"
                    android:src="@drawable/ic_upload_video_activity_enable"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <LinearLayout
                    android:id="@+id/activityContainer"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="8dp"
                    android:background="@drawable/bg_upload_video_activity"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    android:paddingLeft="12dp"
                    android:paddingRight="8dp"
                    android:visibility="gone"
                    app:layout_constrainedWidth="true"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0"
                    app:layout_constraintStart_toEndOf="@+id/chooseActivityIv"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:visibility="visible">

                    <TextView
                        android:id="@+id/activityTv"
                        android:layout_width="0dp"
                        android:layout_height="28dp"
                        android:layout_weight="1"
                        android:drawableLeft="@drawable/ic_activity"
                        android:drawablePadding="4dp"
                        android:ellipsize="end"
                        android:gravity="center"
                        android:includeFontPadding="false"
                        android:maxLines="1"
                        android:textColor="@color/white"
                        android:textSize="12sp"
                        tools:text="光遇" />

                    <ImageView
                        android:id="@+id/deleteActivity"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:src="@drawable/ic_activity_delete" />
                </LinearLayout>
            </androidx.constraintlayout.widget.ConstraintLayout>

            <View
                android:id="@+id/game_tag_line"
                android:layout_width="0dp"
                android:layout_height="8dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/activityFlexbox" />

            <TextView
                android:id="@+id/video_source"
                android:layout_width="wrap_content"
                android:layout_height="60dp"
                android:gravity="center"
                android:paddingLeft="20dp"
                android:paddingRight="16dp"
                android:textColor="@color/text_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/game_tag_line"
                tools:text="视频来源*" />

            <LinearLayout
                android:id="@+id/videoSourceGroup"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="@+id/video_source"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/video_source"
                app:layout_constraintTop_toTopOf="@+id/video_source">

                <CheckedTextView
                    android:id="@+id/originalTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/upload_video_source_selector"
                    android:drawablePadding="4dp"
                    android:gravity="center"
                    android:text="原创"
                    android:textColor="@color/video_upload_source_check"
                    android:textSize="14sp" />

                <CheckedTextView
                    android:id="@+id/reprintTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:drawableLeft="@drawable/upload_video_source_selector"
                    android:drawablePadding="4dp"
                    android:gravity="center"
                    android:text="转载"
                    android:textColor="@color/video_upload_source_check"
                    android:textSize="14sp" />
            </LinearLayout>

            <View
                android:id="@+id/game_video_source_line"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/video_source" />


            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/videoSourceCl"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/game_video_source_line">

                <androidx.constraintlayout.widget.Group
                    android:id="@+id/watermarkGroup"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    app:constraint_referenced_ids="watermark_hint,watermark_sb"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/watermark_hint"
                    android:layout_width="0dp"
                    android:layout_height="48dp"
                    android:gravity="center"
                    android:paddingLeft="20dp"
                    android:paddingRight="16dp"
                    android:text="添加水印"
                    android:textColor="@color/text_title"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.kyleduo.switchbutton.SwitchButton
                    android:id="@+id/watermark_sb"
                    style="@style/MySwitchButtonMD"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:layout_marginRight="5dp"
                    android:checked="true"
                    app:layout_constraintBottom_toBottomOf="@id/watermark_hint"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="@id/watermark_hint" />

                <EditText
                    android:id="@+id/videoSourceEt"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="20dp"
                    android:layout_marginBottom="22dp"
                    android:background="@null"
                    android:gravity="top"
                    android:hint="请注明视频来源（例如转载自http://www.xx.com//vvv），标注清晰度将提高审核通过的概率哦"
                    android:lineSpacingExtra="8dp"
                    android:textColor="@color/video_upload_source_check"
                    android:textColorHint="@color/text_body"
                    android:textSize="14sp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <View
                    android:id="@+id/watermark_click"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@id/watermark_sb"
                    app:layout_constraintLeft_toLeftOf="@id/watermark_sb"
                    app:layout_constraintRight_toRightOf="@id/watermark_sb"
                    app:layout_constraintTop_toTopOf="@id/watermark_sb" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <View
                android:id="@+id/watermark_line"
                android:layout_width="0dp"
                android:layout_height="8dp"
                android:background="@color/background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/videoSourceCl" />


            <androidx.appcompat.widget.AppCompatCheckBox
                android:id="@+id/upload_confirm"
                style="@style/VideoUploadProtocolCheckboxStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="14dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/watermark_line" />

            <TextView
                android:id="@+id/update_protocol"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_marginBottom="2dp"
                android:text="@string/upload_protocol"
                android:textColor="@color/text_subtitleDesc"
                android:textSize="13sp"
                app:layout_constraintBottom_toBottomOf="@id/upload_confirm"
                app:layout_constraintLeft_toRightOf="@id/upload_confirm"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/upload_confirm" />


            <TextView
                android:id="@+id/upload_exposure_hint"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="12dp"
                android:layout_marginBottom="14dp"
                android:drawableLeft="@drawable/video_upload_exposure_hint"
                android:drawablePadding="4dp"
                android:includeFontPadding="false"
                android:text="@string/video_upload_exposure_hint"
                android:textColor="@color/text_title"
                android:textSize="13sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/upload_confirm" />

        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.gh.gamecenter.common.view.NoScrollFocusScrollView>

    <View
        android:layout_width="match_parent"
        android:layout_height="7dp"
        android:layout_marginTop="-7dp"
        android:background="@drawable/shadow" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="@color/background_white"
        android:orientation="horizontal"
        android:padding="10dp">

        <TextView
            android:id="@+id/post_button"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/game_item_btn_download_style"
            android:gravity="center"
            android:text="@string/suggest_post"
            android:textColor="@color/video_upload_post_style"
            android:textSize="16sp" />

    </LinearLayout>
</LinearLayout>

