<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    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/constrainLayout_readerActivity_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ReaderActivity">
    <LinearLayout
        android:id="@+id/viewGroup_readerActivity_container"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="0dp" />
    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar_readerActivity"
        android:background="@color/reader_top_toolbar_bg"
        app:navigationIcon="@drawable/selector_arrow_back_black_blue_24dp"
        android:elevation="4dp"
        android:minHeight="?attr/actionBarSize"
        app:popupTheme="@style/ReaderToolBarStyle"
        android:theme="@style/ReaderToolBarStyle"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_width="0dp"
        android:layout_height="wrap_content">
        <TextView
            tools:text="This is title"
            android:id="@+id/tv_readerActivity_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ellipsize="middle"
            android:gravity="center_vertical"
            android:paddingBottom="4dp"
            android:paddingTop="4dp"
            android:singleLine="true"
            android:textColor="@color/black_87"
            android:textSize="16sp"
            android:textStyle="bold"/>
    </android.support.v7.widget.Toolbar>
    <com.kdanmobile.reader.view.HorizontalView
        android:id="@+id/viewGroup_readerActivity_leftToolbar"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar_readerActivity"
        app:layout_constraintBottom_toTopOf="@+id/viewGroup_readerActivity_bottomToolbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <android.support.constraint.ConstraintLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <LinearLayout
                android:id="@+id/linearLayout_readerActivity_leftToolbarContainer"
                app:layout_constraintRight_toLeftOf="@+id/viewGroup_readerActivity_leftToolbarButtons"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:background="@drawable/bg_reader_tool_bar_left_expand"
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
            <LinearLayout
                android:id="@+id/viewGroup_readerActivity_leftToolbarButtons"
                app:layout_constraintLeft_toRightOf="@+id/linearLayout_readerActivity_leftToolbarContainer"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                android:background="@drawable/bg_reader_tool_bar_left"
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
                <ImageView
                    android:id="@+id/iv_readerActivity_thumbnail"
                    android:onClick="onClick"
                    style="@style/ReaderLeftRightToolbarIImageButton"
                    android:src="@drawable/ic_left_toolbar_thumbnails" />
                <ImageView
                    android:id="@+id/iv_readerActivity_bookmark"
                    android:onClick="onClick"
                    style="@style/ReaderLeftRightToolbarIImageButton"
                    android:src="@drawable/ic_left_toolbar_bookmarks" />
                <ImageView
                    android:id="@+id/iv_readerActivity_outline"
                    android:onClick="onClick"
                    style="@style/ReaderLeftRightToolbarIImageButton"
                    android:src="@drawable/ic_left_toolbar_outline" />
                <ImageView
                    android:id="@+id/iv_readerActivity_search"
                    android:onClick="onClick"
                    style="@style/ReaderLeftRightToolbarIImageButton"
                    android:src="@drawable/ic_left_toolbar_search" />
            </LinearLayout>
        </android.support.constraint.ConstraintLayout>
    </com.kdanmobile.reader.view.HorizontalView>
    <com.kdanmobile.reader.view.HorizontalView
        android:id="@+id/viewGroup_readerActivity_rightToolbar"
        app:layout_constraintTop_toBottomOf="@+id/toolbar_readerActivity"
        app:layout_constraintBottom_toTopOf="@+id/viewGroup_readerActivity_bottomToolbar"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_width="wrap_content"
        android:layout_height="0dp">
        <ScrollView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:background="@drawable/bg_reader_tool_bar_right">
            <android.support.constraint.ConstraintLayout
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
                <View
                    android:id="@+id/view_readerActivity_highLightStroke"
                    app:layout_constraintTop_toTopOf="@id/iv_readerActivity_highLight"
                    app:layout_constraintBottom_toBottomOf="@id/iv_readerActivity_highLight"
                    app:layout_constraintLeft_toLeftOf="@id/iv_readerActivity_highLight"
                    app:layout_constraintRight_toRightOf="@id/iv_readerActivity_highLight"
                    android:layout_margin="12dp"
                    android:background="@color/highlight_default_color"
                    android:layout_width="0dp"
                    android:layout_height="8dp" />
                <ImageView
                    android:id="@+id/iv_readerActivity_highLight"
                    android:src="@drawable/ic_reader_right_toolbar_text"
                    app:layout_constraintTop_toBottomOf="parent"
                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_strike"
                    style="@style/ReaderLeftRightToolbarIImageButton" />
                <ImageView
                    android:id="@+id/iv_readerActivity_strike"
                    android:src="@drawable/ic_reader_right_toolbar_text"
                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_highLight"
                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_underline"
                    style="@style/ReaderLeftRightToolbarIImageButton" />
                <View
                    android:id="@+id/view_readerActivity_strikeStroke"
                    app:layout_constraintTop_toTopOf="@id/iv_readerActivity_strike"
                    app:layout_constraintBottom_toBottomOf="@id/iv_readerActivity_strike"
                    app:layout_constraintLeft_toLeftOf="@id/iv_readerActivity_strike"
                    app:layout_constraintRight_toRightOf="@id/iv_readerActivity_strike"
                    android:layout_margin="12dp"
                    android:background="@color/strike_default_color"
                    android:layout_width="0dp"
                    android:layout_height="2dp" />
                <ImageView
                    android:id="@+id/iv_readerActivity_underline"
                    android:src="@drawable/ic_reader_right_toolbar_text"
                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_strike"
                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_ink"
                    style="@style/ReaderLeftRightToolbarIImageButton" />
                <View
                    android:id="@+id/view_readerActivity_underlineStroke"
                    app:layout_constraintBottom_toBottomOf="@id/iv_readerActivity_underline"
                    app:layout_constraintLeft_toLeftOf="@id/iv_readerActivity_underline"
                    app:layout_constraintRight_toRightOf="@id/iv_readerActivity_underline"
                    android:layout_margin="12dp"
                    android:background="@color/underline_default_color"
                    android:layout_width="0dp"
                    android:layout_height="2dp" />
                <ImageView
                    android:id="@+id/iv_readerActivity_ink"
                    android:src="@drawable/ic_reader_right_toolbar_ink_color1"
                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_underline"
                    app:layout_constraintBottom_toTopOf="@id/iv_readerActivity_setting"
                    style="@style/ReaderLeftRightToolbarIImageButton" />
                <ImageView
                    android:id="@+id/iv_readerActivity_setting"
                    android:src="@drawable/ic_reader_right_toolbar_settings"
                    app:layout_constraintTop_toBottomOf="@id/iv_readerActivity_ink"
                    app:layout_constraintBottom_toBottomOf="parent"
                    style="@style/ReaderLeftRightToolbarIImageButton" />
            </android.support.constraint.ConstraintLayout>
        </ScrollView>
    </com.kdanmobile.reader.view.HorizontalView>
    <android.support.constraint.ConstraintLayout
        android:id="@+id/viewGroup_readerActivity_bottomToolbar"
        android:background="@color/reader_bottom_toolbar_bg"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_width="0dp"
        android:layout_height="wrap_content">
        <View
            android:id="@+id/view_readerActivity_border"
            android:background="#1e000000"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            android:layout_width="0dp"
            android:layout_height="1dp" />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarPrevious"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_prev"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarShare"
            app:layout_constraintHorizontal_chainStyle="spread"
            />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarShare"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_share"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarPrevious"
            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
            />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarKdanCloud"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_kdancloud"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarShare"
            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarViewAll"
            />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarViewAll"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_viewall"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarKdanCloud"
            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarMediaBox"
            />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarMediaBox"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_work"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarViewAll"
            app:layout_constraintRight_toLeftOf="@id/ib_readerActivity_bottomToolbarNext"
            />
        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/ib_readerActivity_bottomToolbarNext"
            style="@style/ReaderBottomToolbarImageButton"
            android:src="@drawable/ic_next"
            app:layout_constraintTop_toBottomOf="@id/view_readerActivity_border"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/ib_readerActivity_bottomToolbarMediaBox"
            app:layout_constraintRight_toRightOf="parent"
            />
    </android.support.constraint.ConstraintLayout>

    <com.kdanmobile.reader.screen.reader.mediabox.MediaBoxView
        android:id="@+id/viewerEditView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</android.support.constraint.ConstraintLayout>