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

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

Issue 15533003: [Android] Implement min/max on all supported date types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/MonthPickerDialog.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java b/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java
index 354810e5e429662ca400284a90d5dcc54cf3a054..011153e9e0cf7d9d566154e05d639549a6e1951c 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java
@@ -44,26 +44,9 @@ public class MonthPickerDialog extends AlertDialog implements OnClickListener,
* @param year The initial year of the dialog.
* @param monthOfYear The initial month of the dialog.
*/
- public MonthPickerDialog(Context context,
- OnMonthSetListener callBack,
- int year,
- int monthOfYear) {
- this(context, 0, callBack, year, monthOfYear);
- }
-
- /**
- * @param context The context the dialog is to run in.
- * @param theme the theme to apply to this dialog
- * @param callBack How the parent is notified that the date is set.
- * @param year The initial year of the dialog.
- * @param monthOfYear The initial month of the dialog.
- */
- public MonthPickerDialog(Context context,
- int theme,
- OnMonthSetListener callBack,
- int year,
- int monthOfYear) {
- super(context, theme);
+ public MonthPickerDialog(Context context, OnMonthSetListener callBack,
+ int year, int monthOfYear, long minMonth, long maxMonth) {
+ super(context);
mCallBack = callBack;
@@ -74,7 +57,7 @@ public class MonthPickerDialog extends AlertDialog implements OnClickListener,
setIcon(0);
setTitle(R.string.month_picker_dialog_title);
- mMonthPicker = new MonthPicker(context);
+ mMonthPicker = new MonthPicker(context, minMonth, maxMonth);
setView(mMonthPicker);
mMonthPicker.init(year, monthOfYear, this);
}
@@ -118,16 +101,6 @@ public class MonthPickerDialog extends AlertDialog implements OnClickListener,
return mMonthPicker;
}
- /**
- * Sets the current date.
- *
- * @param year The date year.
- * @param monthOfYear The date month.
- */
- public void updateDate(int year, int monthOfYear) {
- mMonthPicker.updateMonth(year, monthOfYear);
- }
-
@Override
public Bundle onSaveInstanceState() {
Bundle state = super.onSaveInstanceState();

Powered by Google App Engine
This is Rietveld 408576698