<?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">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="@color/ui_surface">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="16dp"
            android:paddingRight="16dp">

            <LinearLayout
                android:id="@+id/chooseForumContainer"
                android:layout_width="match_parent"
                android:layout_height="44dp"
                android:background="@color/ui_surface"
                android:gravity="center_vertical"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <LinearLayout
                    android:id="@+id/forum_container"
                    android:layout_width="wrap_content"
                    android:layout_height="28dp"
                    android:background="@drawable/bg_choose_forum"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    android:paddingLeft="4dp">

                    <com.gh.gamecenter.feature.view.GameIconView
                        android:id="@+id/forum_icon_view"
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:visibility="gone"
                        app:gameIconBorderColor="@color/black_alpha_10"
                        app:gameIconBorderWidth="0.5dp"
                        app:gameIconCornerRadius="20dp" />

                    <TextView
                        android:id="@+id/chooseForumTv"
                        android:layout_width="wrap_content"
                        android:layout_height="28dp"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="12dp"
                        android:ellipsize="end"
                        android:gravity="center_vertical"
                        android:maxLines="1"
                        android:text="选择论坛"
                        android:textColor="@color/text_theme"
                        android:textSize="12sp" />
                </LinearLayout>

                <ImageView
                    android:id="@+id/arrowIv"
                    android:layout_width="8dp"
                    android:layout_height="8dp"
                    android:layout_marginStart="7dp"
                    android:layout_marginEnd="7dp"
                    android:visibility="gone"
                    app:srcCompat="@drawable/ic_edit_arrow_right" />

                <LinearLayout
                    android:id="@+id/sectionContainer"
                    android:layout_width="wrap_content"
                    android:layout_height="28dp"
                    android:background="@drawable/button_round_primary_light"
                    android:gravity="center"
                    android:paddingStart="12dp"
                    android:paddingEnd="12dp"
                    android:visibility="gone">

                    <TextView
                        android:id="@+id/sectionName"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:text="选择子版块"
                        android:textColor="@color/text_theme"
                        android:textSize="12sp" />

                    <ImageView
                        android:id="@+id/clearIv"
                        android:layout_width="14dp"
                        android:layout_height="14dp"
                        android:layout_marginStart="8dp"
                        android:visibility="gone"
                        app:srcCompat="@drawable/icon_clear" />
                </LinearLayout>
            </LinearLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/video_upload_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/chooseForumContainer">

                <androidx.cardview.widget.CardView
                    android:id="@+id/cardView"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:cardCornerRadius="4dp"
                    app:cardElevation="0dp"
                    app:layout_constraintDimensionRatio="h,328:184"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <com.facebook.drawee.view.SimpleDraweeView
                        android:id="@+id/video_poster"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:scaleType="centerCrop"
                        app:actualImageScaleType="centerCrop"
                        app:placeholderImage="@color/ui_background" />
                </androidx.cardview.widget.CardView>

                <View
                    android:id="@+id/video_poster_mask"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:background="@drawable/bg_shape_f5_radius_4"
                    app:layout_constraintBottom_toBottomOf="@+id/cardView"
                    app:layout_constraintEnd_toEndOf="@+id/cardView"
                    app:layout_constraintStart_toStartOf="@+id/cardView"
                    app:layout_constraintTop_toTopOf="@+id/cardView" />

                <ImageView
                    android:id="@+id/deleteVideoIv"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:layout_margin="12dp"
                    android:src="@drawable/ic_del_video"
                    android:visibility="gone"
                    app:layout_constraintEnd_toEndOf="@+id/cardView"
                    app:layout_constraintTop_toTopOf="@+id/cardView" />

                <RelativeLayout
                    android:id="@+id/upload_info_container"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/cardView"
                    app:layout_constraintEnd_toEndOf="@+id/cardView"
                    app:layout_constraintStart_toStartOf="@+id/cardView"
                    app:layout_constraintTop_toTopOf="@+id/cardView">

                    <com.gh.gamecenter.common.view.CircleProgressBar
                        android:id="@+id/upload_progress"
                        android:layout_width="22dp"
                        android:layout_height="22dp"
                        android:layout_centerVertical="true"
                        app:normal_color="@color/white_alpha_40"
                        app:progress_color="@color/white"
                        app:show_progress="false"
                        app:stroke_width="2" />

                    <ImageView
                        android:id="@+id/pause_button"
                        android:layout_width="22dp"
                        android:layout_height="22dp"
                        android:layout_centerVertical="true"
                        android:scaleType="centerInside"
                        android:src="@drawable/upload_pause" />

                    <LinearLayout
                        android:id="@+id/upload_status_container"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="30dp"
                        android:gravity="center_vertical"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/upload_status"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:includeFontPadding="false"
                            android:textColor="@color/white"
                            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_60"
                            android:textSize="10sp" />
                    </LinearLayout>
                </RelativeLayout>

                <TextView
                    android:id="@+id/upload_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableTop="@drawable/icon_upload_video_btn"
                    android:drawablePadding="4dp"
                    android:text="选择视频"
                    android:textColor="@color/text_instance"
                    app:layout_constraintBottom_toBottomOf="@+id/cardView"
                    app:layout_constraintEnd_toEndOf="@+id/cardView"
                    app:layout_constraintStart_toStartOf="@+id/cardView"
                    app:layout_constraintTop_toTopOf="@+id/cardView" />

                <TextView
                    android:id="@+id/video_poster_patch_hint"
                    android:layout_width="72dp"
                    android:layout_height="28dp"
                    android:layout_marginRight="12dp"
                    android:layout_marginBottom="12dp"
                    android:background="@drawable/video_upload_poster_patch_background"
                    android:gravity="center"
                    android:text="更改封面"
                    android:textColor="@color/white"
                    android:textSize="12sp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@id/cardView"
                    app:layout_constraintRight_toRightOf="@id/cardView"
                    tools:visibility="visible" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <EditText
                android:id="@+id/title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:background="@null"
                android:hint="起一个吸睛的标题吧~"
                android:includeFontPadding="false"
                android:paddingTop="15dp"
                android:paddingBottom="15dp"
                android:textColor="@color/text_primary"
                android:textColorHint="@color/text_instance"
                android:textSize="16sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/video_upload_container" />

            <View
                android:id="@+id/title_line"
                android:layout_width="0dp"
                android:layout_height="0.5dp"
                android:background="@color/ui_divider"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/title" />

            <EditText
                android:id="@+id/video_des"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:background="@null"
                android:gravity="top"
                android:hint="描述下视频内容~"
                android:maxLength="200"
                android:minHeight="60dp"
                android:textColor="@color/text_primary"
                android:textColorHint="@color/text_instance"
                android:textSize="14sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/title_line" />

            <LinearLayout
                android:id="@+id/chooseActivityContainer"
                android:layout_width="match_parent"
                android:layout_height="52dp"
                android:layout_marginTop="24dp"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/video_des">

                <TextView
                    android:id="@+id/activityTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/ic_choose_activity"
                    android:drawablePadding="12dp"
                    android:includeFontPadding="false"
                    android:text="添加话题标签"
                    android:textColor="@color/text_primary" />
            </LinearLayout>

            <View
                android:id="@+id/bbs_name_line"
                android:layout_width="0dp"
                android:layout_height="0.5dp"
                android:layout_marginLeft="26dp"
                android:background="@color/ui_divider"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/chooseActivityContainer" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/contentSourceContainer"
                android:layout_width="match_parent"
                android:layout_height="52dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/bbs_name_line">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/ic_content_source"
                    android:drawablePadding="12dp"
                    android:includeFontPadding="false"
                    android:text="内容来源"
                    android:textColor="@color/text_primary"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <CheckedTextView
                        android:id="@+id/originalTv"
                        android:layout_width="wrap_content"
                        android:layout_height="52dp"
                        android:button="@null"
                        android:drawableLeft="@drawable/selector_original_checkbox"
                        android:drawablePadding="4dp"
                        android:gravity="center"
                        android:text="原创"
                        android:textColor="@color/text_primary" />

                    <CheckedTextView
                        android:id="@+id/reprintTv"
                        android:layout_width="wrap_content"
                        android:layout_height="52dp"
                        android:layout_marginLeft="32dp"
                        android:button="@null"
                        android:drawableLeft="@drawable/selector_original_checkbox"
                        android:drawablePadding="4dp"
                        android:gravity="center"
                        android:text="转载"
                        android:textColor="@color/text_primary" />
                </LinearLayout>
            </androidx.constraintlayout.widget.ConstraintLayout>

            <TextView
                android:id="@+id/reprintUrlTv"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/bg_shape_f5_radius_4"
                android:gravity="center_vertical"
                android:hint="注明内容来源网址(如http://www.xx.com//vvv)"
                android:padding="12dp"
                android:textColor="@color/text_secondary"
                android:textColorHint="@color/text_instance"
                android:textSize="12sp"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/contentSourceContainer"
                tools:visibility="visible" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>