OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.content.browser.input; | 5 package org.chromium.ui.picker; |
6 | 6 |
7 import android.app.AlertDialog; | 7 import android.app.AlertDialog; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.DialogInterface; | 9 import android.content.DialogInterface; |
10 import android.content.DialogInterface.OnClickListener; | 10 import android.content.DialogInterface.OnClickListener; |
11 | 11 |
12 import org.chromium.content.R; | 12 import org.chromium.ui.R; |
13 import org.chromium.content.browser.input.TwoFieldDatePicker.OnMonthOrWeekChange
dListener; | 13 import org.chromium.ui.picker.TwoFieldDatePicker.OnMonthOrWeekChangedListener; |
14 | 14 |
15 public abstract class TwoFieldDatePickerDialog extends AlertDialog implements On
ClickListener, | 15 public abstract class TwoFieldDatePickerDialog extends AlertDialog implements On
ClickListener, |
16 OnMonthOrWeekChangedListener { | 16 OnMonthOrWeekChangedListener { |
17 | 17 |
18 private static final String YEAR = "year"; | 18 private static final String YEAR = "year"; |
19 private static final String POSITION_IN_YEAR = "position_in_year"; | 19 private static final String POSITION_IN_YEAR = "position_in_year"; |
20 | 20 |
21 protected final TwoFieldDatePicker mPicker; | 21 protected final TwoFieldDatePicker mPicker; |
22 protected final OnValueSetListener mCallBack; | 22 protected final OnValueSetListener mCallBack; |
23 | 23 |
24 /** | 24 /** |
25 * The callback used to indicate the user is done filling in the date. | 25 * The callback used to indicate the user is done filling in the date. |
26 */ | 26 */ |
27 public interface OnValueSetListener { | 27 public interface OnValueSetListener { |
28 | 28 |
29 /** | 29 /** |
30 * @param year The year that was set. | 30 * @param year The year that was set. |
31 * @param positionInYear The position in the year that was set. | 31 * @param positionInYear The position in the year that was set. |
32 */ | 32 */ |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 /** | 104 /** |
105 * Sets the current date. | 105 * Sets the current date. |
106 * | 106 * |
107 * @param year The date week year. | 107 * @param year The date week year. |
108 * @param weekOfYear The date week. | 108 * @param weekOfYear The date week. |
109 */ | 109 */ |
110 public void updateDate(int year, int weekOfYear) { | 110 public void updateDate(int year, int weekOfYear) { |
111 mPicker.updateDate(year, weekOfYear); | 111 mPicker.updateDate(year, weekOfYear); |
112 } | 112 } |
113 } | 113 } |
OLD | NEW |