1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Better style the thread count indicators

This commit is contained in:
Jesse Vincent 2012-11-24 13:22:21 -05:00
parent 7767257b9d
commit 16de720661
5 changed files with 51 additions and 17 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/tertiary_text_dark"/>
<!-- A hack because we can't set the color to a theme attribute like ?attr/messageListThreadCountBackgroundColor" -->
<corners android:radius="4dp"/>
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/tertiary_text_light"/>
<!-- A hack because we can't set the color to a theme attribute like ?attr/messageListThreadCountBackgroundColor" -->
<corners android:radius="4dp"/>
</shape>

View File

@ -55,7 +55,7 @@
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/chip_wrapper"
android:layout_below="@+id/subject"
android:layout_toLeftOf="@+id/thread_count"
android:layout_toLeftOf="@+id/thread_count_wrapper"
android:layout_marginLeft="1dip"
android:layout_marginBottom="3dip"
android:layout_marginRight="3dip"
@ -64,21 +64,6 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/thread_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dip"
android:layout_marginRight="12dip"
android:layout_alignParentRight="true"
android:layout_below="@+id/subject"
android:gravity="center_vertical|center_horizontal"
android:paddingLeft="4dip"
android:paddingRight="4dip"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:background="#50000000"
android:focusable="false" />
<TextView
@ -92,5 +77,27 @@
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary" />
<LinearLayout
android:id="@+id/thread_count_wrapper"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/date"
android:layout_alignTop="@+id/preview"
android:layout_alignParentRight="true"
android:layout_marginLeft="4dip"
android:layout_marginRight="2dip"
android:background="?attr/messageListThreadCountBackground"
>
<TextView
android:id="@+id/thread_count"
android:layout_gravity="center|center_vertical"
android:textColor="?attr/messageListThreadCountForegroundColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="4dip"
android:paddingBottom="1dip"
android:paddingLeft="4dip"
android:focusable="false" />
</LinearLayout>
</RelativeLayout>

View File

@ -45,6 +45,9 @@
<attr name="backgroundColorChooseAccountHeader" format="color" />
<attr name="messageListReadItemBackgroundColor" format="reference|color"/>
<attr name="messageListUnreadItemBackgroundColor" format="reference|color"/>
<attr name="messageListThreadCountForegroundColor" format="reference|color"/>
<attr name="messageListThreadCountBackground" format="reference|color"/>
</declare-styleable>
</resources>

View File

@ -44,6 +44,8 @@
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_light</item>
<item name="messageListReadItemBackgroundColor">#80cdcdcd</item>
<item name="messageListUnreadItemBackgroundColor">#00ffffff</item>
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
<item name="messageListThreadCountBackground">@drawable/thread_count_box_light</item>
</style>
<style name="Theme.K9.Dark.Base" parent="Theme.Sherlock">
@ -89,6 +91,8 @@
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_dark</item>
<item name="messageListReadItemBackgroundColor">#00000000</item>
<item name="messageListUnreadItemBackgroundColor">#805a5a5a</item>
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
<item name="messageListThreadCountBackground">@drawable/thread_count_box_dark</item>
</style>
<style name="Theme.K9.Light" parent="Theme.K9.Light.Base">