-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ownCloud color to notifications for lollipop #1177
Conversation
…or progress bar and icon background
Code looks good 👍 |
👍 |
@@ -55,7 +55,8 @@ | |||
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndyScherzinger could it be possible to use this color https://github.com/owncloud/android/blob/master/res/values/setup.xml#L34 instead of the color.primary? The reason is because we have some branded apps and we need this change to bit there too.
@jancborchardt @MTRichards what do you think? what Andy has modified is the background color of the notification image, I am suggesting to use the same one that it´s used on the top bar of the app
@AndyScherzinger please, don´t modify till we have their input 😸 thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rperezb primary is the action bar color :) - with the move to material design the primary color defines the color of the action bar. the color you referred to isn't used anymore in the app. So this is right now legacy code looking at the android app but might still be used by other third party apps who haven't moved to material with the AppCompat implementation yet.
In case we want to define this for third party apps also would mean we would have to move the primary color etc to the setup.xml file
Besides this wouldn't have any impact on branded apps since the notifications are part of the app thus as long as other apps don't set the color exactly the way we would do now in our own code this wouldn't have any impact on their app's notifications :(
ummm, not sure, using this branch. If I modify the color: https://github.com/owncloud/android/blob/master/res/values/setup.xml#L34 the top bar is modified, for instance: Yes, notifications are part of the app, however, we modify the image used on the notifications so that in some cases other images but the ownCloud regular ones are used. In this branch we are forcing to have the color.primary as background color and sometimes, this is not the expected one, we´d rather to have some kind of flexibility here. thanks! |
Argh, now I found the issue.... this depends on the android version (could consider it a bug in my implementation). The actionbar uses the color-id you mentioned anything else doesn't (as in uses the primary color). So my suggestion is: I will "map" the primary color (material design id) to the color-id you mentioned above and from there simply work with the primary, so whenever you change the color you mentioned above it will also work throughout the other definitions :) |
sold! I talked offline with @MTRichards and he agrees in that color as a based one too :) Great team work! (as usual) |
Thanks @AndyScherzinger and @rperezb |
…ification_coloring
…olor to enable proper color manipulation. Technical debt: setup should rename the actionbar_start_color (and actionbar_end_color) since it is basically the primary-oiiod value due to material design terms.
@rperezb @MTRichards I committed the change thus you should now be able to change the color which would also have an impact on the notification color (completely untested atm).
So my proposal would now be:
Any comments on this approach @rperezb @MTRichards ? |
A great teamwork I think. Matt Richards
|
Nice! Just one tiny detail: The cloud is not centered visually in the circle. It needs to be moved a bit up and to the right – just a few pixels. |
@jancborchardt I can't fix that ;) - The notification is a Android standard one so the positioning of the cloud depends on the positioning of the "cloud" in the png file itself. The icon within the notification is also the one used by android to be displayed in the system bar. |
Thanks a lot @AndyScherzinger Besides, in this branch you have modified the color of the text on the login screen: Which it´s perfect! it was something that we wanted to do 💃 Then, I'll check your comment, #1177 (comment) |
Glad I could help. The login screen change is by definition. The text color is based on the colored primary. So as soon as you merge this branch and #1090 this will also impact the primary action button :) |
Keep in mind there’s a difference between background color and primary action button color though. :)
Input field text should not really be colored, that looks kind of strange, no? |
Yes, you are right. :) |
Shouldn’t the text field color just be default (black or off-black I guess)? Otherwise it’s going to look strange for some brandings I guess, especially when they have a light or neon-like header color (which I don’t recommend in the first place, but well). |
…ification_coloring
So how to move on with this PR? |
As soon as the input field text is fixed, it’s good to go from the design side. : ) |
@rperezb @Dianafg76 I changed the input field coloring according to the @jancborchardt's feedback. Sorry for taking that away from you. In case this is something you need in a different way and discussed with @jancborchardt I can implement it, but in a different/new PR. Since bloating the PRs lowers the change to get the PR merged and also raises the time it usually takes to get it merged by the team. |
Code ok 👍 Thanks, @AndyScherzinger |
Add ownCloud color to notifications for lollipop
You are welcome, always a pleasure @davivel :) |
…for progress bar and icon background.
It is quite a details thing, see screenshot. The color setting on the NotificationCompat.Builder just has an effect on Lollipop devices and up.
Please Review:
Design: @jancborchardt
Code: @davivel @masensio @tobiasKaminsky