Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 1 | page.title=Pickers |
Joe Fernandez | 33baa5a | 2013-11-14 11:41:19 -0800 | [diff] [blame] | 2 | page.tags=datepicker,timepicker |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 3 | @jd:body |
| 4 | |
Scott Main | cbcd17d | 2013-05-14 08:46:55 -0700 | [diff] [blame] | 5 | <a class="notice-developers" href="{@docRoot}guide/topics/ui/controls/pickers.html"> |
| 6 | <div> |
| 7 | <h3>Developer Docs</h3> |
| 8 | <p>Pickers</p> |
| 9 | </div> |
| 10 | </a> |
| 11 | |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 12 | <p>Pickers provide a simple way to select a single value from a set. In addition to touching the |
| 13 | up/down arrow buttons, it's possible to set the desired value from the keyboard or via a swipe |
| 14 | gesture.</p> |
| 15 | |
| 16 | <div class="layout-content-row"> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 17 | <div class="layout-content-col span-6"> |
| 18 | |
| 19 | <img src="{@docRoot}design/media/picker_space.png"> |
| 20 | |
| 21 | </div> |
Scott Main | 59ea115 | 2012-06-15 14:52:01 -0700 | [diff] [blame] | 22 | <div class="layout-content-col span-6"> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 23 | |
| 24 | <h4>Space considerations</h4> |
| 25 | <p>Pickers can be used inline on a form, but their relatively large footprint is best suited for |
| 26 | display in a dialog. For inline display, consider using more compact controls such as text fields or |
| 27 | spinners.</p> |
| 28 | |
| 29 | </div> |
| 30 | </div> |
| 31 | |
| 32 | <h2 id="date-time">Date and time pickers</h2> |
| 33 | |
| 34 | <p>Android provides these as ready-to-use dialogs. Each picker is a dialog with a set of controls for |
| 35 | entering the parts of the date (month, day, year) or time (hour, minute, AM/PM). Using these in your |
| 36 | app helps ensure that a user's specification of a data or time input is valid and formatted |
| 37 | correctly. The format of a time and date picker adjusts automatically to the locale.</p> |
| 38 | |
| 39 | <img src="{@docRoot}design/media/picker_datetime.png"> |
Scott Main | d4cc942 | 2012-10-03 18:47:08 -0700 | [diff] [blame] | 40 | |