Improve visualization of streaks

Closes #20
This commit is contained in:
2016-03-26 08:27:23 -04:00
parent dfe41176bc
commit e2c99d745e
7 changed files with 175 additions and 126 deletions

View File

@@ -42,16 +42,36 @@
android:id="@+id/llOverview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android: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"
android:layout_width="100dp"
app:label="@string/strength"
app:maxDiameter="80"
app:textSize="@dimen/smallTextSize"/>
<LinearLayout
style="@style/smallDataViewStyle"
android:orientation="vertical">
<org.isoron.uhabits.views.HabitStreakView
android:id="@+id/smallStreakView"
android:layout_width="match_parent"
android:layout_height="80dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/best_streaks"
android:layout_marginTop="9dp"
android:textColor="@color/fadedTextColor"
android:gravity="center"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -173,7 +193,7 @@
<TextView
android:id="@+id/tvStreaks"
style="@style/cardHeaderStyle"
android:text="@string/streaks"/>
android:text="@string/best_streaks"/>
<org.isoron.uhabits.views.HabitStreakView
android:id="@+id/streakView"

View File

@@ -18,7 +18,7 @@
-->
<resources>
<dimen name="small_square_size">20dp</dimen>
<dimen name="baseSize">20dp</dimen>
<dimen name="check_square_size">42dp</dimen>
<dimen name="history_editor_max_height">450dp</dimen>
<dimen name="history_editor_padding">8dp</dimen>

View File

@@ -151,4 +151,6 @@
<string name="bug_report_failed">Failed to generate bug report.</string>
<string name="generate_bug_report">Generate bug report</string>
<string name="troubleshooting">Troubleshooting</string>
<string name="best_streaks">Best streaks</string>
<string name="strength">Strength</string>
</resources>

View File

@@ -96,11 +96,11 @@
</style>
<style name="smallDataViewStyle">
<item name="android:layout_width">0dp</item>
<item name="android:layout_width">100dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginRight">8dp</item>
<item name="android:textColor">@color/fadedTextColor</item>
</style>
</resources>