use dedicated colors for primary and primary_dark

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/services/NotificationService.java | 2 
src/main/java/eu/siacs/conversations/ui/XmppActivity.java              | 2 
src/main/res/layout/conversation_list_row.xml                          | 2 
src/main/res/values-v21/themes.xml                                     | 4 
src/main/res/values/colors.xml                                         | 5 
src/main/res/values/themes.xml                                         | 4 
6 files changed, 10 insertions(+), 9 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/services/NotificationService.java 🔗

@@ -178,7 +178,7 @@ public class NotificationService {
 	}
 
 	private void setNotificationColor(final Builder mBuilder) {
-		mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.green500));
+		mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.primary));
 	}
 
 	private void updateNotification(final boolean notify) {

src/main/java/eu/siacs/conversations/ui/XmppActivity.java 🔗

@@ -354,7 +354,7 @@ public abstract class XmppActivity extends Activity {
 		mColorRed = getResources().getColor(R.color.red800);
 		mColorOrange = getResources().getColor(R.color.orange500);
 		mColorGreen = getResources().getColor(R.color.green500);
-		mPrimaryColor = getResources().getColor(R.color.green500);
+		mPrimaryColor = getResources().getColor(R.color.primary);
 		mPrimaryBackgroundColor = getResources().getColor(R.color.grey50);
 		mSecondaryBackgroundColor = getResources().getColor(R.color.grey200);
 		this.mTheme = findTheme();

src/main/res/layout/conversation_list_row.xml 🔗

@@ -7,7 +7,7 @@
 	<View
 		android:layout_width="fill_parent"
 		android:layout_height="fill_parent"
-		android:background="@color/green500"/>
+		android:background="@color/primary"/>
 
 	<FrameLayout
 		android:id="@+id/swipeable_item"

src/main/res/values-v21/themes.xml 🔗

@@ -2,8 +2,8 @@
 <resources>
 
     <style name="ConversationsTheme" parent="@android:style/Theme.Material.Light.DarkActionBar">
-        <item name="android:colorPrimary">@color/green500</item>
-        <item name="android:colorPrimaryDark">@color/green700</item>
+        <item name="android:colorPrimary">@color/primary</item>
+        <item name="android:colorPrimaryDark">@color/primary_dark</item>
         <item name="android:colorAccent">@color/accent</item>
 
         <item name="android:windowActionModeOverlay">true</item>

src/main/res/values/colors.xml 🔗

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-	<color name="green500">#ff259b24</color>
-	<color name="green700">#ff0a7e07</color>
+	<color name="primary">#ff259b24</color>
+	<color name="primary_dark">#ff0a7e07</color>
 	<color name="accent">#ff0091ea</color>
 	<color name="black87">#de000000</color>
 	<color name="black54">#8a000000</color>
@@ -16,4 +16,5 @@
 	<color name="red500">#fff44336</color>
 	<color name="red800">#ffc62828</color>
 	<color name="orange500">#ffff9800</color>
+	<color name="green500">#ff259b24</color>
 </resources>

src/main/res/values/themes.xml 🔗

@@ -39,8 +39,8 @@
     </style>
 
     <style name="ConversationsActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
-        <item name="android:background">@color/green500</item>
-        <item name="android:backgroundStacked">@color/green700</item>
+        <item name="android:background">@color/primary</item>
+        <item name="android:backgroundStacked">@color/primary_dark</item>
         <item name="android:displayOptions">showHome|homeAsUp|showTitle</item>
         <item name="android:icon">@android:color/transparent</item>
     </style>