Files
loop/app/src/main/res/layout/show_habit.xml

122 lines
4.2 KiB
XML

<!--
~ 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:clipToPadding="false"
android:orientation="vertical"
android:paddingBottom="0dp">
<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
android:id="@+id/btEditHistory"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_edit_light"
android:text="@string/edit"
android:textColor="@color/grey_400"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
android:orientation="vertical">
<TextView
android:id="@+id/tvStreaks"
style="@style/cardHeaderStyle"
android:text="@string/streaks"/>
<org.isoron.uhabits.views.HabitStreakView
android:id="@+id/streakView"
android:layout_width="match_parent"
android:layout_height="200dp"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
android:orientation="vertical">
<TextView
android:id="@+id/tvWeekdayFreq"
style="@style/cardHeaderStyle"
android:text="@string/frequency"/>
<org.isoron.uhabits.views.HabitFrequencyView
android:id="@+id/punchcardView"
android:layout_width="match_parent"
android:layout_height="200dp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>