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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintArrayAdapter.java

Issue 2479613002: [Payments] Style the add address option in billing address selection. (Closed)
Patch Set: Addressed Dan's comments Created 4 years, 1 month 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
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintArrayAdapter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintArrayAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintArrayAdapter.java
deleted file mode 100644
index 02fcfc06ee82e86174ae621b964ff25b229a0e66..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintArrayAdapter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2016 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.payments.ui;
-
-import android.content.Context;
-import android.widget.ArrayAdapter;
-
-import java.util.List;
-
-/**
- * Subclass of ArrayAdapter used to display a dropdown hint that won't appear in the dropdown
- * options. The last element is the hint.
- *
- * @param <T> The type of element to be inserted into the adapter.
- */
-public class HintArrayAdapter<T> extends ArrayAdapter<T> {
-
- /**
- * Creates an array adapter for which the last element is not shown.
- *
- * @param context The current context.
- * @param resource The resource ID for a layout file containing a layout to use when
- * instantiating views.
- * @param objects The objects to represent in the ListView, the last of which is not displayed
- * in the dropdown, but is used as the hint.
- */
- public HintArrayAdapter(Context context, int resource, List<T> objects) {
- super(context, resource, objects);
- }
-
- @Override
- public int getCount() {
- // Don't display last item, it is used as hint.
- int count = super.getCount();
- return count > 0 ? count - 1 : count;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698