change accentcolor to better conform with material design guidelines; remove amber and sepia themes

This commit is contained in:
Andrew Dolgov 2015-06-02 00:25:46 +04:00
parent ac5e981cbc
commit 209b82a1da
8 changed files with 31 additions and 70 deletions

View File

@ -255,7 +255,7 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur
m_prefs = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
setDarkAppTheme(m_prefs);
setTheme(R.style.DarkTheme);
super.onCreate(savedInstanceState);

View File

@ -25,8 +25,8 @@ public class CommonActivity extends ActionBarActivity {
public final static String THEME_DARK = "THEME_DARK";
public final static String THEME_LIGHT = "THEME_LIGHT";
public final static String THEME_SEPIA = "THEME_SEPIA";
public final static String THEME_AMBER = "THEME_AMBER";
//public final static String THEME_SEPIA = "THEME_SEPIA";
//public final static String THEME_AMBER = "THEME_AMBER";
public final static String THEME_DEFAULT = CommonActivity.THEME_LIGHT;
public static final int EXCERPT_MAX_LENGTH = 256;
@ -186,27 +186,27 @@ public class CommonActivity extends ActionBarActivity {
toast.show();
}
public boolean isDarkTheme() {
/* public boolean isDarkTheme() {
String theme = m_prefs.getString("theme", THEME_DEFAULT);
return theme.equals(THEME_DARK) || theme.equals(THEME_AMBER);
}
return theme.equals(THEME_DARK); || theme.equals(THEME_AMBER);
} */
protected void setAppTheme(SharedPreferences prefs) {
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
if (theme.equals(THEME_DARK)) {
setTheme(R.style.DarkTheme);
} else if (theme.equals(THEME_AMBER)) {
/* } else if (theme.equals(THEME_AMBER)) {
setTheme(R.style.AmberTheme);
} else if (theme.equals(THEME_SEPIA)) {
setTheme(R.style.SepiaTheme);
setTheme(R.style.SepiaTheme); */
} else {
setTheme(R.style.LightTheme);
}
}
protected void setDarkAppTheme(SharedPreferences prefs) {
/* protected void setDarkAppTheme(SharedPreferences prefs) {
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
if (theme.equals(THEME_AMBER)) {
@ -214,7 +214,7 @@ public class CommonActivity extends ActionBarActivity {
} else {
setTheme(R.style.DarkTheme);
}
}
} */
@SuppressWarnings("deprecation")
@SuppressLint("NewApi")

View File

@ -16,7 +16,7 @@ public class PreferencesActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
/* if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {

View File

@ -1,4 +1,5 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/article_fragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
@ -130,6 +131,7 @@
android:layout_gravity="bottom|right"
android:layout_marginRight="16dp"
android:layout_marginBottom="20dp"
app:floatingActionButtonColor="?colorAccent"
android:src="@drawable/ic_action_web_site"
/>

View File

@ -23,11 +23,13 @@
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp" >
android:layout_marginRight="16dp"
android:elevation="4dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:tint="?colorAccent"
android:src="@drawable/ic_account"
android:layout_gravity="center" />
</FrameLayout>

View File

@ -15,6 +15,7 @@
<ImageView
android:id="@+id/icon"
android:tint="?colorAccent"
android:layout_gravity="center_vertical"
android:layout_width="21dp"
android:layout_height="21dp"

View File

@ -2,14 +2,14 @@
<string-array name="pref_theme_names">
<item>@string/theme_light</item>
<item>@string/theme_dark</item>
<item>@string/theme_sepia</item>
<item>@string/theme_amber</item>
<!-- <item>@string/theme_sepia</item>
<item>@string/theme_amber</item> -->
</string-array>
<string-array name="pref_theme_values" translatable="false">
<item>THEME_LIGHT</item>
<item>THEME_DARK</item>
<item>THEME_SEPIA</item>
<item>THEME_AMBER</item>
<!-- <item>THEME_SEPIA</item>
<item>THEME_AMBER</item> -->
</string-array>
<string-array name="headline_mode_names">
<item>@string/headline_display_mode_default</item>

View File

@ -9,11 +9,11 @@
<item name="unreadCounterColor">#909090</item>
<item name="headlinesBackground">#f0f0f0</item>
<item name="articleBackground">@android:color/white</item>
<item name="headlineSelectedBackground">?feedsSelectedBackground</item>
<item name="headlineSelectedBackground">#cccccc</item>
<item name="headlineUnreadBackground">@android:color/white</item>
<item name="feedsSelectedBackground">#cccccc</item>
<item name="feedsSelectedBackground">@android:color/transparent</item>
<item name="feedlistTextColor">@android:color/primary_text_light</item>
<item name="feedlistSelectedTextColor">?feedlistTextColor</item>
<item name="feedlistSelectedTextColor">?colorAccent</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>
@ -35,7 +35,7 @@
<item name="colorPrimary">#6482af</item>
<item name="colorPrimaryDark">#526A8E</item>
<item name="colorAccent">?colorPrimary</item>
<item name="colorAccent">#F4511E</item>
<item name="ic_rss_box">@drawable/ic_rss_box_dark</item>
<item name="ic_rss">@drawable/ic_rss_dark</item>
@ -44,50 +44,6 @@
<item name="ic_star_outline">@drawable/ic_star_outline_dark</item>
</style>
<style name="SepiaTheme" parent="LightTheme">
<item name="feedlistBackground">#EAE2DC</item>
<item name="headlinesBackground">#EAE2DC</item>
<item name="feedlistTextColor">#35281C</item>
<item name="linkColor">?colorPrimary</item>
<item name="colorPrimary">#C46262</item>
<item name="colorPrimaryDark">#7F3F3F</item>
<item name="colorAccent">#E5B0A0</item>
</style>
<style name="AmberTheme" parent="DarkTheme">
<item name="articleHeader">@android:color/black</item>
<item name="articleNoteTextColor">?linkColor</item>
<item name="articleNoteBackground">#543800</item>
<item name="feedlistBackground">?colorPrimaryDark</item>
<item name="headlinesBackground">@android:color/black</item>
<item name="articleBackground">@android:color/black</item>
<item name="articleHeaderTextColor">?linkColor</item>
<item name="articleTextColor">#D2B944</item>
<item name="linkColor">?colorAccent</item>
<item name="feedsSelectedBackground">#30EACF4C</item>
<item name="unreadCounterColor">?colorAccent</item>
<item name="headlineUnreadTextColor">?linkColor</item>
<item name="headlineSelectedTextColor">?linkColor</item>
<item name="headlineExcerptTextColor">?linkColor</item>
<item name="headlineSecondaryTextColor">?linkColor</item>
<item name="headlineSelectedExcerptTextColor">?linkColor</item>
<item name="headlineSelectedSecondaryTextColor">?linkColor</item>
<item name="headlineUnreadBackground">@android:color/black</item>
<item name="headlineSelectedBackground">#30EACF4C</item>
<item name="headlineFooterColor">?colorAccent</item>
<item name="colorPrimary">@android:color/black</item>
<item name="colorPrimaryDark">@android:color/black</item>
<item name="colorAccent">#EACF4C</item>
</style>
<style name="DarkTheme" parent="Theme.AppCompat">
<item name="windowActionBarOverlay">true</item>
@ -101,7 +57,7 @@
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
<item name="headlineSelectedBackground">?feedsSelectedBackground</item>
<item name="headlineSelectedBackground">#1c1c1c</item>
<item name="headlineUnreadBackground">#101010</item>
<item name="linkColor">?colorPrimary</item>
<item name="loadingBackground">@android:color/black</item>
@ -112,8 +68,8 @@
<item name="feedlistBackground">#1c1d1e</item>
<item name="headlinesBackground">#1c1d1e</item>
<item name="articleBackground">#1c1d1e</item>
<item name="feedsSelectedBackground">#1c1c1c</item>
<item name="feedlistSelectedTextColor">?feedlistTextColor</item>
<item name="feedsSelectedBackground">@android:color/transparent</item>
<item name="feedlistSelectedTextColor">?colorAccent</item>
<item name="articleHeader">@android:color/transparent</item>
<item name="articleHeaderTextColor">@android:color/primary_text_dark</item>
<item name="floatingActionButtonStyle">@style/FabTheme</item>
@ -121,9 +77,9 @@
<item name="headlineFooterColor">?colorPrimary</item>
<item name="articleHeaderSeparator">@android:color/black</item>
<item name="colorPrimary">#51698E</item>
<item name="colorPrimaryDark">#445877</item>
<item name="colorAccent">#88b0f0</item>
<item name="colorPrimary">#607D8B</item>
<item name="colorPrimaryDark">#455A64</item>
<item name="colorAccent">#D84315</item>
<item name="ic_rss_box">@drawable/ic_rss_box</item>
<item name="ic_rss">@drawable/ic_rss</item>