add sepia theme

This commit is contained in:
Andrew Dolgov 2012-12-31 03:14:01 +04:00
parent 6e407cb5b1
commit adee6d3493
18 changed files with 82 additions and 55 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/headline_row_selected_sepia"/>
<item android:drawable="@drawable/shadow"/>
<item><bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/arrowhead_sepia"
android:gravity="center_vertical|right" /></item>
</layer-list>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/paper_sepia_bitmap"
android:tileMode="repeat" />

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/feeds_sepia"/>
<item android:drawable="@drawable/shadow"/>
</layer-list>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/paper_sepia"/>
<item android:drawable="@drawable/shadow"/>
</layer-list>

View File

@ -20,6 +20,7 @@
<FrameLayout
android:id="@+id/feeds_fragment"
android:background="?smallScreenBackground"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>

View File

@ -20,6 +20,7 @@
<FrameLayout
android:id="@+id/headlines_container"
android:background="?smallScreenBackground"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>

View File

@ -1,5 +1,6 @@
<resources>
<style name="LightTheme" parent="android:Theme.Holo.Light">
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="LightTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="horizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground"><!-- #e0e0e0 -->@drawable/shadow_feeds</item>
<item name="unreadCounterColor">#0000ff</item>
@ -23,7 +24,23 @@
<item name="loadingBackground">@android:color/white</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="headlineSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="headlineSelectedBackgroundSolid">@color/headline_row_selected_sepia</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_sepia</item>
<item name="feedsSelectedBackgroundSolid">@color/headline_row_selected_sepia</item>
<item name="articleBackground">@drawable/paper_sepia</item>
<item name="unreadCounterColor">#C46262</item>
<item name="feedlistTextColor">#35281C</item>
<item name="linkColor">#C46262</item>
</style>
<style name="DarkTheme" parent="android:Theme.Holo">
<item name="smallScreenBackground">@android:color/transparent</item>
<item name="horizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@drawable/ics_divider_vertical</item>
<item name="unreadCounterColor">#303030</item>

View File

@ -1,50 +0,0 @@
<resources>
<style name="LightTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="horizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground"><!-- #e0e0e0 -->@drawable/shadow_feeds</item>
<item name="unreadCounterColor">#0000ff</item>
<item name="headlinesBackground"><!-- #f0f0f0 -->@drawable/shadow_headlines</item>
<item name="headlinesBackgroundSolid">#f0f0f0</item>
<item name="articleBackground">#ffffff</item>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_light</item>
<item name="headlineSelectedBackgroundSolid">@color/headline_row_selected_light</item>
<item name="headlineUnreadBackground">@android:color/transparent</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_light</item>
<item name="feedsSelectedBackgroundSolid">@color/headline_row_selected_light</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
<item name="feedlistSelectedTextColor">#ffffff</item>
<item name="headlineTextColor">#909090</item>
<item name="headlineUnreadTextColor">@android:color/primary_text_light</item>
<item name="headlineSelectedTextColor">#ffffff</item>
<item name="headlineExcerptTextColor">#909090</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
<item name="linkColor">#30B0E0</item>
<item name="loadingBackground">@android:color/white</item>
</style>
<style name="DarkTheme" parent="android:Theme.Holo">
<item name="horizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">@drawable/ics_divider_vertical</item>
<item name="unreadCounterColor">#303030</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="headlineSelectedBackgroundSolid">@color/ics_cyan</item>
<item name="headlineUnreadBackground">@android:color/transparent</item>
<item name="headlineNormalBackground">@android:color/transparent</item>
<item name="feedsSelectedBackground">@drawable/headline_row_selected_dark</item>
<item name="feedsSelectedBackgroundSolid">@color/ics_cyan</item>
<item name="feedlistTextColor">@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/white</item>
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
<item name="linkColor">@color/ics_cyan</item>
<item name="loadingBackground">@android:color/black</item>
</style>
</resources>

View File

@ -2,10 +2,12 @@
<string-array name="pref_theme_names">
<item>@string/theme_dark</item>
<item>@string/theme_light</item>
<item>@string/theme_sepia</item>
</string-array>
<string-array name="pref_theme_values">
<item>THEME_DARK</item>
<item>THEME_LIGHT</item>
<item>THEME_SEPIA</item>
</string-array>
<string-array name="pref_font_size_names">
<item>@string/font_size_small</item>

View File

@ -2,6 +2,7 @@
<resources>
<attr name="horizontalDivider" format="reference|color" />
<attr name="feedlistBackground" format="reference|color" />
<attr name="smallScreenBackground" format="reference|color" />
<attr name="unreadCounterColor" format="reference|color" />
<attr name="headlinesBackground" format="reference|color" />
<attr name="headlinesBackgroundSolid" format="reference|color" />

View File

@ -3,7 +3,10 @@
<color name="feeds_light">#e0e0e0</color>
<color name="headlines_light">#ffffff</color>
<color name="headlines_sepia">#EAE2DC</color>
<color name="feeds_sepia">#D3C6BA</color>
<color name="headline_row_selected_light">#33b5e5</color>
<color name="headline_row_selected_sepia">#E5B0A0</color>
<color name="ics_cyan">#33b5e5</color>
</resources>

View File

@ -151,4 +151,5 @@
<string name="trial_purchase">Unlock full version</string>
<string name="trial_expired">Trial expired</string>
<string name="trial_expired_message">To continue using Tiny Tiny RSS please unlock the full version by purchasing the key.</string>
<string name="theme_sepia">Sepia</string>
</resources>

View File

@ -1,6 +1,7 @@
<resources>
<style name="LightTheme" parent="android:Theme.Light">
<item name="smallScreenBackground">@android:color/white</item>
<item name="horizontalDivider">@android:drawable/divider_horizontal_bright</item>
<item name="feedlistBackground">#fafafa</item>
<item name="unreadCounterColor">#0000ff</item>
@ -24,7 +25,23 @@
<item name="loadingBackground">@android:color/white</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="headlineSelectedBackgroundSolid">@color/headlines_sepia</item>
<item name="feedsSelectedBackground">@color/headline_row_selected_sepia</item>
<item name="feedsSelectedBackgroundSolid">@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="DarkTheme" parent="android:Theme.Black">
<item name="smallScreenBackground">@android:color/black</item>
<item name="horizontalDivider">@android:drawable/divider_horizontal_dark</item>
<item name="feedlistBackground">#101010</item>
<item name="unreadCounterColor">#303030</item>

View File

@ -210,11 +210,10 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
//view.setBackgroundColor(android.R.color.black);
web.setBackgroundColor(getResources().getColor(android.R.color.transparent));
} else {
cssOverride = "";
cssOverride = "body { background : transparent; }";
}
web.setBackgroundColor(getResources().getColor(android.R.color.transparent));
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";

View File

@ -104,6 +104,10 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
ft.replace(R.id.feeds_fragment, new FeedsFragment(), FRAG_FEEDS);
}
/* if (!isSmallScreen()) {
ft.replace(R.id.headlines_fragment, new HeadlinesFragment(new Feed(-3, "Fresh articles", false)));
} */
ft.commit();
AppRater.appLaunched(this);

View File

@ -134,6 +134,8 @@ public class OnlineActivity extends CommonActivity {
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
setTheme(R.style.DarkTheme);
} else if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_SEPIA")) {
setTheme(R.style.SepiaTheme);
} else {
setTheme(R.style.LightTheme);
}