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

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

Issue 1962063002: Revert 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 ()));
63 } 62 }
64 63
65 /** 64 /**
66 * Enables drawing a shadow at the bottom of the view when the view's conten t extends beyond 65 * Enables drawing a shadow at the bottom of the view when the view's conten t extends beyond
67 * the bottom of the view. This is exactly the same as a fading edge, except that the shadow 66 * the bottom of the view. This is exactly the same as a fading edge, except that the shadow
68 * color can have an alpha component, whereas a fading edge color must be op aque. 67 * color can have an alpha component, whereas a fading edge color must be op aque.
69 * 68 *
70 * @param shadowColor The color of the shadow, e.g. 0x11000000. 69 * @param shadowColor The color of the shadow, e.g. 0x11000000.
71 */ 70 */
72 public void enableBottomShadow(int shadowColor) { 71 public void enableBottomShadow(int shadowColor) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (mFadingShadow != null) { 153 if (mFadingShadow != null) {
155 setVerticalFadingEdgeEnabled(true); 154 setVerticalFadingEdgeEnabled(true);
156 float shadowStrength = getBottomFadingEdgeStrength(); 155 float shadowStrength = getBottomFadingEdgeStrength();
157 float shadowHeight = getVerticalFadingEdgeLength(); 156 float shadowHeight = getVerticalFadingEdgeLength();
158 setVerticalFadingEdgeEnabled(false); 157 setVerticalFadingEdgeEnabled(false);
159 mFadingShadow.drawShadow(this, canvas, FadingShadow.POSITION_BOTTOM, 158 mFadingShadow.drawShadow(this, canvas, FadingShadow.POSITION_BOTTOM,
160 shadowHeight, shadowStrength); 159 shadowHeight, shadowStrength);
161 } 160 }
162 } 161 }
163 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698