Browse Source

Merge pull request #1177 from owncloud/notification_coloring

Add ownCloud color to notifications for lollipop
David A. Velasco 9 years ago
parent
commit
08443f90c5

+ 1 - 1
owncloud-android-library

@@ -1 +1 @@
-Subproject commit 5985ba9a9fd9a208b2a09ee7809949874e0c3a97
+Subproject commit ecc3415e3e3c13fa8f73fdd51a88c1ab7087b199

+ 0 - 5
res/layout-land/account_setup.xml

@@ -95,7 +95,6 @@
 						android:inputType="textUri"
 						android:drawablePadding="5dp"
 						android:paddingRight="55dp"
-						android:textColor="@color/primary"
 						android:textColorHint="@color/login_text_hint_color"
 						android:contentDescription="@string/auth_host_address"
 						>
@@ -153,7 +152,6 @@
 					android:text="@string/oauth2_url_endpoint_auth"
 					android:singleLine="true"
 					android:inputType="textUri"
-					android:textColor="@color/primary"
 					android:textColorHint="@color/login_text_hint_color"
 					android:visibility="gone">
 				</EditText>            
@@ -167,7 +165,6 @@
 					android:text="@string/oauth2_url_endpoint_access"
 					android:singleLine="true"
 					android:inputType="textUri"
-					android:textColor="@color/primary"
 					android:textColorHint="@color/login_text_hint_color"
 					android:visibility="gone">
 					<requestFocus />
@@ -180,7 +177,6 @@
 					android:ems="10"
 					android:hint="@string/auth_username"
 					android:inputType="textNoSuggestions"
-					android:textColor="@color/primary"
 					android:textColorHint="@color/login_text_hint_color"
 					android:contentDescription="@string/auth_username"
 					/>
@@ -193,7 +189,6 @@
 					android:hint="@string/auth_password"
 					android:inputType="textPassword"
 					android:drawablePadding="5dp"
-					android:textColor="@color/primary"
 					android:textColorHint="@color/login_text_hint_color"
 					/>
 		        

+ 0 - 5
res/layout/account_setup.xml

@@ -82,7 +82,6 @@
 				android:inputType="textUri"
 				android:drawablePadding="5dp"
 				android:paddingRight="55dp"
-                android:textColor="@color/primary"
                 android:textColorHint="@color/login_text_hint_color"
 				android:contentDescription="@string/auth_host_address"
                 >
@@ -137,7 +136,6 @@
             android:layout_height="wrap_content"
             android:ems="10"
 			android:enabled="false"
-            android:textColor="@color/primary"
             android:textColorHint="@color/login_text_hint_color"
             android:text="@string/oauth2_url_endpoint_auth"
             android:singleLine="true"
@@ -154,7 +152,6 @@
             android:text="@string/oauth2_url_endpoint_access"
             android:singleLine="true"
             android:inputType="textUri"
-            android:textColor="@color/primary"
             android:textColorHint="@color/login_text_hint_color"
             android:visibility="gone"/>
 
@@ -165,7 +162,6 @@
             android:ems="10"
             android:hint="@string/auth_username"
             android:inputType="textNoSuggestions"
-            android:textColor="@color/primary"
             android:textColorHint="@color/login_text_hint_color"
             android:contentDescription="@string/auth_username"
             />
@@ -178,7 +174,6 @@
 		    android:ems="10"
 		    android:hint="@string/auth_password"
 		    android:inputType="textPassword"
-            android:textColor="@color/primary"
             android:textColorHint="@color/login_text_hint_color"
 		    android:contentDescription="@string/auth_password"
             />

+ 1 - 1
res/values/colors.xml

@@ -19,7 +19,7 @@
 -->
 <resources>
 
-    <color name="owncloud_blue">#1D2D44</color>
+    <color name="owncloud_blue">@color/actionbar_start_color</color>
     <color name="owncloud_blue_accent">#35537A</color>
     <color name="owncloud_blue_bright">#00ddff</color>
 

+ 2 - 1
src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java

@@ -55,7 +55,8 @@ public class NotificationBuilderWithProgressBar extends NotificationCompat.Build
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
             return new NotificationBuilderWithProgressBar(context); 
         } else {
-            return new NotificationCompat.Builder(context);
+            return new NotificationCompat.Builder(context).
+                    setColor(context.getResources().getColor(R.color.primary));
         }
     }
     

+ 1 - 0
src/com/owncloud/android/syncadapter/FileSyncAdapter.java

@@ -526,6 +526,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
     private NotificationCompat.Builder createNotificationBuilder() {
         NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getContext());
         notificationBuilder.setSmallIcon(R.drawable.notification_icon).setAutoCancel(true);
+        notificationBuilder.setColor(getContext().getResources().getColor(R.color.primary));
         return notificationBuilder;
     }