diff options
Diffstat (limited to 'docs')
30 files changed, 342 insertions, 145 deletions
diff --git a/docs/downloads/training/BitmapFun.zip b/docs/downloads/training/BitmapFun.zip Binary files differindex e7e71f9..e48bfd3 100644 --- a/docs/downloads/training/BitmapFun.zip +++ b/docs/downloads/training/BitmapFun.zip diff --git a/docs/html/design/style/iconography.jd b/docs/html/design/style/iconography.jd index 76f4aa4..ce11cf7 100644 --- a/docs/html/design/style/iconography.jd +++ b/docs/html/design/style/iconography.jd @@ -109,10 +109,8 @@ files for further customization. </p> <p> - <a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons (@iconography page)']);" href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a> - </p> <div class="layout-content-row"> diff --git a/docs/html/guide/google/gcm/adv.jd b/docs/html/guide/google/gcm/adv.jd index 2174128..aa66e25 100644 --- a/docs/html/guide/google/gcm/adv.jd +++ b/docs/html/guide/google/gcm/adv.jd @@ -51,7 +51,6 @@ delivered right away unless the <code>delay_while_idle</code> flag is set to tru <p>If the device is not connected to GCM, the message will be stored until a connection is established (again respecting the collapse key rules). When a connection is established, GCM will deliver all pending messages to the device, regardless of the <code>delay_while_idle</code> flag. If the device never gets connected again (for instance, if it was factory reset), the message will eventually time out and be discarded from GCM storage. The default timeout is 4 weeks, unless the <code>time_to_live</code> flag is set.</p> -<p class="note"><strong>Note:</strong> When you set the <code>time_to_live</code> flag, you must also set <code>collapse_key</code>. Otherwise the message will be rejected as a bad request.</p> <p>Finally, when GCM attempts to deliver a message to the device and the application was uninstalled, GCM will discard that message right away and invalidate the registration ID. Future attempts to send a message to that device will get a <code>NotRegistered</code> error. See <a href="#unreg">How Unregistration Works</a> for more information.</p> <p>Although is not possible to track the status of each individual message, the Google APIs Console stats are broken down by messages sent to device, messages collapsed, and messages waiting for delivery.</p> diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd index 5515f31..c6f1a4e 100644 --- a/docs/html/guide/google/gcm/gcm.jd +++ b/docs/html/guide/google/gcm/gcm.jd @@ -57,9 +57,15 @@ page.title=GCM Architectural Overview </div> <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> +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 class="note"> To jump right into using GCM with your Android applications, see the instructions in <a href="gs.html">Getting Started</a>.</p> @@ -647,7 +653,7 @@ when the device is offline, so that only the last message gets sent to the client. This is intended to avoid sending too many messages to the phone when it comes back online. Note that since there is no guarantee of the order in which messages get sent, the "last" message may not actually be the last -message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional, unless you are using the <code>time_to_live</code> parameter—in that case, you must also specify a <code>collapse_key</code>.</td> +message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional.</td> </tr> <tr> <td><code>data</code></td> @@ -665,7 +671,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool </tr> <tr> <td><code>time_to_live</code></td> - <td>How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number). If you use this parameter, you must also specify a <code>collapse_key</code>.</td> + <td>How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number).</td> </tr> </table> diff --git a/docs/html/guide/google/gcm/gs.jd b/docs/html/guide/google/gcm/gs.jd index 6f8598f..93eb794 100644 --- a/docs/html/guide/google/gcm/gs.jd +++ b/docs/html/guide/google/gcm/gs.jd @@ -138,8 +138,14 @@ page.title=GCM: Getting Started </ol> <p>This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is is provided by GCM library), as shown in the next step. It must be a subclass of <code>com.google.android.gcm.GCMBaseIntentService</code>, must contain a public constructor, and should be named <code>my_app_package.GCMIntentService</code> (unless you use a subclass of <code>GCMBroadcastReceiver</code> that overrides the method used to name the service).</p> -<h4><br> - Step 3: Write the my_app_package.GCMIntentService class</h4> + +<p>The intent service must also define its sender ID(s). It does this as follows:</p> +<ul> + <li>If the value is static, the service's default constructor should call <code>super(senderIds)</code>.</li> + <li>If the value is dynamic, the service should override the <code>getSenderIds()</code> method.</li> +</ul> + +<h4>Step 3: Write the my_app_package.GCMIntentService class</h4> <p>Next write the <code>my_app_package.GCMIntentService</code> class, overriding the following callback methods (which are called by <code>GCMBroadcastReceiver</code>):<br> </p> <ul> diff --git a/docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html b/docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html index cf7dc28..80ee784 100644 --- a/docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html +++ b/docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> All Classes </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html b/docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html index 299085c..966598d 100644 --- a/docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html +++ b/docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> All Classes </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html index 7384dfd..515bba4 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:09 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Constants </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html index 56de783..bb0974c 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> InvalidRequestException </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html index 7d5110c..c2ee648 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Message.Builder </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html index 37a8a74..5dbd262 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Message </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html index 21752ca..0721488 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> MulticastResult </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html index 512b8f5..a4aad29 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Result </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html index 5224e15..fabda98 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Sender </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> @@ -591,6 +591,8 @@ protected static java.lang.String <B>getString</B>(java.io.InputStream stre <p> If the stream ends in a newline character, it will be stripped. + <p> + If the stream is null, returns an empty string. <P> <DD><DL> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html index 9f099b3..1bc4fd9 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> com.google.android.gcm.server </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html index eddcca1..de791c7 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> com.google.android.gcm.server </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html index d3d1c43..d509312 100644 --- a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html +++ b/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> com.google.android.gcm.server Class Hierarchy </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/constant-values.html b/docs/html/guide/google/gcm/server-javadoc/constant-values.html index 66df664..68db1cb 100644 --- a/docs/html/guide/google/gcm/server-javadoc/constant-values.html +++ b/docs/html/guide/google/gcm/server-javadoc/constant-values.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Constant Field Values </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/default.css b/docs/html/guide/google/gcm/server-javadoc/default.css index 2513e69..7c395c7 100644 --- a/docs/html/guide/google/gcm/server-javadoc/default.css +++ b/docs/html/guide/google/gcm/server-javadoc/default.css @@ -530,12 +530,12 @@ h3:target { } .design ol { counter-reset: item; } - .design ol li { + .design ol>li { font-size: 14px; line-height: 20px; list-style-type: none; position: relative; } - .design ol li:before { + .design ol>li:before { content: counter(item) ". "; counter-increment: item; position: absolute; @@ -561,16 +561,18 @@ h3:target { content: "9. "; } .design ol li.value-10:before { content: "10. "; } -.design .with-callouts ol li { +.design .with-callouts ol>li { list-style-position: inside; margin-left: 0; } - .design .with-callouts ol li:before { + .design .with-callouts ol>li:before { display: inline; left: -20px; float: left; width: 17px; color: #33b5e5; font-weight: 500; } +.design .with-callouts ul>li { + list-style-position: outside; } /* special list items */ li.no-bullet { @@ -1079,22 +1081,71 @@ color-stop(50%, #acbc00), color-stop(50%, #bdde00), color-stop(100%, #bdde00)); Print Only ========================================================================== */ @media print { -a { - color: inherit; -} -.nav-x, .nav-y { - display: none; -} -.str { color: #060; } -.kwd { color: #006; font-weight: bold; } -.com { color: #600; font-style: italic; } -.typ { color: #404; font-weight: bold; } -.lit { color: #044; } -.pun { color: #440; } -.pln { color: #000; } -.tag { color: #006; font-weight: bold; } -.atn { color: #404; } -.atv { color: #060; } + /* configure printed page */ + @page { + margin: 0.75in 1in; + widows: 4; + orphans: 4; + } + + /* reset spacing metrics */ + html, body, .wrap { + margin: 0 !important; + padding: 0 !important; + width: auto !important; + } + + /* leave enough space on the left for bullets */ + body { + padding-left: 20px !important; + } + #doc-col { + margin-left: 0; + } + + /* hide a bunch of non-content elements */ + #header, #footer, #nav-x, #side-nav, + .training-nav-top, .training-nav-bottom, + #doc-col .content-footer, + .nav-x, .nav-y, + .paging-links, + a.totop { + display: none !important; + } + + /* remove extra space above page titles */ + #doc-col .content-header { + margin-top: 0; + } + + /* bump up spacing above subheadings */ + h2 { + margin-top: 40px !important; + } + + /* print link URLs where possible and give links default text color */ + p a:after { + content: " (" attr(href) ")"; + font-size: 80%; + } + p a { + word-wrap: break-word; + } + a { + color: inherit; + } + + /* syntax highlighting rules */ + .str { color: #060; } + .kwd { color: #006; font-weight: bold; } + .com { color: #600; font-style: italic; } + .typ { color: #404; font-weight: bold; } + .lit { color: #044; } + .pun { color: #440; } + .pln { color: #000; } + .tag { color: #006; font-weight: bold; } + .atn { color: #404; } + .atv { color: #060; } } /* ============================================================================= @@ -2033,8 +2084,11 @@ div.toggle-content.closed .toggle-content-toggleme { #jd-content img.toggle-content-img { margin:0 5px 5px 0; } -div.toggle-content > p { - padding:0 0 5px; +div.toggle-content p { + margin:10px 0 0; +} +div.toggle-content-toggleme { + padding:0 0 0 15px; } @@ -2145,14 +2199,9 @@ table.blank th, table.blank td { .nolist { list-style:none; - padding:0; - margin:0 0 1em 1em; + margin-left:0; } -.nolist li { - padding:0 0 2px; - margin:0; -} pre.classic { background-color:transparent; @@ -2180,6 +2229,12 @@ p.table-caption { color:#666; } +div.note, +div.caution, +div.warning { + margin: 0 0 15px; +} + p.note, div.note, p.caution, div.caution, p.warning, div.warning { @@ -2898,10 +2953,6 @@ ul#search_filtered { /* SEARCH RESULTS */ -/* disable twiddle and size selectors for left column */ -#leftSearchControl div { - padding:0; -} #leftSearchControl .gsc-twiddle { background-image : none; @@ -3475,7 +3526,7 @@ EndColorStr='#ececec'); .morehover:hover { opacity:1; - height:345px; + height:385px; width:268px; -webkit-transition-property:height, -webkit-opacity; } @@ -3489,7 +3540,7 @@ EndColorStr='#ececec'); .morehover .mid { width:228px; background:url(../images/more_mid.png) repeat-y; - padding:10px 20px 10px 20px; + padding:10px 20px 0 20px; } .morehover .mid .header { @@ -3598,15 +3649,19 @@ a.download-sdk { padding-top: 14px; } +#nav-x .wrap { + min-height:34px; +} + #nav-x .wrap, #searchResults.wrap { max-width:940px; border-bottom:1px solid #CCC; - min-height:34px; - } - +#searchResults.wrap #leftSearchControl { + min-height:700px +} .nav-x { margin-left:0; margin-bottom:0; @@ -3762,7 +3817,8 @@ a.download-sdk { height: 300px; } .slideshow-develop img.play { - width:350px; + max-width:350px; + max-height:240px; margin:20px 0 0 90px; -webkit-transform: perspective(800px ) rotateY( 35deg ); box-shadow: -16px 20px 40px rgba(0, 0, 0, 0.3); @@ -3817,6 +3873,7 @@ a.download-sdk { .feed .feed-nav li { list-style: none; float: left; + height: 21px; /* +4px bottom border = 25px; same as .feed-nav */ margin-right: 25px; cursor: pointer; } @@ -3969,21 +4026,24 @@ a.download-sdk { .landing-docs { margin:20px 0 0; } -.landing-banner { - height:280px; -} .landing-banner .col-6:first-child, -.landing-docs .col-6:first-child { +.landing-docs .col-6:first-child, +.landing-docs .col-12 { margin-left:0; + min-height:280px; } .landing-banner .col-6:last-child, -.landing-docs .col-6:last-child { +.landing-docs .col-6:last-child, +.landing-docs .col-12 { margin-right:0; } .landing-banner h1 { margin-top:0; } +.landing-docs { + clear:left; +} .landing-docs h3 { font-size:14px; line-height:21px; @@ -4002,4 +4062,99 @@ a.download-sdk { .plusone { float:right; -}
\ No newline at end of file +} + + + +/************* HOME/LANDING PAGE *****************/ + +.slideshow-home { + height: 500px; + width: 940px; + border-bottom: 1px solid #CCC; + position: relative; + margin: 0; +} +.slideshow-home .frame { + width: 940px; + height: 500px; +} +.slideshow-home .content-left { + float: left; + text-align: center; + vertical-align: center; + margin: 0 0 0 35px; +} +.slideshow-home .content-right { + margin: 80px 0 0 0; +} +.slideshow-home .content-right p { + margin-bottom: 10px; +} +.slideshow-home .content-right p:last-child { + margin-top: 15px; +} +.slideshow-home .content-right h1 { + padding:0; +} +.slideshow-home .item { + height: 500px; + width: 940px; +} +.home-sections { + padding: 30px 20px 20px; + margin: 20px 0; + background: -webkit-linear-gradient(top, #F6F6F6,#F9F9F9); +} +.home-sections ul { + margin: 0; +} +.home-sections ul li { + float: left; + display: block; + list-style: none; + width: 170px; + height: 35px; + border: 1px solid #ccc; + background: white; + margin-right: 10px; + border-radius: 1px; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + box-shadow: 1px 1px 5px #EEE; + -webkit-box-shadow: 1px 1px 5px #EEE; + -moz-box-shadow: 1px 1px 5px #EEE; + background: white; +} +.home-sections ul li:hover { + background: #F9F9F9; + border: 1px solid #CCC; +} +.home-sections ul li a, +.home-sections ul li a:hover { + font-weight: bold; + margin-top: 8px; + line-height: 18px; + float: left; + width: 100%; + text-align: center; + color: #09c !important; +} +.home-sections ul li a { + font-weight: bold; + margin-top: 8px; + line-height: 18px; + float: left; + width:100%; + text-align:center; +} +.home-sections ul li img { + float: left; + margin: -8px 0 0 10px; +} +.home-sections ul li.last { + margin-right: 0px; +} +.fullpage #footer { + margin-top: -40px; +} diff --git a/docs/html/guide/google/gcm/server-javadoc/deprecated-list.html b/docs/html/guide/google/gcm/server-javadoc/deprecated-list.html index 729b2bf..04b9aa5 100644 --- a/docs/html/guide/google/gcm/server-javadoc/deprecated-list.html +++ b/docs/html/guide/google/gcm/server-javadoc/deprecated-list.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Deprecated List </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/help-doc.html b/docs/html/guide/google/gcm/server-javadoc/help-doc.html index 7f5286c..c479cff 100644 --- a/docs/html/guide/google/gcm/server-javadoc/help-doc.html +++ b/docs/html/guide/google/gcm/server-javadoc/help-doc.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> API Help </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/index-all.html b/docs/html/guide/google/gcm/server-javadoc/index-all.html index 0b095ec..97aa300 100644 --- a/docs/html/guide/google/gcm/server-javadoc/index-all.html +++ b/docs/html/guide/google/gcm/server-javadoc/index-all.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Index </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="./default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/index.html b/docs/html/guide/google/gcm/server-javadoc/index.html index d8ba0ef..d3c3821 100644 --- a/docs/html/guide/google/gcm/server-javadoc/index.html +++ b/docs/html/guide/google/gcm/server-javadoc/index.html @@ -2,7 +2,7 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc on Mon Jul 16 14:12:10 PDT 2012--> +<!-- Generated by javadoc on Wed Aug 29 14:55:34 PDT 2012--> <TITLE> Generated Documentation (Untitled) </TITLE> diff --git a/docs/html/guide/google/gcm/server-javadoc/overview-tree.html b/docs/html/guide/google/gcm/server-javadoc/overview-tree.html index b8e28ad..c9afea6 100644 --- a/docs/html/guide/google/gcm/server-javadoc/overview-tree.html +++ b/docs/html/guide/google/gcm/server-javadoc/overview-tree.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Class Hierarchy </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/google/gcm/server-javadoc/serialized-form.html b/docs/html/guide/google/gcm/server-javadoc/serialized-form.html index 7a1378f..ab99e41 100644 --- a/docs/html/guide/google/gcm/server-javadoc/serialized-form.html +++ b/docs/html/guide/google/gcm/server-javadoc/serialized-form.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 --> +<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 --> <TITLE> Serialized Form </TITLE> -<META NAME="date" CONTENT="2012-07-16"> +<META NAME="date" CONTENT="2012-08-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style"> diff --git a/docs/html/guide/topics/ui/themes.jd b/docs/html/guide/topics/ui/themes.jd index d787492..bc1c4f0 100644 --- a/docs/html/guide/topics/ui/themes.jd +++ b/docs/html/guide/topics/ui/themes.jd @@ -413,8 +413,8 @@ thoroughly describe the styles, so viewing the actual source code for these styl themes will give you a better understanding of what style properties each one provides. For a better reference to the Android styles and themes, see the following source code:</p> <ul> - <li><a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/values/styles.xml;h=d7b654e49809cb97a35682754b1394af5c8bc88b;hb=HEAD">Android Styles (styles.xml)</a></li> - <li><a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/values/themes.xml;h=6b3d7407d1c895a3c297e60d5beac98e2d34c271;hb=HEAD">Android Themes (themes.xml)</a></li> + <li><a href="https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/styles.xml">Android Styles (styles.xml)</a></li> + <li><a href="https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml">Android Themes (themes.xml)</a></li> </ul> <p>These files will help you learn through example. For instance, in the Android themes source code, @@ -422,9 +422,8 @@ you'll find a declaration for <code><style name="Theme.Dialog"></code>. In you'll see all of the properties that are used to style dialogs that are used by the Android framework.</p> -<p>For more information about the syntax used to create styles in XML, see -<a href="{@docRoot}guide/topics/resources/available-resources.html#stylesandthemes">Available Resource Types: -Style and Themes</a>.</p> +<p>For more information about the syntax for styles and themes in XML, see the +<a href="{@docRoot}guide/topics/resources/style-resource.html">Style Resource</a> document.</p> <p>For a reference of available style attributes that you can use to define a style or theme (e.g., "windowBackground" or "textAppearance"), see {@link android.R.attr} or the respective diff --git a/docs/html/training/displaying-bitmaps/cache-bitmap.jd b/docs/html/training/displaying-bitmaps/cache-bitmap.jd index 94abe21..2a333cc 100644 --- a/docs/html/training/displaying-bitmaps/cache-bitmap.jd +++ b/docs/html/training/displaying-bitmaps/cache-bitmap.jd @@ -96,7 +96,7 @@ and leave the rest of your app little memory to work with.</p> <p>Here’s an example of setting up a {@link android.util.LruCache} for bitmaps:</p> <pre> -private LruCache<String, Bitmap> mMemoryCache; +private LruCache<String, Bitmap> mMemoryCache; @Override protected void onCreate(Bundle savedInstanceState) { @@ -109,7 +109,7 @@ protected void onCreate(Bundle savedInstanceState) { // Use 1/8th of the available memory for this memory cache. final int cacheSize = 1024 * 1024 * memClass / 8; - mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { + mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { // The cache size will be measured in bytes rather than number of items. @@ -159,7 +159,7 @@ public void loadBitmap(int resId, ImageView imageView) { updated to add entries to the memory cache:</p> <pre> -class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { +class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { ... // Decode image in background. @Override @@ -179,7 +179,7 @@ class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { rely on images being available in this cache. Components like {@link android.widget.GridView} with larger datasets can easily fill up a memory cache. Your application could be interrupted by another task like a phone call, and while in the background it might be killed and the memory cache -destroyed. Once the user resumes, your application it has to process each image again.</p> +destroyed. Once the user resumes, your application has to process each image again.</p> <p>A disk cache can be used in these cases to persist processed bitmaps and help decrease loading times where images are no longer available in a memory cache. Of course, fetching images from disk @@ -190,18 +190,14 @@ be unpredictable.</p> appropriate place to store cached images if they are accessed more frequently, for example in an image gallery application.</p> -<p>Included in the sample code of this class is a basic {@code DiskLruCache} implementation. -However, a more robust and recommended {@code DiskLruCache} solution is included in the Android 4.0 -source code ({@code libcore/luni/src/main/java/libcore/io/DiskLruCache.java}). Back-porting this -class for use on previous Android releases should be fairly straightforward (a <a -href="http://www.google.com/search?q=disklrucache">quick search</a> shows others who have already -implemented this solution).</p> - -<p>Here’s updated example code that uses the simple {@code DiskLruCache} included in the sample -application of this class:</p> +<p>The sample code of this class uses a {@code DiskLruCache} implementation that is pulled from the +<a href="https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/libcore/io/DiskLruCache.java">Android source</a>. Here’s updated example code that adds a disk cache in addition +to the existing memory cache:</p> <pre> -private DiskLruCache mDiskCache; +private DiskLruCache mDiskLruCache; +private final Object mDiskCacheLock = new Object(); +private boolean mDiskCacheStarting = true; private static final int DISK_CACHE_SIZE = 1024 * 1024 * 10; // 10MB private static final String DISK_CACHE_SUBDIR = "thumbnails"; @@ -210,12 +206,26 @@ protected void onCreate(Bundle savedInstanceState) { ... // Initialize memory cache ... - File cacheDir = getCacheDir(this, DISK_CACHE_SUBDIR); - mDiskCache = DiskLruCache.openCache(this, cacheDir, DISK_CACHE_SIZE); + // Initialize disk cache on background thread + File cacheDir = getDiskCacheDir(this, DISK_CACHE_SUBDIR); + new InitDiskCacheTask().execute(cacheDir); ... } -class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { +class InitDiskCacheTask extends AsyncTask<File, Void, Void> { + @Override + protected Void doInBackground(File... params) { + synchronized (mDiskCacheLock) { + File cacheDir = params[0]; + mDiskLruCache = DiskLruCache.open(cacheDir, DISK_CACHE_SIZE); + mDiskCacheStarting = false; // Finished initialization + mDiskCacheLock.notifyAll(); // Wake any waiting threads + } + return null; + } +} + +class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { ... // Decode image in background. @Override @@ -232,7 +242,7 @@ class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { } // Add final bitmap to caches - addBitmapToCache(String.valueOf(imageKey, bitmap); + addBitmapToCache(imageKey, bitmap); return bitmap; } @@ -246,28 +256,48 @@ public void addBitmapToCache(String key, Bitmap bitmap) { } // Also add to disk cache - if (!mDiskCache.containsKey(key)) { - mDiskCache.put(key, bitmap); + synchronized (mDiskCacheLock) { + if (mDiskLruCache != null && mDiskLruCache.get(key) == null) { + mDiskLruCache.put(key, bitmap); + } } } public Bitmap getBitmapFromDiskCache(String key) { - return mDiskCache.get(key); + synchronized (mDiskCacheLock) { + // Wait while disk cache is started from background thread + while (mDiskCacheStarting) { + try { + mDiskCacheLock.wait(); + } catch (InterruptedException e) {} + } + if (mDiskLruCache != null) { + return mDiskLruCache.get(key); + } + } + return null; } // Creates a unique subdirectory of the designated app cache directory. Tries to use external // but if not mounted, falls back on internal storage. -public static File getCacheDir(Context context, String uniqueName) { +public static File getDiskCacheDir(Context context, String uniqueName) { // Check if media is mounted or storage is built-in, if so, try and use external cache dir // otherwise use internal cache dir - final String cachePath = Environment.getExternalStorageState() == Environment.MEDIA_MOUNTED - || !Environment.isExternalStorageRemovable() ? - context.getExternalCacheDir().getPath() : context.getCacheDir().getPath(); + final String cachePath = + Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || + !isExternalStorageRemovable() ? getExternalCacheDir(context).getPath() : + context.getCacheDir().getPath(); return new File(cachePath + File.separator + uniqueName); } </pre> +<p class="note"><strong>Note:</strong> Even initializing the disk cache requires disk operations +and therefore should not take place on the main thread. However, this does mean there's a chance +the cache is accessed before initialization. To address this, in the above implementation, a lock +object ensures that the app does not read from the disk cache until the cache has been +initialized.</p> + <p>While the memory cache is checked in the UI thread, the disk cache is checked in the background thread. Disk operations should never take place on the UI thread. When image processing is complete, the final bitmap is added to both the memory and disk cache for future use.</p> @@ -292,7 +322,7 @@ android.widget.ImageView} objects.</p> changes using a {@link android.app.Fragment}:</p> <pre> -private LruCache<String, Bitmap> mMemoryCache; +private LruCache<String, Bitmap> mMemoryCache; @Override protected void onCreate(Bundle savedInstanceState) { @@ -301,7 +331,7 @@ protected void onCreate(Bundle savedInstanceState) { RetainFragment.findOrCreateRetainFragment(getFragmentManager()); mMemoryCache = RetainFragment.mRetainedCache; if (mMemoryCache == null) { - mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { + mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { ... // Initialize cache here as usual } mRetainFragment.mRetainedCache = mMemoryCache; @@ -311,7 +341,7 @@ protected void onCreate(Bundle savedInstanceState) { class RetainFragment extends Fragment { private static final String TAG = "RetainFragment"; - public LruCache<String, Bitmap> mRetainedCache; + public LruCache<String, Bitmap> mRetainedCache; public RetainFragment() {} diff --git a/docs/html/training/displaying-bitmaps/display-bitmap.jd b/docs/html/training/displaying-bitmaps/display-bitmap.jd index 5eac04c..4572c42 100644 --- a/docs/html/training/displaying-bitmaps/display-bitmap.jd +++ b/docs/html/training/displaying-bitmaps/display-bitmap.jd @@ -103,7 +103,8 @@ public class ImageDetailActivity extends FragmentActivity { } </pre> -<p>The details {@link android.app.Fragment} holds the {@link android.widget.ImageView} children:</p> +<p>Here is an implementation of the details {@link android.app.Fragment} which holds the {@link android.widget.ImageView} children. This might seem like a perfectly reasonable approach, but can +you see the drawbacks of this implementation? How could it be improved?</p> <pre> public class ImageDetailFragment extends Fragment { @@ -146,11 +147,11 @@ public class ImageDetailFragment extends Fragment { } </pre> -<p>Hopefully you noticed the issue with this implementation; The images are being read from -resources on the UI thread which can lead to an application hanging and being force closed. Using an -{@link android.os.AsyncTask} as described in the <a href="process-bitmap.html">Processing Bitmaps Off -the UI Thread</a> lesson, it’s straightforward to move image loading and processing to a background -thread:</p> +<p>Hopefully you noticed the issue: the images are being read from resources on the UI thread, +which can lead to an application hanging and being force closed. Using an +{@link android.os.AsyncTask} as described in the <a href="process-bitmap.html">Processing Bitmaps +Off the UI Thread</a> lesson, it’s straightforward to move image loading and processing to a +background thread:</p> <pre> public class ImageDetailActivity extends FragmentActivity { @@ -190,7 +191,7 @@ modifications for a memory cache:</p> <pre> public class ImageDetailActivity extends FragmentActivity { ... - private LruCache<String, Bitmap> mMemoryCache; + private LruCache<String, Bitmap> mMemoryCache; @Override public void onCreate(Bundle savedInstanceState) { @@ -229,7 +230,8 @@ UI remains fluid, memory usage remains under control and concurrency is handled the way {@link android.widget.GridView} recycles its children views).</p> <p>To start with, here is a standard {@link android.widget.GridView} implementation with {@link -android.widget.ImageView} children placed inside a {@link android.app.Fragment}:</p> +android.widget.ImageView} children placed inside a {@link android.app.Fragment}. Again, this might +seem like a perfectly reasonable approach, but what would make it better?</p> <pre> public class ImageGridFragment extends Fragment implements AdapterView.OnItemClickListener { @@ -261,7 +263,7 @@ public class ImageGridFragment extends Fragment implements AdapterView.OnItemCli } @Override - public void onItemClick(AdapterView<?> parent, View v, int position, long id) { + public void onItemClick(AdapterView<?> parent, View v, int position, long id) { final Intent i = new Intent(getActivity(), ImageDetailActivity.class); i.putExtra(ImageDetailActivity.EXTRA_IMAGE, position); startActivity(i); @@ -345,13 +347,13 @@ public class ImageGridFragment extends Fragment implements AdapterView.OnItemCli } static class AsyncDrawable extends BitmapDrawable { - private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference; + private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference; public AsyncDrawable(Resources res, Bitmap bitmap, BitmapWorkerTask bitmapWorkerTask) { super(res, bitmap); bitmapWorkerTaskReference = - new WeakReference<BitmapWorkerTask>(bitmapWorkerTask); + new WeakReference<BitmapWorkerTask>(bitmapWorkerTask); } public BitmapWorkerTask getBitmapWorkerTask() { diff --git a/docs/html/training/displaying-bitmaps/index.jd b/docs/html/training/displaying-bitmaps/index.jd index 78371ad..b91172b 100644 --- a/docs/html/training/displaying-bitmaps/index.jd +++ b/docs/html/training/displaying-bitmaps/index.jd @@ -43,8 +43,8 @@ exception:<br />{@code java.lang.OutofMemoryError: bitmap size exceeds VM budget perform under this minimum memory limit. However, keep in mind many devices are configured with higher limits.</li> <li>Bitmaps take up a lot of memory, especially for rich images like photographs. For example, the - camera on the <a href="http://www.google.com/nexus/">Galaxy Nexus</a> takes photos up to 2592x1936 - pixels (5 megapixels). If the bitmap configuration used is {@link + camera on the <a href="http://www.android.com/devices/detail/galaxy-nexus">Galaxy Nexus</a> takes + photos up to 2592x1936 pixels (5 megapixels). If the bitmap configuration used is {@link android.graphics.Bitmap.Config ARGB_8888} (the default from the Android 2.3 onward) then loading this image into memory takes about 19MB of memory (2592*1936*4 bytes), immediately exhausting the per-app limit on some devices.</li> @@ -75,4 +75,4 @@ exception:<br />{@code java.lang.OutofMemoryError: bitmap size exceeds VM budget components like {@link android.support.v4.view.ViewPager} and {@link android.widget.GridView} using a background thread and bitmap cache.</dd> -</dl>
\ No newline at end of file +</dl> diff --git a/docs/html/training/displaying-bitmaps/process-bitmap.jd b/docs/html/training/displaying-bitmaps/process-bitmap.jd index d1e346c..d4fcff3 100644 --- a/docs/html/training/displaying-bitmaps/process-bitmap.jd +++ b/docs/html/training/displaying-bitmaps/process-bitmap.jd @@ -62,13 +62,13 @@ decodeSampledBitmapFromResource()}</a>: </p> <a name="BitmapWorkerTask"></a> <pre> -class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { - private final WeakReference<ImageView> imageViewReference; +class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { + private final WeakReference<ImageView> imageViewReference; private int data = 0; public BitmapWorkerTask(ImageView imageView) { // Use a WeakReference to ensure the ImageView can be garbage collected - imageViewReference = new WeakReference<ImageView>(imageView); + imageViewReference = new WeakReference<ImageView>(imageView); } // Decode image in background. @@ -133,13 +133,13 @@ completes:</p> <a name="AsyncDrawable"></a> <pre> static class AsyncDrawable extends BitmapDrawable { - private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference; + private final WeakReference<BitmapWorkerTask> bitmapWorkerTaskReference; public AsyncDrawable(Resources res, Bitmap bitmap, BitmapWorkerTask bitmapWorkerTask) { super(res, bitmap); bitmapWorkerTaskReference = - new WeakReference<BitmapWorkerTask>(bitmapWorkerTask); + new WeakReference<BitmapWorkerTask>(bitmapWorkerTask); } public BitmapWorkerTask getBitmapWorkerTask() { @@ -211,7 +211,7 @@ one associated with the {@link android.widget.ImageView}:</p> <a name="BitmapWorkerTaskUpdated"></a> <pre> -class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { +class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { ... @Override @@ -236,4 +236,4 @@ class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { android.widget.GridView} components as well as any other components that recycle their child views. Simply call {@code loadBitmap} where you normally set an image to your {@link android.widget.ImageView}. For example, in a {@link android.widget.GridView} implementation this -would be in the {@link android.widget.Adapter#getView getView()} method of the backing adapter.</p>
\ No newline at end of file +would be in the {@link android.widget.Adapter#getView getView()} method of the backing adapter.</p> |