[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Consolidation: normalize usage of background / paper color t...

2017-09-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/380826 )

Change subject: Consolidation: normalize usage of background / paper color 
throughout.
..


Consolidation: normalize usage of background / paper color throughout.

One of the major design themes that has emerged from the consolidation is
the following:

- All activities shall have a default background color of base80 (light) /
  base10 (dark)
- All components (controls, cards, list items) that appear in an activity
  shall have a background of "paper_color", which is base100/base14.

This patch sweeps through all activities/framents and normalizes (and
corrects where necessary) their usages of these two colors.

This also consolidates the unnecessary "base_color" style, being
equivalent to windowBackground.

Change-Id: Iaed1ad7016944a4c21c96dfe7ac0a5cbca31d6f2
---
M app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
M app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
M 
app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardItemView.java
M app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
M app/src/main/java/org/wikipedia/offline/RemoteCompilationsFragment.java
M app/src/main/res/layout/activity_create_account.xml
M app/src/main/res/layout/activity_edit_section.xml
M app/src/main/res/layout/activity_langlinks.xml
M app/src/main/res/layout/activity_login.xml
M app/src/main/res/layout/dialog_preference_languages.xml
M app/src/main/res/layout/fragment_compilation_detail.xml
M app/src/main/res/layout/fragment_description_edit.xml
M app/src/main/res/layout/fragment_description_edit_help.xml
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/layout/fragment_history.xml
M app/src/main/res/layout/fragment_local_compilations.xml
M app/src/main/res/layout/fragment_page.xml
M app/src/main/res/layout/fragment_preview_edit.xml
M app/src/main/res/layout/fragment_reading_list.xml
M app/src/main/res/layout/fragment_reading_lists.xml
M app/src/main/res/layout/fragment_remote_compilations.xml
M app/src/main/res/layout/fragment_search.xml
M app/src/main/res/layout/fragment_search_recent.xml
M app/src/main/res/layout/fragment_search_results.xml
M app/src/main/res/layout/inflate_create_account_onboarding.xml
M app/src/main/res/layout/item_language_list_entry.xml
M app/src/main/res/layout/item_page_list_entry.xml
M app/src/main/res/layout/item_reading_list.xml
M app/src/main/res/layout/item_search_recent.xml
M app/src/main/res/layout/item_search_result.xml
M app/src/main/res/layout/view_explore_overflow.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
34 files changed, 61 insertions(+), 63 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mholloway: Looks good to me, approved



diff --git a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java 
b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
index cbb2eb9..231d6e0 100644
--- a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
@@ -53,7 +53,7 @@
 }
 
 private void resetBackgroundColor() {
-setBackgroundColor(ResourceUtil.getThemedColor(getContext(), 
R.attr.cardBackgroundColor));
+setBackgroundColor(ResourceUtil.getThemedColor(getContext(), 
R.attr.paper_color));
 }
 
 private class ImageLoadListener implements 
FaceAndColorDetectImageView.OnImageLoadListener {
@@ -81,7 +81,7 @@
 private void animateBackgroundColor(@NonNull View view, @ColorInt int 
targetColor) {
 final int animDuration = 500;
 ObjectAnimator animator = ObjectAnimator.ofInt(view, 
"backgroundColor",
-ResourceUtil.getThemedColor(getContext(), 
R.attr.cardBackgroundColor),
+ResourceUtil.getThemedColor(getContext(), 
R.attr.paper_color),
 targetColor);
 animator.setEvaluator(new ArgbEvaluator());
 animator.setDuration(animDuration);
diff --git a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java 
b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
index 1b57372..656ddcb 100644
--- a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
@@ -15,7 +15,7 @@
 
 public DefaultFeedCardView(Context context) {
 super(context);
-setCardBackgroundColor(ResourceUtil.getThemedColor(context, 
R.attr.cardBackgroundColor));
+setCardBackgroundColor(ResourceUtil.getThemedColor(context, 
R.attr.paper_color));
 }
 
 @Override public void setCard(@NonNull T card) {
diff --git 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardItemView.java
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Consolidation: normalize usage of background / paper color t...

2017-09-26 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380826 )

Change subject: Consolidation: normalize usage of background / paper color 
throughout.
..

Consolidation: normalize usage of background / paper color throughout.

One of the major design themes that has emerged from the consolidation is
the following:

- All activities shall have a default background color of base80 (light) /
  base10 (dark)
- All components (controls, cards, list items) that appear in an activity
  shall have a background of "paper_color", which is base100/base14.

This patch sweeps through all activities/framents and normalizes (and
corrects where necessary) their usages of these two colors.

This also consolidates the unnecessary "base_color" style, being
equivalent to windowBackground.

Change-Id: Iaed1ad7016944a4c21c96dfe7ac0a5cbca31d6f2
---
M app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
M app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
M 
app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardItemView.java
M app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
M app/src/main/java/org/wikipedia/offline/RemoteCompilationsFragment.java
M app/src/main/res/layout/activity_create_account.xml
M app/src/main/res/layout/activity_edit_section.xml
M app/src/main/res/layout/activity_langlinks.xml
M app/src/main/res/layout/activity_login.xml
M app/src/main/res/layout/dialog_preference_languages.xml
M app/src/main/res/layout/fragment_compilation_detail.xml
M app/src/main/res/layout/fragment_description_edit.xml
M app/src/main/res/layout/fragment_description_edit_help.xml
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/layout/fragment_history.xml
M app/src/main/res/layout/fragment_local_compilations.xml
M app/src/main/res/layout/fragment_page.xml
M app/src/main/res/layout/fragment_preview_edit.xml
M app/src/main/res/layout/fragment_reading_list.xml
M app/src/main/res/layout/fragment_reading_lists.xml
M app/src/main/res/layout/fragment_remote_compilations.xml
M app/src/main/res/layout/fragment_search.xml
M app/src/main/res/layout/fragment_search_recent.xml
M app/src/main/res/layout/fragment_search_results.xml
M app/src/main/res/layout/inflate_create_account_onboarding.xml
M app/src/main/res/layout/item_language_list_entry.xml
M app/src/main/res/layout/item_page_list_entry.xml
M app/src/main/res/layout/item_reading_list.xml
M app/src/main/res/layout/item_search_recent.xml
M app/src/main/res/layout/item_search_result.xml
M app/src/main/res/layout/view_explore_overflow.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
34 files changed, 61 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/26/380826/1

diff --git a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java 
b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
index cbb2eb9..231d6e0 100644
--- a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
@@ -53,7 +53,7 @@
 }
 
 private void resetBackgroundColor() {
-setBackgroundColor(ResourceUtil.getThemedColor(getContext(), 
R.attr.cardBackgroundColor));
+setBackgroundColor(ResourceUtil.getThemedColor(getContext(), 
R.attr.paper_color));
 }
 
 private class ImageLoadListener implements 
FaceAndColorDetectImageView.OnImageLoadListener {
@@ -81,7 +81,7 @@
 private void animateBackgroundColor(@NonNull View view, @ColorInt int 
targetColor) {
 final int animDuration = 500;
 ObjectAnimator animator = ObjectAnimator.ofInt(view, 
"backgroundColor",
-ResourceUtil.getThemedColor(getContext(), 
R.attr.cardBackgroundColor),
+ResourceUtil.getThemedColor(getContext(), 
R.attr.paper_color),
 targetColor);
 animator.setEvaluator(new ArgbEvaluator());
 animator.setDuration(animDuration);
diff --git a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java 
b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
index 1b57372..656ddcb 100644
--- a/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/DefaultFeedCardView.java
@@ -15,7 +15,7 @@
 
 public DefaultFeedCardView(Context context) {
 super(context);
-setCardBackgroundColor(ResourceUtil.getThemedColor(context, 
R.attr.cardBackgroundColor));
+setCardBackgroundColor(ResourceUtil.getThemedColor(context, 
R.attr.paper_color));
 }
 
 @Override public void setCard(@NonNull T card) {
diff --git 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardItemView.java