summaryrefslogtreecommitdiffstats
path: root/docs/html/design/building-blocks/pickers.jd
blob: 47363d075e62cfc74b297d1a6adf43410d31ff27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
page.title=Pickers
page.tags="datepicker","timepicker"
@jd:body

<p>Pickers provide a simple way to select a single value from a set. In addition to touching the
up/down arrow buttons, it's possible to set the desired value from the keyboard or via a swipe
gesture.</p>

<div class="layout-content-row">
  <div class="layout-content-col span-6">

    <img src="{@docRoot}design/media/picker_space.png">

  </div>
  <div class="layout-content-col span-6">

<h4>Space considerations</h4>
<p>Pickers can be used inline on a form, but their relatively large footprint is best suited for
display in a dialog. For inline display, consider using more compact controls such as text fields or
spinners.</p>

  </div>
</div>

<h2 id="date-time">Date and time pickers</h2>

<p>Android provides these as ready-to-use dialogs. Each picker is a dialog with a set of controls for
entering the parts of the date (month, day, year) or time (hour, minute, AM/PM). Using these in your
app helps ensure that a user's specification of a data or time input is valid and formatted
correctly. The format of a time and date picker adjusts automatically to the locale.</p>

<img src="{@docRoot}design/media/picker_datetime.png">


<div class="note develop">
<p><strong>Developer Guide</strong></p>
  <p>For information about how to create date and time pickers,
  see the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a> API guide.</p>
</div>