<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:id="@+id/bgLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#efefef"
    android:gravity="center_horizontal"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:theme="@style/AppTheme.AppBarOverlay">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/actionBarSize"
            android:background="@color/white"
            app:contentInsetLeft="0dp"
            android:elevation="@dimen/seekbarsize"
            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:layout_marginRight="@dimen/textSizeSmall"
                android:ellipsize="marquee"
                android:gravity="center"
                android:marqueeRepeatLimit="marquee_forever"
                android:scrollHorizontally="true"
                android:singleLine="true"
                android:text="Topic"
                android:textColor="@color/btn_bg_color"
                android:textSize="@dimen/textSize" />

            <ImageButton
                android:id="@+id/helpIcon"
                android:layout_width="@dimen/buttonHeightNormal"
                android:layout_height="@dimen/buttonHeightNormal"
                android:layout_gravity="center|right"
                android:layout_marginRight="@dimen/textSizeSmall"
                android:background="@android:color/transparent"
                android:contentDescription="@string/action_submit"
                android:padding="2dp"
                android:scaleType="fitCenter"
                android:src="@mipmap/help_icon"
                android:visibility="gone" />

        </androidx.appcompat.widget.Toolbar>
    </com.google.android.material.appbar.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:orientation="vertical">

        <com.ttiglobal.inttilectgpchat.util.CustomViewPager
            android:id="@+id/viewPager"
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:background="#efefef" />

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="@dimen/buttonHeightLarge"
            android:layout_marginBottom="@dimen/seekbarsize_small"
            android:elevation="5dp"
            app:cardElevation="@dimen/seekbarsize_small">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <TextView
                    android:id="@+id/time"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_alignParentTop="true"
                   android:layout_centerInParent="true"
                    android:layout_marginTop="8dp"
                    android:gravity="center"
                    android:layout_gravity="center"
                    android:textColor="@color/btn_bg_color"
                    android:textSize="@dimen/textSize"
                    android:textStyle="bold" />


                <Button
                    android:id="@+id/submitButton"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/buttonHeightNormal"
                    android:layout_alignParentRight="true"
                    android:layout_centerInParent="true"
                    android:layout_gravity="center"
                    android:layout_marginRight="8dp"
                    android:background="@color/btn_bg_color"
                    android:gravity="center"
                    android:minWidth="@dimen/timerSize"
                    android:text="@string/action_submit"
                    android:textAllCaps="true"
                    android:textColor="#FFFFFF"
                    android:textSize="@dimen/textSizeAverage"
                    android:visibility="visible" />
            </RelativeLayout>
        </androidx.cardview.widget.CardView>

        <com.ttiglobal.inttilectgpchat.roundcornerprogressbar.RoundCornerProgressBar
            android:id="@+id/linearTimerView"
            android:layout_width="match_parent"
            android:layout_height="@dimen/seekbarsize"
            android:visibility="gone"
            app:rcBackgroundColor="@color/material_grey500"
            app:rcBackgroundPadding="0dp"
            app:rcMax="0"
            app:rcProgress="0"
            app:rcProgressColor="@color/btn_bg_color"
            app:rcRadius="0dp"
            app:rcReverse="false"
            app:rcSecondaryProgress="0"
            app:rcSecondaryProgressColor="@android:color/transparent" />


    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/buttonHeightLarge"
        android:background="#efefef"
        android:gravity="center"
        android:orientation="horizontal"
        android:paddingLeft="@dimen/seekbarsize_small"
        android:paddingRight="@dimen/seekbarsize_small">

        <ImageButton
            android:id="@+id/previous"
            android:layout_width="@dimen/buttonHeightNormal"
            android:layout_height="58dp"
            android:layout_gravity="center"
            android:background="@null"
            android:contentDescription="@string/app_name"
            android:padding="@dimen/seekbarsize_small"
            android:scaleType="fitCenter"
            android:src="@drawable/previous_tab" />

        <com.ogaclejapan.smarttablayout.SmartTabLayout
            android:id="@+id/indicatorTab"
            android:layout_width="0dip"
            android:layout_height="58dp"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:clipToPadding="false"
            app:stl_customTabTextLayoutId="@layout/custom_tab_circle"
            app:stl_defaultTabTextColor="@color/white"
            app:stl_defaultTabTextHorizontalPadding="0dp"
            app:stl_defaultTabTextMinWidth="0dp"
            app:stl_defaultTabTextSize="@dimen/textSizeSmall"
            app:stl_dividerColor="@android:color/transparent"
            app:stl_dividerThickness="0dp"
            app:stl_indicatorColor="@color/btn_bg_color"
            app:stl_indicatorCornerRadius="15dp"
            app:stl_indicatorGravity="center"
            app:stl_indicatorInFront="false"
            app:stl_indicatorInterpolation="smart"
            app:stl_indicatorThickness="30dp"
            app:stl_underlineColor="@android:color/transparent"
            app:stl_underlineThickness="0dp" />

        <ImageButton
            android:id="@+id/next"
            android:layout_width="@dimen/buttonHeightNormal"
            android:layout_height="58dp"
            android:layout_gravity="center"
            android:background="@null"
            android:contentDescription="@string/app_name"
            android:padding="@dimen/seekbarsize_small"
            android:scaleType="fitCenter"
            android:src="@drawable/next_tab" />
    </LinearLayout>
</LinearLayout>
