diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css index 3bfb6874d..d11a862ed 100644 --- a/tools/droiddoc/templates-sdk/assets/css/default.css +++ b/tools/droiddoc/templates-sdk/assets/css/default.css @@ -338,7 +338,8 @@ video.with-shadow { width: 34px; height: 34px; } #nav li.expanded li ul.tree-list-children { - padding:0; + display:block; /*dd temporary for debug */ + padding: 0 0 0 10px; } #nav li.expanded li ul.tree-list-children .tree-list-children { padding:0 0 0 10px; @@ -957,7 +958,7 @@ scroll top left; background-image: url(../images/styles/ico_wrong.png); } .do-dont-label.good { background-image: url(../images/styles/ico_good.png); } - + @@ -2358,6 +2359,9 @@ div.toggle-content.closed .toggle-content-toggleme { #jd-content img.toggle-content-img { margin:0 5px 5px 0; } +div.toggle-content p { + margin:10px 0 0; +} div.toggle-content-toggleme { padding:0 0 0 15px; } @@ -2443,6 +2447,144 @@ Lightbox background-position: -10px 0; } + +/* Styles for toggleable divs */ +.toggleable { + padding: .25em 1em 0em 1em; + margin-bottom: 0; +} +.toggleme { + padding: 1em 1em 0 2em; + line-height:1em; +} +.toggleable a { + text-decoration:none; +} +.toggleme a { + text-decoration:underline; +} + +.toggleable.closed .toggleme { + display:none; +} +#jd-content .toggle-img { + margin:0; +} + +/* -------------------------------------------------------------------------- +Styles for samples project trees and code browsing in resources tab +*/ + +.structure-dir { +background-image:url(../../assets/images/folder.png); +background-repeat:no-repeat; +background-position:16px 2px; + margin:.25em 0 0 0; + padding:0 0 0 0; +} + +.structure-toggleme { + margin:0 0 0 3em; + padding:0 0 0 0; + text-decoration:none; +} + +.structure-java{ +background-image:url(../../assets/images/file-java.png); +background-repeat:no-repeat; +background-position:0px 2px; + margin:.3em 0 0 0; + padding:.3em 0 .3em 22px; +} + +.structure-file { +background-image:url(../../assets/images/file-generic.png); +background-repeat:no-repeat; +background-position:0px 2px; + margin:.3em 0 0 0; + padding:.3em 0 .3em 22px; +} + +.structure-xml { +background-image:url(../../assets/images/file-xml.png); +background-repeat:no-repeat; +background-position:0px 2px; + margin:.3em 0 0 0; + padding:.3em 0 .25em 22px; +} + +.structure-img { +background-image:url(../../assets/images/file-image.png); +background-repeat:no-repeat; +background-position:0px 2px; + margin:.3em 0 0 0; + padding:.3em 0 .25em 22px; +} + +.structure-manifest { +background-image:url(../../assets/images/file-manifest.png); +background-repeat:no-repeat; + margin:.0 0 0 1.25em; + padding:0 0 0 22px; + text-decoration:none; +} + +#jd-content .structure-toggle-img { + margin:.5em 0 0 0; +padding-right:2.1em; +} + +.dirInfo { + margin-left:2em; +} + +.structure-dir a { + text-decoration:none; +} + +.structure-manifest a { + text-decoration: none; +} +.structure-file a { + text-decoration: none; +} + +.sampleEmbed { + background-color:rgb(249, 249, 249); +} + +.sampleEmbed ol.lineNumbers { + list-style-type: decimal; + padding-left:1em; +} + +.sampleEmbed ol.lineNumbers li { +border-left:1px solid #ddd; +border-right:1px solid #ddd; +color:gray; +background-color:#f7f7f7; +margin:0 0 0 24px; +padding: 2px 2px 2px 6px; +} + +.sampleEmbed ol.lineNumbers li:hover { +background: #efefef; +} + +/* -------------------------------------------------------------------------- +Styles for raw formatted line numbers (not used with listformatted version) +div.sampleLine div.lineNumber { + display: inline; +} +div.sampleLine div.lineCode { + display: inline; + padding-left:6px; +} +div.sampleLine { + padding:0; + margin:0; +}*/ + /* -------------------------------------------------------------------------- Butterbar */ @@ -2489,7 +2631,7 @@ table.blank th, table.blank td { .caption { margin: 0.5em 0 2em 0; color: #000; - font-size: 11.5px; + font-size: 11.5px; } .nolist { diff --git a/tools/droiddoc/templates-sdk/assets/images/file-generic.png b/tools/droiddoc/templates-sdk/assets/images/file-generic.png new file mode 100644 index 000000000..18024577b Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/file-generic.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/file-image.png b/tools/droiddoc/templates-sdk/assets/images/file-image.png new file mode 100644 index 000000000..d3aec4634 Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/file-image.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/file-java.png b/tools/droiddoc/templates-sdk/assets/images/file-java.png new file mode 100644 index 000000000..ec85e4bf6 Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/file-java.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/file-manifest.png b/tools/droiddoc/templates-sdk/assets/images/file-manifest.png new file mode 100644 index 000000000..332d06690 Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/file-manifest.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/file-xml.png b/tools/droiddoc/templates-sdk/assets/images/file-xml.png new file mode 100644 index 000000000..3dd21b67b Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/file-xml.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/folder.png b/tools/droiddoc/templates-sdk/assets/images/folder.png new file mode 100644 index 000000000..44c610047 Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/folder.png differ diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index c21929ea1..86b7aa1d2 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -188,6 +188,8 @@ $(document).ready(function() { $("#nav-x li.tools a").addClass("selected"); } else if ($("body").hasClass("google")) { $("#nav-x li.google a").addClass("selected"); + } else if ($("body").hasClass("samples")) { + $("#nav-x li.samples a").addClass("selected"); } // highlight Distribute tab @@ -640,13 +642,6 @@ function updateSideNavPosition() { $('#devdoc-nav .totop').css({left: -(newLeft - parseInt($('#side-nav').css('margin-left')))}); } - - - - - - - // TODO: use $(document).ready instead function addLoadEvent(newfun) { var current = window.onload; @@ -2577,6 +2572,13 @@ function init_navtree(navtree_id, toroot, root_nodes) } } + + + + + + + /* TODO: eliminate redundancy with non-google functions */ function init_google_navtree(navtree_id, toroot, root_nodes) { @@ -2691,6 +2693,22 @@ function init_default_gcm_navtree(toroot) { }); } +function showSamplesRefTree() { + init_default_samples_navtree(toRoot); +} + +function init_default_samples_navtree(toroot) { + // load json file for navtree data + $.getScript(toRoot + 'samples_navtree_data.js', function(data, textStatus, jqxhr) { + // when the file is loaded, initialize the tree + if(jqxhr.status === 200) { + init_google_navtree("samples-tree-list", toroot, SAMPLES_NAVTREE_DATA); + highlightSidenav(); + resizeNav(); + } + }); +} + /* TOGGLE INHERITED MEMBERS */ /* Toggle an inherited class (arrow toggle) diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs index 4f3273c69..78e53b271 100644 --- a/tools/droiddoc/templates-sdk/components/masthead.cs +++ b/tools/droiddoc/templates-sdk/components/masthead.cs @@ -188,6 +188,10 @@ onkeyup="return search_changed(event, false, '')" />
  • Google Services
  • + +
  • Samples +
  • +
  • @@ -214,7 +218,7 @@ onkeyup="return search_changed(event, false, '')" /> - +
  • Google Services
  • + +
  • Samples +
  • + diff --git a/tools/droiddoc/templates-sdk/customizations.cs b/tools/droiddoc/templates-sdk/customizations.cs index 33edbdef7..985f059a2 100644 --- a/tools/droiddoc/templates-sdk/customizations.cs +++ b/tools/droiddoc/templates-sdk/customizations.cs @@ -134,6 +134,30 @@ def:distribute_nav() ?> + +
    +
    +
    +to top + + + + +
    + +
    + + +
    @@ -177,28 +201,7 @@ def:about_nav() ?> }); - -
    -
    -
    -to top - - - - -
    -
    - -: - - @@ -322,6 +325,8 @@ def:custom_left_nav() ?> devsite> + + devsite> + + + + +
    class="fullpage"class="col-13" id="doc-col"class="col-12" id="doc-col" > + + + + + + + + + +
    + +
    + +
    +
    + +

    item2

    +

    + +

    + +
    + +
    + +
    +

    class="with-title-tabs">""

      +
    • + +
    • + +
    • +
    + +
    + + + + + +
    + + + + + + + + +

    The file containing the source code shown below is located in the corresponding directory in <sdk>/samples/android-<version>/...

    + + +
    + +
      + +
    +
    +
    + + + + + + + + + + +

    You can find the source code for this sample in your SDK at:

    +

    +<sdk>/samples/android-<version>/ +

    + + + +
    + + +
    + + + + + + + + + + + + diff --git a/tools/droiddoc/templates-sdk/sampleindex.cs b/tools/droiddoc/templates-sdk/sampleindex.cs index a1733634c..2447da895 100644 --- a/tools/droiddoc/templates-sdk/sampleindex.cs +++ b/tools/droiddoc/templates-sdk/sampleindex.cs @@ -1,53 +1,219 @@ - devsite> + - + +
    class="fullpage"class="col-13" id="doc-col"class="col-12" id="doc-col" > + + + + + + + + + +
    + +
    + +
    +
    + +

    item2

    +

    + +

    + +
    + +
    + +
    +

    class="with-title-tabs">

      +
    • + +
    • + +
    • +
    + +
    + + + + + +
    + + + + + + + + - -
    -
    - - Sample Code > - -

    -
    + -
    -

    ← Back

    + + +
    + +
    + + + Info ] + +
    + + + + +
    +
    + + + + + + + - -

    Subdirectories

    -
      - -
    • /
    • - -
    - +

    Project Structure

    - -

    Files

    -
      - -
    • - -
    - +

    Decide what to do with this ...

    -
    + + + + + +
    + +
    + + + Info ] + +
    + + + + +
    +
    + + + + + + + + + + +

    You can find the source code for this sample in your SDK at:

    +

    +<sdk>/samples/android-<version>/ +

    + + + +
    -
    + + diff --git a/tools/droiddoc/templates-sdk/samples_navtree_data.cs b/tools/droiddoc/templates-sdk/samples_navtree_data.cs new file mode 100644 index 000000000..24ac7b77c --- /dev/null +++ b/tools/droiddoc/templates-sdk/samples_navtree_data.cs @@ -0,0 +1,3 @@ +var SAMPLES_NAVTREE_DATA = + +;