change accentcolor to better conform with material design guidelines; remove amber and sepia themes
This commit is contained in:
parent
ac5e981cbc
commit
209b82a1da
@ -255,7 +255,7 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur
|
|||||||
m_prefs = PreferenceManager
|
m_prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(getApplicationContext());
|
.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
setDarkAppTheme(m_prefs);
|
setTheme(R.style.DarkTheme);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ public class CommonActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
public final static String THEME_DARK = "THEME_DARK";
|
public final static String THEME_DARK = "THEME_DARK";
|
||||||
public final static String THEME_LIGHT = "THEME_LIGHT";
|
public final static String THEME_LIGHT = "THEME_LIGHT";
|
||||||
public final static String THEME_SEPIA = "THEME_SEPIA";
|
//public final static String THEME_SEPIA = "THEME_SEPIA";
|
||||||
public final static String THEME_AMBER = "THEME_AMBER";
|
//public final static String THEME_AMBER = "THEME_AMBER";
|
||||||
public final static String THEME_DEFAULT = CommonActivity.THEME_LIGHT;
|
public final static String THEME_DEFAULT = CommonActivity.THEME_LIGHT;
|
||||||
|
|
||||||
public static final int EXCERPT_MAX_LENGTH = 256;
|
public static final int EXCERPT_MAX_LENGTH = 256;
|
||||||
@ -186,27 +186,27 @@ public class CommonActivity extends ActionBarActivity {
|
|||||||
toast.show();
|
toast.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDarkTheme() {
|
/* public boolean isDarkTheme() {
|
||||||
String theme = m_prefs.getString("theme", THEME_DEFAULT);
|
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) {
|
protected void setAppTheme(SharedPreferences prefs) {
|
||||||
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
|
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
|
||||||
|
|
||||||
if (theme.equals(THEME_DARK)) {
|
if (theme.equals(THEME_DARK)) {
|
||||||
setTheme(R.style.DarkTheme);
|
setTheme(R.style.DarkTheme);
|
||||||
} else if (theme.equals(THEME_AMBER)) {
|
/* } else if (theme.equals(THEME_AMBER)) {
|
||||||
setTheme(R.style.AmberTheme);
|
setTheme(R.style.AmberTheme);
|
||||||
} else if (theme.equals(THEME_SEPIA)) {
|
} else if (theme.equals(THEME_SEPIA)) {
|
||||||
setTheme(R.style.SepiaTheme);
|
setTheme(R.style.SepiaTheme); */
|
||||||
} else {
|
} else {
|
||||||
setTheme(R.style.LightTheme);
|
setTheme(R.style.LightTheme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setDarkAppTheme(SharedPreferences prefs) {
|
/* protected void setDarkAppTheme(SharedPreferences prefs) {
|
||||||
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
|
String theme = prefs.getString("theme", CommonActivity.THEME_DEFAULT);
|
||||||
|
|
||||||
if (theme.equals(THEME_AMBER)) {
|
if (theme.equals(THEME_AMBER)) {
|
||||||
@ -214,7 +214,7 @@ public class CommonActivity extends ActionBarActivity {
|
|||||||
} else {
|
} else {
|
||||||
setTheme(R.style.DarkTheme);
|
setTheme(R.style.DarkTheme);
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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:id="@+id/article_fragment"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -130,6 +131,7 @@
|
|||||||
android:layout_gravity="bottom|right"
|
android:layout_gravity="bottom|right"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
|
app:floatingActionButtonColor="?colorAccent"
|
||||||
android:src="@drawable/ic_action_web_site"
|
android:src="@drawable/ic_action_web_site"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -23,11 +23,13 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginRight="16dp" >
|
android:layout_marginRight="16dp"
|
||||||
|
android:elevation="4dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
|
android:tint="?colorAccent"
|
||||||
android:src="@drawable/ic_account"
|
android:src="@drawable/ic_account"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
|
android:tint="?colorAccent"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_width="21dp"
|
android:layout_width="21dp"
|
||||||
android:layout_height="21dp"
|
android:layout_height="21dp"
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
<string-array name="pref_theme_names">
|
<string-array name="pref_theme_names">
|
||||||
<item>@string/theme_light</item>
|
<item>@string/theme_light</item>
|
||||||
<item>@string/theme_dark</item>
|
<item>@string/theme_dark</item>
|
||||||
<item>@string/theme_sepia</item>
|
<!-- <item>@string/theme_sepia</item>
|
||||||
<item>@string/theme_amber</item>
|
<item>@string/theme_amber</item> -->
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="pref_theme_values" translatable="false">
|
<string-array name="pref_theme_values" translatable="false">
|
||||||
<item>THEME_LIGHT</item>
|
<item>THEME_LIGHT</item>
|
||||||
<item>THEME_DARK</item>
|
<item>THEME_DARK</item>
|
||||||
<item>THEME_SEPIA</item>
|
<!-- <item>THEME_SEPIA</item>
|
||||||
<item>THEME_AMBER</item>
|
<item>THEME_AMBER</item> -->
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="headline_mode_names">
|
<string-array name="headline_mode_names">
|
||||||
<item>@string/headline_display_mode_default</item>
|
<item>@string/headline_display_mode_default</item>
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
<item name="unreadCounterColor">#909090</item>
|
<item name="unreadCounterColor">#909090</item>
|
||||||
<item name="headlinesBackground">#f0f0f0</item>
|
<item name="headlinesBackground">#f0f0f0</item>
|
||||||
<item name="articleBackground">@android:color/white</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="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="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="headlineUnreadTextColor">@android:color/primary_text_light</item>
|
||||||
<item name="headlineSelectedTextColor">@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="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<item name="colorPrimary">#6482af</item>
|
<item name="colorPrimary">#6482af</item>
|
||||||
<item name="colorPrimaryDark">#526A8E</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_box">@drawable/ic_rss_box_dark</item>
|
||||||
<item name="ic_rss">@drawable/ic_rss_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>
|
<item name="ic_star_outline">@drawable/ic_star_outline_dark</item>
|
||||||
</style>
|
</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">
|
<style name="DarkTheme" parent="Theme.AppCompat">
|
||||||
<item name="windowActionBarOverlay">true</item>
|
<item name="windowActionBarOverlay">true</item>
|
||||||
|
|
||||||
@ -101,7 +57,7 @@
|
|||||||
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
|
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
|
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
|
||||||
<item name="headlineSelectedBackground">?feedsSelectedBackground</item>
|
<item name="headlineSelectedBackground">#1c1c1c</item>
|
||||||
<item name="headlineUnreadBackground">#101010</item>
|
<item name="headlineUnreadBackground">#101010</item>
|
||||||
<item name="linkColor">?colorPrimary</item>
|
<item name="linkColor">?colorPrimary</item>
|
||||||
<item name="loadingBackground">@android:color/black</item>
|
<item name="loadingBackground">@android:color/black</item>
|
||||||
@ -112,8 +68,8 @@
|
|||||||
<item name="feedlistBackground">#1c1d1e</item>
|
<item name="feedlistBackground">#1c1d1e</item>
|
||||||
<item name="headlinesBackground">#1c1d1e</item>
|
<item name="headlinesBackground">#1c1d1e</item>
|
||||||
<item name="articleBackground">#1c1d1e</item>
|
<item name="articleBackground">#1c1d1e</item>
|
||||||
<item name="feedsSelectedBackground">#1c1c1c</item>
|
<item name="feedsSelectedBackground">@android:color/transparent</item>
|
||||||
<item name="feedlistSelectedTextColor">?feedlistTextColor</item>
|
<item name="feedlistSelectedTextColor">?colorAccent</item>
|
||||||
<item name="articleHeader">@android:color/transparent</item>
|
<item name="articleHeader">@android:color/transparent</item>
|
||||||
<item name="articleHeaderTextColor">@android:color/primary_text_dark</item>
|
<item name="articleHeaderTextColor">@android:color/primary_text_dark</item>
|
||||||
<item name="floatingActionButtonStyle">@style/FabTheme</item>
|
<item name="floatingActionButtonStyle">@style/FabTheme</item>
|
||||||
@ -121,9 +77,9 @@
|
|||||||
<item name="headlineFooterColor">?colorPrimary</item>
|
<item name="headlineFooterColor">?colorPrimary</item>
|
||||||
<item name="articleHeaderSeparator">@android:color/black</item>
|
<item name="articleHeaderSeparator">@android:color/black</item>
|
||||||
|
|
||||||
<item name="colorPrimary">#51698E</item>
|
<item name="colorPrimary">#607D8B</item>
|
||||||
<item name="colorPrimaryDark">#445877</item>
|
<item name="colorPrimaryDark">#455A64</item>
|
||||||
<item name="colorAccent">#88b0f0</item>
|
<item name="colorAccent">#D84315</item>
|
||||||
|
|
||||||
<item name="ic_rss_box">@drawable/ic_rss_box</item>
|
<item name="ic_rss_box">@drawable/ic_rss_box</item>
|
||||||
<item name="ic_rss">@drawable/ic_rss</item>
|
<item name="ic_rss">@drawable/ic_rss</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user