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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageScrollView.java

Issue 1958233002: Reland of Update NTP to new material design spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.ntp; 5 package org.chromium.chrome.browser.ntp;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 mGestureDetector = new GestureDetector( 53 mGestureDetector = new GestureDetector(
54 getContext(), new GestureDetector.SimpleOnGestureListener() { 54 getContext(), new GestureDetector.SimpleOnGestureListener() {
55 @Override 55 @Override
56 public boolean onSingleTapUp(MotionEvent e) { 56 public boolean onSingleTapUp(MotionEvent e) {
57 boolean retVal = super.onSingleTapUp(e); 57 boolean retVal = super.onSingleTapUp(e);
58 requestFocus(); 58 requestFocus();
59 return retVal; 59 return retVal;
60 } 60 }
61 }); 61 });
62 setBackgroundColor(NtpColorUtils.getBackgroundColorResource(getResources ()));
62 } 63 }
63 64
64 /** 65 /**
65 * Enables drawing a shadow at the bottom of the view when the view's conten t extends beyond 66 * Enables drawing a shadow at the bottom of the view when the view's conten t extends beyond
66 * the bottom of the view. This is exactly the same as a fading edge, except that the shadow 67 * the bottom of the view. This is exactly the same as a fading edge, except that the shadow
67 * color can have an alpha component, whereas a fading edge color must be op aque. 68 * color can have an alpha component, whereas a fading edge color must be op aque.
68 * 69 *
69 * @param shadowColor The color of the shadow, e.g. 0x11000000. 70 * @param shadowColor The color of the shadow, e.g. 0x11000000.
70 */ 71 */
71 public void enableBottomShadow(int shadowColor) { 72 public void enableBottomShadow(int shadowColor) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 if (mFadingShadow != null) { 154 if (mFadingShadow != null) {
154 setVerticalFadingEdgeEnabled(true); 155 setVerticalFadingEdgeEnabled(true);
155 float shadowStrength = getBottomFadingEdgeStrength(); 156 float shadowStrength = getBottomFadingEdgeStrength();
156 float shadowHeight = getVerticalFadingEdgeLength(); 157 float shadowHeight = getVerticalFadingEdgeLength();
157 setVerticalFadingEdgeEnabled(false); 158 setVerticalFadingEdgeEnabled(false);
158 mFadingShadow.drawShadow(this, canvas, FadingShadow.POSITION_BOTTOM, 159 mFadingShadow.drawShadow(this, canvas, FadingShadow.POSITION_BOTTOM,
159 shadowHeight, shadowStrength); 160 shadowHeight, shadowStrength);
160 } 161 }
161 } 162 }
162 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698