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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java

Issue 85643002: Transfer date/time value to chooser as double (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doubledate2
Patch Set: Created 7 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 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.content.browser.input;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.content.R; 9 import org.chromium.content.R;
10 10
(...skipping 27 matching lines...) Expand all
38 long minValue, long maxValue) { 38 long minValue, long maxValue) {
39 super(context, theme, callBack, year, weekOfYear, minValue, maxValue); 39 super(context, theme, callBack, year, weekOfYear, minValue, maxValue);
40 setTitle(R.string.week_picker_dialog_title); 40 setTitle(R.string.week_picker_dialog_title);
41 } 41 }
42 42
43 @Override 43 @Override
44 protected TwoFieldDatePicker createPicker(Context context, long minValue, lo ng maxValue) { 44 protected TwoFieldDatePicker createPicker(Context context, long minValue, lo ng maxValue) {
45 return new WeekPicker(context, minValue, maxValue); 45 return new WeekPicker(context, minValue, maxValue);
46 } 46 }
47 47
48 @Override
49 protected void tryNotifyDateSet() {
50 if (mCallBack != null) {
51 WeekPicker picker = getWeekPicker();
52 picker.clearFocus();
53 mCallBack.onValueSet(picker.getYear(), picker.getWeek());
54 }
55 }
56
57 /** 48 /**
58 * Gets the {@link WeekPicker} contained in this dialog. 49 * Gets the {@link WeekPicker} contained in this dialog.
59 * 50 *
60 * @return The calendar view. 51 * @return The calendar view.
61 */ 52 */
62 public WeekPicker getWeekPicker() { 53 public WeekPicker getWeekPicker() {
63 return (WeekPicker) mPicker; 54 return (WeekPicker) mPicker;
64 } 55 }
65 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698