Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4101)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java

Issue 2892673002: [Home] Fix placeholder color for incognito (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
index 41e99379aa30ff92c94a706b9c8d92f9e348a4c9..6d4ee5ef1254dcabd7f2731c54b43d72c58c742e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
@@ -236,6 +236,11 @@ public class BottomSheet
boolean isUsingLightToolbarTheme();
/**
+ * @return Whether or not the content is themed for incognito (i.e. dark colors).
+ */
+ boolean isIncognitoThemedContent();
+
+ /**
* @return The vertical scroll offset of the content view.
*/
int getVerticalScrollOffset();
@@ -683,8 +688,12 @@ public class BottomSheet
// Temporarily make the background of the toolbar holder a solid color so the transition
// doesn't appear to show a hole in the toolbar.
- mToolbarHolder.setBackgroundColor(
- ApiCompatibilityUtils.getColor(getResources(), R.color.default_primary_color));
+ int colorId = content.isIncognitoThemedContent() ? R.color.incognito_primary_color
+ : R.color.default_primary_color;
+ mToolbarHolder.setBackgroundColor(ApiCompatibilityUtils.getColor(getResources(), colorId));
+ mBottomSheetContentContainer.setBackgroundColor(
+ ApiCompatibilityUtils.getColor(getResources(), colorId));
+
mContentSwapAnimatorSet.playTogether(animators);
mContentSwapAnimatorSet.start();

Powered by Google App Engine
This is Rietveld 408576698