Index: chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRecyclerView.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRecyclerView.java |
index 672e674e8ba65f226a5d6841b8f2b0e107e1002e..16d218f48055ba81578c23852bbd451cc1e670da 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRecyclerView.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRecyclerView.java |
@@ -17,6 +17,7 @@ import android.support.v7.view.ContextThemeWrapper; |
import android.support.v7.widget.LinearLayoutManager; |
import android.support.v7.widget.RecyclerView; |
import android.support.v7.widget.helper.ItemTouchHelper; |
+import android.util.AttributeSet; |
import android.view.GestureDetector; |
import android.view.MotionEvent; |
import android.view.View; |
@@ -54,8 +55,8 @@ public class SuggestionsRecyclerView extends RecyclerView implements TouchDisabl |
public static final NewTabPageViewHolder.PartialBindCallback RESET_FOR_DISMISS_CALLBACK = |
new ResetForDismissCallback(); |
- private final GestureDetector mGestureDetector; |
- private final LinearLayoutManager mLayoutManager; |
+ private GestureDetector mGestureDetector; |
+ private LinearLayoutManager mLayoutManager; |
/** |
* Total height of the items being dismissed. Tracked to allow the bottom space to compensate |
@@ -73,9 +74,17 @@ public class SuggestionsRecyclerView extends RecyclerView implements TouchDisabl |
/** Whether the RecyclerView and its children should react to touch events. */ |
private boolean mTouchEnabled = true; |
+ public SuggestionsRecyclerView(Context context, AttributeSet attrs) { |
gone
2017/03/28 20:21:07
Put this under the other one, make the other one c
Theresa
2017/03/28 23:10:04
Done.
|
+ super(new ContextThemeWrapper(context, R.style.NewTabPageRecyclerView), attrs); |
+ init(); |
+ } |
+ |
public SuggestionsRecyclerView(Context context) { |
super(new ContextThemeWrapper(context, R.style.NewTabPageRecyclerView)); |
+ init(); |
+ } |
+ private void init() { |
Resources res = getContext().getResources(); |
setBackgroundColor(ApiCompatibilityUtils.getColor(res, R.color.ntp_bg)); |
setLayoutParams(new LayoutParams( |