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

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

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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.content.Context; 7 import android.content.Context;
8 import android.util.AttributeSet; 8 import android.util.AttributeSet;
9 import android.view.View; 9 import android.view.View;
10 import android.widget.ExpandableListView; 10 import android.widget.ExpandableListView;
11 11
12 import org.chromium.ui.base.DeviceFormFactor; 12 import org.chromium.ui.base.DeviceFormFactor;
13 13
14 /** 14 /**
15 * Customized ExpandableListView for the recent tabs page. This class handles ta blet-specific 15 * Customized ExpandableListView for the recent tabs page. This class handles ta blet-specific
16 * layout implementation. 16 * layout implementation.
17 */ 17 */
18 public class RecentTabsExpandableListView extends ExpandableListView { 18 public class RecentTabsExpandableListView extends ExpandableListView {
19 private static final int MAX_LIST_VIEW_WIDTH_DP = 550; 19 private static final int MAX_LIST_VIEW_WIDTH_DP = 550;
20 20
21 private int mMaxListViewWidth; 21 private int mMaxListViewWidth;
22 private int mSavedListPosition = 0; 22 private int mSavedListPosition;
23 private int mSavedListTop = 0; 23 private int mSavedListTop;
24 24
25 /** 25 /**
26 * Constructor for inflating from XML. 26 * Constructor for inflating from XML.
27 */ 27 */
28 public RecentTabsExpandableListView(Context context, AttributeSet attrs) { 28 public RecentTabsExpandableListView(Context context, AttributeSet attrs) {
29 super(context, attrs); 29 super(context, attrs);
30 } 30 }
31 31
32 @Override 32 @Override
33 protected void onFinishInflate() { 33 protected void onFinishInflate() {
(...skipping 29 matching lines...) Expand all
63 } 63 }
64 64
65 @Override 65 @Override
66 protected void onDetachedFromWindow() { 66 protected void onDetachedFromWindow() {
67 mSavedListPosition = getFirstVisiblePosition(); 67 mSavedListPosition = getFirstVisiblePosition();
68 View v = getChildAt(0); 68 View v = getChildAt(0);
69 mSavedListTop = (v == null) ? 0 : v.getTop(); 69 mSavedListTop = (v == null) ? 0 : v.getTop();
70 super.onDetachedFromWindow(); 70 super.onDetachedFromWindow();
71 } 71 }
72 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698