summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/droiddoc/templates-sdk/assets/css/default.css20
-rw-r--r--tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.pngbin0 -> 4712 bytes
-rw-r--r--tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.pngbin0 -> 18596 bytes
-rw-r--r--tools/droiddoc/templates-sdk/assets/js/docs.js17
-rw-r--r--tools/droiddoc/templates-sdk/components/masthead.cs64
-rw-r--r--tools/droiddoc/templates-sdk/customizations.cs119
-rw-r--r--tools/droiddoc/templates-sdk/docpage.cs43
-rw-r--r--tools/droiddoc/templates-sdk/head_tag.cs5
8 files changed, 197 insertions, 71 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 71d15df..8513843 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -7438,6 +7438,10 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me
font-weight: 400;
}
+.dac-header-crumbs-link.current.ndk {
+ color: #00BCD4;
+}
+
@media (max-width: 719px) {
.dac-header-crumbs {
display: none;
@@ -7630,6 +7634,10 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me
padding-bottom: 11px;
}
+.dac-nav-link.has-subnav.ndk, .dac-nav-link.selected.ndk {
+ border-bottom: 3px solid #00BCD4;
+}
+
.dac-nav-secondary {
border-bottom: 1px solid #e5e5e5;
display: none;
@@ -7660,11 +7668,12 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me
}
}
-.dac-nav-secondary .dac-nav-item:first-child .dac-nav-link {
- padding-left: 20px;
+.dac-nav-secondary .dac-nav-link.selected {
+ border: none;
+ font-weight: 700;
}
-.dac-nav-secondary .dac-nav-link.selected {
+.dac-nav-secondary .dac-nav-link.selected.ndk {
border: none;
font-weight: 700;
}
@@ -7750,6 +7759,11 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me
padding: 0 20px;
}
+ .dac-nav-link.has-subnav.ndk, .dac-nav-link.selected.ndk {
+ border: none;
+ padding: 0 20px;
+ }
+
.dac-logo-image {
margin-right: 5px;
vertical-align: top;
diff --git a/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png
new file mode 100644
index 0000000..511c200
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png
new file mode 100644
index 0000000..1d88dfa
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index 2efe3dc..30a29fc 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -163,6 +163,21 @@ $(document).ready(function() {
} else {
navEl.find("> li.home > a").addClass('selected');
}
+
+// highlight NDK tabs
+ } else if ($("body").hasClass("ndk")) {
+ parentNavEl = navEl.find("> li.ndk > a");
+ parentNavEl.addClass('has-subnav');
+ if ($("body").hasClass("guide")) {
+ navEl.find("> li.guides > a").addClass("selected ndk");
+ } else if ($("body").hasClass("reference")) {
+ navEl.find("> li.reference > a").addClass("selected ndk");
+ } else if ($("body").hasClass("samples")) {
+ navEl.find("> li.samples > a").addClass("selected ndk");
+ } else if ($("body").hasClass("downloads")) {
+ navEl.find("> li.downloads > a").addClass("selected ndk");
+ }
+
// highlight Develop tab
} else if ($("body").hasClass("develop") || $("body").hasClass("google")) {
parentNavEl = navEl.find("> li.develop > a");
@@ -1056,7 +1071,7 @@ function checkSticky() {
var top = $(window).scrollTop();
// we set the navbar fixed when the scroll position is beyond the height of the site header...
- var shouldBeSticky = top >= stickyTop;
+ var shouldBeSticky = top > stickyTop;
// ... except if the document content is shorter than the sidenav height.
// (this is necessary to avoid crazy behavior on OSX Lion due to overscroll bouncing)
if ($("#doc-col").height() < $("#side-nav").height()) {
diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs
index 000d95f..d3fe1c3 100644
--- a/tools/droiddoc/templates-sdk/components/masthead.cs
+++ b/tools/droiddoc/templates-sdk/components/masthead.cs
@@ -58,26 +58,36 @@
<span class="dac-nav-hamburger-bot"></span>
</span>
</a>
- <a class="dac-header-logo" href="<?cs var:toroot ?>index.html">
+ <?cs if:ndk ?><a class="dac-header-logo" href="<?cs var:toroot ?>ndk/index.html">
+ <img class="dac-header-logo-image" src="<?cs var:toroot ?>assets/images/android_logo_ndk.png"
+ srcset="<?cs var:toroot ?>assets/images/android_logo_ndk@2x.png 2x"
+ width="32" height="36" alt="Android" /> NDK
+ </a><?cs else ?><a class="dac-header-logo" href="<?cs var:toroot ?>index.html">
<img class="dac-header-logo-image" src="<?cs var:toroot ?>assets/images/android_logo.png"
srcset="<?cs var:toroot ?>assets/images/android_logo@2x.png 2x"
width="32" height="36" alt="Android" /> Developers
- </a>
+ </a><?cs /if ?>
<ul class="dac-header-crumbs">
<?cs # More <li> elements added here with javascript ?>
- <?cs if:!section.landing ?><li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current"><?cs var:page.title ?></a></li><?cs
+ <?cs if:!section.landing ?><li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current <?cs
+ if:ndk ?>ndk<?cs /if ?>"><?cs var:page.title ?></a></li><?cs
/if ?>
</ul>
<?cs # ADD SEARCH AND MENU ?>
+ <?cs if:!ndk ?>
<?cs call:header_search_widget() ?>
+ <?cs /if ?>
- <a class="dac-header-consoleBtn" href="https://play.google.com/apps/publish/">
+ <?cs if:ndk ?><a class="dac-header-consoleBtn" href="http://developer.android.com">
+ <span class="dac-visible-desktop-inline">Back to Android Developers</span>
+ </a><?cs else ?><a class="dac-header-consoleBtn" href="https://play.google.com/apps/publish/">
<span class="dac-sprite dac-google-play"></span>
<span class="dac-visible-desktop-inline">Developer</span>
Console
- </a>
+ </a><?cs /if ?>
+
</div><!-- end header-wrap.wrap -->
</div><!-- end header -->
@@ -87,6 +97,49 @@
</div>
</div> <!--end header-wrapper -->
+ <?cs if:ndk ?>
+ <!-- NDK Navigation-->
+ <nav class="dac-nav">
+ <div class="dac-nav-dimmer" data-dac-toggle-nav></div>
+
+ <ul class="dac-nav-list" data-dac-nav>
+ <li class="dac-nav-item dac-nav-head">
+ <a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation">
+ <img class="dac-logo-image" src="<?cs var:toroot ?>assets/images/android_logo_ndk.png"
+ srcset="<?cs var:toroot ?>assets/images/android_logo_ndk@2x.png 2x"
+ width="32" height="36" alt="Android" /> NDK
+ </a>
+ </li>
+ <li class="dac-nav-item guides">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/guides/index.html"
+ zh-tw-lang="API 指南"
+ zh-cn-lang="API 指南"
+ ru-lang="Руководства по API"
+ ko-lang="API 가이드"
+ ja-lang="API ガイド"
+ es-lang="Guías de la API">Guides</a>
+ </li>
+ <li class="dac-nav-item reference">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/reference/index.html"
+ zh-tw-lang="參考資源"
+ zh-cn-lang="参考"
+ ru-lang="Справочник"
+ ko-lang="참조문서"
+ ja-lang="リファレンス"
+ es-lang="Referencia">Reference</a>
+ </li>
+ <li class="dac-nav-item samples">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/samples/index.html"
+ >Samples</a>
+ </li>
+ <li class="dac-nav-item downloads">
+ <a class="dac-nav-link" href="<?cs var:toroot ?>ndk/downloads/index.html"
+ >Downloads</a>
+ </li>
+ </ul>
+ </nav>
+ <!-- end NDK navigation-->
+ <?cs else ?>
<!-- Navigation-->
<nav class="dac-nav">
<div class="dac-nav-dimmer" data-dac-toggle-nav></div>
@@ -213,6 +266,7 @@
</ul>
</nav>
<!-- end navigation-->
+ <?cs /if ?>
<?cs /if ?><?cs # end if/else !devsite ?>
<?cs
diff --git a/tools/droiddoc/templates-sdk/customizations.cs b/tools/droiddoc/templates-sdk/customizations.cs
index 276dd0d..c955c87 100644
--- a/tools/droiddoc/templates-sdk/customizations.cs
+++ b/tools/droiddoc/templates-sdk/customizations.cs
@@ -455,6 +455,28 @@ def:default_left_nav() ?>
<?cs
/def ?>
+<?cs
+def:ndk_nav() ?>
+ <div class="wrap clearfix" id="body-content"><div class="cols">
+ <div class="col-3 dac-toggle dac-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
+ <?cs call:mobile_nav_toggle() ?>
+ <div class="dac-toggle-content" id="devdoc-nav">
+ <div class="scroll-pane">
+<?cs
+if:guide ?><?cs include:"../../../../frameworks/base/docs/html-ndk/ndk/guides/guides_toc.cs" ?><?cs
+elif:reference ?><?cs include:"../../../../frameworks/base/docs/html-ndk/ndk/reference/reference_toc.cs" ?><?cs
+elif:downloads ?><?cs include:"../../../../frameworks/base/docs/html-ndk/ndk/downloads/downloads_toc.cs" ?><?cs
+elif:samples ?><?cs include:"../../../../frameworks/base/docs/html-ndk/ndk/samples/samples_toc.cs" ?><?cs
+/if ?>
+ </div>
+ </div>
+ </div> <!-- end side-nav -->
+ <script>
+ $(document).ready(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+<?cs /def ?>
<?cs
def:header_search_widget() ?>
@@ -499,53 +521,64 @@ def:header_search_widget() ?>
<?cs /def ?>
-
<?cs
def:custom_left_nav() ?><?cs
- if:fullpage ?><?cs
- call:fullpage() ?><?cs
- elif:nonavpage ?><?cs
- call:no_nav() ?><?cs
- elif:guide ?><?cs
- call:guide_nav() ?><?cs
- elif:design ?><?cs
- call:design_nav() ?><?cs
- elif:training ?><?cs
- call:training_nav() ?><?cs
- elif:tools ?><?cs
- call:tools_nav() ?><?cs
- elif:google ?><?cs
- call:google_nav() ?><?cs
- elif:samples ?><?cs
- call:samples_nav() ?><?cs
- elif:preview ?><?cs
- call:preview_nav() ?><?cs
- elif:distribute ?><?cs
- if:googleplay ?><?cs
- call:googleplay_nav() ?><?cs
- elif:essentials ?><?cs
- call:essentials_nav() ?><?cs
- elif:users ?><?cs
- call:users_nav() ?><?cs
- elif:engage ?><?cs
- call:engage_nav() ?><?cs
- elif:monetize ?><?cs
- call:monetize_nav() ?><?cs
- elif:analyze ?><?cs
- call:analyze_nav() ?><?cs
- elif:disttools ?><?cs
- call:disttools_nav() ?><?cs
- elif:stories ?><?cs
- call:stories_nav() ?><?cs
+ if:ndk ?><?cs
+ if:fullpage ?><?cs
+ call:fullpage() ?><?cs
+ elif:nonavpage ?><?cs
+ call:no_nav() ?><?cs
+ elif:guide || reference || samples || downloads ?><?cs
+ call:ndk_nav() ?><?cs
+ else ?><?cs
+ call:default_left_nav() ?> <?cs
/if ?><?cs
- elif:about ?><?cs
- call:about_nav() ?><?cs
- elif:distribute ?><?cs
- call:distribute_nav() ?><?cs
- elif:wear ?><?cs
- call:wear_nav() ?><?cs
else ?><?cs
- call:default_left_nav() ?> <?cs
+ if:fullpage ?><?cs
+ call:fullpage() ?><?cs
+ elif:nonavpage ?><?cs
+ call:no_nav() ?><?cs
+ elif:guide ?><?cs
+ call:guide_nav() ?><?cs
+ elif:design ?><?cs
+ call:design_nav() ?><?cs
+ elif:training ?><?cs
+ call:training_nav() ?><?cs
+ elif:tools ?><?cs
+ call:tools_nav() ?><?cs
+ elif:google ?><?cs
+ call:google_nav() ?><?cs
+ elif:samples ?><?cs
+ call:samples_nav() ?><?cs
+ elif:preview ?><?cs
+ call:preview_nav() ?><?cs
+ elif:distribute ?><?cs
+ if:googleplay ?><?cs
+ call:googleplay_nav() ?><?cs
+ elif:essentials ?><?cs
+ call:essentials_nav() ?><?cs
+ elif:users ?><?cs
+ call:users_nav() ?><?cs
+ elif:engage ?><?cs
+ call:engage_nav() ?><?cs
+ elif:monetize ?><?cs
+ call:monetize_nav() ?><?cs
+ elif:analyze ?><?cs
+ call:analyze_nav() ?><?cs
+ elif:disttools ?><?cs
+ call:disttools_nav() ?><?cs
+ elif:stories ?><?cs
+ call:stories_nav() ?><?cs
+ /if ?><?cs
+ elif:about ?><?cs
+ call:about_nav() ?><?cs
+ elif:distribute ?><?cs
+ call:distribute_nav() ?><?cs
+ elif:wear ?><?cs
+ call:wear_nav() ?><?cs
+ else ?><?cs
+ call:default_left_nav() ?> <?cs
+ /if ?><?cs
/if ?><?cs
/def ?>
diff --git a/tools/droiddoc/templates-sdk/docpage.cs b/tools/droiddoc/templates-sdk/docpage.cs
index 3af7049..d69023f 100644
--- a/tools/droiddoc/templates-sdk/docpage.cs
+++ b/tools/droiddoc/templates-sdk/docpage.cs
@@ -6,25 +6,30 @@
<?cs # add document classes for navigation header selection (and other stuff) ?>
<?cs
-if:(google || reference.gms || reference.gcm) ?>google <?cs
-/if ?><?cs
-if:(guide||develop||training||reference||tools||sdk||google||samples||preview) ?>develop<?cs
- if:guide ?> guide<?cs /if ?><?cs
- if:samples ?> samples<?cs /if ?><?cs
- if:preview ?> preview<?cs /if ?><?cs
-elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories)
- ?>distribute<?cs
- if:googleplay ?> googleplay<?cs /if ?><?cs
- if:essentials ?> essentials<?cs /if ?><?cs
- if:users ?> users<?cs /if ?><?cs
- if:engage ?> engage<?cs /if ?><?cs
- if:monetize ?> monetize<?cs /if ?><?cs
- if:disttools ?> disttools<?cs /if ?><?cs
- if:stories ?> stories<?cs /if ?><?cs
-elif:(about||wear||tv||auto) ?>about<?cs
-elif:design ?>design<?cs
-/if ?><?cs
-if:page.trainingcourse ?> trainingcourse<?cs
+ if:(google || reference.gms || reference.gcm) ?>google <?cs /if ?><?cs
+ if:ndk ?>ndk<?cs
+ if:guide ?> guide<?cs /if ?><?cs
+ if:samples ?> samples<?cs /if ?><?cs
+ if:reference ?> reference<?cs /if ?><?cs
+ if:downloads ?> downloads<?cs /if ?><?cs
+ else ?><?cs
+ if:(guide||develop||training||reference||tools||sdk||google||samples||preview) ?>develop<?cs
+ if:guide ?> guide<?cs /if ?><?cs
+ if:samples ?> samples<?cs /if ?><?cs
+ if:preview ?> preview<?cs /if ?><?cs
+ elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>distribute<?cs
+ if:googleplay ?> googleplay<?cs /if ?><?cs
+ if:essentials ?> essentials<?cs /if ?><?cs
+ if:users ?> users<?cs /if ?><?cs
+ if:engage ?> engage<?cs /if ?><?cs
+ if:monetize ?> monetize<?cs /if ?><?cs
+ if:disttools ?> disttools<?cs /if ?><?cs
+ if:stories ?> stories<?cs /if ?><?cs
+ if:analyze ?> analyze<?cs /if ?><?cs
+ elif:(about||wear||tv||auto) ?>about<?cs
+ elif:design ?>design<?cs
+ /if ?><?cs
+ if:page.trainingcourse ?> trainingcourse<?cs /if ?><?cs
/if ?>" itemscope itemtype="http://schema.org/Article"><?cs
include:"header.cs" ?>
diff --git a/tools/droiddoc/templates-sdk/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs
index cfc8b17..3ffa09d 100644
--- a/tools/droiddoc/templates-sdk/head_tag.cs
+++ b/tools/droiddoc/templates-sdk/head_tag.cs
@@ -36,6 +36,11 @@ if:android.whichdoc != 'online' ?>http:<?cs
if:android.whichdoc != 'online' ?>http:<?cs
/if ?>//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
title="roboto">
+<?cs
+ if:ndk ?><link rel="stylesheet" href="<?cs
+ if:android.whichdoc != 'online' ?>http:<?cs
+ /if ?>//fonts.googleapis.com/css?family=Roboto+Mono:400,500,700" title="roboto-mono" type="text/css"><?cs
+/if ?>
<link href="<?cs var:toroot ?>assets/css/default.css?v=5" rel="stylesheet" type="text/css">
<?cs if:reference && !(reference.gms || reference.gcm || preview) ?>