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 import android.view.LayoutInflater; | 11 import android.view.LayoutInflater; |
12 import android.view.View; | 12 import android.view.View; |
13 import android.widget.NumberPicker; | 13 import android.widget.NumberPicker; |
14 | 14 |
15 import org.chromium.content.R; | 15 import org.chromium.ui.R; |
16 | 16 |
17 import java.util.ArrayList; | 17 import java.util.ArrayList; |
18 | 18 |
19 /** | 19 /** |
20 * A time picker dialog with upto 5 number pickers left to right: | 20 * A time picker dialog with upto 5 number pickers left to right: |
21 * hour, minute, second, milli, AM/PM. | 21 * hour, minute, second, milli, AM/PM. |
22 * | 22 * |
23 * If is24hourFormat is true then AM/PM picker is not displayed and | 23 * If is24hourFormat is true then AM/PM picker is not displayed and |
24 * hour range is 0..23. Otherwise hour range is 1..12. | 24 * hour range is 0..23. Otherwise hour range is 1..12. |
25 * The milli picker is not displayed if step >= SECOND_IN_MILLIS | 25 * The milli picker is not displayed if step >= SECOND_IN_MILLIS |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 NumberFormatter(String format) { | 266 NumberFormatter(String format) { |
267 mFormat = format; | 267 mFormat = format; |
268 } | 268 } |
269 | 269 |
270 @Override | 270 @Override |
271 public String format(int value) { | 271 public String format(int value) { |
272 return String.format(mFormat, value); | 272 return String.format(mFormat, value); |
273 } | 273 } |
274 } | 274 } |
275 } | 275 } |
OLD | NEW |