sdkpage.cs revision 7c05b69c0c985bd2f57caec9143710a2204317b8
1<?cs include:"doctype.cs" ?> 2<?cs include:"macros.cs" ?> 3<html> 4<?cs if:sdk.redirect ?> 5 <head> 6 <title>Redirecting...</title> 7 <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs 8 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs 9 else ?>index.html<?cs /if ?>"> 10 <link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> 11 </head> 12<?cs else ?> 13 <?cs include:"head_tag.cs" ?> 14<?cs /if ?> 15<body class="gc-documentation 16 <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs 17 elif:design ?>design<?cs 18 elif:distribute ?>distribute<?cs 19 /if ?>" itemscope itemtype="http://schema.org/CreativeWork"> 20 <a name="top"></a> 21<?cs include:"header.cs" ?> 22 23 24<div <?cs if:fullpage 25?><?cs else 26?>class="col-13" id="doc-col"<?cs /if ?> > 27 28<?cs if:sdk.redirect ?> 29 30<div class="g-unit"> 31 <div id="jd-content"> 32 <p>Redirecting to 33 <a href="<?cs var:toroot ?>sdk/<?cs 34 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs 35 else ?>index.html<?cs /if ?>"><?cs 36 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs 37 else ?>Download the SDK<?cs /if ?> 38 </a> ...</p> 39 40<?cs else ?> 41<?cs # else, if NOT redirect ... 42# 43# 44# The following is for SDK/NDK pages 45# 46# 47?> 48 49<?cs if:header.hide ?><?cs else ?> 50<h1 itemprop="name"><?cs var:page.title ?></h1> 51<?cs /if ?> 52 <div id="jd-content" itemprop="description"> 53 54<?cs if:sdk.not_latest_version ?> 55 <div class="special"> 56 <p><strong>This is NOT the current Android SDK release.</strong></p> 57 <p><a href="/sdk/index.html">Download the current Android SDK</a></p> 58 </div> 59<?cs /if ?> 60 61 62<?cs if:ndk ?> 63<?cs # 64# 65# 66# 67# 68# 69# 70# the following is for the NDK 71# 72# (nested in if/else redirect) 73# 74# 75# 76# 77?> 78 79 <table class="download" id="download-table"> 80 <tr> 81 <th>Platform</th> 82 <th>Package</th> 83 <th>Size</th> 84 <th>MD5 Checksum</th> 85 </tr> 86 <tr> 87 <td>Windows</td> 88 <td> 89 <a onClick="return onDownload(this)" 90 href="http://dl.google.com/android/ndk/<?cs var:ndk.win_download ?>"><?cs var:ndk.win_download ?></a> 91 </td> 92 <td><?cs var:ndk.win_bytes ?> bytes</td> 93 <td><?cs var:ndk.win_checksum ?></td> 94 </tr> 95 <tr class="alt-color"> 96 <td>Mac OS X (intel)</td> 97 <td> 98 <a onClick="return onDownload(this)" 99 href="http://dl.google.com/android/ndk/<?cs var:ndk.mac_download ?>"><?cs var:ndk.mac_download ?></a> 100 </td> 101 <td><?cs var:ndk.mac_bytes ?> bytes</td> 102 <td><?cs var:ndk.mac_checksum ?></td> 103 </tr> 104 <tr> 105 <td>Linux 32/64-bit (x86)</td> 106 <td> 107 <a onClick="return onDownload(this)" 108 href="http://dl.google.com/android/ndk/<?cs var:ndk.linux_download ?>"><?cs var:ndk.linux_download ?></a> 109 </td> 110 <td><?cs var:ndk.linux_bytes ?> bytes</td> 111 <td><?cs var:ndk.linux_checksum ?></td> 112 </tr> 113 </table> 114 115 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?> 116 <?cs call:tag_list(root.descr) ?> 117 118 119 120<script> 121 function onDownload(link) { 122 123 $("#downloadForRealz").html("Download " + $(link).text()); 124 $("#downloadForRealz").attr('href',$(link).attr('href')); 125 126 $("#tos").fadeIn('slow'); 127 128 location.hash = "download"; 129 return false; 130 } 131 132 133 function onAgreeChecked() { 134 if ($("input#agree").is(":checked")) { 135 $("a#downloadForRealz").removeClass('disabled'); 136 } else { 137 $("a#downloadForRealz").addClass('disabled'); 138 } 139 } 140 141 function onDownloadNdkForRealz(link) { 142 if ($("input#agree").is(':checked')) { 143 $("#tos").fadeOut('slow'); 144 145 $('html, body').animate({ 146 scrollTop: $("#Installing").offset().top 147 }, 800, function() { 148 $("#Installing").click(); 149 }); 150 151 return true; 152 } else { 153 $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200, 154 function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)} 155 ); 156 return false; 157 } 158 } 159 160 $(window).hashchange( function(){ 161 if (location.hash == "") { 162 location.reload(); 163 } 164 }); 165 166</script> 167 168 <?cs else ?> 169<?cs # end if NDK ... 170# 171# 172# 173# 174# 175# 176# the following is for the SDK 177# 178# (nested in if/else redirect and if/else NDK) 179# 180# 181# 182# 183?> 184 <?cs if:android.whichdoc == "online" ?> 185 186 187<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?> 188<?cs call:tag_list(root.descr) ?> 189 190 191 192 193<h4><a href='' class="expandable" 194 onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;" 195 >DOWNLOAD FOR OTHER PLATFORMS</a></h4> 196 197 198<div class="pax col-13 online" style="display:none;margin:0;"> 199 200 201<p class="table-caption"><strong>ADT Bundle</strong></p> 202 <table class="download"> 203 <tr> 204 <th>Platform</th> 205 <th>Package</th> 206 <th>Size</th> 207 <th>MD5 Checksum</th> 208 </tr> 209 <tr> 210 <td>Windows</td> 211 <td> 212 <a onClick="return onDownload(this)" id="win-bundle" 213 href="http://dl.google.com/android/<?cs var:sdk.win_bundle_download ?>"><?cs var:sdk.win_bundle_download ?></a> 214 </td> 215 <td><?cs var:sdk.win_bundle_bytes ?> bytes</td> 216 <td><?cs var:sdk.win_bundle_checksum ?></td> 217 </tr> 218 <tr class="alt-color"> 219 <td>Mac OS X (intel)</td> 220 <td> 221 <a onClick="return onDownload(this)" id="mac-bundle" 222 href="http://dl.google.com/android/<?cs var:sdk.mac_bundle_download ?>"><?cs var:sdk.mac_bundle_download ?></a> 223 </td> 224 <td><?cs var:sdk.mac_bundle_bytes ?> bytes</td> 225 <td><?cs var:sdk.mac_bundle_checksum ?></td> 226 </tr> 227 <tr> 228 <td>Linux 32/64-bit (x86)</td> 229 <td> 230 <a onClick="return onDownload(this)" id="linux-bundle" 231 href="http://dl.google.com/android/<?cs var:sdk.linux_bundle_download ?>"><?cs var:sdk.linux_bundle_download ?></a> 232 </td> 233 <td><?cs var:sdk.linux_bundle_bytes ?> bytes</td> 234 <td><?cs var:sdk.linux_bundle_checksum ?></td> 235 </tr> 236 </table> 237 238 239<p class="table-caption"><strong>SDK Tools Only</strong></p> 240 <table class="download"> 241 <tr> 242 <th>Platform</th> 243 <th>Package</th> 244 <th>Size</th> 245 <th>MD5 Checksum</th> 246 </tr> 247 <tr> 248 <td rowspan="2">Windows</td> 249 <td> 250 <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download 251?>"><?cs var:sdk.win_download ?></a> 252 </td> 253 <td><?cs var:sdk.win_bytes ?> bytes</td> 254 <td><?cs var:sdk.win_checksum ?></td> 255 </tr> 256 <tr> 257 <!-- blank TD from Windows rowspan --> 258 <td> 259 <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs 260var:sdk.win_installer 261?>"><?cs var:sdk.win_installer ?></a> (Recommended) 262 </td> 263 <td><?cs var:sdk.win_installer_bytes ?> bytes</td> 264 <td><?cs var:sdk.win_installer_checksum ?></td> 265 </tr> 266 <tr class="alt-color"> 267 <td>Mac OS X (intel)</td> 268 <td> 269 <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs 270var:sdk.mac_download 271?>"><?cs var:sdk.mac_download ?></a> 272 </td> 273 <td><?cs var:sdk.mac_bytes ?> bytes</td> 274 <td><?cs var:sdk.mac_checksum ?></td> 275 </tr> 276 <tr> 277 <td>Linux (i386)</td> 278 <td> 279 <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs 280var:sdk.linux_download 281?>"><?cs var:sdk.linux_download ?></a> 282 </td> 283 <td><?cs var:sdk.linux_bytes ?> bytes</td> 284 <td><?cs var:sdk.linux_checksum ?></td> 285 </tr> 286 </table> 287 288</div><!-- end pax --> 289 290 291 292</div><!-- end col-13 for lower-half content --> 293 294 295 296 297<script> 298 if (location.hash == "#Requirements") { 299 $('.reqs').show(); 300 } else if (location.hash == "#ExistingIDE") { 301 $('.ide').show(); 302 } 303 304 var os; 305 var $bundlelink; 306 var $toolslink; 307 308 if (navigator.appVersion.indexOf("Win")!=-1) { 309 os = "Windows"; 310 $bundlelink = $('#win-bundle'); 311 $toolslink = $('#win-tools'); 312 } else if (navigator.appVersion.indexOf("Mac")!=-1) { 313 os = "Mac"; 314 $bundlelink = $('#mac-bundle'); 315 $toolslink = $('#mac-tools'); 316 } else if (navigator.appVersion.indexOf("Linux")!=-1) { 317 os = "Linux"; 318 $bundlelink = $('#linux-bundle'); 319 $toolslink = $('#linux-tools'); 320 } 321 322 if (os) { 323 $('#not-supported').hide(); 324 325 /* set up primary adt download button */ 326 $('#download-bundle-button').show(); 327 $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>"); 328 $('#download-bundle-button').click(function() {return onDownloadBouncer(this,true);}).attr('href', $bundlelink.attr('href')); 329 330 /* set up sdk tools only button */ 331 $('#download-tools-button').show(); 332 $('#download-tools-button').append("Download the SDK Tools for " + os); 333 $('#download-tools-button').click(function() {return onDownload(this,false);}).attr('href', $toolslink.attr('href')); 334 } else { 335 $('.pax').show(); 336 } 337 338 339 function onDownloadBouncer(link, button) { 340 341 if (navigator.userAgent.indexOf("WOW64") != -1 || 342 navigator.userAgent.indexOf("Win64") != -1 ) { 343 344 $("#naMessage").show(); 345 $("#warningCancel").click(function() { 346 $('#naMessage').hide(); 347 onDownload(link,button); 348 }); 349 $("#warningOk").click(function() { 350 $('#naMessage').hide(); 351 onDownload($("#download-tools-button").get(),false); 352 }); 353 return false; 354 } else { 355 return onDownload(link,button); 356 } 357 } 358 359 360 function onDownload(link, button) { 361 362 if (button) { 363 $("#downloadForRealz").html($(link).text()); 364 } else { 365 $("#downloadForRealz").html("Download " + $(link).text()); 366 $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html'); 367 } 368 $("#downloadForRealz").attr('href',$(link).attr('href')); 369 370 $("#tos").fadeIn('fast'); 371 $("#landing").fadeOut('fast'); 372 373 location.hash = "download"; 374 return false; 375 } 376 377 378 function onAgreeChecked() { 379 if ($("input#agree").is(":checked")) { 380 $("a#downloadForRealz").removeClass('disabled'); 381 } else { 382 $("a#downloadForRealz").addClass('disabled'); 383 } 384 } 385 386 function onDownloadForRealz(link) { 387 if ($("input#agree").is(':checked')) { 388 $("div.sdk-terms").slideUp(); 389 $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow'); 390 $("#next-steps").fadeIn('slow'); 391 $("h1#tos-header").text('Get Ready to Code!'); 392 return true; 393 } else { 394 $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200, 395 function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)} 396 ); 397 return false; 398 } 399 } 400 401 $(window).hashchange( function(){ 402 if (location.hash == "") { 403 location.reload(); 404 } 405 }); 406 407</script> 408 409 410 411</div><!-- end the wrapper used for relative/absolute positions --> 412<?cs # THIS DIV WAS OPENED IN INDEX.JD ?> 413 414 415 416 417 <?cs else ?> <?cs # end if online ?> 418 419 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?> 420 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming 421 Android 3.0 release, to give you a head-start on developing applications for it. 422 </p> 423 424 <p>See the <a 425 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information 426 about how to set up the preview SDK and get started.</p> 427 <style type="text/css"> 428 .non-preview { display:none; } 429 </style> 430 431 <?cs else ?><?cs # it's normal offline docs ?> 432 433 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?> 434 <?cs call:tag_list(root.descr) ?> 435 <style type="text/css"> 436 body .offline { display:block; } 437 body .online { display:none; } 438 </style> 439 <script> 440 $('.reqs').show(); 441 </script> 442 <?cs /if ?> 443 444 <?cs /if ?> <?cs # end if/else online ?> 445 446<?cs /if ?> <?cs # end if/else NDK ?> 447 448<?cs /if ?> <?cs # end if/else redirect ?> 449 450 451</div><!-- end jd-content --> 452 453<?cs if:!sdk.redirect ?> 454<?cs include:"footer.cs" ?> 455<?cs /if ?> 456 457</div><!-- end g-unit --> 458 459<?cs include:"trailer.cs" ?> 460 461</body> 462</html> 463 464 465 466