<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    tools:context=".blog.BlogDetails">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?android:attr/actionBarSize"
        android:background="#ffffff"
        android:elevation="@dimen/seekbarsize_small"
        app:contentInsetLeft="0dp"
        app:contentInsetStart="0dp"
        app:popupTheme="@style/AppTheme.PopupOverlay">

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:scrollHorizontally="true"
            android:singleLine="true"
            android:text="FORUM"
            android:textAllCaps="true"
            android:textColor="@color/btn_bg_color"
            android:textSize="@dimen/textSizeAverage"
            android:textStyle="bold" />
    </androidx.appcompat.widget.Toolbar>

    <ScrollView
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/toolbar"
        android:layout_above="@id/llout_comment"
        android:fillViewport="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <LinearLayout
                android:id="@+id/llout_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                tools:ignore="MissingConstraints">
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.3"
                    tools:ignore="MissingConstraints">
                    <de.hdodenhof.circleimageview.CircleImageView
                        android:id="@+id/img_profile_image"
                        android:layout_width="25dp"
                        android:layout_height="40dp"
                        android:layout_marginStart="16dp"
                        android:layout_marginTop="8dp"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:clickable="true"
                        android:focusable="true"/>
                    <TextView
                        android:id="@+id/txt_user_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center|start"
                        android:layout_marginStart="5dp"
                        android:gravity="center|start"
                        android:textColor="@color/material_black"/>
                </LinearLayout>
                <TextView
                    android:id="@+id/txt_post_time"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="120dp"
                    android:layout_marginTop="14dp"
                    android:layout_weight=".7"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:textColor="@color/material_black"/>
            </LinearLayout>

            <FrameLayout
                android:id="@+id/video_layout"
                android:layout_width="fill_parent"
                android:layout_height="@dimen/layoutsizeLarge"
                android:layout_marginTop="@dimen/seekbarsize"
                android:background="@color/material_white">

                <com.ttiglobal.porsche.videoview.UniversalVideoView
                    android:id="@+id/videoView"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_gravity="center"
                    app:uvv_autoRotation="true"
                    app:uvv_fitXY="false" />

                <com.ttiglobal.porsche.videoview.UniversalMediaController
                    android:id="@+id/media_controller"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    app:uvv_scalable="true" />

                <ProgressBar
                    android:id="@+id/progressBar"
                    android:layout_width="@dimen/buttonHeightNormal"
                    android:layout_height="@dimen/buttonHeightNormal"
                    android:layout_gravity="center"
                    android:visibility="gone" />

            </FrameLayout>

            <LinearLayout
                android:id="@+id/count"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                app:layout_constraintTop_toBottomOf="@+id/post_image">
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    app:layout_constraintTop_toBottomOf="@+id/post_image">
                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:layout_marginStart="25dp"
                        android:layout_marginTop="8dp"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        app:srcCompat="@drawable/liked"/>
                    <TextView
                        android:id="@+id/txt_count"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="10dp"
                        android:layout_marginTop="8dp"
                        android:layout_marginBottom="8dp"
                        android:textColor="@color/grey"/>
                </LinearLayout>

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1">
                    <TextView
                        android:id="@+id/txt_comment_count"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_gravity="end|center"
                        android:layout_marginTop="8dp"
                        android:layout_marginEnd="25dp"
                        android:layout_marginBottom="8dp"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:gravity="end"/>
                </LinearLayout>
            </LinearLayout>

            <TextView
                android:id="@+id/txt_post_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="18dp"
                android:layout_marginTop="5dp"
                android:layout_marginEnd="18dp"
                android:ellipsize="end"
                android:lines="3"
                android:text="Cooking is a fine art"
                android:textColor="@color/post_heading"
                android:textSize="20sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/txt_post_desc"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="18dp"
                android:layout_marginEnd="18dp"
                android:fontFamily="serif"
                android:gravity="start"
                android:lineSpacingExtra="4dp"
                android:paddingTop="5dp"
                android:text="@string/desc"
                android:textColor="#3e3c3c"
                android:textSize="15sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/post_title" />
        </LinearLayout>
    </ScrollView>
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_above="@+id/llout_comment"
        android:background="@color/grey"/>
    <LinearLayout
        android:id="@+id/llout_comment"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_alignParentBottom="true"
        android:background="@color/white">
        <LinearLayout
            android:id="@+id/llout_likes"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:gravity="center">
            <ImageView
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                android:src="@drawable/unliked"
                android:tint="@color/post_details"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="5dp"
                android:gravity="center"
                android:text="Like"
                android:textColor="@color/material_black"
                android:textSize="15sp"/>
        </LinearLayout>
        <View
            android:layout_width="1dp"
            android:layout_height="45dp"
            android:background="@color/grey"/>
        <LinearLayout
            android:id="@+id/llout_comments"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:gravity="center">
            <ImageView
                android:id="@+id/comment_bt"
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                android:src="@drawable/comment"
                android:tint="@color/post_details"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="5dp"
                android:gravity="center"
                android:text="Comments"
                android:textColor="@color/material_black"
                android:textSize="15sp"/>
        </LinearLayout>
    </LinearLayout>
</RelativeLayout>
