Refactor RingView; make text size consistent

This commit is contained in:
2016-03-15 05:30:27 -04:00
parent b20fd44cbc
commit 9232378d04
4 changed files with 63 additions and 38 deletions

View File

@@ -31,18 +31,28 @@
<LinearLayout
style="@style/cardStyle"
android:gravity="center">
android:gravity="start">
<TextView
android:id="@+id/tvOverview"
style="@style/cardHeaderStyle"
android:text="@string/overview"/>
<org.isoron.uhabits.views.RingView
android:id="@+id/scoreRing"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/llOverview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:label="@string/habit_strength"/>
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="60"
app:textSize="12"/>
</LinearLayout>
</LinearLayout>
@@ -65,28 +75,28 @@
android:orientation="horizontal">
<org.isoron.uhabits.views.RepetitionCountView
app:label="@string/month"
style="@style/smallDataViewStyle"
app:interval="31"
app:textSize="34"
style="@style/repetitionCountStyle"/>
app:label="@string/month"
app:textSize="12"/>
<org.isoron.uhabits.views.RepetitionCountView
app:label="@string/quarter"
style="@style/smallDataViewStyle"
app:interval="92"
app:textSize="34"
style="@style/repetitionCountStyle"/>
app:label="@string/quarter"
app:textSize="12"/>
<org.isoron.uhabits.views.RepetitionCountView
app:label="@string/year"
style="@style/smallDataViewStyle"
app:interval="365"
app:textSize="34"
style="@style/repetitionCountStyle"/>
app:label="@string/year"
app:textSize="12"/>
<org.isoron.uhabits.views.RepetitionCountView
app:label="@string/all_time"
style="@style/smallDataViewStyle"
app:interval="0"
app:textSize="34"
style="@style/repetitionCountStyle"/>
app:label="@string/all_time"
app:textSize="12"/>
</LinearLayout>

View File

@@ -93,7 +93,7 @@
<item name="android:paddingTop">12dp</item>
</style>
<style name="repetitionCountStyle">
<style name="smallDataViewStyle">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>