implement dark gray theme, bump version

This commit is contained in:
Andrew Dolgov 2013-02-09 20:25:56 +04:00
parent a608e8cee8
commit 535b04dbe1
12 changed files with 89 additions and 11 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="132"
android:versionName="1.10" >
android:versionCode="133"
android:versionName="1.11" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -65,4 +65,27 @@
<item name="loadingBackground">@android:color/black</item>
</style>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">@color/feeds_dark_gray</item>
<item name="horizontalDivider">@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>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_gray</item>
<item name="headlineSelectedBackgroundSolid">@color/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="feedsSelectedBackgroundSolid">@color/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="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="android:actionBarStyle">@style/ActionBarDarkGray</item>
</style>
<style name="ActionBarDarkGray" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">#232527</item>
</style>
</resources>

View File

@ -64,4 +64,27 @@
<item name="loadingBackground">@android:color/black</item>
</style>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">@color/feeds_dark_gray</item>
<item name="horizontalDivider">@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>
<item name="headlineSelectedBackground">@drawable/headline_row_selected_gray</item>
<item name="headlineSelectedBackgroundSolid">@color/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="feedsSelectedBackgroundSolid">@color/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="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="android:actionBarStyle">@style/ActionBarDarkGray</item>
</style>
<style name="ActionBarDarkGray" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">#232527</item>
</style>
</resources>

View File

@ -1,11 +1,13 @@
<resources>
<string-array name="pref_theme_names">
<item>@string/theme_dark</item>
<item>@string/theme_dark_gray</item>
<item>@string/theme_light</item>
<item>@string/theme_sepia</item>
<item>@string/theme_sepia</item>
</string-array>
<string-array name="pref_theme_values">
<item>THEME_DARK</item>
<item>THEME_DARK_GRAY</item>
<item>THEME_LIGHT</item>
<item>THEME_SEPIA</item>
</string-array>

View File

@ -8,5 +8,7 @@
<color name="headline_row_selected_light">#33b5e5</color>
<color name="headline_row_selected_sepia">#E5B0A0</color>
<color name="ics_cyan">#33b5e5</color>
<color name="feeds_dark_gray">#1c1d1e</color>
<color name="headline_row_selected_gray">#22667f</color>
<color name="headline_row_unread_gray">#383c42</color>
</resources>

View File

@ -155,4 +155,5 @@
<string name="trial_thanks">Full version, thank you for support!</string>
<string name="prefs_fullscreen_mode">Fullscreen mode</string>
<string name="reading">Reading</string>
<string name="theme_dark_gray">Dark gray</string>
</resources>

View File

@ -65,4 +65,24 @@
<item name="loadingBackground">@android:color/black</item>
</style>
<style name="DarkGrayTheme" parent="DarkTheme">
<item name="smallScreenBackground">#1c1d1e</item>
<item name="horizontalDivider">@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="headlineSelectedBackgroundSolid">@color/headline_row_selected_gray</item>
<item name="headlineUnreadBackground">@color/headline_row_unread_gray</item>
<item name="feedsSelectedBackground">@color/headline_row_selected_gray</item>
<item name="feedsSelectedBackgroundSolid">@color/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="headlineTextColor">@android:color/secondary_text_dark</item>
<item name="android:actionBarStyle">@style/ActionBarDarkGray</item>
</style>
</resources>

View File

@ -213,6 +213,8 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK_GRAY")) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else {
cssOverride = "body { background : transparent; }";
}

View File

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

View File

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

View File

@ -188,12 +188,12 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
web.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK_GRAY")) {
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; }";
}
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));

View File

@ -56,10 +56,11 @@ public class HeadlinesRequest extends ApiRequest {
m_articles.add(placeholder);
}
if (m_articles.size() == 0)
/* if (m_articles.size() == 0)
m_activity.setLoadingStatus(R.string.no_headlines_to_display, false);
else
m_activity.setLoadingStatus(R.string.blank, false);
else */
m_activity.setLoadingStatus(R.string.blank, false);
return;
}