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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java

Issue 2711003006: Remove the Physical Web SwipeRefreshWidget (Closed)
Patch Set: git show Created 3 years, 10 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
« no previous file with comments | « chrome/android/java/res/values/colors.xml ('k') | chrome/android/java/strings/android_chrome_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java
deleted file mode 100644
index 9bd335e3e4fc866f243d3fb5ac6ceb7aad5d5f89..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.physicalweb;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.ListView;
-
-import org.chromium.chrome.R;
-
-/**
- * Subclass of {@link android.support.v4.widget.SwipeRefreshLayout} that supports containing a
- * single ViewGroup. The ViewGroup must contain a ListView such that the top of the list is
- * aligned to the top of the parent view. Scrolling past the top of the list triggers a
- * refresh.
- */
-public class SwipeRefreshWidget extends android.support.v4.widget.SwipeRefreshLayout {
- private ListView mListView;
-
- public SwipeRefreshWidget(Context context, AttributeSet attributeSet) {
- super(context, attributeSet);
- }
-
- @Override
- public boolean canChildScrollUp() {
- if (mListView == null) {
- mListView = (ListView) findViewById(R.id.physical_web_urls_list);
- }
-
- // The real child we care about is the list, so check if that can scroll.
- return mListView.getChildCount() > 0
- && (mListView.getFirstVisiblePosition() > 0
- || mListView.getChildAt(0).getTop() < mListView.getPaddingTop());
- }
-}
« no previous file with comments | « chrome/android/java/res/values/colors.xml ('k') | chrome/android/java/strings/android_chrome_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698