<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="com.nauk.coinfolio.Activities.CurrencyDetailsActivity">

    <ViewFlipper
        android:id="@+id/vfCurrencyDetails"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="56dp">

        <LinearLayout
            android:id="@+id/chartsLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:id="@+id/progressLayoutChart"
                android:layout_width="match_parent"
                android:layout_height="305dp"
                android:layout_marginTop="15dp"
                android:visibility="gone"
                android:gravity="center">

                <ProgressBar
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="?android:attr/progressBarStyleLarge"
                    android:layout_gravity="center"
                    android:background="@drawable/circular_progress_bar"/>

            </LinearLayout>


            <com.github.mikephil.charting.charts.LineChart
                android:id="@+id/chartPriceView"
                android:layout_width="match_parent"
                android:layout_height="250dp"
                android:layout_marginTop="15dp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/timestampHightlight"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:gravity="center_horizontal"
                    android:layout_weight="0.33"
                    android:text="\n" />

                <TextView
                    android:id="@+id/priceHightlight"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:gravity="center_horizontal"
                    android:layout_weight="0.33"
                    android:text="\n" />

                <TextView
                    android:id="@+id/volumeHightlight"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:gravity="center_horizontal"
                    android:layout_weight="0.33"
                    android:text="\n"/>

            </LinearLayout>

            <com.github.mikephil.charting.charts.BarChart
                android:id="@+id/chartVolumeView"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:layout_marginTop="5dp" />

            <LinearLayout
                android:id="@+id/layoutChartButtons"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button1h"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button3h"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:enabled="false"
                    android:text="@string/button1d"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button3d"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button1w"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button1m"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button3m"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button6m"/>

                <Button
                    style="@style/Widget.AppCompat.Button.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="11.1"
                    android:text="@string/button1y"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/llCharts"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Beginning price"
                        android:layout_weight="0.75"/>

                    <TextView
                        android:id="@+id/txtViewPriceStart"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25"/>

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/separationLineSize"
                    android:background="@color/separationLine"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Current price"
                        android:layout_weight="0.75"/>

                    <TextView
                        android:id="@+id/txtViewPriceNow"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25"/>

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/separationLineSize"
                    android:background="@color/separationLine"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Delta"
                        android:layout_weight="0.75"/>

                    <TextView
                        android:id="@+id/txtViewPercentage"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25"/>

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/separationLineSize"
                    android:background="@color/separationLine"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Total volume"
                        android:layout_weight="0.75"/>

                    <TextView
                        android:id="@+id/totalVolume"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25" />

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/separationLineSize"
                    android:background="@color/separationLine"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Highest price"
                        android:layout_weight="0.75" />

                    <TextView
                        android:id="@+id/highestPrice"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25" />

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/separationLineSize"
                    android:background="@color/separationLine"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="0.16">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="Lowest price"
                        android:layout_weight="0.75"/>

                    <TextView
                        android:id="@+id/lowestPrice"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_horizontal"
                        android:layout_weight="0.25" />

                </LinearLayout>

            </LinearLayout>


        </LinearLayout>

        <LinearLayout
            android:id="@+id/infosLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ProgressBar
                android:id="@+id/progressBar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="?android:attr/progressBarStyleLarge"
                android:layout_gravity="center"
                android:background="@drawable/circular_progress_bar" />

            <!--<ScrollView
                android:id="@+id/svInfos"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <ProgressBar
                        android:id="@+id/progressBar"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="?android:attr/progressBarStyleLarge"
                        android:layout_gravity="center"
                        android:background="@drawable/circular_progress_bar" />

                </LinearLayout>

            </ScrollView>-->

        </LinearLayout>

        <ScrollView
            android:id="@+id/svTransactions"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/listTransactions"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

            </LinearLayout>

        </ScrollView>

        <!--<ScrollView
            android:id="@+id/svTransactions"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/transactionsLinearLayout"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:orientation="vertical">

            </LinearLayout>

        </ScrollView>-->

    </ViewFlipper>

    <android.support.design.widget.BottomNavigationView
        android:id="@+id/navigation_details"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="0dp"
        android:layout_marginStart="0dp"
        android:background="?android:attr/windowBackground"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:menu="@menu/navigation_details"
        android:layout_alignParentBottom="true"/>

</RelativeLayout>