diff options
136 files changed, 873 insertions, 623 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index ceb8cde..b2e69de 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1731,6 +1731,9 @@ public class Notification implements Parcelable return this; } + /** + * Provide the bitmap to be used as the payload for the BigPicture notification. + */ public BigPictureStyle bigPicture(Bitmap b) { mPicture = b; return this; @@ -1809,6 +1812,10 @@ public class Notification implements Parcelable return this; } + /** + * Provide the longer text to be displayed in the big form of the + * template in place of the content text. + */ public BigTextStyle bigText(CharSequence cs) { mBigText = cs; return this; @@ -1889,6 +1896,9 @@ public class Notification implements Parcelable return this; } + /** + * Append a line to the digest section of the Inbox notification. + */ public InboxStyle addLine(CharSequence cs) { mTexts.add(cs); return this; diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd index d115beb..4a75b91 100644 --- a/docs/html/about/dashboards/index.jd +++ b/docs/html/about/dashboards/index.jd @@ -32,19 +32,20 @@ Google Play within a 14-day period ending on the data collection date noted belo </tr> <tr><td><a href="/about/versions/android-1.5.html">1.5</a></td><td>Cupcake</td> <td>3</td><td>0.2%</td></tr> <tr><td><a href="/about/versions/android-1.6.html">1.6</a></td><td>Donut</td> <td>4</td><td>0.5%</td></tr> -<tr><td><a href="/about/versions/android-2.1.html">2.1</a></td><td>Eclair</td> <td>7</td><td>4.7%</td></tr> -<tr><td><a href="/about/versions/android-2.2.html">2.2</a></td><td>Froyo</td> <td>8</td><td>17.3%</td></tr> +<tr><td><a href="/about/versions/android-2.1.html">2.1</a></td><td>Eclair</td> <td>7</td><td>4.2%</td></tr> +<tr><td><a href="/about/versions/android-2.2.html">2.2</a></td><td>Froyo</td> <td>8</td><td>15.5%</td></tr> <tr><td><a href="/about/versions/android-2.3.html">2.3 - 2.3.2</a> - </td><td rowspan="2">Gingerbread</td> <td>9</td><td>0.4%</td></tr> + </td><td rowspan="2">Gingerbread</td> <td>9</td><td>0.3%</td></tr> <tr><td><a href="/about/versions/android-2.3.3.html">2.3.3 - 2.3.7 - </a></td><!-- Gingerbread --> <td>10</td><td>63.6%</td></tr> + </a></td><!-- Gingerbread --> <td>10</td><td>60.3%</td></tr> <tr><td><a href="/about/versions/android-3.1.html">3.1</a></td> <td rowspan="2">Honeycomb</td> <td>12</td><td>0.5%</td></tr> -<tr><td><a href="/about/versions/android-3.2.html">3.2</a></td> <!-- Honeycomb --><td>13</td><td>1.9%</td></tr> +<tr><td><a href="/about/versions/android-3.2.html">3.2</a></td> <!-- Honeycomb --><td>13</td><td>1.8%</td></tr> <tr><td><a href="/about/versions/android-4.0.html">4.0 - 4.0.2</a></td> - <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.2%</td></tr> + <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.1%</td></tr> <tr><td><a href="/about/versions/android-4.0.3.html">4.0.3 - 4.0.4</a></td> - <!-- ICS --> <td>15</td><td>10.7%</td></tr> + <!-- ICS --> <td>15</td><td>15.8%</td></tr> +<tr><td><a href="/about/versions/android-4.1.html">4.1</a></td> <td>Jelly Bean</td><td>16</td><td>0.8%</td></tr> </table> @@ -52,11 +53,11 @@ Google Play within a 14-day period ending on the data collection date noted belo <div class="col-7" style="margin-right:0"> <img alt="" -src="http://chart.apis.google.com/chart?&cht=p&chs=460x310&chd=t:0.2,0.5,4.7,17.3,0.4,63.6,0.5,1.9,0.2,10.7&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3&chco=c4df9b,6fad0c&chf=bg,s,00000000" /> +src="http://chart.apis.google.com/chart?&cht=p&chs=460x310&chd=t:0.2,0.5,4.2,15.5,0.3,60.3,0.5,1.8,0.1,15.8,0.8&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3|Android%204.1&chco=c4df9b,6fad0c&chf=bg,s,00000000" /> </div><!-- end dashboard-panel --> -<p style="clear:both"><em>Data collected during a 14-day period ending on July 2, 2012</em></p> +<p style="clear:both"><em>Data collected during a 14-day period ending on August 1, 2012</em></p> <!-- <p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p> --> @@ -81,9 +82,9 @@ line for that version meets the y-axis on the right.</p> Google Play within a 14-day period ending on the date indicated on the x-axis.</p> <img alt="" height="250" width="660" -src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C01/01%7C01/15%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C04/15%7C05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C1%3A%7C2012%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.3,98.2,98.6,98.4,98.4,98.6,98.5,98.6,98.8,98.7,98.9,99.1,99.1|97.2,97.2,97.6,97.5,97.6,97.8,97.8,97.9,98.1,98.1,98.3,98.5,98.6|88.7,89.2,89.9,90.3,90.8,91.4,91.8,92.1,92.5,92.7,93.1,93.5,93.9|58.2,60.1,62.0,63.7,65.2,66.8,68.6,69.9,71.5,72.6,74.0,75.2,76.5|3.5,3.6,4.0,4.1,4.3,4.6,5.5,6.5,7.6,8.2,9.4,11.0,12.8|2.0,2.2,2.6,3.0,3.2,3.5,4.5,5.5,6.6,7.4,8.7,10.4,12.3|0.3,0.4,0.7,0.8,1.1,1.3,2.3,3.3,4.4,5.3,6.7,8.4,10.4&chm=b,c3df9b,0,1,0|b,b6dc7d,1,2,0|tAndroid%202.2,5b831d,2,0,15,,t::-5|b,aadb5e,2,3,0|tAndroid%202.3.3,496c13,3,0,15,,t::-5|b,9ddb3d,3,4,0|b,91da1e,4,5,0|b,80c414,5,6,0|tAndroid%204.0.3,131d02,6,12,15,,t::-5|B,6fad0c,6,7,0&chg=7,25&chdl=Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a0d155,94d134,84c323,73ad18,62960f,507d08&chf=bg,s,00000000" /> +src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chf=bg,s,00000000&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C04/15%7C05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C07/15%7C08/01%7C1%3A%7C2012%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.6,98.4,98.4,98.6,98.5,98.6,98.8,98.7,98.9,99.1,99.1,99.2,98.6|97.6,97.5,97.6,97.8,97.8,97.9,98.1,98.1,98.3,98.5,98.6,98.7,98.1|89.9,90.3,90.8,91.4,91.8,92.1,92.5,92.7,93.1,93.5,93.9,94.2,93.9|62.0,63.7,65.2,66.8,68.6,69.9,71.5,72.6,74.0,75.2,76.5,77.8,78.4|4.0,4.1,4.3,4.6,5.5,6.5,7.6,8.2,9.4,11.0,12.8,15.6,18.1|2.6,3.0,3.2,3.5,4.5,5.5,6.6,7.4,8.7,10.4,12.3,15.1,17.6|0.7,0.8,1.1,1.3,2.3,3.3,4.4,5.3,6.7,8.4,10.4,13.2,15.8&chm=b,c3df9b,0,1,0|b,b6dc7d,1,2,0|tAndroid%202.2,5b831d,2,0,15,,t::-5|b,aadb5e,2,3,0|tAndroid%202.3.3,496c13,3,0,15,,t::-5|b,9ddb3d,3,4,0|b,91da1e,4,5,0|b,80c414,5,6,0|tAndroid%204.0.3,131d02,6,10,15,,t::-5|B,6fad0c,6,7,0&chg=7,25&chdl=Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a0d155,94d134,84c323,73ad18,62960f,507d08" /> -<p><em>Last historical dataset collected during a 14-day period ending on July 2, 2012</em></p> +<p><em>Last historical dataset collected during a 14-day period ending on August 1, 2012</em></p> @@ -143,26 +144,26 @@ ending on the data collection date noted below.</p> <th scope="col">xhdpi</th> </tr> <tr><th scope="row">small</th> -<td>1.7%</td> <!-- small/ldpi --> +<td>1.5%</td> <!-- small/ldpi --> <td></td> <!-- small/mdpi --> -<td>1.3%</td> <!-- small/hdpi --> +<td>1.2%</td> <!-- small/hdpi --> <td></td> <!-- small/xhdpi --> </tr> <tr><th scope="row">normal</th> -<td>0.4%</td> <!-- normal/ldpi --> -<td>12.9%</td> <!-- normal/mdpi --> -<td>57.5%</td> <!-- normal/hdpi --> -<td>18.0%</td> <!-- normal/xhdpi --> +<td>0.5%</td> <!-- normal/ldpi --> +<td>12.1%</td> <!-- normal/mdpi --> +<td>55.3%</td> <!-- normal/hdpi --> +<td>17.4%</td> <!-- normal/xhdpi --> </tr> <tr><th scope="row">large</th> -<td>0.2%</td> <!-- large/ldpi --> -<td>2.9%</td> <!-- large/mdpi --> +<td>0.1%</td> <!-- large/ldpi --> +<td>2.7%</td> <!-- large/mdpi --> <td></td> <!-- large/hdpi --> -<td></td> <!-- large/xhdpi --> +<td>4.5%</td> <!-- large/xhdpi --> </tr> <tr><th scope="row">xlarge</th> <td></td> <!-- xlarge/ldpi --> -<td>5.1%</td> <!-- xlarge/mdpi --> +<td>4.7%</td> <!-- xlarge/mdpi --> <td></td> <!-- xlarge/hdpi --> <td></td> <!-- xlarge/xhdpi --> </tr> @@ -173,12 +174,11 @@ ending on the data collection date noted below.</p> <div class="col-7" style="margin-right:0"> <img alt="" -src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg,s,00000000&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi%7CLarge%20/%20ldpi%7CLarge%20/%20mdpi%7CNormal%20/%20hdpi%7CNormal%20/%20ldpi%7CNormal%20/%20mdpi%7CNormal%20/%20xhdpi%7CSmall%20/%20hdpi%7CSmall%20/%20ldpi&chd=t%3A5.1,0.2,2.9,57.5,0.4,12.9,18.0,1.3,1.7" /> +src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg,s,00000000&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Large%20/%20xhdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Normal%20/%20xhdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A4.7,0.1,2.7,4.5,55.3,0.5,12.1,17.4,1.2,1.5" /> </div> -<p style="clear:both"><em>Data collected during a 7-day period ending on July 2, 2012</em></p> - +<p style="clear:both"><em>Data collected during a 7-day period ending on August 1, 2012</em></p> @@ -217,20 +217,20 @@ ending on the data collection date noted below.</p> </tr> <tr> <td>1.1 only</th> -<td>9.7%</td> +<td>9.3%</td> </tr> <tr> <td>2.0 & 1.1</th> -<td>90.3%</td> +<td>90.7%</td> </tr> </table> </div> <div class="col-7" style="margin-right:0"> <img alt="" -src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL% 202.0%20%26%201.1&chd=t%3A9.7,90.3&chf=bg,s,00000000" /> +src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL%202.0%20%26%201.1&chd=t%3A9.3,90.7&chf=bg,s,00000000" /> </div> -<p style="clear:both"><em>Data collected during a 7-day period ending on July 2, 2012</em></p> +<p style="clear:both"><em>Data collected during a 7-day period ending on August 1, 2012</em></p> diff --git a/docs/html/about/versions/android-1.6-highlights.jd b/docs/html/about/versions/android-1.6-highlights.jd index 2ee1d80..edfd7ff 100644 --- a/docs/html/about/versions/android-1.6-highlights.jd +++ b/docs/html/about/versions/android-1.6-highlights.jd @@ -49,17 +49,17 @@ This page provides an overview of some new features and technologies.</p> <!-- screenshots float right --> <div class="screenshot"> -<img src="images/search.png" class="screenshot" alt="" /><br/> +<img src="{@docRoot}sdk/images/search.png" class="screenshot" alt="" /><br/> Quick Search Box </div> <div class="screenshot"> -<img src="images/camera.png" class="screenshot" alt="" /><br/> +<img src="{@docRoot}sdk/images/camera.png" class="screenshot" alt="" /><br/> New Camera/Camcorder UI </div> <div class="screenshot"> -<img src="images/battery.png" class="screenshot" alt="" /><br/> +<img src="{@docRoot}sdk/images/battery.png" class="screenshot" alt="" /><br/> Battery Usage Indicator </div> @@ -121,7 +121,7 @@ on the new accessibility framework and enable them in Settings.</p> <h2 id="GooglePlayUpdates" style="clear:right">Google Play Updates</h2> <div class="screenshot" style="margin-top:-35px"> -<img src="images/market.png" class="screenshot" alt="" /><br/> +<img src="{@docRoot}sdk/images/market.png" class="screenshot" alt="" /><br/> New Google Play UI </div> diff --git a/docs/html/about/versions/android-2.0-highlights.jd b/docs/html/about/versions/android-2.0-highlights.jd index 2ba9ac7..58b5fda 100644 --- a/docs/html/about/versions/android-2.0-highlights.jd +++ b/docs/html/about/versions/android-2.0-highlights.jd @@ -54,27 +54,27 @@ and technologies in Android 2.0.</p> <!-- screenshots float right --> <div class="screenshot"> - <img src="images/2.0/quick-connect.png" class="screenshot" alt="" /><br/> + <img src="{@docRoot}sdk/images/2.0/quick-connect.png" class="screenshot" alt="" /><br/> Quick Contact for Android </div> <div class="screenshot second"> - <img src="images/2.0/multiple-accounts.png" class="screenshot" alt="" /><br/> + <img src="{@docRoot}sdk/images/2.0/multiple-accounts.png" class="screenshot" alt="" /><br/> Multiple Accounts </div> <div class="screenshot"> - <img src="images/2.0/mms-search.png" class="screenshot" alt="" /><br/> + <img src="{@docRoot}sdk/images/2.0/mms-search.png" class="screenshot" alt="" /><br/> Messaging Search </div> <div class="screenshot second"> - <img src="images/2.0/email-inbox.png" class="screenshot" alt="" /><br/> + <img src="{@docRoot}sdk/images/2.0/email-inbox.png" class="screenshot" alt="" /><br/> Email Combined Inbox </div> <div class="screenshot"> - <img src="images/2.0/camera-modes.png" class="screenshot" alt="" /><br/> + <img src="{@docRoot}sdk/images/2.0/camera-modes.png" class="screenshot" alt="" /><br/> Camera Modes </div> diff --git a/docs/html/about/versions/android-2.2-highlights.jd b/docs/html/about/versions/android-2.2-highlights.jd index 37a20d5..190e301 100644 --- a/docs/html/about/versions/android-2.2-highlights.jd +++ b/docs/html/about/versions/android-2.2-highlights.jd @@ -71,7 +71,7 @@ href="android-2.2.html#api">Android 2.2 version notes</a>.</p> <table class="columns" style="max-width:800px"> <tr> <td> -<img src="images/2.2/22home.png" alt="" height=230 /> +<img src="{@docRoot}sdk/images/2.2/22home.png" alt="" height=230 /> </td> <td> <p style="margin-top:0">New Home screen <span class="green">tips widget</span> assists new users on @@ -103,7 +103,7 @@ easily set up and sync an Exchange account (available for Exchange 2007 and high application, enabling users to auto-complete recipient names from the directory.</p> </td> <td> -<img src="images/2.2/22exchange.png" alt="" height=300 /> +<img src="{@docRoot}sdk/images/2.2/22exchange.png" alt="" height=300 /> </td> </tr> </table> @@ -114,7 +114,7 @@ application, enabling users to auto-complete recipient names from the directory. <table class="columns" style="max-width:800px"> <tr> <td> -<img src="images/2.2/22gallery.png" alt="" height=220 /> +<img src="{@docRoot}sdk/images/2.2/22gallery.png" alt="" height=220 /> </td> <td> <p>Gallery allows you to <span class="green">peek into picture stacks</span> using a zoom @@ -141,7 +141,7 @@ connecting their phone to the computer with a USB cable. The connection is then two devices.</p> </td> <td> -<img src="images/2.2/22hotspot.png" alt="" height=180 /> +<img src="{@docRoot}sdk/images/2.2/22hotspot.png" alt="" height=180 /> </td> </tr> </table> @@ -152,7 +152,7 @@ two devices.</p> <table class="columns" style="max-width:800px"> <tr> <td> -<img src="images/2.2/22keyboard.png" alt="" height=220 /> +<img src="{@docRoot}sdk/images/2.2/22keyboard.png" alt="" height=220 /> </td> <td> <p>Multi-lingual users can add multiple languages to the keyboard and <span class="green">switch @@ -179,7 +179,7 @@ faster.</p> which results in faster app switching and smoother performance on memory-constrained devices.</p> </td> <td> -<img src="images/2.2/jit-graph.png" alt="" height=200 /> +<img src="{@docRoot}sdk/images/2.2/jit-graph.png" alt="" height=200 /> </td> </tr> </table> diff --git a/docs/html/about/versions/android-2.2.jd b/docs/html/about/versions/android-2.2.jd index 361e8b6..64ddca4 100644 --- a/docs/html/about/versions/android-2.2.jd +++ b/docs/html/about/versions/android-2.2.jd @@ -1,4 +1,4 @@ -page.title=Android 2.2 Platform +page.title=Android 2.2 APIs sdk.platform.version=2.2 sdk.platform.apiLevel=8 sdk.platform.majorMinor=minor @@ -117,7 +117,7 @@ settings.</p> <p>For more information about setting a preferred install location for your application, including a discussion of what types of applications should and should not request external installation, please read the <a -href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> +href="{@docRoot}guide/topics/data/install-location.html">App Install Location</a> document. </p> <h3 id="backup-manager">Data backup</h3> diff --git a/docs/html/about/versions/android-2.3.3.jd b/docs/html/about/versions/android-2.3.3.jd index 55ff346..7a9711d 100644 --- a/docs/html/about/versions/android-2.3.3.jd +++ b/docs/html/about/versions/android-2.3.3.jd @@ -1,4 +1,4 @@ -page.title=Android 2.3.3 Platform +page.title=Android 2.3.3 APIs sdk.platform.version=2.3.3 sdk.platform.apiLevel=10 @@ -122,8 +122,8 @@ NFC. To request filtering, add <code><uses-feature android:name="android.hardware.nfc" android:required="true"></code> to the application's manifest.</p> -<p class="note">To look at sample code for NFC, see -<a href="{@docRoot}resources/samples/NFCDemo/index.html">NFCDemo app</a>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.html">filtering by tag technology</a></li>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html">using foreground dispatch</a>, and <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.html">foreground NDEF push (P2P)</a>.</p> +<p class="note">For more information, read the + <a href="{@docRoot}guide/topics/connectivity/nfc/index.html">NFC</a> developer guide.</p> <h3 id="bluetooth">Bluetooth</h3> diff --git a/docs/html/about/versions/android-2.3.4.jd b/docs/html/about/versions/android-2.3.4.jd index bb4feec..3bb0d7b 100644 --- a/docs/html/about/versions/android-2.3.4.jd +++ b/docs/html/about/versions/android-2.3.4.jd @@ -1,4 +1,4 @@ -page.title=Android 2.3.4 Platform +page.title=Android 2.3.4 APIs sdk.platform.version=2.3.4 sdk.platform.apiLevel=10 diff --git a/docs/html/about/versions/android-2.3.jd b/docs/html/about/versions/android-2.3.jd index 2afa564..8715973 100644 --- a/docs/html/about/versions/android-2.3.jd +++ b/docs/html/about/versions/android-2.3.jd @@ -1,4 +1,4 @@ -page.title=Android 2.3 Platform +page.title=Android 2.3 APIs sdk.platform.version=2.3 sdk.platform.apiLevel=9 @@ -76,8 +76,8 @@ android:name="android.software.sip" android:required="true"></code> and <code><uses-feature android:name="android.software.sip.voip"></code> to the application manifest.</p> -<p class="note">To look at a sample application that uses the SIP API, see <a -href="{@docRoot}resources/samples/SipDemo/index.html">SIP Demo</a>.</p> +<p class="note">For more information, read the <a +href="{@docRoot}guide/topics/connectivity/sip.html">SIP</a> developer guide.</p> <h3 id="nfc">Near Field Communications (NFC)</h3> diff --git a/docs/html/about/versions/android-3.0.jd b/docs/html/about/versions/android-3.0.jd index 76e0795..5bfdffc 100644 --- a/docs/html/about/versions/android-3.0.jd +++ b/docs/html/about/versions/android-3.0.jd @@ -1,4 +1,4 @@ -page.title=Android 3.0 Platform +page.title=Android 3.0 APIs sdk.platform.version=3.0 sdk.platform.apiLevel=11 @jd:body diff --git a/docs/html/about/versions/android-3.1.jd b/docs/html/about/versions/android-3.1.jd index 2a845f0..b0e2f08 100644 --- a/docs/html/about/versions/android-3.1.jd +++ b/docs/html/about/versions/android-3.1.jd @@ -1,4 +1,4 @@ -page.title=Android 3.1 Platform +page.title=Android 3.1 APIs sdk.platform.version=3.1 sdk.platform.apiLevel=12 @jd:body diff --git a/docs/html/about/versions/android-3.2.jd b/docs/html/about/versions/android-3.2.jd index 02111a0..e0f0125 100644 --- a/docs/html/about/versions/android-3.2.jd +++ b/docs/html/about/versions/android-3.2.jd @@ -1,4 +1,4 @@ -page.title=Android 3.2 Platform +page.title=Android 3.2 APIs sdk.platform.version=3.2 sdk.platform.apiLevel=13 @jd:body diff --git a/docs/html/about/versions/android-4.0.3.jd b/docs/html/about/versions/android-4.0.3.jd index a8c7e83..a773b6e 100644 --- a/docs/html/about/versions/android-4.0.3.jd +++ b/docs/html/about/versions/android-4.0.3.jd @@ -1,4 +1,4 @@ -page.title=Android 4.0.3 Platform +page.title=Android 4.0.3 APIs sdk.platform.version=4.0.3 sdk.platform.apiLevel=15 @jd:body diff --git a/docs/html/about/versions/android-4.0.jd b/docs/html/about/versions/android-4.0.jd index 99ab9cb..8595eee 100644 --- a/docs/html/about/versions/android-4.0.jd +++ b/docs/html/about/versions/android-4.0.jd @@ -1,4 +1,4 @@ -page.title=Android 4.0 Platform +page.title=Android 4.0 APIs sdk.platform.version=4.0 sdk.platform.apiLevel=14 @jd:body diff --git a/docs/html/design/building-blocks/dialogs.jd b/docs/html/design/building-blocks/dialogs.jd index 2820471..9b653ee 100644 --- a/docs/html/design/building-blocks/dialogs.jd +++ b/docs/html/design/building-blocks/dialogs.jd @@ -10,29 +10,28 @@ user to adjust settings or enter text.</p> <div class="with-callouts"> <ol> - <li> - <h4>Optional title region</h4> - <p>The title introduces the content of your dialog. It can, for example, identify the name of a - setting that the user is about to change, or request a decision.</p> - </li> - <li> - <h4>Content area</h4> - <p>Dialog content varies widely. For settings dialogs, a dialog may contain UI elements such as - sliders, text fields, checkboxes, or radio buttons that allow the user to change app or system - settings. In other cases, such as alerts, the content may consist solely of text that provides - further context for a user decision.</p> - </li> - - <li> - <h4>Action buttons</h4> - <p>Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely action. However, if the options consist of specific actions such as Close or Wait rather than a confirmation or cancellation of the action described in the content, then all the buttons should be active verbs. Order actions following these rules:</p> - <ul> - - <li>The dismissive action of a dialog is always on the left. Dismissive actions return to the user to the previous state.</li> - <li>The affirmative actions are on the right. Affirmative actions continue progress toward the user goal that triggered the dialog.</li> - </ul> - </li> +<li> +<h4>Optional title region</h4> +<p>The title introduces the content of your dialog. It can, for example, identify the name of a + setting that the user is about to change, or request a decision.</p> +</li> +<li> +<h4>Content area</h4> +<p>Dialog content varies widely. For settings dialogs, a dialog may contain UI elements such as + sliders, text fields, checkboxes, or radio buttons that allow the user to change app or system + settings. In other cases, such as alerts, the content may consist solely of text that provides + further context for a user decision.</p> +</li> +<li> +<h4>Action buttons</h4> +<p>Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely + action. However, if the options consist of specific actions such as Close or Wait rather than + a confirmation or cancellation of the action described in the content, then all the buttons + should be active verbs. As a rule, the dismissive action of a dialog is always on the left + whereas the affirmative actions are on the right.</p> +</li> </ol> + </div> <img src="{@docRoot}design/media/dialogs_examples.png"> diff --git a/docs/html/design/building-blocks/index.jd b/docs/html/design/building-blocks/index.jd index e554775..d915aae 100644 --- a/docs/html/design/building-blocks/index.jd +++ b/docs/html/design/building-blocks/index.jd @@ -11,7 +11,7 @@ footer.hide=1 #text-overlay { position: absolute; left: 0; - top: 520px; + top: 472px; width: 450px; } </style> diff --git a/docs/html/design/building-blocks/tabs.jd b/docs/html/design/building-blocks/tabs.jd index 8a2eb41..19ed1c3 100644 --- a/docs/html/design/building-blocks/tabs.jd +++ b/docs/html/design/building-blocks/tabs.jd @@ -6,7 +6,6 @@ page.title=Tabs <p>Tabs in the action bar make it easy to explore and switch between different views or functional aspects of your app, or to browse categorized data sets.</p> -<p>For details on using gestures to move between tabs, see the <a href="{@docRoot}design/patterns/swipe-views.html">Swipe Views</a> pattern.</p> <h2 id="scrollable">Scrollable Tabs</h2> @@ -37,7 +36,7 @@ to the next/previous view, swipe left or right.</p> <h2 id="fixed">Fixed Tabs</h2> -<p>Fixed tabs display all items concurrently. To navigate to a different view, touch the tab, or swipe left or right.</p> +<p>Fixed tabs display all items concurrently. To navigate to a different view, touch the tab.</p> <img src="{@docRoot}design/media/tabs_standard.png"> <div class="figure-caption"> diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs index 17e08f2..a31fdd3 100644 --- a/docs/html/design/design_toc.cs +++ b/docs/html/design/design_toc.cs @@ -36,9 +36,7 @@ <li><a href="<?cs var:toroot ?>design/patterns/selection.html">Selection</a></li> <li><a href="<?cs var:toroot ?>design/patterns/notifications.html">Notifications</a></li> <li><a href="<?cs var:toroot ?>design/patterns/settings.html">Settings</a></li> - <li><a href="<?cs var:toroot ?>design/patterns/help.html">Help</a></li> <li><a href="<?cs var:toroot ?>design/patterns/compatibility.html">Compatibility</a></li> - <li><a href="<?cs var:toroot ?>design/patterns/accessibility.html">Accessibility</a></li> <li><a href="<?cs var:toroot ?>design/patterns/pure-android.html">Pure Android</a></li> </ul> </li> diff --git a/docs/html/design/media/accessibility_contentdesc.png b/docs/html/design/media/accessibility_contentdesc.png Binary files differdeleted file mode 100644 index b4a5c2d..0000000 --- a/docs/html/design/media/accessibility_contentdesc.png +++ /dev/null diff --git a/docs/html/design/media/actionbar_drawer.png b/docs/html/design/media/actionbar_drawer.png Binary files differdeleted file mode 100644 index 95e04f5..0000000 --- a/docs/html/design/media/actionbar_drawer.png +++ /dev/null diff --git a/docs/html/design/media/app_structure_book_detail_page_flip.png b/docs/html/design/media/app_structure_book_detail_page_flip.png Binary files differindex 1066094..0cca587 100644 --- a/docs/html/design/media/app_structure_book_detail_page_flip.png +++ b/docs/html/design/media/app_structure_book_detail_page_flip.png diff --git a/docs/html/design/media/app_structure_gallery_filmstrip.png b/docs/html/design/media/app_structure_gallery_filmstrip.png Binary files differindex a937533..483bafa 100644 --- a/docs/html/design/media/app_structure_gallery_filmstrip.png +++ b/docs/html/design/media/app_structure_gallery_filmstrip.png diff --git a/docs/html/design/media/building_blocks_landing.png b/docs/html/design/media/building_blocks_landing.png Binary files differindex 40ab0da..2da47b7 100644 --- a/docs/html/design/media/building_blocks_landing.png +++ b/docs/html/design/media/building_blocks_landing.png diff --git a/docs/html/design/media/color_spectrum.png b/docs/html/design/media/color_spectrum.png Binary files differindex b7ab309..7d2c023 100644 --- a/docs/html/design/media/color_spectrum.png +++ b/docs/html/design/media/color_spectrum.png diff --git a/docs/html/design/media/compatibility_physical_buttons.png b/docs/html/design/media/compatibility_physical_buttons.png Binary files differindex 66a23c8..30d5ddd 100644 --- a/docs/html/design/media/compatibility_physical_buttons.png +++ b/docs/html/design/media/compatibility_physical_buttons.png diff --git a/docs/html/design/media/compatibility_virtual_nav.png b/docs/html/design/media/compatibility_virtual_nav.png Binary files differindex 27d39b2..ea595a4 100644 --- a/docs/html/design/media/compatibility_virtual_nav.png +++ b/docs/html/design/media/compatibility_virtual_nav.png diff --git a/docs/html/design/media/dialogs_popups_example.png b/docs/html/design/media/dialogs_popups_example.png Binary files differindex c7536f3..2deb00d 100644 --- a/docs/html/design/media/dialogs_popups_example.png +++ b/docs/html/design/media/dialogs_popups_example.png diff --git a/docs/html/design/media/help_better.png b/docs/html/design/media/help_better.png Binary files differdeleted file mode 100644 index fde5cb2..0000000 --- a/docs/html/design/media/help_better.png +++ /dev/null diff --git a/docs/html/design/media/help_cling.png b/docs/html/design/media/help_cling.png Binary files differdeleted file mode 100644 index c91d189..0000000 --- a/docs/html/design/media/help_cling.png +++ /dev/null diff --git a/docs/html/design/media/help_dont.png b/docs/html/design/media/help_dont.png Binary files differdeleted file mode 100644 index a1c9841..0000000 --- a/docs/html/design/media/help_dont.png +++ /dev/null diff --git a/docs/html/design/media/help_evenbetter.png b/docs/html/design/media/help_evenbetter.png Binary files differdeleted file mode 100644 index beb88f8..0000000 --- a/docs/html/design/media/help_evenbetter.png +++ /dev/null diff --git a/docs/html/design/media/help_overflow.png b/docs/html/design/media/help_overflow.png Binary files differdeleted file mode 100644 index fb2bc0a..0000000 --- a/docs/html/design/media/help_overflow.png +++ /dev/null diff --git a/docs/html/design/media/help_solo_overflow.png b/docs/html/design/media/help_solo_overflow.png Binary files differdeleted file mode 100644 index 9423ede..0000000 --- a/docs/html/design/media/help_solo_overflow.png +++ /dev/null diff --git a/docs/html/design/media/index_landing_page.png b/docs/html/design/media/index_landing_page.png Binary files differindex 2065344..3f319b0 100644 --- a/docs/html/design/media/index_landing_page.png +++ b/docs/html/design/media/index_landing_page.png diff --git a/docs/html/design/media/multipane_show.png b/docs/html/design/media/multipane_show.png Binary files differindex 9993c9b..b10c91c 100644 --- a/docs/html/design/media/multipane_show.png +++ b/docs/html/design/media/multipane_show.png diff --git a/docs/html/design/media/notifications_dismiss.png b/docs/html/design/media/notifications_dismiss.png Binary files differindex 696a97f..71bed4f 100644 --- a/docs/html/design/media/notifications_dismiss.png +++ b/docs/html/design/media/notifications_dismiss.png diff --git a/docs/html/design/media/notifications_expand_contract_msg.png b/docs/html/design/media/notifications_expand_contract_msg.png Binary files differdeleted file mode 100644 index f37ec2c..0000000 --- a/docs/html/design/media/notifications_expand_contract_msg.png +++ /dev/null diff --git a/docs/html/design/media/notifications_pattern_additional_fail.png b/docs/html/design/media/notifications_pattern_additional_fail.png Binary files differindex 4f056db..707c98c 100644 --- a/docs/html/design/media/notifications_pattern_additional_fail.png +++ b/docs/html/design/media/notifications_pattern_additional_fail.png diff --git a/docs/html/design/media/notifications_pattern_additional_win.png b/docs/html/design/media/notifications_pattern_additional_win.png Binary files differindex 9d69dfd..eb193d8 100644 --- a/docs/html/design/media/notifications_pattern_additional_win.png +++ b/docs/html/design/media/notifications_pattern_additional_win.png diff --git a/docs/html/design/media/notifications_pattern_anatomy.png b/docs/html/design/media/notifications_pattern_anatomy.png Binary files differindex c9fdf85..cacc183 100644 --- a/docs/html/design/media/notifications_pattern_anatomy.png +++ b/docs/html/design/media/notifications_pattern_anatomy.png diff --git a/docs/html/design/media/notifications_pattern_expand_contract.png b/docs/html/design/media/notifications_pattern_expand_contract.png Binary files differdeleted file mode 100644 index e89835c..0000000 --- a/docs/html/design/media/notifications_pattern_expand_contract.png +++ /dev/null diff --git a/docs/html/design/media/notifications_pattern_expandable.png b/docs/html/design/media/notifications_pattern_expandable.png Binary files differdeleted file mode 100644 index 3092676..0000000 --- a/docs/html/design/media/notifications_pattern_expandable.png +++ /dev/null diff --git a/docs/html/design/media/notifications_pattern_ongoing_music.png b/docs/html/design/media/notifications_pattern_ongoing_music.png Binary files differindex 77b24ed..01039bd 100644 --- a/docs/html/design/media/notifications_pattern_ongoing_music.png +++ b/docs/html/design/media/notifications_pattern_ongoing_music.png diff --git a/docs/html/design/media/notifications_pattern_personal.png b/docs/html/design/media/notifications_pattern_personal.png Binary files differdeleted file mode 100644 index 08880b2..0000000 --- a/docs/html/design/media/notifications_pattern_personal.png +++ /dev/null diff --git a/docs/html/design/media/notifications_pattern_phone_icons.png b/docs/html/design/media/notifications_pattern_phone_icons.png Binary files differindex bee66c9..09d8a83 100644 --- a/docs/html/design/media/notifications_pattern_phone_icons.png +++ b/docs/html/design/media/notifications_pattern_phone_icons.png diff --git a/docs/html/design/media/notifications_pattern_priority.png b/docs/html/design/media/notifications_pattern_priority.png Binary files differdeleted file mode 100644 index e89835c..0000000 --- a/docs/html/design/media/notifications_pattern_priority.png +++ /dev/null diff --git a/docs/html/design/media/notifications_pattern_real_time_people.png b/docs/html/design/media/notifications_pattern_real_time_people.png Binary files differindex d03b6f0..2af40b8 100644 --- a/docs/html/design/media/notifications_pattern_real_time_people.png +++ b/docs/html/design/media/notifications_pattern_real_time_people.png diff --git a/docs/html/design/media/notifications_pattern_social_fail.png b/docs/html/design/media/notifications_pattern_social_fail.png Binary files differindex aa0e028..2c8fddc 100644 --- a/docs/html/design/media/notifications_pattern_social_fail.png +++ b/docs/html/design/media/notifications_pattern_social_fail.png diff --git a/docs/html/design/media/notifications_pattern_two_actions.png b/docs/html/design/media/notifications_pattern_two_actions.png Binary files differdeleted file mode 100644 index 7c19f2e..0000000 --- a/docs/html/design/media/notifications_pattern_two_actions.png +++ /dev/null diff --git a/docs/html/design/media/principles_decide_for_me.png b/docs/html/design/media/principles_decide_for_me.png Binary files differindex 8080b4e..2d8b883 100644 --- a/docs/html/design/media/principles_decide_for_me.png +++ b/docs/html/design/media/principles_decide_for_me.png diff --git a/docs/html/design/media/principles_error.png b/docs/html/design/media/principles_error.png Binary files differindex c867fe6..9376766 100644 --- a/docs/html/design/media/principles_error.png +++ b/docs/html/design/media/principles_error.png diff --git a/docs/html/design/media/principles_information_when_need_it.png b/docs/html/design/media/principles_information_when_need_it.png Binary files differindex d78d5c5..c5ef3ca 100644 --- a/docs/html/design/media/principles_information_when_need_it.png +++ b/docs/html/design/media/principles_information_when_need_it.png diff --git a/docs/html/design/media/principles_keep_it_brief.png b/docs/html/design/media/principles_keep_it_brief.png Binary files differindex ee7dbbb..9c2813b 100644 --- a/docs/html/design/media/principles_keep_it_brief.png +++ b/docs/html/design/media/principles_keep_it_brief.png diff --git a/docs/html/design/media/principles_never_lose_stuff.png b/docs/html/design/media/principles_never_lose_stuff.png Binary files differindex 84037d9..acbefea 100644 --- a/docs/html/design/media/principles_never_lose_stuff.png +++ b/docs/html/design/media/principles_never_lose_stuff.png diff --git a/docs/html/design/media/tabs_youtube.png b/docs/html/design/media/tabs_youtube.png Binary files differindex 4ea6c1c..69e9268 100644 --- a/docs/html/design/media/tabs_youtube.png +++ b/docs/html/design/media/tabs_youtube.png diff --git a/docs/html/design/media/themes_holo_dark.png b/docs/html/design/media/themes_holo_dark.png Binary files differindex e1f4477..0a5876a 100644 --- a/docs/html/design/media/themes_holo_dark.png +++ b/docs/html/design/media/themes_holo_dark.png diff --git a/docs/html/design/media/themes_holo_inverse.png b/docs/html/design/media/themes_holo_inverse.png Binary files differindex 528d119..50be4fb 100644 --- a/docs/html/design/media/themes_holo_inverse.png +++ b/docs/html/design/media/themes_holo_inverse.png diff --git a/docs/html/design/media/themes_holo_light.png b/docs/html/design/media/themes_holo_light.png Binary files differindex 4f34bb3..edc7f77 100644 --- a/docs/html/design/media/themes_holo_light.png +++ b/docs/html/design/media/themes_holo_light.png diff --git a/docs/html/design/media/ui_overview_notifications.png b/docs/html/design/media/ui_overview_notifications.png Binary files differindex fe4375e..bc0513f 100644 --- a/docs/html/design/media/ui_overview_notifications.png +++ b/docs/html/design/media/ui_overview_notifications.png diff --git a/docs/html/design/patterns/accessibility.jd b/docs/html/design/patterns/accessibility.jd deleted file mode 100644 index a41397f..0000000 --- a/docs/html/design/patterns/accessibility.jd +++ /dev/null @@ -1,61 +0,0 @@ -page.title=Accessibility -@jd:body - -<p>One of Android's missions is to organize the world's information and make it universally accessible and useful. Accessibility is the measure of how successfully a product can be used by people with varying abilities. Our mission applies to all users-including people with disabilities such as visual impairment, color deficiency, hearing loss, and limited dexterity.</p> -<p><a href="https://www.google.com/#hl=en&q=universal+design&fp=1">Universal design</a> is the practice of making products that are inherently accessible to all users, regardless of ability. The Android design patterns were created in accordance with universal design principles, and following them will help your app meet basic usability standards. Adhering to universal design and enabling Android's accessibility tools will make your app as accessible as possible.</p> -<p>Robust support for accessibility will increase your app's user base. It may also be required for adoption by some organizations.</p> -<p><a href="http://www.google.com/accessibility/">Learn more about Google and accessibility.</a></p> - -<h2 id="tools">Android's Accessibility Tools</h2> -<p>Android includes several features that support access for users with visual impairments; they don't require drastic visual changes to your app.</p> - -<ul> - <li><strong><a href="https://play.google.com/store/apps/details?id=com.google.android.marvin.talkback">TalkBack</a></strong> is a pre-installed screen reader service provided by Google. It uses spoken feedback to describe the results of actions such as launching an app, and events such as notifications.</li> - <li><strong>Explore by Touch</strong> is a system feature that works with TalkBack, allowing you to touch your device's screen and hear what's under your finger via spoken feedback. This feature is helpful to users with low vision.</li> - <li><strong>Accessibility settings</strong> let you modify your device's display and sound options, such as increasing the text size, changing the speed at which text is spoken, and more.</li> -</ul> - -<p>Some users use hardware or software directional controllers (such as a D-pad, trackball, keyboard) to jump from selection to selection on a screen. They interact with the structure of your app in a linear fashion, similar to 4-way remote control navigation on a television.</p> - -<h2 id="tools">Guidelines</h2> -<p>The Android design principle "I should always know where I am" is key for accessibility concerns. As a user navigates through an application, they need feedback and a mental model of where they are. All users benefit from a strong sense of information hierarchy and an architecture that makes sense. Most users benefit from visual and haptic feedback during their navigation (such as labels, colors, icons, touch feedback) Low vision users benefit from explicit verbal descriptions and large visuals with high contrast.</p> -<p>As you design your app, think about the labels and notations needed to navigate your app by sound. When using Explore by Touch, the user enables an invisible but audible layer of structure in your application. Like any other aspect of app design, this structure can be simple, elegant, and robust. The following are Android's recommended guidelines to enable effective navigation for all users.</p> - -<h4>Make navigation intuitive</h4> -<p>Design well-defined, clear task flows with minimal navigation steps, especially for major user tasks. Make sure those tasks are navigable via focus controls. </p> - -<h4>Use recommended touch target sizes</h4> -<p>48 dp is the recommended touch target size for on screen elements. Read about <a href="{@docRoot}design/style/metrics-grids.html">Android Metrics and Grids</a> to learn about implementation strategies to help most of your users. For certain users, it may be appropriate to use larger touch targets. An example of this is educational apps, where buttons larger than the minimum recommendations are appropriate for children with developing motor skills and people with manual dexterity challenges.</p> - - -<h4>Label visual UI elements meaningfully</h4> -<p>In your wireframes, <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">label functional UI components</a> that have no visible text. Those components might be buttons, icons, tabs with icons, and icons with state (like stars). Developers can use the <code><a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">contentDescription</a></code> attribute to set the label.</p> - -<img src="{@docRoot}design/media/accessibility_contentdesc.png"> - -<h4>Provide alternatives to affordances that time out</h4> -<p>Your app may have icons or controls that disappear after a certain amount of time. For example, five seconds after starting a video, playback controls may fade from the screen.</p> - -<p>Due to the way that TalkBack works, those controls are not read out loud unless they are focused on. If they fade out from the screen quickly, your user may not even be aware that they are available. Therefore, make sure that you are not relying on timed out controls for high priority task flows. (This is a good universal design guideline too.) If the controls enable an important function, make sure that the user can turn on the controls again and/or their function is duplicated elsewhere. You can also change the behavior of your app when accessibility services are turned on. Your developer may be able to make sure that timed-out controls won't disappear.</p> - -<h4>Use standard framework controls or enable TalkBack for custom controls</h4> -<p>Standard Android framework controls work automatically with accessibility services and have ContentDescriptions built in by default.</p> - -<p>An oft-overlooked system control is font size. Users can turn on a system-wide large font size in Settings; using the default system font size in your application will enable the user's preferences in your app as well. To enable system font size in your app, mark text and their associated containers to be measured in <a href="{@docRoot}guide/practices/screens_support.html#screen-independence">scale pixels</a>.</p> - -<p>Also, keep in mind that when users have large fonts enabled or speak a different language than you, their type might be larger than the space you've allotted for it. Read <a href="{@docRoot}design/style/devices-displays.html">Devices and Displays</a> and <a href="http://developer.android.com/guide/practices/screens_support.html">Supporting Multiple Screens</a> for design strategies.</p> - -<p>If you use custom controls, Android has the developer tools in place to allow adherence to the above guidelines and provide meaningful descriptions about the UI. Provide adequate notation on your wireframes and direct your developer to the <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views">Custom Views</a> documentation.</p> - -<h4>Try it out yourself</h4> -<p>Turn on the TalkBack service in <strong>Settings > Accessibility</strong> and navigate your application using directional controls or eyes-free navigation.</p> - -<h2>Checklist</h2> -<ul> - <li>Make navigation intuitive</li> - <li>Use recommended touch target sizes</li> - <li>Label visual UI elements meaningfully</li> - <li>Provide alternatives to affordances that time out</li> - <li>Use standard framework controls or enable TalkBack for custom controls</li> - <li>Try it out yourself</li> -</ul>
\ No newline at end of file diff --git a/docs/html/design/patterns/actionbar.jd b/docs/html/design/patterns/actionbar.jd index 80aa77d..4206301 100644 --- a/docs/html/design/patterns/actionbar.jd +++ b/docs/html/design/patterns/actionbar.jd @@ -66,7 +66,7 @@ content, such as an app title or longer branding information. <p> Show the most important actions of your app in the actions section. Actions that don't fit in the -action bar are moved automatically to the action overflow. Long-press on an icon to view the action's name. +action bar are moved automatically to the action overflow. </p> </li> @@ -144,44 +144,28 @@ content of a CAB in order to insert the actions you would like the user to be ab <p>For more information, refer to the <a href="{@docRoot}design/patterns/selection.html">Selection pattern</a>.</p> -<h2 id="elements">View Controls</h2> -<p>If your app displays data in different views, the action bar has three different controls to allow users to switch between them: tabs, spinners, and drawers.</p> +<h2 id="elements">Action Bar Elements</h2> <h4>Tabs</h4> -<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Tabs may be fixed, where all tabs are simultaneously displayed, or may scroll, allowing a larger number of views to be presented.</p> +<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Use tabs +if you expect your users to switch views frequently.</p> <img src="{@docRoot}design/media/tabs_youtube.png"> -<p><strong>Use tabs if</strong>:</p> -<ul> -<li>You expect your app's users to switch views frequently.</li> -<li>You want the user to be highly aware of the alternate views.</li> -</ul> +<p>There are two types of tabs: fixed and scrollable.</p> -<h4>Fixed tabs</h4> <div class="layout-content-row"> <div class="layout-content-col span-6"> -<p><em>Fixed tabs</em> are always visible on the screen, and can't be moved out of the way like scrollable -tabs. Fixed tabs in the main action bar can move to the top bar when the screen orientation changes.</p> - -<p>Use fixed tabs to support quick changes between two or three app views. Fixed tabs should always allow the user to navigate between the views by swiping left or right on the content area.</p> - - </div> - <div class="layout-content-col span-7"> - - <img src="{@docRoot}design/media/action_bar_pattern_default_tabs.png"> - <div class="figure-caption"> - Default fixed tabs shown in Holo Dark & Light. - </div> - - </div> -</div> <h4>Scrollable tabs</h4> -<div class="layout-content-row"> - <div class="layout-content-col span-6"> -<p><em>Scrollable tabs</em> always take up the entire width of the bar, with the currently active view item in the center, and therefore need to live in a dedicated bar. Scrollable tabs can themselves be scrolled horizontally to bring more tabs into view.</p> -<p>Use scrollable tabs if you have a large number of views or if you're unsure how many views will be displayed because your app inserts views dynamically (for example, open chats in a messaging app that the user can navigate between). Scrollable tabs should always allow the user to navigate between the views by swiping left or right on the content area as well as swiping the tabs themselves.</p> +<p><em>Scrollable tabs</em> always take up the entire width of the bar, with the currently active view item in +the center, and therefore need to live in a dedicated bar. Scrollable tabs can themselves be +scrolled horizontally to bring more tabs into view.</p> +<p>Use scrollable tabs if you have a large number of views or if you're unsure how many views will be +displayed because your app inserts views dynamically (for example, open chats in a messaging app +that the user can navigate between). Scrollable tabs should always allow the user to navigate +between the views by swiping left or right on the content area as well as swiping the tabs +themselves.</p> </div> <div class="layout-content-col span-7"> @@ -202,43 +186,44 @@ tabs. Fixed tabs in the main action bar can move to the top bar when the screen <div class="layout-content-row"> <div class="layout-content-col span-6"> -<h4>Spinners</h4> -<p>A <em>spinner</em> is a drop-down menu that allows users to switch between views of your app. </p> -<p><strong>Use a spinner in the main action bar if</strong>:</p> -<ul> -<li>You don't want to give up the vertical screen real estate for a dedicated tab bar.</li> -<li>The user is switching between views of the same data set (for example: calendar events viewed by day, week, or month) or data sets of the same type (such as content for two different accounts).</li> -</ul> +<h4>Fixed tabs</h4> +<p><em>Fixed tabs</em> are always visible on the screen, and can't be moved out of the way like scrollable +tabs. Fixed tabs in the main action bar can move to the top bar when the screen orientation changes.</p> </div> <div class="layout-content-col span-7"> - <img src="{@docRoot}design/media/action_bar_pattern_spinner.png"> + <img src="{@docRoot}design/media/action_bar_pattern_default_tabs.png"> <div class="figure-caption"> - Action bar spinner from Calendar application. + Default fixed tabs shown in Holo Dark & Light. </div> </div> </div> -<h4>Drawers</h4> <div class="layout-content-row"> <div class="layout-content-col span-6"> -<p>A <em>drawer</em> is a slide-out menu that allows users to switch between views of your app. It can be opened by touching the action bar's app icon (decorated with the Up caret.) Because it relies on Up navigation, a drawer is only suitable for use at the topmost level of your app's hierarchy.</p> -<p><strong>Open a drawer from the main action bar if</strong>:</p> +<h4>Spinners</h4> +<p>A <em>spinner</em> is a drop-down menu that allows users to switch between views of your app. </p> +<p><strong>Use spinners rather than tabs in the main action bar if</strong>:</p> <ul> <li>You don't want to give up the vertical screen real estate for a dedicated tab bar.</li> -<li>You want to provide direct navigation to a number of views within your app which don't have direct relationships between each other.</li> +<li>You expect your app's users to switch views infrequently.</li> </ul> </div> <div class="layout-content-col span-7"> - <img src="{@docRoot}design/media/actionbar_drawer.png"> + + <img src="{@docRoot}design/media/action_bar_pattern_spinner.png"> + <div class="figure-caption"> + Action bar spinner from Calendar application. + </div> + </div> </div> -<h2>Action buttons</h2> +<h4>Action buttons</h4> <p><em>Action buttons</em> on the action bar surface your app's most important activities. Think about which buttons will get used most often, and order them accordingly. Depending on available screen real estate, the system shows your most important actions as action buttons and moves the rest to the diff --git a/docs/html/design/patterns/app-structure.jd b/docs/html/design/patterns/app-structure.jd index a483522..e2398ed 100644 --- a/docs/html/design/patterns/app-structure.jd +++ b/docs/html/design/patterns/app-structure.jd @@ -185,18 +185,28 @@ collections of items. Then use multi-select to allow application of those action in a category view.</p> <h2 id="details">Details</h2> -<p>The detail view allows you to view and act on your data. The layout of the detail view depends on the data type being displayed, and therefore differs widely among apps.</p> +<p>The detail view allows you to view and act on your data. The layout of the detail view depends on +the data type being displayed, and therefore differs widely among apps.</p> <div class="layout-content-row"> <div class="layout-content-col span-4"> <h4>Layout</h4> -<p>Consider the activities people will perform in the detail view and arrange the layout accordingly.</p> +<p>Consider the activities people will perform in the detail view and arrange the layout accordingly. +For immersive content, make use of the lights-out mode to allow for distraction-free viewing of +full-screen content.</p> + + <img src="{@docRoot}design/media/app_structure_people_detail.png"> </div> <div class="layout-content-col span-9"> - <img src="{@docRoot}design/media/app_structure_people_detail.png"> + <img src="{@docRoot}design/media/app_structure_book_detail_page_flip.png"> + <div class="figure-caption"> + Google Books' detail view is all about replicating the experience of reading an actual book. + The page-flip animation reinforces that notion. To create an immersive experience the app + enters lights-out mode, which hides all system UI affordances. + </div> <div class="figure-caption"> The purpose of the People app's detail view is to surface communication options. The list view @@ -207,25 +217,9 @@ in a category view.</p> </div> </div> -<div class="layout-content-row"> - <div class="layout-content-col span-4"> - -<h4>Lights-out mode</h4> -<p>Immersive content like media and games is best experienced full screen without distractions. But that doesn't mean you can't also offer actions on the content like sharing, commenting, or searching. If the user hasn't interacted with any of the controls after a short period of time, automatically fade away the action bar and all system UI affordances so the user can lean back and enjoy the content. We call this lights-out mode. Later, if the user wants to take some action, they can touch anywhere on the screen to exit lights-out mode and bring back the controls.</p> - - </div> - <div class="layout-content-col span-9"> - - <img src="{@docRoot}design/media/app_structure_book_detail_page_flip.png"> - <div class="figure-caption"> - Google Books' detail view replicates the immersive experience of reading an actual book through lights-out mode and a page-flip animation. - </div> - </div> -</div> - <h4>Make navigation between detail views efficient</h4> <p>If your users are likely to want to look at multiple items in sequence, allow them to navigate -between items from within the detail view. Use swipe views or other techniques, such as thumbnail view controls, +between items from within the detail view. Use swipe views or other techniques, such as filmstrips, to achieve this.</p> <img src="{@docRoot}design/media/app_structure_gmail_swipe.png"> @@ -235,8 +229,8 @@ to achieve this.</p> <img src="{@docRoot}design/media/app_structure_gallery_filmstrip.png"> <div class="figure-caption"> - In addition to supporting swipe gestures to move left or right through pages, Magazines provides a - thumbnail view control that lets people quickly jump to specific pages. + In addition to supporting swipe gestures to move left or right through images, Gallery provides a + filmstrip control that lets people quickly jump to specific images. </div> <h2 id="checklist">Checklist</h2> diff --git a/docs/html/design/patterns/help.jd b/docs/html/design/patterns/help.jd deleted file mode 100644 index 4a92c7b..0000000 --- a/docs/html/design/patterns/help.jd +++ /dev/null @@ -1,114 +0,0 @@ -page.title=Help -@jd:body - -<p>We wish we could guarantee that if you follow every piece of advice on this website, everyone will be able to learn and use your app without a hitch. Sadly, that's not the case.</p> - -<p>Some of your users will run into questions or problems along the way. They'll be looking for answers <strong>within your app</strong>, and if they don't find them quickly, they may leave and never come back.</p> - -<p>This page covers design patterns for making help accessible in your app and tips for creating help content for users who are eager for assistance.</p> - -<h2 id="your-app">Designing Help into Your App</h2> - -<h3>Don't show unsolicited help, except in very limited cases</h3> -<p>Naturally, you want everyone to quickly learn the ropes, discover the cool features, and get the most out of your app. So you might be tempted to present a one-time introductory slideshow, video, or splash screen to all new users when they first open the app. Or you might be drawn to the idea of displaying helpful text bubbles or dialogs when users interact with certain features for the first time.</p> -<p>In almost all cases, we advise <strong>against</strong> approaches like these because:</p> -<ul> - <li><strong>They're interruptions.</strong> People will be eager to start using your app, and anything you put in front of them will feel like an obstacle or possibly an annoyance, despite your good intentions. And because they didn't ask for it, they probably won't pay close attention to it.</li> - <li><strong>They're usually not necessary.</strong> If you have usability concerns about an aspect of your app, don't just throw help at the problem. Try to solve it in the UI. Apply Android design patterns, styles, and building blocks, and you'll go a long way in reducing the need to educate your users.</li> -</ul> -<p>The only reason for showing pure help content to new users unsolicited is:<br> -<em>To teach high value functionality that's only available through an atypical use of a gesture.</em></p> - -<p>For example, we use help content to teach users how to place apps on their Home Screen. This functionality is:</p> -<div class="layout-content-row"> - <div class="layout-content-col span-8"> - <ol> - <li><strong>High value</strong> - <p>Without it, users wouldn't be able to customize the most frequently-visited Android screen to meet their needs.</p></li> - <li><strong>Available only through a gesture</strong> - <p>Users can't do this through a button or a menu.</p></li> - <li><strong>Atypical for the gesture</strong> - <p>Many high value functions invoked through a gesture - like scrolling, swiping tabs, and turning pages - are common and yield expected results. Users will be able to discover them in your app, and unsolicited help is unnecessary. But here, the gesture does something unexpected: press and hold doesn't just select an app, it also immediately navigates to the Home Screen and creates a shortcut to the app that can then be dragged around.</p></li> - </ol> - <p>However, this is an exceptional case. Most functionality doesn't meet all three of these criteria.</p> - </div> - <div class="layout-content-col span-5"> - <img src="{@docRoot}design/media/help_cling.png"> - <div class="figure-caption"> - The first time each user visits the All Apps screen, a semi-transparent overlay appears to teach an important gesture. - </div> - </div> - <p class="clearfix">Bottom line: when it comes to offering help in your app, it's much better to <strong>let users come to you</strong> when they need it.</p> -</div> - -<h3 id="standard-design">Follow the standard design for navigating to help</h3> - -<p>On every screen in your app, offer help in the <a href="{@docRoot}design/patterns/actionbar.html">action overflow</a>. Always make it the very last item in the menu and label it "Help".</p> - -<div class="layout-content-row"> - <div class="layout-content-col span-7"> - <img src="{@docRoot}design/media/help_overflow.png"> - </div> - <div class="layout-content-col span-6"> - <img src="{@docRoot}design/media/help_solo_overflow.png"> - <div class="figure-caption"> - Even if your screen has no other action overflow items, "Help" should appear there and not be promoted to the action bar. - </div> - </div> - <p>We've established this standard design so that when users are desperate for help, they won't have to hunt to find it (see design principle: <a href="{@docRoot}design/get-started/principles.html#give-me-tricks">Give me tricks that work everywhere</a>).</p> -</div> - -<h3 id="help-urgent">Assume that every call for help is urgent</h3> - -<p>In addition to help, you might want to expose miscellaneous other information, such as copyright info, credits, terms of service, and privacy policy.</p> - -<p>Let users access this information through your Help menu item, but don't give it prominence equal to the core help content. Optimize the flow for people who have urgent questions about how to do something or why something is happening in your app. The smaller subset of users who are looking for legal fine print or the names of the people who created the app won't be as burdened by taking a few extra steps.</p> - -<p>The same is true for any communication options you might want to provide, such as contacting customer support or submitting feedback. Offer these options in a way that doesn't add an extra step before users see help. When you put the help content forward, you increase the likelihood that users will find the answers on their own, which in turn reduces your support costs.</p> - -<p>When someone chooses "Help":</p> - -<div class="layout-content-row"> - <div class="layout-content-col span-4"> - <img src="{@docRoot}design/media/help_dont.png"> - </div> - <div class="layout-content-col span-4"> - <img src="{@docRoot}design/media/help_better.png"> - </div> - <div class="layout-content-col span-5"> - <img src="{@docRoot}design/media/help_evenbetter.png"> - </div> -</div> - -<div class="layout-content-row"> - <div class="layout-content-col span-4"> - <h4 class="do-dont-label bad">Don't</h4> - <p>Present a dialog asking them to choose between help and other options.</p> - </div> - <div class="layout-content-col span-4"> - <h4 class="do-dont-label good">Better</h4> - <p>Immediately launch a web browser with help content. Place other options in a footer.</p> - </div> - <div class="layout-content-col span-5"> - <h4 class="do-dont-label good">Even Better</h4> - <p>Build a help screen in your app and offer other options in the action bar.</p> - <p>This requires more development work than launching a web browser, but it's a nicer experience for users because they don't leave your app to get the help they need and doesn't require a network connection.</p> - </div> -</div> - -<h2>Principles for Writing On-Screen Help Content</h2> - -<h4>Help is part of the UI</h4> -<p>On-screen help is an extension of your app's UI, not a description of it. All words on the screen from the core app to the help should follow our <a href="{@docRoot}design/style/writing.html">Writing Style</a> principles so that the end-to-end experience feels seamless and cohesive.</p> - -<h4>Make every pixel count</h4> -<p>It's not necessary to document every single detail about your app, especially things that are extremely apparent just by looking at the UI, or behaviors that are standard for the platform. Surface just the key additional information that the on-screen text doesn't have room to describe, in a way that makes it easy to map to the screen.</p> - -<h4>Pictures are faster than words</h4> -<p>In describing key UI elements and providing step-by-step instructions, consider combining text with icons, partial screenshots with callouts, and other imagery. You'll need fewer words to explain things, and users will absorb the information more quickly.</p> - -<h4>Help me scan, not read</h4> -<p>People don't read help from start to finish. They scan around, looking for a piece of information containing the answer they need. Make it less burdensome with friendly formatting and layout choices like bold headings, bulleted and numbered lists, tables, and white space between paragraphs. And if you have a large amount of content, divide it into multiple screens to cut down on scrolling.</p> - -<h4>Take me straight to the answer</h4> -<p>What's better than a screen that's easy to scan? A screen that requires no scanning at all because the answer's right there. Consider having each screen in your app navigate to help that's relevant just to that screen. We call this <em>contextual help</em>, and it's the holy grail of user assistance. If you take this approach, be sure to also provide a way to get to the rest of the help content.</p>
\ No newline at end of file diff --git a/docs/html/design/patterns/multi-pane-layouts.jd b/docs/html/design/patterns/multi-pane-layouts.jd index f752be2..0e63e32 100644 --- a/docs/html/design/patterns/multi-pane-layouts.jd +++ b/docs/html/design/patterns/multi-pane-layouts.jd @@ -26,8 +26,8 @@ left pane. Make sure to keep the item in the left pane selected in order to esta relationship between the panels.</p> <h2 id="orientation">Compound Views and Orientation Changes</h2> -<p>Screens should strive to have the same functionality regardless of orientation. If you use a compound view in -one orientation, try not to split it up when the user rotates the screen. There are several techniques +<p>Screens should have the same functionality regardless of orientation. If you use a compound view in +one orientation, don't split it up when the user rotates the screen. There are several techniques you can use to adjust the layout after orientation change while keeping functional parity intact.</p> <div class="layout-content-row"> @@ -83,7 +83,9 @@ width and vice versa.</p> <div class="layout-content-col span-5"> <h4>Show/hide</h4> -<p>If your screen cannot accommodate the compound view on rotation show the right pane in full screen view on rotation to portrait. Use the Up icon in action bar to show the parent screen.</p> +<p>After rotating the device, show the right pane in fullscreen view. Use the Up icon in the action bar +to show the left panel and allow navigation to a different email. Hide the left panel by touching +the content in the detail panel.</p> </div> </div> @@ -102,7 +104,7 @@ width and vice versa.</p> <p>Look for opportunities to consolidate your views into multi-panel compound views.</p> </li> <li> -<p>Make sure that your screens try to provide functional parity after the screen orientation +<p>Make sure that your screens provide functional parity after the screen orientation changes.</p> </li> </ul> diff --git a/docs/html/design/patterns/notifications.jd b/docs/html/design/patterns/notifications.jd index fbb05e3..ad88a01 100644 --- a/docs/html/design/patterns/notifications.jd +++ b/docs/html/design/patterns/notifications.jd @@ -1,164 +1,11 @@ page.title=Notifications @jd:body -<p>The notification system allows your app to keep the user informed about events, such as new chat messages or a calendar event. Think of notifications as a news channel that alerts the user to important events as they happen or a log that chronicles events while the user is not paying attention.</p> - -<h4>New in Jelly Bean</h4> -<p>In Jelly Bean, notifications received their most important structural and functional update since the beginning of Android.</p> -<ul> - <li>Notifications can include actions that enable the user to immediately act on a notification from the notification drawer.</li> - <li>Notifications are now more flexible in size and layout.</li> - <li>Stacked notifications can be collapsed and expanded.</li> - <li>A priority flag was introduced that helps to sort notifications by importance rather than time only.</li> -</ul> - -<h2>Anatomy of a notification</h2> - -<div class="layout-content-row"> - <div class="layout-content-col span-6"> - <h4>Base Layout</h4> - <p>At a minimum, all notifications consist of a base layout, including:</p> - <ul> - <li>the sending application's notification icon or the sender's photo</li> - <li>a notification title and message</li> - <li>an optional timestamp</li> - <li>a secondary icon to identify the sending application when the sender's image is shown for the main icon</li> - </ul> - <p>The base notification layout has not changed in Jelly Bean, so app notifications designed for versions earlier than Jelly Bean still look and work the same.</p> - </div> - <div class="layout-content-col span-6"> - <img src="{@docRoot}design/media/notifications_pattern_anatomy.png"> - <div class="figure-caption"> - Base layout of a notification - </div> - </div> -</div> - -<h4>Expanded layouts</h4> -<p>With Jelly Bean you have the option to provide more event detail. You can use this to show the first few lines of a message or show a larger image preview. This provides the user with additional context, and - in some cases - may allow the user to read a message in its entirety. The user can pinch-zoom or two-finger glide in order to toggle between base and expanded layouts. For single event notifications, Android provides two expanded layout templates (text and image) for you to re-use in your application.</p> - -<img src="{@docRoot}design/media/notifications_pattern_expandable.png"> - -<h4>Actions</h4> -<div class="layout-content-row"> - <div class="layout-content-col span-6"> - <p>Starting with Jelly Bean, Android supports optional actions that are displayed at the bottom of the notification. With actions, users can handle the most common tasks for a particular notification from within the notification shade without having to open the originating application. This speeds up interaction and, in conjunction with "swipe-to-dismiss", helps users to streamline their notification triaging experience.</p> - <p>Be judicious with how many actions you include with a notification. The more actions you include, the more cognitive complexity you create. Limit yourself to the fewest number of actions possible by only including the most imminently important and meaningful ones.</p> - <p>Good candidates for actions on notifications are actions that are:</p> - <ul> - <li>essential, frequent and typical for the content type you're displaying</li> - <li>time-critical</li> - <li>not overlapping with neighboring actions</li> - </ul> - <p>Avoid actions that are:</p> - <ul> - <li>ambiguous</li> - <li>implicit to the default action of the notification (such as "Read" or "Open")</li> - </ul> - </div> - <div class="layout-content-col span-7"> - <img src="{@docRoot}design/media/notifications_pattern_two_actions.png"> - <div class="figure-caption"> - Calendar reminder notification with two actions - </div> - </div> -</div> - -<p>You can specify a maximum of three actions, each consisting of an action icon and an action name. Adding actions to a base layout will make the notification expandable, even if the notification doesn't have an expanded layout. Since actions are only shown for expanded notifications and are otherwise hidden, you must make sure that any action a user can invoke from a notification is available from within the associated application as well.</p> - -<h2>Design guidelines</h2> -<div class="layout-content-row"> - <div class="layout-content-col span-6"> - <img src="{@docRoot}design/media/notifications_pattern_personal.png"> - </div> - <div class="layout-content-col span-7"> - <h4>Make it personal</h4> - <p>For notifications of items sent by another user (such as a message or status update), include that person's image.</p> - <p>Remember to include the app icon as a secondary icon in the notification, so that the user can still identify which app posted it.</p> - </div> -</div> - -<h4>Navigate to the right place</h4> -<p>When the user touches a notification, open your app to the place where the user can consume and -act upon the data referenced in the notification. In most cases this will be the detail view of a -single data item such as a message, but it might also be a summary view if the notification is -stacked (see <em>Stacked notifications</em> below) and references multiple items. If in any of those cases -the user is taken to a hierarchy level below your app's top-level, insert navigation into your app's -back stack to allow them to navigate to your app's top level using the system back key. For more -information, see the chapter on <em>System-to-app navigation</em> in the -<a href="{@docRoot}design/patterns/navigation.html">Navigation</a> design pattern.</p> -<h4>Timestamps for time sensitive events</h4> -<p>By default, standard Android notifications include a timestamp. Consider -whether the timestamp is valuable in the context of your notification.</p> -<p>Include a timestamp if the user likely needs to know how long ago the notification occurred. Good -candidates for timestamps include communication notifications (email, messaging, chat, voicemail) -where the user may need the timestamp information to understand the context of a message or to -tailor a response.</p> - -<h4>Correctly set and manage notification priority</h4> -<p>Starting with Jelly Bean, Android now supports a priority flag for notifications. It allows you to influence where your notification will appear in comparison to other notifications and help to make sure that users always see their most important notifications first. You can choose from the following priority levels when posting a notification:</p> - -<img src="{@docRoot}design/media/notifications_pattern_priority.png"> - -<table> - <tr> - <th><strong>Priority</strong></th> - <th><strong>Use</strong></th> - </tr> - <tr> - <td>MAX</td> - <td>Use for critical and urgent notifications that alert the user to a condition that is time-critical or needs to be resolved before they can continue with a particular task.</td> - </tr> - <tr> - <td>HIGH</td> - <td>Use high priority notifications primarily for important communication, such as message or chat events with content that is particularly interesting for the user.</td> - </tr> - <tr> - <td>DEFAULT</td> - <td>The default priority. Keep all notifications that don't fall into any of the other categories at this priority level.</td> - </tr> - <tr> - <td>LOW</td> - <td>Use for notifications that you still want the user to be informed about, but that rate low in urgency.</td> - </tr> - <tr> - <td>MIN</td> - <td>Contextual/background information (e.g. weather information, contextual location information). Minimum priority notifications will not show in the status bar. The user will only discover them when they expand the notification tray.</td> - </tr> -</table> - -<h4>Stack your notifications</h4> -<p>If your app creates a notification while another of the same type is still pending, avoid creating -an altogether new notification object. Instead, stack the notification.</p> -<p>A stacked notification builds a summary description and allows the user to understand how many -notifications of a particular kind are pending.</p> -<p><strong>Don't</strong>:</p> - -<img src="{@docRoot}design/media/notifications_pattern_additional_fail.png"> - -<p><strong>Do</strong>:</p> - -<img src="{@docRoot}design/media/notifications_pattern_additional_win.png"> - -<p>You can provide more detail about the individual notifications that make up a stack by using the expanded digest layout. This allows users to gain a better sense of which notifications are pending and if they are interesting enough to be read in detail within the associated app.</p> - -<img src="{@docRoot}design/media/notifications_expand_contract_msg.png"> - -<h4>Make notifications optional</h4> -<p>Users should always be in control of notifications. Allow the user to silence the notifications from -your app by adding a notification settings item to your application settings.</p> -<h4>Use distinct icons</h4> -<p>By glancing at the notification area, the user should be able to discern what notification types are -currently pending.</p> -<p><strong>Do</strong>:</p> -<p>Look at the notification icons the Android apps already provide and create notification icons for - your app that are sufficiently distinct in appearance.</p> -<p><strong>Don't</strong>:</p> -<p>Use color to distinguish your app from others. Notification icons should be <a href="{@docRoot}design/style/iconography.html#notification">white</a>.</p> - -<h2>Building notifications that users care about</h2> -<p>To create an app that feels streamlined, pleasant, and respectful, it is important to design your notifications carefully. Notifications embody your app's voice, and contribute to your app's personality. Unwanted or unimportant notifications can annoy the user, so use them judiciously.</p> - +<p>The notification system allows your app to keep the user informed about important events, such as +new messages in a chat app or a calendar event.</p> +<p>To create an app that feels streamlined, pleasant, and respectful, it is important to design your +notifications carefully. Notifications embody your app's voice, and contribute to your app's +personality. Unwanted or unimportant notifications can annoy the user, so use them judiciously.</p> <h4>When to display a notification</h4> <p>To create an application that people love, it's important to recognize that the user's attention and focus is a resource that must be protected. To use an analogy that might resonate with software @@ -219,10 +66,108 @@ develop a widget that they can choose to place on their home screen.</p> </div> <div class="layout-content-col span-6"> + <img src="{@docRoot}design/media/notifications_pattern_social_fail.png"> + + </div> +</div> + +<h2 id="design-guidelines">Design Guidelines</h2> + +<div class="layout-content-row"> + <div class="layout-content-col span-6"> + + <img src="{@docRoot}design/media/notifications_pattern_anatomy.png"> + + </div> + <div class="layout-content-col span-6"> + +<h4>Make it personal</h4> +<p>For notifications of items sent by another user (such as a message or status update), include that +person's image.</p> +<p>Remember to include the app icon as a secondary icon in the notification, so that the user can +still identify which app posted it.</p> + + </div> +</div> + +<h4>Navigate to the right place</h4> +<p>When the user touches a notification, be open your app to the place where the user can consume and +act upon the data referenced in the notification. In most cases this will be the detail view of a +single data item (e.g. a message), but it might also be a summary view if the notification is +stacked (see <em>Stacked notifications</em> below) and references multiple items. If in any of those cases +the user is taken to a hierarchy level below your app's top-level, insert navigation into your app's +back stack to allow them to navigate to your app's top level using the system back key. For more +information, see the chapter on <em>System-to-app navigation</em> in the +<a href="{@docRoot}design/patterns/navigation.html">Navigation</a> design pattern.</p> +<h4>Timestamps for time sensitive events</h4> +<p>By default, standard Android notifications include a timestamp in the upper right corner. Consider +whether the timestamp is valuable in the context of your notification. If the timestamp is not +valuable, consider if the event is important enough to warrant grabbing the user's attention with a +notification. If the notification is important enough, decide if you would like to opt out of +displaying the timestamp.</p> +<p>Include a timestamp if the user likely needs to know how long ago the notification occurred. Good +candidates for timestamps include communication notifications (email, messaging, chat, voicemail) +where the user may need the timestamp information to understand the context of a message or to +tailor a response.</p> +<h4>Stack your notifications</h4> +<p>If your app creates a notification while another of the same type is still pending, avoid creating +an altogether new notification object. Instead, stack the notification.</p> +<p>A stacked notification builds a summary description and allows the user to understand how many +notifications of a particular kind are pending.</p> +<p><strong>Don't</strong>:</p> + +<img src="{@docRoot}design/media/notifications_pattern_additional_fail.png"> + +<p><strong>Do</strong>:</p> + +<img src="{@docRoot}design/media/notifications_pattern_additional_win.png"> + +<p>If you keep the summary and detail information on different screens, a stacked notification may need +to open to a different place in the app than a single notification.</p> +<p>For example, a single email notification should always open to the content of the email, whereas a +stacked email notification opens to the Inbox view.</p> +<h4>Clean up after yourself</h4> +<p>Just like calendar events, some notifications alert the user to an event that happens at a +particular point in time. After that moment has passed, the notification is likely not important to +the user anymore, and you should consider removing it automatically. The same is true for active +chat conversations or voicemail messages the user has listened to, users should not have to manually +dismiss notifications independently from taking action on them.</p> + +<div class="vspace size-1"> </div> + +<div class="layout-content-row"> + <div class="layout-content-col span-7"> + +<h4>Provide a peek into your notification</h4> +<p>You can provide a short preview of your notification's content by providing optional ticker text. +The ticker text is shown for a short amount of time when the notification enters the system and then +hides automatically.</p> + + </div> + <div class="layout-content-col span-6"> + + <img src="{@docRoot}design/media/notifications_pattern_phone_ticker.png"> + </div> </div> +<h4>Make notifications optional</h4> +<p>Users should always be in control of notifications. Allow the user to silence the notifications from +your app by adding a notification settings item to your application settings.</p> +<h4>Use distinct icons</h4> +<p>By glancing at the notification area, the user should be able to discern what notification types are +currently pending.</p> +<p><strong>Do</strong>:</p> +<ul> +<li>Look at the notification icons the Android apps already provide and create notification icons for + your app that are sufficiently distinct in appearance.</li> +</ul> +<p><strong>Don't</strong>:</p> +<ul> +<li>Use color to distinguish your app from others. Notification icons should generally be monochrome.</li> +</ul> + <h2 id="interacting-with-notifications">Interacting With Notifications</h2> <div class="layout-content-row"> diff --git a/docs/html/design/patterns/swipe-views.jd b/docs/html/design/patterns/swipe-views.jd index b98a063..95d65dd 100644 --- a/docs/html/design/patterns/swipe-views.jd +++ b/docs/html/design/patterns/swipe-views.jd @@ -65,9 +65,6 @@ using the swipe gesture to navigate to the next/previous detail view.</p> the swipe gesture.</p> </li> <li> -<p>If a view contains content that exceeds the width of the screen such as a wide Email message, make sure the user's initial swipes will scroll horizontally within the view. Once the end of the content is reached, an additional swipe should navigate to the next view. In addition, support the use of edge swipes to immediately navigate between views when content scrolls horizontally.</p> -</li> -<li> <p>Consider adding contextual information in your detail view that informs the user about the relative list position of the currently visible item.</p> </li> diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs index bc028e5..f11e965 100644 --- a/docs/html/distribute/distribute_toc.cs +++ b/docs/html/distribute/distribute_toc.cs @@ -74,6 +74,8 @@ <span class="en">Google Play Badges</a></li> <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/brand.html"> <span class="en">Brand Assets and Guidelines</a></li> + <li><a href="<?cs var:toroot ?>distribute/promote/device-art.html"> + <span class="en">Device Art Generator</a></li> </ul> </li> diff --git a/docs/html/distribute/googleplay/strategies/app-quality.jd b/docs/html/distribute/googleplay/strategies/app-quality.jd index 26d71d7..6ea862b 100644 --- a/docs/html/distribute/googleplay/strategies/app-quality.jd +++ b/docs/html/distribute/googleplay/strategies/app-quality.jd @@ -67,7 +67,7 @@ You can improve your apps's UI responsiveness by moving long-running operations <p> A great way to improve UI performance is to minimize the complexity of your layouts. If you open up <a href="{@docRoot}tools/help/hierarchy-viewer.html">hierarchyviewer</a> and see that your layouts are more than 5 levels deep, it may be time to simplify your layout. Consider refactoring those deeply nested LinearLayouts into RelativeLayout. The impact of View objects is cumulative — each one costs about 1 to 2 KB of memory, so large view hierarchies can be a recipe for disaster, causing frequent VM garbage collection passes which block the main (UI) thread. You can learn more in <a href="http://www.youtube.com/watch?v=wDBM6wVEO70">World of ListView</a>, another session at Google I/O.</p> <p> -Lastly, pointed out in the blog post <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">Traceview War Story</a>, tools like <a href="{@docRoot}tools/traceview.html">traceview</code> and <a href="{@docRoot}tools/ddms.html">ddms</a> can be your best friends in improving your app by profiling method calls and monitoring VM memory allocations, respectively.</p> +Lastly, pointed out in the blog post <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">Traceview War Story</a>, tools like <a href="{@docRoot}tools/help/traceview.html">traceview</code> and <a href="{@docRoot}tools/help/ddms.html">ddms</a> can be your best friends in improving your app by profiling method calls and monitoring VM memory allocations, respectively.</p> <h2 id="usability">Improve Usability</h2> @@ -93,7 +93,7 @@ Lastly, usability is an extensive and well-documented subject, with close ties t <p> There's no substitute for a real user interface designer — ideally one who's well-versed in mobile and Android, and ideally handy with both interaction and visual design. One popular venue to post openings for designers is <a href="http://jobs.smashingmagazine.com">jobs.smashingmagazine.com</a>, and leveraging social connections on Twitter and LinkedIn can surface great talent.</p> <p> -If you don't have the luxury of working with a UI designer, there are some ways in which you can improve your app's appearance yourself. First, get familiar with Adobe Photoshop, Adobe Fireworks, or some other raster image editing tool. Mastering the art of the pixel in these apps takes time, but honing this skill can help build polish across your interface designs. Also, master the resources framework by studying <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res;h=a3562fe1af94134486a8a899f02a9c2f7986c8dd;hb=master">the framework UI</a> assets and layouts and reading through the new <a href="{@docRoot}guide/components/resources/available-resources.html">resources documentation</a>. Techniques such as 9-patches and resource directory qualifiers are somewhat unique to Android, and are crucial in building flexible yet aesthetic UIs.</p> +If you don't have the luxury of working with a UI designer, there are some ways in which you can improve your app's appearance yourself. First, get familiar with Adobe Photoshop, Adobe Fireworks, or some other raster image editing tool. Mastering the art of the pixel in these apps takes time, but honing this skill can help build polish across your interface designs. Also, master the resources framework by studying <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res;h=a3562fe1af94134486a8a899f02a9c2f7986c8dd;hb=master">the framework UI</a> assets and layouts and reading through the new <a href="{@docRoot}guide/topics/resources/index.html">resources documentation</a>. Techniques such as 9-patches and resource directory qualifiers are somewhat unique to Android, and are crucial in building flexible yet aesthetic UIs.</p> <p> Before you get too far in designing your app and writing the code, make sure to visit the Android Design site and learn about the vision, the building blocks, and the tools of designing beautiful and inspiring user interfaces.</p> @@ -105,7 +105,7 @@ Again, listen to your users by collecting and responding to feature requests. Be <h2 id="integrate">Integrate with the System and Third-Party apps</h2> <p> -A great way to deliver a delightful user experience is to integrate tightly with the operating system. Features like <a href="{@docRoot}guide/topics/appwidgets/index.html">Home screen widgets</a>, <a href={@docRoot}design/patterns/notifications.html">rich notifications</a>, <a href="{@docRoot}guide/topics/search/index.html">global search integration</a>, and {@link android.widget.QuickContactBadge Quick Contacts} are fairly low-hanging fruit in this regard. </p> +A great way to deliver a delightful user experience is to integrate tightly with the operating system. Features like <a href="{@docRoot}guide/topics/appwidgets/index.html">Home screen widgets</a>, <a href="{@docRoot}design/patterns/notifications.html">rich notifications</a>, <a href="{@docRoot}guide/topics/search/index.html">global search integration</a>, and {@link android.widget.QuickContactBadge Quick Contacts} are fairly low-hanging fruit in this regard. </p> <p>For some app categories, basic features like home screen widgets are par for the course. Not including them is a sure-fire way to tarnish an otherwise positive user experience. Some apps can achieve even tighter OS integration with Android's contacts, accounts, and sync APIs. </p> <p> diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png Binary files differnew file mode 100644 index 0000000..f340a62 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png Binary files differnew file mode 100644 index 0000000..2a4e595 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png Binary files differnew file mode 100644 index 0000000..f3a3120 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png Binary files differnew file mode 100644 index 0000000..c40b37c --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png Binary files differnew file mode 100644 index 0000000..aae684b --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png Binary files differnew file mode 100644 index 0000000..61a0da9 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png Binary files differnew file mode 100644 index 0000000..e21a421 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png Binary files differnew file mode 100644 index 0000000..2999f35 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png Binary files differnew file mode 100644 index 0000000..cefdd35 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png Binary files differnew file mode 100644 index 0000000..8f7aec7 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png Binary files differnew file mode 100644 index 0000000..b2908a8 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png Binary files differnew file mode 100644 index 0000000..7f4b0b4 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png Binary files differnew file mode 100644 index 0000000..c10bd53 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png Binary files differnew file mode 100644 index 0000000..8b5cc5a --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png Binary files differnew file mode 100644 index 0000000..f525e8e --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png Binary files differnew file mode 100644 index 0000000..e26bfe1 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png Binary files differnew file mode 100644 index 0000000..ea26b73 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png Binary files differnew file mode 100644 index 0000000..ed4ad0c --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png Binary files differnew file mode 100644 index 0000000..74bd077 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png Binary files differnew file mode 100644 index 0000000..bb4bec8 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png Binary files differnew file mode 100644 index 0000000..8b9a3d9 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_back.png b/docs/html/distribute/promote/device-art-resources/xoom/land_back.png Binary files differnew file mode 100644 index 0000000..e1eb075 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/land_back.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png b/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png Binary files differnew file mode 100644 index 0000000..15e5f50 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png b/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png Binary files differnew file mode 100644 index 0000000..885508a --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_back.png b/docs/html/distribute/promote/device-art-resources/xoom/port_back.png Binary files differnew file mode 100644 index 0000000..290ca35 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/port_back.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png b/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png Binary files differnew file mode 100644 index 0000000..8b3dca3 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png b/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png Binary files differnew file mode 100644 index 0000000..895b75e --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png diff --git a/docs/html/distribute/promote/device-art-resources/xoom/thumb.png b/docs/html/distribute/promote/device-art-resources/xoom/thumb.png Binary files differnew file mode 100644 index 0000000..8fd08a4 --- /dev/null +++ b/docs/html/distribute/promote/device-art-resources/xoom/thumb.png diff --git a/docs/html/distribute/promote/device-art.jd b/docs/html/distribute/promote/device-art.jd new file mode 100644 index 0000000..af36625 --- /dev/null +++ b/docs/html/distribute/promote/device-art.jd @@ -0,0 +1,517 @@ +page.title=Device Art Generator +@jd:body + +<p>The device art generator allows you to quickly wrap your app screenshots in real device artwork. +This provides better visual context for your app screenshots on your web site or in other +promotional materials.</p> + +<p class="note"><strong>Note</strong>: Do <em>not</em> use graphics created here in your 1024x500 +feature image or screenshots for your Google Play app listing.</p> + +<hr> + +<div class="supported-browser"> + +<div class="layout-content-row"> + <div class="layout-content-col span-3"> + <h4>Step 1</h4> + <p>Drag a screenshot from your desktop onto a device to the right.</p> + </div> + <div class="layout-content-col span-10"> + <ul id="device-list"></ul> + </div> +</div> + +<hr> + +<div class="layout-content-row"> + <div class="layout-content-col span-3"> + <h4>Step 2</h4> + <p>Customize the generated image and drag it to your desktop to save.</p> + <p id="frame-customizations"> + <input type="checkbox" id="output-shadow" checked="checked" class="form-field-checkbutton"> + <label for="output-shadow">Shadow</label><br> + <input type="checkbox" id="output-glare" checked="checked" class="form-field-checkbutton"> + <label for="output-glare">Screen Glare</label><br><br> + <a class="button" id="rotate-button">Rotate</a> + </p> + </div> + <div class="layout-content-col span-10"> + <div id="output">No input image.</div> + </div> +</div> + +</div> + +<div class="unsupported-browser" style="display: none"> + <p class="warning"><strong>Error:</strong> This page requires + <span id="unsupported-browser-reason">certain features</span>, which your web browser + doesn't support. To continue, navigate to this page on a supported web browser, such as + <strong>Google Chrome</strong>.</p> + <a href="https://www.google.com/chrome/" class="button">Get Google Chrome</a> + <br><br> +</div> + +<style> + h4 { + text-transform: uppercase; + } + + #device-list { + padding: 0; + margin: 0; + } + + #device-list li { + display: inline-block; + vertical-align: bottom; + margin: 0; + margin-right: 20px; + text-align: center; + } + + #device-list li .thumb-container { + display: inline-block; + } + + #device-list li .thumb-container img { + margin-bottom: 8px; + opacity: 0.6; + + -webkit-transition: -webkit-transform 0.2s, opacity 0.2s; + -moz-transition: -moz-transform 0.2s, opacity 0.2s; + transition: transform 0.2s, opacity 0.2s; + } + + #device-list li.drag-hover .thumb-container img { + opacity: 1; + + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + transform: scale(1.1); + } + + #device-list li .device-details { + font-size: 13px; + line-height: 16px; + color: #888; + } + + #device-list li .device-url { + font-weight: bold; + } + + #output { + color: #f44; + font-style: italic; + } + + #output img { + max-height: 500px; + } +</style> +<script> + // Global variables + var g_currentImage; + var g_currentDevice; + + // Global constants + var MSG_INVALID_INPUT_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files ' + + 'matching the target device\'s screen resolution in either portrait or landscape.'; + var MSG_NO_INPUT_IMAGE = 'Drag a screenshot (in PNG format) from your desktop onto a ' + + 'target device above.' + var MSG_GENERATING_IMAGE = 'Generating device art…'; + + var MAX_DISPLAY_HEIGHT = 126; // XOOM, to fit into 200px wide + + // Device manifest. + var DEVICES = [ + { + id: 'nexus_7', + title: 'Nexus 7', + url: 'http://www.android.com/devices/detail/nexus-7', + physicalSize: 7, + physicalHeight: 7.81, + density: 213, + landRes: ['shadow', 'back', 'fore'], + landOffset: [363,260], + portRes: ['shadow', 'back', 'fore'], + portOffset: [265,341], + portSize: [800,1280], + }, + { + id: 'xoom', + title: 'Motorola XOOM', + url: 'http://www.google.com/phone/detail/motorola-xoom', + physicalSize: 10, + physicalHeight: 6.61, + density: 160, + landRes: ['shadow', 'back', 'fore'], + landOffset: [218,191], + portRes: ['shadow', 'back', 'fore'], + portOffset: [199,200], + portSize: [800,1280], + }, + { + id: 'galaxy_nexus', + title: 'Galaxy Nexus', + url: 'http://www.android.com/devices/detail/galaxy-nexus', + physicalSize: 4.65, + physicalHeight: 5.33, + density: 320, + landRes: ['shadow', 'back', 'fore'], + landOffset: [371,199], + portRes: ['shadow', 'back', 'fore'], + portOffset: [216,353], + portSize: [720,1280], + }, + { + id: 'nexus_s', + title: 'Nexus S', + url: 'http://www.google.com/phone/detail/nexus-s', + physicalSize: 4.0, + physicalHeight: 4.88, + density: 240, + landRes: ['shadow', 'back', 'fore'], + landOffset: [247,135], + portRes: ['shadow', 'back', 'fore'], + portOffset: [134,247], + portSize: [480,800], + } + ]; + + DEVICES = DEVICES.sort(function(x, y) { return x.physicalSize - y.physicalSize; }); + + var MAX_HEIGHT = 0; + for (var i = 0; i < DEVICES.length; i++) { + MAX_HEIGHT = Math.max(MAX_HEIGHT, DEVICES[i].physicalHeight); + } + + // Setup performed once the DOM is ready. + $(document).ready(function() { + if (!checkBrowser()) { + return; + } + + setupUI(); + + // Set up Chrome drag-out + $.event.props.push("dataTransfer"); + document.body.addEventListener('dragstart', function(e) { + var a = e.target; + if (a.classList.contains('dragout')) { + e.dataTransfer.setData('DownloadURL', a.dataset.downloadurl); + } + }, false); + }); + + /** + * Returns the device from DEVICES with the given id. + */ + function getDeviceById(id) { + for (var i = 0; i < DEVICES.length; i++) { + if (DEVICES[i].id == id) + return DEVICES[i]; + } + return; + } + + /** + * Checks to make sure the browser supports this page. If not, + * updates the UI accordingly and returns false. + */ + function checkBrowser() { + // Check for browser support + var browserSupportError = null; + + // Must have <canvas> + var elem = document.createElement('canvas'); + if (!elem.getContext || !elem.getContext('2d')) { + browserSupportError = 'HTML5 canvas.'; + } + + // Must have FileReader + if (!window.FileReader) { + browserSupportError = 'desktop file access'; + } + + if (browserSupportError) { + $('.supported-browser').hide(); + + $('#unsupported-browser-reason').html(browserSupportError); + $('.unsupported-browser').show(); + return false; + } + + return true; + } + + function setupUI() { + $('#output').html(MSG_NO_INPUT_IMAGE); + + $('#frame-customizations').hide(); + + $('#output-shadow, #output-glare').click(function() { + createFrame(g_currentDevice, g_currentImage); + }); + + // Build device list. + $.each(DEVICES, function() { + $('<li>') + .append($('<div>') + .addClass('thumb-container') + .append($('<img>') + .attr('src', 'device-art-resources/' + this.id + '/thumb.png') + .attr('height', + Math.floor(MAX_DISPLAY_HEIGHT * this.physicalHeight / MAX_HEIGHT)))) + .append($('<div>') + .addClass('device-details') + .html((this.url + ? ('<a class="device-url" href="' + this.url + '">' + this.title + '</a>') + : this.title) + + '<br>' + this.physicalSize + '" @ ' + this.density + 'dpi' + + '<br>' + this.portSize[0] + 'x' + this.portSize[1])) + .data('deviceId', this.id) + .appendTo('#device-list'); + }); + + // Set up drag and drop. + $('#device-list li') + .live('dragover', function(evt) { + $(this).addClass('drag-hover'); + evt.dataTransfer.dropEffect = 'link'; + evt.preventDefault(); + }) + .live('dragleave', function(evt) { + $(this).removeClass('drag-hover'); + }) + .live('drop', function(evt) { + $('#output').empty().html(MSG_GENERATING_IMAGE); + $(this).removeClass('drag-hover'); + g_currentDevice = getDeviceById($(this).closest('li').data('deviceId')); + evt.preventDefault(); + loadImageFromFileList(evt.dataTransfer.files, function(data) { + if (data == null) { + $('#output').html(MSG_INVALID_INPUT_IMAGE); + return; + } + loadImageFromUri(data.uri, function(img) { + g_currentFilename = data.name; + g_currentImage = img; + createFrame(); + }); + }); + }); + + // Set up rotate button. + $('#rotate-button').click(function() { + if (!g_currentImage) { + return; + } + + var w = g_currentImage.naturalHeight; + var h = g_currentImage.naturalWidth; + var canvas = $('<canvas>') + .attr('width', w) + .attr('height', h) + .get(0); + + var ctx = canvas.getContext('2d'); + ctx.rotate(-Math.PI / 2); + ctx.translate(-h, 0); + ctx.drawImage(g_currentImage, 0, 0); + + loadImageFromUri(canvas.toDataURL(), function(img) { + g_currentImage = img; + createFrame(); + }); + }); + } + + /** + * Generates the frame from the current selections (g_currentImage and g_currentDevice). + */ + function createFrame() { + var port; + if (g_currentImage.naturalWidth == g_currentDevice.portSize[0] && + g_currentImage.naturalHeight == g_currentDevice.portSize[1]) { + if (!g_currentDevice.portRes) { + alert('No portrait frame is currently available for this device.'); + $('#output').html(MSG_NO_INPUT_IMAGE); + return; + } + port = true; + } else if (g_currentImage.naturalWidth == g_currentDevice.portSize[1] && + g_currentImage.naturalHeight == g_currentDevice.portSize[0]) { + if (!g_currentDevice.landRes) { + alert('No landscape frame is currently available for this device.'); + $('#output').html(MSG_NO_INPUT_IMAGE); + return; + } + port = false; + } else { + alert('Screenshots for ' + g_currentDevice.title + ' must be ' + + g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] + + ' or ' + + g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + '.'); + $('#output').html(MSG_INVALID_INPUT_IMAGE); + return; + } + + // Load image resources + var res = port ? g_currentDevice.portRes : g_currentDevice.landRes; + var resList = {}; + for (var i = 0; i < res.length; i++) { + resList[res[i]] = 'device-art-resources/' + g_currentDevice.id + '/' + + (port ? 'port_' : 'land_') + res[i] + '.png' + } + + var resourceImages = {}; + loadImageResources(resList, function(r) { + resourceImages = r; + continuation_(); + }); + + function continuation_() { + var width = resourceImages['back'].naturalWidth; + var height = resourceImages['back'].naturalHeight; + var offset = port ? g_currentDevice.portOffset : g_currentDevice.landOffset; + + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + + var ctx = canvas.getContext('2d'); + if (resourceImages['shadow'] && $('#output-shadow').is(':checked')) { + ctx.drawImage(resourceImages['shadow'], 0, 0); + } + ctx.drawImage(resourceImages['back'], 0, 0); + ctx.drawImage(g_currentImage, offset[0], offset[1]); + if (resourceImages['fore'] && $('#output-glare').is(':checked')) { + ctx.drawImage(resourceImages['fore'], 0, 0); + } + + var dataUrl = canvas.toDataURL(); + var filename = g_currentFilename + ? ('framed_' + g_currentFilename) + : 'framed_screenshot.png'; + + var $link = $('<a>') + .attr('download', filename) + .attr('href', dataUrl) + .attr('draggable', true) + .attr('data-downloadurl', ['image/png', filename, dataUrl].join(':')) + .append($('<img>').attr('src', dataUrl)) + .appendTo($('#output').empty()); + + $('#frame-customizations').show(); + } + } + + /** + * Loads an image from a data URI. The callback will be called with the <img> once + * it loads. + */ + function loadImageFromUri(uri, callback) { + callback = callback || function(){}; + + var img = document.createElement('img'); + img.src = uri; + img.onload = function() { + callback(img); + }; + img.onerror = function() { + callback(null); + } + } + + /** + * Loads a set of images (organized by ID). Once all images are loaded, the callback + * is triggered with a dictionary of <img>'s, organized by ID. + */ + function loadImageResources(images, callback) { + var imageResources = {}; + + var checkForCompletion_ = function() { + for (var id in images) { + if (!(id in imageResources)) + return; + } + (callback || function(){})(imageResources); + callback = null; + }; + + for (var id in images) { + var img = document.createElement('img'); + img.src = images[id]; + (function(img, id) { + img.onload = function() { + imageResources[id] = img; + checkForCompletion_(); + }; + img.onerror = function() { + imageResources[id] = null; + checkForCompletion_(); + } + })(img, id); + } + } + + /** + * Loads the first valid image from a FileList (e.g. drag + drop source), as a data URI. This + * method will throw an alert() in case of errors and call back with null. + * + * @param {FileList} fileList The FileList to load. + * @param {Function} callback The callback to fire once image loading is done (or fails). + * @return Returns an object containing 'uri' representing the loaded image. There will also be + * a 'name' field indicating the file name, if one is available. + */ + function loadImageFromFileList(fileList, callback) { + fileList = fileList || []; + + var file = null; + for (var i = 0; i < fileList.length; i++) { + if (fileList[i].type.toLowerCase().match(/^image\/png/)) { + file = fileList[i]; + break; + } + } + + if (!file) { + alert('Please use a valid screenshot file (PNG format).'); + callback(null); + return; + } + + var fileReader = new FileReader(); + + // Closure to capture the file information. + fileReader.onload = function(e) { + callback({ + uri: e.target.result, + name: file.name + }); + }; + fileReader.onerror = function(e) { + switch(e.target.error.code) { + case e.target.error.NOT_FOUND_ERR: + alert('File not found.'); + break; + case e.target.error.NOT_READABLE_ERR: + alert('File is not readable.'); + break; + case e.target.error.ABORT_ERR: + break; // noop + default: + alert('An error occurred reading this file.'); + } + callback(null); + }; + fileReader.onabort = function(e) { + alert('File read cancelled.'); + callback(null); + }; + + fileReader.readAsDataURL(file); + } +</script> diff --git a/docs/html/guide/components/fragments.jd b/docs/html/guide/components/fragments.jd index 4f62033..7747b31 100644 --- a/docs/html/guide/components/fragments.jd +++ b/docs/html/guide/components/fragments.jd @@ -45,17 +45,10 @@ parent.link=activities.html <li>{@link android.app.FragmentManager}</li> <li>{@link android.app.FragmentTransaction}</li> </ol> - - <h2>Related samples</h2> - <ol> - <li><a -href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a></li> - <li><a -href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">ApiDemos</a></li> - </ol> <h2>See also</h2> <ol> + <li><a href="{@docRoot}training/basics/fragments/index.html">Building a Dynamic UI with Fragments</a></li> <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and Handsets</a></li> </ol> @@ -834,7 +827,7 @@ then rotates to landscape (which restarts the current activity).</p> <p>For more samples using fragments (and complete source files for this example), -see the sample code available in <a +see the API Demos sample app available in <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment"> ApiDemos</a> (available for download from the <a href="{@docRoot}resources/samples/get.html">Samples SDK component</a>).</p> diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd index ba5e1f0..b89914a 100644 --- a/docs/html/guide/components/services.jd +++ b/docs/html/guide/components/services.jd @@ -49,13 +49,6 @@ perform interprocess communication</li> LocalService}</a></li> </ol> -<h2>Articles</h2> -<ol> - <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li> - <li><a href="{@docRoot}resources/articles/service-api-changes-starting-with.html">Service API changes starting - with Android 2.0</a></li> -</ol> - <h2>See also</h2> <ol> <li><a href="{@docRoot}guide/components/bound-services.html">Bound Services</a></li> diff --git a/docs/html/guide/google/gcm/adv.jd b/docs/html/guide/google/gcm/adv.jd index 39e946e..5cb433f 100644 --- a/docs/html/guide/google/gcm/adv.jd +++ b/docs/html/guide/google/gcm/adv.jd @@ -203,7 +203,7 @@ registerReceiver(mRetryReceiver, filter); <p>GCM allows a maximum of 4 different collapse keys to be used by the GCM server at any given time. In other words, the GCM server can simultaneously store 4 different send-to-sync messages, each with a different collapse key. If you exceed this number GCM will only keep 4 collapse keys, with no guarantees about which ones they will be.</p> <h3 id="payload">Messages with payload</h3> -<p>Unlike a send-to-sync message, every "message with payload" (non-collapsible message) is delivered. The payload the message contains can be up to 4K. For example, here is a JSON-formatted message in an IM application in which spectators are discussing a sporting event:</p> +<p>Unlike a send-to-sync message, every "message with payload" (non-collapsible message) is delivered. The payload the message contains can be up to 4kb. For example, here is a JSON-formatted message in an IM application in which spectators are discussing a sporting event:</p> <pre class="prettyprint pretty-json">{ "registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...", diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd index 79edb9f..f471560 100644 --- a/docs/html/guide/google/gcm/gcm.jd +++ b/docs/html/guide/google/gcm/gcm.jd @@ -56,7 +56,7 @@ page.title=GCM Architectural Overview </div> </div> -<p>Google Cloud Messaging for Android (GCM) is a service that helps +<p>Google Cloud Messaging for Android (GCM) is a free service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p> @@ -545,7 +545,8 @@ private void handleRegistration(Intent intent) { <p>The <code>com.google.android.c2dm.intent.RECEIVE</code> intent is used by GCM to deliver the messages sent by the 3rd-party server to the application running in the device. If the server included key-pair values in the <code>data</code> parameter, they are available as -extras in this intent, with the keys being the extra names. +extras in this intent, with the keys being the extra names. GCM also includes an extra called +<code>from</code> which contains the sender ID as an string. <p>Here is an example, again using the <code>MyIntentReceiver</code> class:</p> @@ -651,8 +652,9 @@ message sent by the application server. See <a href="adv.html#collapsible">Advan <tr> <td><code>data</code></td> <td>A JSON object whose fields represents the key-value pairs of the message's payload data. If present, the payload data it will be -included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code> -There is no limit on the number of key/value pairs, though there is a limit on the total size of the message. Optional.</td> +included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. +There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). Note that the values <em>must be enclosed by strings</em>. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). Optional.</td> + </tr> <tr> <td><code>delay_while_idle</code></td> @@ -683,7 +685,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool </tr> <tr> <td><code>data.<key></code></td> - <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Optional.</td> + <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). Optional.</td> </tr> <tr> <td><code>delay_while_idle</code></td> @@ -695,7 +697,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool </tr> </table> - +<p>If you want to test your request (either JSON or plain text) without delivering the message to the devices, you can set an optional HTTP parameter called <code>dry_run</code> with the value <code>true</code>. The result will be almost identical to running the request without this parameter, except that the message will not be delivered to the devices. Consequently, the response will contain fake IDs for the message and multicast fields (see <a href="#response">Response format</a>).</p> <h4 id="example-requests">Example requests</h4> <p>Here is the smallest possible request (a message without any parameters and just one recipient) using JSON:</p> @@ -879,8 +881,22 @@ messages. <li>Request originated from a server not whitelisted in the Server Key IPs.</li> </ul> -Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project.<br/> +Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project. You can check the validity of your API key by running the following command:<br/> + + +<pre># api_key=YOUR_API_KEY + +# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"ABC\"]}"</pre> + + +If you receive a 401 HTTP status code, your API key is not valid. Otherwise you should see something like this:<br/> + +<pre> +{"multicast_id":6782339717028231855,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]} +</pre> +If you want to confirm the validity of a registration ID, you can do so by replacing "ABC" with the registration ID. +<br/> Happens when the HTTP status code is 401. <dt id="timeout"><strong>Timeout</strong></dt> @@ -974,7 +990,7 @@ registration_id=32 <p>To view statistics and any error messages for your GCM applications:</p> <ol> - <li> Go to <code><a href="http://play.google.com/apps/publish">play.google.com/apps/publish</a></code>.</li> + <li> Go to the <code><a href="http://play.google.com/apps/publish">Android Developer Console</a></code>.</li> <li>Login with your developer account. <p>You will see a page that has a list of all of your apps.</p></li> <li> Click on the "statistics" link next to the app for which you want to view GCM stats. @@ -982,6 +998,8 @@ registration_id=32 <li>Go to the drop-down menu and select the GCM metric you want to view. </li> </ol> +<p class="note"><strong>Note:</strong> Stats on the Google API Console are not enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Android Developer Console</a>.</p> + <h2 id="example">Examples</h2> <p>See the <a href="demo.html">GCM Demo Application</a> document.</p> diff --git a/docs/html/guide/google/gcm/index.jd b/docs/html/guide/google/gcm/index.jd index 140b076..8079eba 100644 --- a/docs/html/guide/google/gcm/index.jd +++ b/docs/html/guide/google/gcm/index.jd @@ -5,6 +5,8 @@ page.title=Google Cloud Messaging for Android <p><img src="{@docRoot}images/gcm/gcm-logo.png" /></p> <p>Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p> +<p>GCM is completely free no matter how big your messaging needs are, and there are no quotas.</p> + <p>To learn more about GCM, you can join the <a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a> and read the following documents:</p> <dl> diff --git a/docs/html/guide/google/play/expansion-files.jd b/docs/html/guide/google/play/expansion-files.jd index 62ca1e2..750e958 100644 --- a/docs/html/guide/google/play/expansion-files.jd +++ b/docs/html/guide/google/play/expansion-files.jd @@ -262,7 +262,7 @@ are on the device upon start-up. If the files are not on the device, use Google href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service to request URLs for the expansion files, then download and save them. <p>To greatly reduce the amount of code you must write and ensure a good user experience -during the download, we recommend you use the <a href="AboutLibraries">Downloader +during the download, we recommend you use the <a href="#AboutLibraries">Downloader Library</a> to implement your download behavior.</p> <p>If you build your own download service instead of using the library, be aware that you must not change the name of the expansion files and must save them to the proper diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd index 65c5674..0dd92d9 100644 --- a/docs/html/guide/practices/optimizing-for-3.0.jd +++ b/docs/html/guide/practices/optimizing-for-3.0.jd @@ -118,7 +118,7 @@ Manager</a> and install the following: <li>Samples for SDK API 11</li> </ul> </li> - <li><a href="{@docRoot}guide/developing/other-ide.html#AVD">Create an AVD</a> for a tablet-type + <li><a href="{@docRoot}tools/devices/managing-avds.html">Create an AVD</a> for a tablet-type device: <p>Set the target to "Android 3.0" and the skin to "WXGA" (the default skin).</p></li> </ol> diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd index 48ccdeb..ce59a9d 100644 --- a/docs/html/guide/practices/security.jd +++ b/docs/html/guide/practices/security.jd @@ -134,9 +134,8 @@ dynamic permission grants on a case-by-case basis.</p> <p>To provide additional protection for sensitive data, some applications choose to encrypt local files using a key that is not accessible to the -application. (For example, a key can be placed in a <code><a -href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and -protected with a user password that is not stored on the device). While this +application. (For example, a key can be placed in a {@link java.security.KeyStore} +and protected with a user password that is not stored on the device). While this does not protect data from a root compromise that can monitor the user inputting the password, it can provide protection for a lost device without <a href="http://source.android.com/tech/encryption/index.html">file system @@ -716,8 +715,7 @@ href="{@docRoot}reference/android/accounts/AccountManager.html"> AccountManager</a></code> using <code><a href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>. Alternatively, if only one application will use the credential, you might use a -<code><a -href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for +{@link java.security.KeyStore} for storage.</p> <a name="Crypto"></a> @@ -751,8 +749,8 @@ href="{@docRoot}reference/javax/crypto/KeyGenerator.html"> number generator significantly weakens the strength of the algorithm, and may allow offline attacks.</p> -<p>If you need to store a key for repeated use, use a mechanism like <code><a -href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that +<p>If you need to store a key for repeated use, use a mechanism like + {@link java.security.KeyStore} that provides a mechanism for long term storage and retrieval of cryptographic keys.</p> diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd index f6c2247..4529797 100644 --- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd +++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd @@ -58,7 +58,7 @@ suggestions on how to work with multiple sets of icons.</p> <h2 id="market">Application Icons on Google Play</h2> -<p>If you are <a href="{@docRoot}tools/publishing/publishing.html">publishing +<p>If you are <a href="{@docRoot}distribute/index.html">publishing your application on Google Play</a>, you will also need to provide a 512x512 pixel, high-resolution application icon in the <a href="http://play.google.com/apps/publish">developer console</a> at upload-time. diff --git a/docs/html/guide/samples/index.html b/docs/html/guide/samples/index.html index f4acdbf..959eaf5 100644 --- a/docs/html/guide/samples/index.html +++ b/docs/html/guide/samples/index.html @@ -1,10 +1,10 @@ <html> <head> -<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/browser.html?tag=sample"> +<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/samples/index.html"> <title>Redirecting...</title> </head> <body> <p>You should have been redirected. Please <a -href="http://developer.android.com/resources/browser.html?tag=sample">click here</a>.</p> +href="http://developer.android.com/tools/samples/index.html">click here</a>.</p> </body> </html>
\ No newline at end of file diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd index 602b6e8..598b08a 100644 --- a/docs/html/guide/topics/data/backup.jd +++ b/docs/html/guide/topics/data/backup.jd @@ -187,10 +187,7 @@ href="#RestoreVersion">Checking the Restore Data Version</a> for more informatio available only on devices running API Level 8 (Android 2.2) or greater, so you should also set your <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a> -attribute to "8". However, if you implement proper <a -href="{@docRoot}resources/articles/backward-compatibility.html">backward compatibility</a> in -your application, you can support this feature for devices running API Level 8 or greater, while -remaining compatible with older devices.</p> +attribute to "8".</p> diff --git a/docs/html/guide/topics/data/install-location.jd b/docs/html/guide/topics/data/install-location.jd index 19c4b39..5abdced 100644 --- a/docs/html/guide/topics/data/install-location.jd +++ b/docs/html/guide/topics/data/install-location.jd @@ -111,10 +111,7 @@ storage.</p> <p class="caution"><strong>Caution:</strong> Although XML markup such as this will be ignored by older platforms, you must be careful not to use programming APIs introduced in API Level 8 while your {@code minSdkVersion} is less than "8", unless you perform the work necessary to -provide backward compatibility in your code. For information about building -backward compatibility in your application code, see the <a -href="{@docRoot}resources/articles/backward-compatibility.html">Backward Compatibility</a> -article.</p> +provide backward compatibility in your code.</p> @@ -141,17 +138,13 @@ system again. At which time, you can restart your Service.</dd> <dd>Your alarms registered with {@link android.app.AlarmManager} will be cancelled. You must manually re-register any alarms when external storage is remounted.</dd> <dt>Input Method Engines</dt> - <dd>Your <a href="{@docRoot}resources/articles/on-screen-inputs.html">IME</a> will be + <dd>Your <a href="{@docRoot}guide/topics/text/creating-input-method.html">IME</a> will be replaced by the default IME. When external storage is remounted, the user can open system settings to enable your IME again.</dd> <dt>Live Wallpapers</dt> - <dd>Your running <a href="{@docRoot}resources/articles/live-wallpapers.html">Live Wallpaper</a> + <dd>Your running <a href="http://android-developers.blogspot.com/2010/02/live-wallpapers.html">Live Wallpaper</a> will be replaced by the default Live Wallpaper. When external storage is remounted, the user can select your Live Wallpaper again.</dd> - <dt>Live Folders</dt> - <dd>Your <a href="{@docRoot}resources/articles/live-folders.html">Live Folder</a> will be -removed from the home screen. When external storage is remounted, the user can add your Live Folder -to the home screen again.</dd> <dt>App Widgets</dt> <dd>Your <a href="{@docRoot}guide/topics/appwidgets/index.html">App Widget</a> will be removed from the home screen. When external storage is remounted, your App Widget will <em>not</em> be @@ -174,7 +167,7 @@ external storage, it can never receive this broadcast.</dd> <dt>Copy Protection</dt> <dd>Your application cannot be installed to a device's SD card if it uses Google Play's Copy Protection feature. However, if you use Google Play's - <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, your + <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, your application <em>can</em> be installed to internal or external storage, including SD cards.</dd> </dl> diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd index a9fedb7..6114a4a 100644 --- a/docs/html/guide/topics/graphics/opengl.jd +++ b/docs/html/guide/topics/graphics/opengl.jd @@ -84,11 +84,8 @@ understanding how to implement these classes in an activity should be your first this class by creating an instance of {@link android.opengl.GLSurfaceView} and adding your {@link android.opengl.GLSurfaceView.Renderer Renderer} to it. However, if you want to capture touch screen events, you should extend the {@link android.opengl.GLSurfaceView} class to - implement the touch listeners, as shown in OpenGL Tutorials for - <a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#touch">ES 1.0</a>, - <a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#touch">ES 2.0</a> and the <a -href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.html" ->TouchRotateActivity</a> sample.</dd> + implement the touch listeners, as shown in OpenGL training lesson, + <a href="{@docRoot}training/graphics/opengl/touch.html">Responding to Touch Events</a>.</dd> <dt><strong>{@link android.opengl.GLSurfaceView.Renderer}</strong></dt> <dd>This interface defines the methods required for drawing graphics in an OpenGL {@link @@ -164,9 +161,8 @@ interface to OpenGL ES 2.0 and is available starting with Android 2.2 (API Level </li> </ul> -<p>If you'd like to start building an app with OpenGL right away, have a look at the tutorials for -<a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0</a> or -<a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0</a>! +<p>If you'd like to start building an app with OpenGL right away, follow the +<a href="{@docRoot}training/graphics/opengl/index.html">Displaying Graphics with OpenGL ES</a> class. </p> <h2 id="manifest">Declaring OpenGL Requirements</h2> @@ -277,10 +273,6 @@ which simulates a camera position. </li> </ol> -<p>For a complete example of how to apply projection and camera views with OpenGL ES 1.0, see the <a -href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#projection-and-views">OpenGL ES 1.0 -tutorial</a>.</p> - <h3 id="proj-es2">Projection and camera view in OpenGL ES 2.0</h3> <p>In the ES 2.0 API, you apply projection and camera view by first adding a matrix member to @@ -382,8 +374,7 @@ objects to be rendered by OpenGL. </li> </ol> <p>For a complete example of how to apply projection and camera view with OpenGL ES 2.0, see the <a -href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#projection-and-views">OpenGL ES 2.0 -tutorial</a>.</p> +href="{@docRoot}training/graphics/opengl/index.html">Displaying Graphics with OpenGL ES</a> class.</p> <h2 id="faces-winding">Shape Faces and Winding</h2> diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd index a3d4a95..4807a5e 100644 --- a/docs/html/guide/topics/manifest/manifest-element.jd +++ b/docs/html/guide/topics/manifest/manifest-element.jd @@ -152,7 +152,7 @@ either internal or external storage through the system settings.</td> <p class="caution"><strong>Caution:</strong> If your application uses Google Play's Copy Protection feature, it cannot be installed to a device's SD card. However, if you use Google - Play's <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, + Play's <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, your application <em>can</em> be installed to internal or external storage, including SD cards.</p> <p class="note"><strong>Note:</strong> By default, your application will be installed on the @@ -175,7 +175,7 @@ multiple SD cards can be used with the same device.</li> storage. However, the system will not allow the user to move the application to external storage if this attribute is set to {@code internalOnly}, which is the default setting.</p> -<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for +<p>Read <a href="{@docRoot}guide/topics/data/install-location.html">App Install Location</a> for more information about using this attribute (including how to maintain backward compatibility).</p> <p>Introduced in: API Level 8.</p> diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd index 7999033..f5e4805 100644 --- a/docs/html/guide/topics/providers/content-provider-basics.jd +++ b/docs/html/guide/topics/providers/content-provider-basics.jd @@ -1031,11 +1031,11 @@ mRowsDeleted = getContentResolver().delete( <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn"> android:grantUriPermission</a></code> attribute of the - {@code <a href="guide/topics/manifest/provider-element.html"><provider></a>} + {@code <a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a>} element, as well as the - {@code <a href="guide/topics/manifest/grant-uri-permission-element.html"> + {@code <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html"> <grant-uri-permission></a>} child element of the - {@code <a href="guide/topics/manifest/provider-element.html"><provider></a>} + {@code <a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a>} element. The URI permissions mechanism is explained in more detail in the <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide, in the section "URI Permissions". diff --git a/docs/html/guide/topics/resources/accessing-resources.jd b/docs/html/guide/topics/resources/accessing-resources.jd index 03bb939..0673b6f 100644 --- a/docs/html/guide/topics/resources/accessing-resources.jd +++ b/docs/html/guide/topics/resources/accessing-resources.jd @@ -336,6 +336,6 @@ android.widget.ArrayAdapter}<String>(this, <strong>android.R.layout.simple <p>In this example, {@link android.R.layout#simple_list_item_1} is a layout resource defined by the platform for items in a {@link android.widget.ListView}. You can use this instead of creating -your own layout for list items. (For more about using {@link android.widget.ListView}, see the -<a href="{@docRoot}resources/tutorials/views/hello-listview.html">List View Tutorial</a>.)</p> +your own layout for list items. For more information, see the +<a href="{@docRoot}guide/topics/ui/layout/listview.html">List View</a> developer guide.</p> diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd index c653b0c..cd88ae9 100644 --- a/docs/html/guide/topics/resources/layout-resource.jd +++ b/docs/html/guide/topics/resources/layout-resource.jd @@ -169,8 +169,8 @@ root element.</p> <p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight View that consumes no layout space until you explicitly inflate it, at which point, it includes a layout file defined by its {@code android:layout} attribute. For more information about using {@link -android.view.ViewStub}, read <a href="{@docRoot}resources/articles/layout-tricks-stubs.html">Layout -Tricks: ViewStubs</a>.</p> +android.view.ViewStub}, read <a href="{@docRoot}training/improving-layouts/loading-ondemand.html">Loading + Views On Demand</a>.</p> </dd> <dt id="merge-element"><code><merge></code></dt> @@ -181,8 +181,7 @@ that already contains the appropriate parent View to contain the children of the in another layout file using <a href="#include-element"><code><include></code></a> and this layout doesn't require a different {@link android.view.ViewGroup} container. For more information about merging layouts, read <a -href="{@docRoot}resources/articles/layout-tricks-merge.html">Layout -Tricks: Merging</a>.</dd> +href="{@docRoot}training/improving-layouts/reusing-layouts.html">Re-using Layouts with <include/></a>.</dd> </dl> diff --git a/docs/html/guide/topics/resources/runtime-changes.jd b/docs/html/guide/topics/resources/runtime-changes.jd index f5475b4..5f39aa5 100644 --- a/docs/html/guide/topics/resources/runtime-changes.jd +++ b/docs/html/guide/topics/resources/runtime-changes.jd @@ -16,8 +16,8 @@ parent.link=index.html <ol> <li><a href="providing-resources.html">Providing Resources</a></li> <li><a href="accessing-resources.html">Accessing Resources</a></li> - <li><a href="{@docRoot}resources/articles/faster-screen-orientation-change.html">Faster Screen -Orientation Change</a></li> + <li><a href="http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html">Faster + Screen Orientation Change</a></li> </ol> </div> </div> diff --git a/docs/html/guide/topics/security/security.jd b/docs/html/guide/topics/security/security.jd index eeaac44..9cdccae 100644 --- a/docs/html/guide/topics/security/security.jd +++ b/docs/html/guide/topics/security/security.jd @@ -135,8 +135,7 @@ dynamic permission grants on a case-by-case basis.</p> <p>To provide additional protection for sensitive data, some applications choose to encrypt local files using a key that is not accessible to the -application. (For example, a key can be placed in a <code><a -href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and +application. (For example, a key can be placed in a {@link java.security.KeyStore} and protected with a user password that is not stored on the device). While this does not protect data from a root compromise that can monitor the user inputting the password, it can provide protection for a lost device without <a @@ -717,8 +716,7 @@ href="{@docRoot}reference/android/accounts/AccountManager.html"> AccountManager</a></code> using <code><a href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>. Alternatively, if only one application will use the credential, you might use a -<code><a -href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for +{@link java.security.KeyStore} for storage.</p> <a name="Crypto"></a> @@ -752,8 +750,7 @@ href="{@docRoot}reference/javax/crypto/KeyGenerator.html"> number generator significantly weakens the strength of the algorithm, and may allow offline attacks.</p> -<p>If you need to store a key for repeated use, use a mechanism like <code><a -href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that +<p>If you need to store a key for repeated use, use a mechanism like {@link java.security.KeyStore} that provides a mechanism for long term storage and retrieval of cryptographic keys.</p> diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd index a045899..726476a 100644 --- a/docs/html/guide/topics/sensors/index.jd +++ b/docs/html/guide/topics/sensors/index.jd @@ -18,7 +18,7 @@ the default position, the screens are wider than they are tall. This introduces issues that we’ve noticed causing problems in some apps.</p> </a> - <a href="android-developers.blogspot.com/2011/06/deep-dive-into-location.html"> + <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html"> <h4>A Deep Dive Into Location</h4> <p>I’ve written an open-source reference app that incorporates all of the tips, tricks, and cheats I know to reduce the time between opening an app and seeing an up-to-date list of nearby diff --git a/docs/html/guide/topics/sensors/sensors_overview.jd b/docs/html/guide/topics/sensors/sensors_overview.jd index e38a843..a162ccf 100644 --- a/docs/html/guide/topics/sensors/sensors_overview.jd +++ b/docs/html/guide/topics/sensors/sensors_overview.jd @@ -662,7 +662,7 @@ whether there's a pressure sensor on a device:</p> <h4>Using Google Play filters to target specific sensor configurations</h4> <p>If you are publishing your application on Google Play you can use the - <a href="{@docRoot}guide//topics/manifest/uses-feature-element.html"><code><uses-feature> + <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code><uses-feature> </code></a> element in your manifest file to filter your application from devices that do not have the appropriate sensor configuration for your application. The <code><uses-feature></code> element has several hardware descriptors that let you filter diff --git a/docs/html/guide/topics/text/creating-input-method.jd b/docs/html/guide/topics/text/creating-input-method.jd index e49610f..7086824 100644 --- a/docs/html/guide/topics/text/creating-input-method.jd +++ b/docs/html/guide/topics/text/creating-input-method.jd @@ -1,6 +1,5 @@ page.title=Creating an Input Method parent.title=Articles -parent.link=../browser.html?tag=article @jd:body <div id="qv-wrapper"> @@ -162,8 +161,8 @@ parent.link=../browser.html?tag=article In this example, {@code MyKeyboardView} is an instance of a custom implementation of {@link android.inputmethodservice.KeyboardView} that renders a {@link android.inputmethodservice.Keyboard}. If you’re building a traditional QWERTY keyboard, - see the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample - app for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class. + see the Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample + app</a> for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class. </p> <h3 id="CandidateView">Candidates view</h3> <p> @@ -175,7 +174,8 @@ parent.link=../browser.html?tag=article default behavior, so you don’t have to implement this if you don’t provide suggestions).</p> <p> For an example implementation that provides user suggestions, see the - <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample app. + Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample + app</a>. </p> <h3 id="DesignConsiderations">UI design considerations</h3> <p> @@ -388,8 +388,8 @@ The input type bit pattern can have one of several values, including: To intercept hardware keys, override {@link android.inputmethodservice.InputMethodService#onKeyDown(int, KeyEvent) onKeyDown()} and {@link android.inputmethodservice.InputMethodService#onKeyUp(int, KeyEvent) onKeyUp()}. - See the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample - app for an example. + See the Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample + app</a> for an example. </p> <p> Remember to call the <code>super()</code> method for keys you don't want to handle yourself. diff --git a/docs/html/guide/topics/text/spell-checker-framework.jd b/docs/html/guide/topics/text/spell-checker-framework.jd index 1c2e211..7f7a0b8 100644 --- a/docs/html/guide/topics/text/spell-checker-framework.jd +++ b/docs/html/guide/topics/text/spell-checker-framework.jd @@ -1,6 +1,5 @@ page.title=Spelling Checker Framework parent.title=Articles -parent.link=../browser.html?tag=article @jd:body <div id="qv-wrapper"> <div id="qv"> diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd index 0c1d065..7d36181 100644 --- a/docs/html/guide/topics/ui/accessibility/services.jd +++ b/docs/html/guide/topics/ui/accessibility/services.jd @@ -10,7 +10,7 @@ parent.link=index.html <ol> <li><a href="#manifest">Manifest Declarations and Permissions</a> <ol> - <li><a href="service-declaration">Accessibility service declaration</a></li> + <li><a href="#service-declaration">Accessibility service declaration</a></li> <li><a href="#service-config">Accessibility service configuration</a></li> </ol> </li> diff --git a/docs/html/guide/topics/ui/layout/relative.jd b/docs/html/guide/topics/ui/layout/relative.jd index ee6cf02..47f9417 100644 --- a/docs/html/guide/topics/ui/layout/relative.jd +++ b/docs/html/guide/topics/ui/layout/relative.jd @@ -44,19 +44,19 @@ android.widget.RelativeLayout.LayoutParams}.</p> include:</p> <dl> <dt><a -href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop" +href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop" >{@code android:layout_alignParentTop}</a></dt> <dd>If {@code "true"}, makes the top edge of this view match the top edge of the parent. </dd> <dt><a -href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical" +href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical" >{@code android:layout_centerVertical}</a></dt> <dd>If {@code "true"}, centers this child vertically within its parent.</dd> <dt><a -href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below" +href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below" >{@code android:layout_below}</a></dt> <dd>Positions the top edge of this view below the view specified with a resource ID.</dd> <dt><a -href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf" +href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf" >{@code android:layout_toRightOf}</a></dt> <dd>Positions the left edge of this view to the right of the view specified with a resource ID.</dd> </dl> diff --git a/docs/html/legal.jd b/docs/html/legal.jd index 3c614d3..3206503 100644 --- a/docs/html/legal.jd +++ b/docs/html/legal.jd @@ -18,12 +18,11 @@ mobile.</p> <p>To start developing apps for Android, <a href="{@docRoot}sdk/index.html">download the free Android SDK</a>.</p> - - <h2 id="Brands">Android Brands</h2> -<p>The "Android" name and <img src="images/android-logo.png" alt="Android" -style="margin:0;padding:0 2px;vertical-align:baseline" /> logo are trademarks of Google Inc. +<p>The "Android" name, the <img src="images/android-logo.png" alt="Android" +style="margin:0;padding:0 2px;vertical-align:baseline" /> logo, and +<a href="http://www.google.com/permissions/">other trademarks</a> are property of Google Inc. You may not use the logo or the logo's custom typeface.</p> <p>You may use the word "Android" in a product name only as a descriptor, such as "for Android" @@ -42,7 +41,7 @@ use of it must be attributed as such.</p> <p>For more information about Android brands, see the <a href="{@docRoot}distribute/googleplay/promote/brand.html">Android Branding Guidelines</a>.</p> - +<p>All other trademarks are the property of their respective owners.</p> <h2 id="WebSite">Web Site Content</h2> @@ -126,4 +125,6 @@ Terms of Service</a></p> href="http://developer.android.com">developer.android.com</a> are subject to their own terms, as documented on their respective web sites. </p> + + </div>
\ No newline at end of file diff --git a/docs/html/tools/adk/aoa2.jd b/docs/html/tools/adk/aoa2.jd index 2a3b2f0..bbccfc3 100644 --- a/docs/html/tools/adk/aoa2.jd +++ b/docs/html/tools/adk/aoa2.jd @@ -20,7 +20,7 @@ page.title=Android Open Accessory Protocol 2.0 </div> <p>This document describes the changes to the Android Open Accessory (AOA) protocol since its -initial release, and is a supplement to the documentation of the <a href="oap.html">first +initial release, and is a supplement to the documentation of the <a href="aoa.html">first release of AOA</a>.</p> <p>The Android Open Accessory Protocol 2.0 adds two new features: audio output (from the Android diff --git a/docs/html/tools/help/gltracer.jd b/docs/html/tools/help/gltracer.jd index 35c405e..700ee39 100644 --- a/docs/html/tools/help/gltracer.jd +++ b/docs/html/tools/help/gltracer.jd @@ -5,9 +5,9 @@ page.title=Tracer for OpenGL ES <div id="qv"> <h2>In this document</h2> <ol> - <li><a href="running">Running Tracer</a></li> - <li><a href="generating">Generating a Trace</a></li> - <li><a href="analyzing">Analyzing a Trace</a></li> + <li><a href="#running">Running Tracer</a></li> + <li><a href="#generating">Generating a Trace</a></li> + <li><a href="#analyzing">Analyzing a Trace</a></li> </ol> <h2>See also</h2> <ol> diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd index 6163fbc..62ec422 100644 --- a/docs/html/tools/revisions/platforms.jd +++ b/docs/html/tools/revisions/platforms.jd @@ -870,7 +870,7 @@ class="toggle-content-img" alt="" />Android {@sdkPlatformVersion}, Revision 1</a <dt>Tools:</dt> <dd> -<p>Adds support for building with Android library projects. See <a href="tools-notes.html">SDK +<p>Adds support for building with Android library projects. See <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools, r6</a> for information.</p> </dd> diff --git a/docs/html/tools/sdk/installing.jd b/docs/html/tools/sdk/installing.jd index 126d992..d7f1957 100644 --- a/docs/html/tools/sdk/installing.jd +++ b/docs/html/tools/sdk/installing.jd @@ -375,7 +375,7 @@ devices. </td> <td colspan="3"><code>docs/</code></td> <td>A full set of documentation in HTML format, including the Developer's Guide, API Reference, and other information. To read the documentation, load the -file <code>offline.html</code> in a web browser.</td> +file <code>index.html</code> in a web browser.</td> </tr> <tr> <td colspan="3"><code>platform-tools/</code></td> diff --git a/docs/html/training/accessibility/service.jd b/docs/html/training/accessibility/service.jd index f62506b..80ecbc7 100644 --- a/docs/html/training/accessibility/service.jd +++ b/docs/html/training/accessibility/service.jd @@ -281,6 +281,6 @@ public void onAccessibilityEvent(AccessibilityEvent event) { <p>Now you have a complete, functioning accessibility service. Try configuring how it interacts with the user, by adding Android's <a - href="http://developer.android.com/resources/articles/tts.html">text-to-speech + href="http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html">text-to-speech engine</a>, or using a {@link android.os.Vibrator} to provide haptic feedback!</p> diff --git a/docs/html/training/basics/network-ops/connecting.jd b/docs/html/training/basics/network-ops/connecting.jd index f70cf58..ac8d993 100644 --- a/docs/html/training/basics/network-ops/connecting.jd +++ b/docs/html/training/basics/network-ops/connecting.jd @@ -66,7 +66,7 @@ and {@link android.net.NetworkInfo#isConnected isConnected()}. Remember, the device may be out of range of a network, or the user may have disabled both Wi-Fi and mobile data access. For more discussion of this topic, see the lesson <a -href="{@docRoot}training/network-ops/managing.html">Managing Network +href="{@docRoot}training/basics/network-ops/managing.html">Managing Network Usage</a>.</p> <pre> diff --git a/docs/html/training/custom-views/create-view.jd b/docs/html/training/custom-views/create-view.jd index b0bc8b4..674bcc9 100644 --- a/docs/html/training/custom-views/create-view.jd +++ b/docs/html/training/custom-views/create-view.jd @@ -61,7 +61,7 @@ well-designed class, though, a custom view should: existing view subclasses, such as {@link android.widget.Button}.</p> -<p>To allow the <a href=”{@docRoot}guide/developing/tools/adt.html”>Android Developer Tools +<p>To allow the <a href="{@docRoot}guide/developing/tools/adt.html">Android Developer Tools </a> to interact with your view, at a minimum you must provide a constructor that takes a {@link android.content.Context} and an {@link android.util.AttributeSet} object as parameters. This constructor allows the layout editor to create and edit an instance of your view.</p> @@ -105,7 +105,7 @@ enable this behavior in your custom view, you must: <pre> <resources>; - <declare-styleable name="PieChart"> + <declare-styleable name="PieChart"> <attr name="showText" format="boolean" /> <attr name="labelPosition" format="enum"> <enum name="left" value="0"/> @@ -276,6 +276,6 @@ public void setShowText(boolean showText) { </ul> <p>For more information on creating accessible views, see - <a href=”{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views”> + <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views"> Making Applications Accessible</a> in the Android Developers Guide. </p> diff --git a/docs/html/training/custom-views/optimizing-view.jd b/docs/html/training/custom-views/optimizing-view.jd index 1f489dd..7f2e762 100644 --- a/docs/html/training/custom-views/optimizing-view.jd +++ b/docs/html/training/custom-views/optimizing-view.jd @@ -19,7 +19,7 @@ previous.link=making-interactive.html <h2>You should also read</h2> <ul> - <li><a href=”{@docRoot}guide/topics/graphics/hardware-accel.html”> + <li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html"> Hardware Acceleration </a> </li> diff --git a/docs/html/training/efficient-downloads/regular_updates.jd b/docs/html/training/efficient-downloads/regular_updates.jd index feb7a8e..262d676 100644 --- a/docs/html/training/efficient-downloads/regular_updates.jd +++ b/docs/html/training/efficient-downloads/regular_updates.jd @@ -15,14 +15,14 @@ next.link=redundant_redundant.html <h2>This lesson teaches you to</h2> <ol> - <li><a href="#C2DM">Use Cloud to Device Messaging as an alternative to polling</a></li> + <li><a href="#GCM">Use Google Cloud Messaging as an alternative to polling</a></li> <li><a href="#OptimizedPolling">Optimize polling with inexact repeating alarms and exponential back-offs</a></li> </ol> <h2>You should also read</h2> <ul> <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li> - <li><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging</a></li> + <li><a href="{@docRoot}guide/google/gcm/index.html">Google Cloud Messaging for Android</a></li> </ul> </div> @@ -34,17 +34,17 @@ next.link=redundant_redundant.html <p>This lesson will examine how your refresh frequency can be varied to best mitigate the effect of background updates on the underlying wireless radio state machine.</p> -<h2 id="C2DM">Use Cloud to Device Messaging as an Alternative to Polling</h2> +<h2 id="GCM">Use Google Cloud Messaging as an Alternative to Polling</h2> <p>Every time your app polls your server to check if an update is required, you activate the wireless radio, drawing power unnecessarily, for up to 20 seconds on a typical 3G connection.</p> -<p><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging (C2DM)</a> is a lightweight mechanism used to transmit data from a server to a particular app instance. Using C2DM, your server can notify your app running on a particular device that there is new data available for it.</p> +<p><a href="{@docRoot}guide/google/gcm/index.html">Google Cloud Messaging for Android (GCM)</a> is a lightweight mechanism used to transmit data from a server to a particular app instance. Using GCM, your server can notify your app running on a particular device that there is new data available for it.</p> <p>Compared to polling, where your app must regularly ping the server to query for new data, this event-driven model allows your app to create a new connection only when it knows there is data to download.</p> <p>The result is a reduction in unnecessary connections, and a reduced latency for updated data within your application.</p> -<p>C2DM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use C2DM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.</p> +<p>GCM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use GCM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.</p> <h2 id="OptimizedPolling">Optimize Polling with Inexact Repeating Alarms and Exponential Backoffs</h2> @@ -99,4 +99,4 @@ executeUpdateOrPrefetch();</pre> } }</pre> -<p>Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.</p>
\ No newline at end of file +<p>Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.</p> diff --git a/docs/html/training/implementing-navigation/lateral.jd b/docs/html/training/implementing-navigation/lateral.jd index 76acf03..b59bab2 100644 --- a/docs/html/training/implementing-navigation/lateral.jd +++ b/docs/html/training/implementing-navigation/lateral.jd @@ -119,7 +119,7 @@ public void onCreate(Bundle savedInstanceState) { <h2 id="horizontal-paging">Implement Horizontal Paging (Swipe Views)</h2> -<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p> +<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views.html">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p> <p>Below is an example of using a {@link android.support.v4.view.ViewPager} to swipe across a collection of objects.</p> diff --git a/docs/html/training/improving-layouts/reusing-layouts.jd b/docs/html/training/improving-layouts/reusing-layouts.jd index 095b0dd..fdd3333 100644 --- a/docs/html/training/improving-layouts/reusing-layouts.jd +++ b/docs/html/training/improving-layouts/reusing-layouts.jd @@ -25,12 +25,9 @@ next.link=loading-ondemand.html <!-- other docs (NOT javadocs) --> <h2>You should also read</h2> <ul> - <li><a href="{@docRoot}resources/articles/layout-tricks-reuse.html">Creating Reusable UI -Components</a></li> - <li><a href="{@docRoot}resources/articles/layout-tricks-merge.html">Merging Layouts</a></li> <li><a href="{@docRoot}guide/topics/resources/layout-resource.html#include-element">Layout -Resource</a></li> +Resources</a></li> </ul> </div> diff --git a/docs/html/training/improving-layouts/smooth-scrolling.jd b/docs/html/training/improving-layouts/smooth-scrolling.jd index 0afa929..2a1ffba 100644 --- a/docs/html/training/improving-layouts/smooth-scrolling.jd +++ b/docs/html/training/improving-layouts/smooth-scrolling.jd @@ -22,8 +22,8 @@ previous.link=loading-ondemand.html <!-- other docs (NOT javadocs) --> <h2>You should also read</h2> <ul> - <li><a href="{@docRoot}resources/articles/listview-backgrounds.html">ListView -Backgrounds: An Optimization</a></li> + <li><a href="http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html">Why + is my list black? An Android optimization</a></li> </ul> </div> diff --git a/docs/html/training/notepad/index.jd b/docs/html/training/notepad/index.jd index 87a57d1..64ba144 100644 --- a/docs/html/training/notepad/index.jd +++ b/docs/html/training/notepad/index.jd @@ -1,6 +1,5 @@ page.title=Notepad Tutorial parent.title=Tutorials -parent.link=../../browser.html?tag=tutorial @jd:body |