200 lines
7.2 KiB
XML
200 lines
7.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="start">
|
|
|
|
<TextView
|
|
android:id="@+id/tvOverview"
|
|
style="@style/cardHeaderStyle"
|
|
android:text="@string/overview"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/llOverview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<org.isoron.uhabits.views.RingView
|
|
android:id="@+id/scoreRing"
|
|
style="@style/smallDataViewStyle"
|
|
app:label="@string/habit_strength"
|
|
app:maxDiameter="70"
|
|
app:textSize="@dimen/smallTextSize"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
style="@style/cardStyle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="top|start"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:id="@+id/tvCount"
|
|
style="@style/cardHeaderStyle"
|
|
android:text="@string/number_of_repetitions"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/llRepetition"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<org.isoron.uhabits.views.RepetitionCountView
|
|
style="@style/smallDataViewStyle"
|
|
app:interval="30"
|
|
app:labelFormat="@string/last_x_days"
|
|
app:labelValue="30"
|
|
app:textSize="12"/>
|
|
|
|
<org.isoron.uhabits.views.RepetitionCountView
|
|
style="@style/smallDataViewStyle"
|
|
app:interval="92"
|
|
app:labelFormat="@string/last_x_months"
|
|
app:labelValue="4"
|
|
app:textSize="12"/>
|
|
|
|
<org.isoron.uhabits.views.RepetitionCountView
|
|
style="@style/smallDataViewStyle"
|
|
app:interval="365"
|
|
app:labelFormat="@string/last_x_months"
|
|
app:labelValue="12"
|
|
app:textSize="12"/>
|
|
|
|
<org.isoron.uhabits.views.RepetitionCountView
|
|
style="@style/smallDataViewStyle"
|
|
app:interval="0"
|
|
app:label="@string/all_time"
|
|
app:textSize="12"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<RelativeLayout
|
|
style="@style/cardStyle"
|
|
android:gravity="center">
|
|
|
|
<Spinner
|
|
android:id="@+id/sStrengthInterval"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:entries="@array/strengthIntervalNames"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_alignParentEnd="true"
|
|
android:minWidth="100dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/tvStrength"
|
|
style="@style/cardHeaderStyle"
|
|
android:text="@string/habit_strength"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"/>
|
|
|
|
<org.isoron.uhabits.views.HabitScoreView
|
|
android:id="@+id/scoreView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="220dp"
|
|
android:layout_below="@id/tvStrength"/>
|
|
|
|
</RelativeLayout>
|
|
|
|
<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"
|
|
android:textSize="@dimen/smallTextSize"/>
|
|
|
|
</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> |