use pill counters like tt-rss main

This commit is contained in:
Andrew Dolgov 2013-05-27 22:48:31 +04:00
parent 0e942e4339
commit a503c6141f
9 changed files with 152 additions and 98 deletions

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/unread_counter_background" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/unread_counter_background_dark" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/unread_counter_background_sepia" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>

View File

@ -9,7 +9,8 @@
android:paddingBottom="10dip"
android:paddingLeft="8dip"
android:paddingRight="8dip"
android:paddingTop="10dip" >
android:paddingTop="10dip"
android:textAlignment="center" >
<ImageView
android:id="@+id/icon"
@ -32,15 +33,21 @@
<TextView
android:id="@+id/unread_counter"
android:layout_width="wrap_content"
android:layout_width="45dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="6dp"
android:layout_weight="0"
android:gravity="right"
android:paddingRight="12dip"
android:text="{123}"
android:background="?attr/unreadCounterBackground"
android:gravity="center"
android:paddingBottom="4dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="4dp"
android:singleLine="true"
android:text="3200"
android:textColor="?unreadCounterColor"
android:textSize="13sp"
android:textSize="12sp"
android:textStyle="bold" />
<ImageButton

View File

@ -33,15 +33,21 @@
<TextView
android:id="@+id/unread_counter"
android:layout_width="wrap_content"
android:layout_width="45dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="6dp"
android:layout_weight="0"
android:gravity="right"
android:paddingRight="12dp"
android:text="{123}"
android:textColor="?feedlistSelectedTextColor"
android:textSize="13sp"
android:background="?attr/unreadCounterBackground"
android:gravity="center"
android:paddingBottom="4dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="4dp"
android:singleLine="true"
android:text="3200"
android:textColor="?unreadCounterColor"
android:textSize="12sp"
android:textStyle="bold" />
<ImageButton

View File

@ -3,7 +3,7 @@
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground"><!-- #e0e0e0 -->@drawable/shadow_feeds</item>
<item name="unreadCounterColor">#0000ff</item>
<item name="unreadCounterColor">#ffffff</item>
<item name="headlinesBackground"><!-- #f0f0f0 -->@drawable/shadow_headlines</item>
<item name="headlinesBackgroundSolid">#f0f0f0</item>
<item name="articleBackground">@android:color/transparent</item>
@ -23,6 +23,7 @@
<item name="headlineTitleHighScoreUnreadTextColor">#008000</item>
<item name="linkColor">#30B0E0</item>
<item name="loadingBackground">@android:color/white</item>
<item name="unreadCounterBackground">@drawable/counter_background</item>
</style>
<style name="SepiaTheme" parent="LightTheme">
@ -34,21 +35,17 @@
<item name="headlineSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="articleBackground">@drawable/paper_sepia</item>
<item name="unreadCounterColor">#C46262</item>
<item name="unreadCounterBackground">@drawable/counter_background_sepia</item>
<item name="feedlistTextColor">#35281C</item>
<item name="linkColor">#C46262</item>
<!-- <item name="android:actionBarStyle">@style/ActionBarSepia</item> -->
</style>
<!-- <style name="ActionBarSepia" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#351d11</item>
</style> -->
<style name="DarkTheme" parent="Theme.Sherlock">
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@android:color/transparent</item>
<item name="unreadCounterColor">@color/ics_cyan</item>
<item name="unreadCounterColor">#ffffff</item>
<item name="headlinesBackground">@drawable/headlines_dark</item>
<item name="headlinesBackgroundSolid">@drawable/headlines_dark</item>
<item name="articleBackground">@android:color/black</item>
@ -68,13 +65,13 @@
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
<item name="linkColor">@color/ics_cyan</item>
<item name="loadingBackground">@android:color/black</item>
<item name="unreadCounterBackground">@drawable/counter_background_dark</item>
</style>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">@color/feeds_dark_gray</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@drawable/shadow_feeds_gray</item>
<item name="unreadCounterColor">#a0a0a0</item>
<item name="headlinesBackground">@drawable/shadow_headlines_gray</item>
<item name="headlinesBackgroundSolid">@color/feeds_dark_gray</item>
<item name="articleBackground">@color/feeds_dark_gray</item>
@ -87,6 +84,7 @@
<item name="actionBarStyle">@style/ActionBarDarkGray</item>
<item name="android:actionBarStyle">@style/ActionBarDarkGray</item>
<item name="headlineSelectedSecondaryTextColor">#a0a0a0</item>
</style>
<style name="ActionBarDarkGray" parent="Widget.Sherlock.ActionBar.Solid">

View File

@ -23,4 +23,5 @@
<attr name="headlineTitleHighScoreUnreadTextColor" format="reference|color" />
<attr name="linkColor" format="reference|color" />
<attr name="loadingBackground" format="reference|color" />
<attr name="unreadCounterBackground" format="reference|color" />
</resources>

View File

@ -13,4 +13,7 @@
<color name="headline_row_unread_gray">#383c42</color>
<color name="headline_row_unread_light">#f0f0f0</color>
<color name="headline_row_unread_sepia">#F2EAE8</color>
<color name="unread_counter_background">#88b0f0</color>
<color name="unread_counter_background_dark">#303030</color>
<color name="unread_counter_background_sepia">#C46262</color>
</resources>

View File

@ -1,93 +1,96 @@
<resources>
<style name="LightTheme" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="smallScreenBackground">@android:color/white</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground">#fafafa</item>
<item name="unreadCounterColor">#0000ff</item>
<item name="headlinesBackground">#ffffff</item>
<item name="headlinesBackgroundSolid">#ffffff</item>
<item name="articleBackground">@android:color/transparent</item>
<item name="headlineSelectedBackground">#fff7d5</item>
<item name="headlineUnreadBackground">#fafafa</item>
<item name="headlineNormalBackground">#f0f0f0</item>
<item name="feedsSelectedBackground">#96C5FF</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
<item name="feedlistSelectedTextColor">@android:color/primary_text_light</item>
<item name="headlineTextColor">@android:color/primary_text_light</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_light</item>
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
<item name="headlineSecondaryTextColor">#909090</item>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="LightTheme" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground"><!-- #e0e0e0 -->@drawable/shadow_feeds</item>
<item name="unreadCounterColor">#ffffff</item>
<item name="headlinesBackground"><!-- #f0f0f0 -->@drawable/shadow_headlines</item>
<item name="headlinesBackgroundSolid">#f0f0f0</item>
<item name="articleBackground">@android:color/transparent</item>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_light</item>
<item name="headlineUnreadBackground">@drawable/headline_row_unread_light</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_light</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
<item name="feedlistSelectedTextColor">#ffffff</item>
<item name="headlineTextColor">@android:color/secondary_text_light</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_light</item>
<item name="headlineSelectedTextColor">#ffffff</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
<item name="headlineSecondaryTextColor">#909090</item>
<item name="headlineSelectedSecondaryTextColor">#606060</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
<item name="headlineTitleHighScoreUnreadTextColor">#008000</item>
<item name="linkColor">#5858F8</item>
<item name="loadingBackground">@android:color/white</item>
</style>
<item name="linkColor">#30B0E0</item>
<item name="loadingBackground">@android:color/white</item>
<item name="unreadCounterBackground">@drawable/counter_background</item>
</style>
<style name="SepiaTheme" parent="LightTheme">
<item name="smallScreenBackground">@color/headlines_sepia</item>
<item name="feedlistBackground">@drawable/shadow_feeds_sepia</item>
<item name="headlinesBackground">@color/headlines_sepia</item>
<item name="headlinesBackgroundSolid">@color/headlines_sepia</item>
<item name="headlineSelectedBackground">@color/headline_row_selected_sepia</item>
<item name="headlineUnreadBackground">#F2EAE8</item>
<item name="feedsSelectedBackground">@color/headline_row_selected_sepia</item>
<item name="articleBackground">@color/headlines_sepia</item>
<item name="unreadCounterColor">#C46262</item>
<item name="feedlistTextColor">#35281C</item>
<item name="linkColor">#C46262</item>
</style>
<style name="SepiaTheme" parent="LightTheme">
<item name="smallScreenBackground">@drawable/paper_sepia</item>
<item name="feedlistBackground">@drawable/shadow_feeds_sepia</item>
<item name="headlinesBackground">@drawable/shadow_headlines_sepia</item>
<item name="headlinesBackgroundSolid">@drawable/paper_sepia</item>
<item name="headlineUnreadBackground">@drawable/headline_row_unread_sepia</item> <!-- #F2EAE8 -->
<item name="headlineSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="articleBackground">@drawable/paper_sepia</item>
<item name="unreadCounterBackground">@drawable/counter_background_sepia</item>
<item name="feedlistTextColor">#35281C</item>
<item name="linkColor">#C46262</item>
<!-- <item name="android:actionBarStyle">@style/ActionBarSepia</item> -->
</style>
<style name="DarkTheme" parent="Theme.Sherlock">
<item name="smallScreenBackground">@android:color/black</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">#101010</item>
<item name="unreadCounterColor">#303030</item>
<item name="headlinesBackground">#000000</item>
<item name="headlinesBackgroundSolid">#000000</item>
<item name="articleBackground">@android:color/transparent</item>
<item name="headlineSelectedBackground">#F5B800</item>
<item name="headlineUnreadBackground">#202020</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">#F5B800</item>
<style name="DarkTheme" parent="Theme.Sherlock">
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@android:color/transparent</item>
<item name="unreadCounterColor">#ffffff</item>
<item name="headlinesBackground">@drawable/headlines_dark</item>
<item name="headlinesBackgroundSolid">@drawable/headlines_dark</item>
<item name="articleBackground">@android:color/black</item>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_dark</item>
<item name="headlineUnreadBackground">#202020</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_dark</item>
<item name="feedlistTextColor">@android:color/primary_text_dark</item>
<item name="feedlistSelectedTextColor">@android:color/primary_text_dark</item>
<item name="headlineTextColor">@android:color/primary_text_dark</item>
<item name="feedlistSelectedTextColor">@android:color/black</item>
<item name="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_dark</item>
<item name="headlineSelectedTextColor">@android:color/black</item>
<item name="headlineSelectedTextColor">@android:color/white</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
<item name="headlineSecondaryTextColor">#909090</item>
<item name="headlineSelectedSecondaryTextColor">#404040</item>
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
<item name="linkColor">#5858F8</item>
<item name="linkColor">@color/ics_cyan</item>
<item name="loadingBackground">@android:color/black</item>
</style>
<item name="unreadCounterBackground">@drawable/counter_background_dark</item>
</style>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">#1c1d1e</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@color/feeds_dark_gray</item>
<item name="unreadCounterColor">#a0a0a0</item>
<item name="headlinesBackground">@color/feeds_dark_gray</item>
<item name="headlinesBackgroundSolid">@color/headline_row_selected_gray</item>
<item name="articleBackground">#1c1d1e</item>
<item name="headlineSelectedBackground">@color/headline_row_selected_gray</item>
<item name="headlineUnreadBackground">@color/headline_row_unread_gray</item>
<item name="feedsSelectedBackground">@color/headline_row_selected_gray</item>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">@color/feeds_dark_gray</item>
<item name="ttrssHorizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@drawable/shadow_feeds_gray</item>
<item name="headlinesBackground">@drawable/shadow_headlines_gray</item>
<item name="headlinesBackgroundSolid">@color/feeds_dark_gray</item>
<item name="articleBackground">@color/feeds_dark_gray</item>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_gray</item>
<item name="headlineUnreadBackground">@drawable/headline_row_unread_gray</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_gray</item>
<item name="feedlistSelectedTextColor">@android:color/primary_text_dark</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedSecondaryTextColor">#a0a0a0</item>
<item name="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="actionBarStyle">@style/ActionBarDarkGray</item>
</style>
<item name="android:actionBarStyle">@style/ActionBarDarkGray</item>
<item name="headlineSelectedSecondaryTextColor">#a0a0a0</item>
</style>
<style name="ActionBarDarkGray" parent="Widget.Sherlock.ActionBar.Solid">
<style name="ActionBarDarkGray" parent="Widget.Sherlock.ActionBar.Solid">
<item name="android:background">#232527</item>
</style>
<style name="DarkDialogTheme" parent="android:Theme.Dialog"></style>
<style name="DarkDialogTheme" parent="android:Theme.Dialog">
</style>
</resources>