Merge branch 'gingerbread' into gingerbread-release
diff --git a/tools/droiddoc/templates-sdk/customization.cs b/tools/droiddoc/templates-sdk/customization.cs
index 34f5595..907f0f7 100644
--- a/tools/droiddoc/templates-sdk/customization.cs
+++ b/tools/droiddoc/templates-sdk/customization.cs
@@ -101,7 +101,7 @@
<?cs
def:sdk_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
- <div class="g-unit g-first not-resizable" id="side-nav">
+ <div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
</div>
@@ -110,8 +110,8 @@
<?cs
def:resources_tab_nav() ?>
- <div class="g-section g-tpl-240" id="body-content">
- <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div class="g-section g-tpl-200" id="body-content">
+ <div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../frameworks/base/docs/html/resources/resources_toc.cs" ?>
</div>
@@ -126,7 +126,7 @@
<?cs
def:guide_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
- <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
</div>
@@ -141,7 +141,7 @@
<?cs # The default side navigation for the reference docs ?><?cs
def:default_left_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
- <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div class="g-unit g-first" id="side-nav">
<div id="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 0205408..849ead4 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -4,8 +4,8 @@
<?cs if:sdk.redirect ?>
<head>
<title>Redirecting...</title>
- <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
- if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
+ <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
+ if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?>index.html<?cs /if ?>">
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
</head>
@@ -22,8 +22,8 @@
<div class="g-unit">
<div id="jd-content">
- <p>Redirecting to
- <a href="<?cs var:toroot ?>sdk/<?cs
+ <p>Redirecting to
+ <a href="<?cs var:toroot ?>sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?>index.html<?cs /if ?>"><?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
@@ -37,11 +37,11 @@
</div>
<div id="jd-content">
- <?cs
- if:ndk ?><?cs
- else ?><?cs
- if:android.whichdoc == "online" ?><p><em><?cs
- var:sdk.date ?></em></p><?cs
+ <?cs
+ if:ndk ?><?cs
+ else ?><?cs
+ if:android.whichdoc == "online" ?><p><em><?cs
+ var:sdk.date ?></em></p><?cs
/if ?><?cs
/if ?>
@@ -63,7 +63,7 @@
application developers build performance-critical portions of their apps in
native code. It is designed for use <em>only</em> in conjunction with the
Android SDK, so if you have not already installed the latest Android SDK, please
-do so before downloading the NDK. Also, please read <a href="#overview">What is
+do so before downloading the NDK. Also, please read <a href="#overview">What is
the Android NDK?</a> to get an understanding of what the NDK offers and whether
it will be useful to you.</p>
@@ -114,16 +114,16 @@
improvements and new features for users and developers. Additionally, the SDK
itself introduces several new capabilities that enable you to develop
applications more efficiently. See the <a href="features.html">Android <?cs
- var:sdk.preview.version ?> Platform Highlights</a> document for a list of
+ var:sdk.preview.version ?> Platform Highlights</a> document for a list of
highlights.</p>
-<?cs /if ?>
+<?cs /if ?>
<?cs # end if NDK ... the following is for the SDK ?>
-<?cs #
+<?cs #
<div class="toggle-content special">
- <p>The Android SDK has changed! If you've worked with the Android SDK before,
+ <p>The Android SDK has changed! If you've worked with the Android SDK before,
you will notice several important differences:</p>
-
+
<div class="toggle-content-toggleme" style="display:none">
<ul style="padding-bottom:.0;">
<li style="margin-top:.5em">The SDK downloadable package includes <em>only</em>
@@ -139,13 +139,13 @@
keep your development environment up-to-date. </li>
</ul>
<p style="margin-top:0">If you are currently using the Android 1.6 SDK, you
- do not need to install the new SDK, because your existing SDK already
- includes the Android SDK and AVD Manager tool. To develop against Android
- 2.0.1, for example, you can just download the Android 2.0.1 platform (and
- updated SDK Tools) into your existing SDK. Refer to <a
+ do not need to install the new SDK, because your existing SDK already
+ includes the Android SDK and AVD Manager tool. To develop against Android
+ 2.0.1, for example, you can just download the Android 2.0.1 platform (and
+ updated SDK Tools) into your existing SDK. Refer to <a
href="adding-components.html">Adding SDK Components</a>.</p>
</div>
-
+
<a href='#' class='toggle-content-button show' onclick="toggleContent(this,true);return false;">
<span>show more</span><span style='display:none'>show less</span>
</a>
@@ -156,9 +156,10 @@
href="#quickstart">Quick Start</a>, below, for an overview of how to install and
set up the SDK. </p>
- <p>If you are already using the Android SDK and would like to update to the
-latest tools or platforms, please use the <em>Android SDK and AVD Manager</em>
-to get the components, rather than downloading a new SDK package.</p>
+ <p>If you're already using the Android SDK, you should
+update to the latest tools or platform using the <em>Android SDK and AVD Manager</em>, rather than
+downloading a new SDK starter package. See <a
+href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
<table class="download">
<tr>
@@ -168,7 +169,7 @@
<th>MD5 Checksum</th>
</tr>
<tr>
- <td>Windows</td>
+ <td rowspan="2">Windows</td>
<td>
<a onclick="onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
?>"><?cs var:sdk.win_download ?></a>
@@ -176,6 +177,15 @@
<td><?cs var:sdk.win_bytes ?> bytes</td>
<td><?cs var:sdk.win_checksum ?></td>
</tr>
+ <tr>
+ <!-- blank TD from Windows rowspan -->
+ <td>
+ <a onclick="onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_installer
+?>"><?cs var:sdk.win_installer ?></a> (Recommended)
+ </td>
+ <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
+ <td><?cs var:sdk.win_installer_checksum ?></td>
+ </tr>
<tr class="alt-color">
<td>Mac OS X (intel)</td>
<td>
@@ -208,12 +218,12 @@
<div id="next-steps" style="display:none">
- <p><b>Your download of <em><span id="filename"></span></em> has begun!</b></p>
+ <p><b><em><span id="filename"></span></em> is now downloading. Follow the steps below to
+get started.</b></p>
</div>
<script type="text/javascript">
function onDownload(link) {
- $(link).parent().parent().children().css('background', '#fff');
$("#filename").text($(link).html());
$("#next-steps").show();
}
@@ -221,7 +231,7 @@
<?cs /if ?>
<?cs /if ?>
-<?cs /if ?>
+<?cs /if ?>
<?cs if:android.whichdoc != "online" && sdk.preview ?>
<p>Welcome developers! The next release of the Android platform will be
@@ -233,7 +243,7 @@
improvements and new features for users and developers. Additionally, the SDK
itself introduces several new capabilities that enable you to develop
applications more efficiently. See the <a
-href="http://developer.android.com/sdk/preview/features.html">Android
+href="http://developer.android.com/sdk/preview/features.html">Android
<?cs var:sdk.preview.version ?> Highlights</a> document for a list of
highlights.</p>
<?cs /if ?>
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates/assets/android-developer-docs.css
index b848db0..a574237 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates/assets/android-developer-docs.css
@@ -34,10 +34,6 @@
font-size:12px;
}
-#side-nav.not-resizable {
- background:url('images/sidenav-rule.png') no-repeat 243px 0;
-}
-
#resize-packages-nav {
/* keeps the resize handle below the h-scroll handle */
height:270px;
@@ -1181,6 +1177,76 @@
float: right;
}
+/* 200px */
+.g-tpl-200 .g-unit,
+.g-unit .g-tpl-200 .g-unit,
+.g-unit .g-unit .g-tpl-200 .g-unit {
+ display: block;
+ margin: 0 0 0 200px;
+ width: auto;
+ float: none;
+}
+.g-unit .g-unit .g-tpl-200 .g-first,
+.g-unit .g-tpl-200 .g-first,
+.g-tpl-200 .g-first {
+ display: block;
+ margin: 0;
+ width: 200px;
+ float: left;
+}
+/* 200px alt */
+.g-tpl-200-alt .g-unit,
+.g-unit .g-tpl-200-alt .g-unit,
+.g-unit .g-unit .g-tpl-200-alt .g-unit {
+ display: block;
+ margin: 0 200px 0 0;
+ width: auto;
+ float: none;
+}
+.g-unit .g-unit .g-tpl-200-alt .g-first,
+.g-unit .g-tpl-200-alt .g-first,
+.g-tpl-200-alt .g-first {
+ display: block;
+ margin: 0;
+ width: 200px;
+ float: right;
+}
+
+/* 190px */
+.g-tpl-190 .g-unit,
+.g-unit .g-tpl-190 .g-unit,
+.g-unit .g-unit .g-tpl-190 .g-unit {
+ display: block;
+ margin: 0 0 0 190px;
+ width: auto;
+ float: none;
+}
+.g-unit .g-unit .g-tpl-190 .g-first,
+.g-unit .g-tpl-190 .g-first,
+.g-tpl-190 .g-first {
+ display: block;
+ margin: 0;
+ width: 190px;
+ float: left;
+}
+/* 190px alt */
+.g-tpl-190-alt .g-unit,
+.g-unit .g-tpl-190-alt .g-unit,
+.g-unit .g-unit .g-tpl-190-alt .g-unit {
+ display: block;
+ margin: 0 190px 0 0;
+ width: auto;
+ float: none;
+}
+.g-unit .g-unit .g-tpl-190-alt .g-first,
+.g-unit .g-tpl-190-alt .g-first,
+.g-tpl-190-alt .g-first {
+ display: block;
+ margin: 0;
+ width: 190px;
+ float: right;
+}
+
/* 180px */
.g-tpl-180 .g-unit,
.g-unit .g-tpl-180 .g-unit,
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js
index 4c59dd6..5262bd8 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.js
+++ b/tools/droiddoc/templates/assets/android-developer-docs.js
@@ -141,18 +141,20 @@
cookiePath = "reference_";
} else if (location.href.indexOf("/guide/") != -1) {
cookiePath = "guide_";
+ } else if (location.href.indexOf("/sdk/") != -1) {
+ cookiePath = "sdk_";
} else if (location.href.indexOf("/resources/") != -1) {
cookiePath = "resources_";
}
if (!isMobile) {
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizePackagesHeight(); } });
- $(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
+ $("#side-nav").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
var cookieWidth = readCookie(cookiePath+'width');
var cookieHeight = readCookie(cookiePath+'height');
if (cookieWidth) {
restoreWidth(cookieWidth);
- } else if ($(".side-nav-resizable").length) {
+ } else if ($("#side-nav").length) {
resizeWidth();
}
if (cookieHeight) {
@@ -171,12 +173,12 @@
var lastSlashPos = fullPageName.lastIndexOf("/");
var firstSlashPos;
if (fullPageName.indexOf("/guide/") != -1) {
- firstSlashPos = fullPageName.indexOf("/guide/");
- } else if (fullPageName.indexOf("/sdk/") != -1) {
- firstSlashPos = fullPageName.indexOf("/sdk/");
- } else {
- firstSlashPos = fullPageName.indexOf("/resources/");
- }
+ firstSlashPos = fullPageName.indexOf("/guide/");
+ } else if (fullPageName.indexOf("/sdk/") != -1) {
+ firstSlashPos = fullPageName.indexOf("/sdk/");
+ } else if (fullPageName.indexOf("/resources/") != -1) {
+ firstSlashPos = fullPageName.indexOf("/resources/");
+ }
if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html')
fullPageName = fullPageName + "index.html";
}
@@ -184,7 +186,7 @@
var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5);
var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/resources/") != -1))) {
-// if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide)
+// if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide and resources)
lastBackstep = pathPageName.lastIndexOf("/");
while (link.length == 0) {
backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep);
@@ -249,10 +251,8 @@
$("#classes-nav").css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
$("#nav-tree").css({height:swapperHeight + "px"});
- // If in the dev guide docs, also resize the "devdoc-nav" div
- } else if (href.indexOf("/guide/") != -1) {
- $("#devdoc-nav").css({height:sidenav.css("height")});
- } else if (href.indexOf("/resources/") != -1) {
+ // Also resize the "devdoc-nav" div
+ } else if ($("#devdoc-nav").length) {
$("#devdoc-nav").css({height:sidenav.css("height")});
}
@@ -268,6 +268,7 @@
* which creates the resizable side bar */
function resizeWidth() {
var windowWidth = $(window).width() + "px";
+ var sidenav = $("#side-nav");
if (sidenav.length) {
var sidenavWidth = sidenav.css("width");
} else {
@@ -283,7 +284,7 @@
classesNav.css({width:sidenavWidth});
$("#packages-nav").css({width:sidenavWidth});
- if ($(".side-nav-resizable").length) { // Must check if the nav is resizable because IE6 calls resizeWidth() from resizeAll() for all pages
+ if (sidenav.length) { // Must check if the nav exists because IE6 calls resizeWidth() from resizeAll() for all pages
var basePath = getBaseUri(location.pathname);
var section = basePath.substring(1,basePath.indexOf("/",1));
writeCookie("width", sidenavWidth, section, null);