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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java

Issue 574673003: Move *Picker.java and *PickerDialog.java to ui/android/java/... - Part1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased patch. Created 6 years, 3 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
Index: content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java
deleted file mode 100644
index 5a8d2003b6b9d1279e2e6b1349379583a8c4b22d..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2013 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.content.browser.input;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.TextView;
-
-import org.chromium.content.R;
-
-import java.util.List;
-
-/**
- * Date/time suggestion adapter for the suggestion dialog.
- */
-class DateTimeSuggestionListAdapter extends ArrayAdapter<DateTimeSuggestion> {
- private final Context mContext;
-
- DateTimeSuggestionListAdapter(Context context, List<DateTimeSuggestion> objects) {
- super(context, R.layout.date_time_suggestion, objects);
- mContext = context;
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View layout = convertView;
- if (convertView == null) {
- LayoutInflater inflater = LayoutInflater.from(mContext);
- layout = inflater.inflate(R.layout.date_time_suggestion, parent, false);
- }
- TextView labelView = (TextView) layout.findViewById(R.id.date_time_suggestion_value);
- TextView sublabelView = (TextView) layout.findViewById(R.id.date_time_suggestion_label);
-
- if (position == getCount() - 1) {
- labelView.setText(mContext.getText(R.string.date_picker_dialog_other_button_label));
- sublabelView.setText("");
- } else {
- labelView.setText(getItem(position).localizedValue());
- sublabelView.setText(getItem(position).label());
- }
-
- return layout;
- }
-
- @Override
- public int getCount() {
- return super.getCount() + 1;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698