<!--
  ~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
  ~
  ~ This file is part of Loop Habit Tracker.
  ~
  ~ Loop Habit Tracker is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by the
  ~ Free Software Foundation, either version 3 of the License, or (at your
  ~ option) any later version.
  ~
  ~ Loop Habit Tracker is distributed in the hope that it will be useful, but
  ~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program. If not, see <http://www.gnu.org/licenses/>.
  -->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:app="http://isoron.org/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/windowBackground"
            android:fillViewport="true">

    <LinearLayout
        style="@style/cardsListStyle"
        tools:context="org.isoron.uhabits.ShowHabitActivity">

        <LinearLayout
            style="@style/cardStyle"
            android:gravity="center">

            <TextView
                android:id="@+id/tvOverview"
                style="@style/cardHeaderStyle"
                android:text="@string/overview"/>

            <org.isoron.uhabits.views.RingView
                android:id="@+id/scoreRing"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:label="@string/habit_strength"/>

        </LinearLayout>

        <LinearLayout style="@style/cardStyle">

            <TextView
                android:id="@+id/tvStrength"
                style="@style/cardHeaderStyle"
                android:text="@string/habit_strength"/>

            <org.isoron.uhabits.views.HabitScoreView
                android:id="@+id/scoreView"
                android:layout_width="match_parent"
                android:layout_height="200dp"/>

        </LinearLayout>

        <LinearLayout
            style="@style/cardStyle"
            android:paddingBottom="0dp"
            android:clipToPadding="false"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tvHistory"
                style="@style/cardHeaderStyle"
                android:text="@string/history"/>

            <org.isoron.uhabits.views.HabitHistoryView
                android:id="@+id/historyView"
                android:layout_width="match_parent"
                android:layout_height="160dp" />

            <Button
                style="?android:borderlessButtonStyle"
                android:id="@+id/btEditHistory"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:src="@drawable/ic_action_edit_light"
                android:textColor="@color/grey_400"
                android:text="@string/edit"/>

        </LinearLayout>

        <LinearLayout style="@style/cardStyle">

            <TextView
                android:id="@+id/tvStreaks"
                style="@style/cardHeaderStyle"
                android:text="@string/streaks"/>

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

            <org.isoron.uhabits.views.HabitStreakView
                android:id="@+id/streakView"
                android:layout_width="match_parent"
                android:layout_height="200dp"/>
        </LinearLayout>
    </LinearLayout>
</ScrollView>