Merge pull request #1177 from owncloud/notification_coloring
authorDavid A. Velasco <dvelasco@owncloud.com>
Thu, 22 Oct 2015 07:10:10 +0000 (09:10 +0200)
committerDavid A. Velasco <dvelasco@owncloud.com>
Thu, 22 Oct 2015 07:10:10 +0000 (09:10 +0200)
Add ownCloud color to notifications for lollipop

owncloud-android-library
res/layout-land/account_setup.xml
res/layout/account_setup.xml
res/values/colors.xml
src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java
src/com/owncloud/android/syncadapter/FileSyncAdapter.java

index 5985ba9..ecc3415 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5985ba9a9fd9a208b2a09ee7809949874e0c3a97
+Subproject commit ecc3415e3e3c13fa8f73fdd51a88c1ab7087b199
index 477011d..347568e 100644 (file)
@@ -95,7 +95,6 @@
                                                android:inputType="textUri"\r
                                                android:drawablePadding="5dp"\r
                                                android:paddingRight="55dp"\r
-                                               android:textColor="@color/primary"\r
                                                android:textColorHint="@color/login_text_hint_color"\r
                                                android:contentDescription="@string/auth_host_address"\r
                                                >\r
                                        android:text="@string/oauth2_url_endpoint_auth"\r
                                        android:singleLine="true"\r
                                        android:inputType="textUri"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:visibility="gone">\r
                                </EditText>            \r
                                        android:text="@string/oauth2_url_endpoint_access"\r
                                        android:singleLine="true"\r
                                        android:inputType="textUri"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:visibility="gone">\r
                                        <requestFocus />\r
                                        android:ems="10"\r
                                        android:hint="@string/auth_username"\r
                                        android:inputType="textNoSuggestions"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:contentDescription="@string/auth_username"\r
                                        />\r
                                        android:hint="@string/auth_password"\r
                                        android:inputType="textPassword"\r
                                        android:drawablePadding="5dp"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        />\r
                        \r
index 876d834..3a8655f 100644 (file)
@@ -82,7 +82,6 @@
                                android:inputType="textUri"\r
                                android:drawablePadding="5dp"\r
                                android:paddingRight="55dp"\r
-                android:textColor="@color/primary"\r
                 android:textColorHint="@color/login_text_hint_color"\r
                                android:contentDescription="@string/auth_host_address"\r
                 >\r
             android:layout_height="wrap_content"\r
             android:ems="10"\r
                        android:enabled="false"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:text="@string/oauth2_url_endpoint_auth"\r
             android:singleLine="true"\r
             android:text="@string/oauth2_url_endpoint_access"\r
             android:singleLine="true"\r
             android:inputType="textUri"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:visibility="gone"/>\r
 \r
             android:ems="10"\r
             android:hint="@string/auth_username"\r
             android:inputType="textNoSuggestions"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:contentDescription="@string/auth_username"\r
             />\r
                    android:ems="10"\r
                    android:hint="@string/auth_password"\r
                    android:inputType="textPassword"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
                    android:contentDescription="@string/auth_password"\r
             />\r
index 8ca0a4e..dab9b3f 100644 (file)
@@ -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>
 
index c71b35f..5dd043f 100644 (file)
@@ -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));
         }
     }
     
index 43ddae3..7f8b0db 100644 (file)
@@ -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;
     }