diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 1cc4e3c1b9..09eeb67620 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -41,7 +41,7 @@ ifeq "" "$(PLATFORM_VERSION)" # which is the version that we reveal to the end user. # Update this value when the platform version changes (rather # than overriding it somewhere else). Can be an arbitrary string. - PLATFORM_VERSION := 4.2.42.42.42 + PLATFORM_VERSION := 4.2.1.2.4.8.16.32.64 endif ifeq "" "$(PLATFORM_SDK_VERSION)" diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css index f56fc9851d..4c4cdee5ae 100644 --- a/tools/droiddoc/templates-sdk/assets/css/default.css +++ b/tools/droiddoc/templates-sdk/assets/css/default.css @@ -129,11 +129,14 @@ strong { em { font-style: italic; } -acronym { +acronym, +.tooltip-link { border-bottom: 1px dotted #555555; cursor: help; } -acronym:hover { +acronym:hover, +.tooltip-link:hover { + color: #7aa1b0; border-bottom-color: #7aa1b0; } img.with-shadow, @@ -445,21 +448,23 @@ video.with-shadow { border:1px solid #DADADA; border-bottom:0; } - + .training-nav-top a.next-page-link { border-left:0; width:123px; } + .paging-links a.disabled, .training-nav-top a.disabled, .content-footer a.disabled { - color:#999; + color:#bbb; } + .paging-links a.disabled:hover, .training-nav-top a.disabled:hover, .content-footer a.disabled:hover { cursor:default; - color:#999 !important; + color:#bbb !important; } .training-nav-top a.start-class-link, @@ -467,6 +472,78 @@ video.with-shadow { width:262px; } + /* list of classes on course landing page */ + ol.class-list { + list-style:none; + margin-left:0; + } + ol.class-list>li { + margin:0 0 15px; + padding:5px 0 0; + overflow:hidden; + border-top:1px solid #ccc; + } + ol.class-list li a.title { + font-size:16px; + margin:0; + clear:left; + display:block; + height:32px; + padding:0 4px; + } + ol.class-list li a.title h2 { + color:inherit; + margin:0 0 10px; + display:block; + float:left; + width:675px; + } + ol.class-list li a.title span { + display:none; + float:left; + font-size:18px; + font-weight:bold; + background: transparent url(../images/styles/disclosure_right.png) no-repeat scroll 50% 50%; + width: 10px; + height: 32px; + } + ol.class-list li a.title:hover { + background:#ddd; + color:#258AAF !important; + } + ol.class-list li a.title:hover span { + display:block; + } + + #jd-content + ol.class-list li img { + float:left; + clear:left; + width:64px; + margin:0 20px 0 0; + } + ol.class-list li p.description { + float:left; + display:block; + width:250px; + margin:0; + } + ol.class-list li p.description.article { + width: 550px; + } + ol.class-list ol { + float:left; + width:320px; + margin:0 0 0 30px; + list-style:none; + margin:0 0 0 20px; + } + ol.class-list div.lessons li { + margin:0 0 6px; + line-height:16px; + } + + .hide { display:none !important; } @@ -483,6 +560,49 @@ video.with-shadow { float:right; text-transform:uppercase; } + + + + /* inner-doc tabs w/ title */ + +div#title-tabs-wrapper { + border-bottom:1px solid #ccc; + margin:20px 0 30px; +} +h1.with-title-tabs { + display:inline-block; + margin:0 0 -1px 0; + padding:0 60px 0 0; + border-bottom:1px solid #F9F9F9; +} +ul#title-tabs { + list-style:none; + padding:0; + height:29px; + margin:0; + font-size:16px; + line-height:26px; + display:inline-block; + vertical-align:bottom; +} +ul#title-tabs li { + display:block; + float:left; + margin-right:40px; + border-bottom: 3px solid transparent; +} +ul#title-tabs li.selected { + border-bottom: 3px solid #93C; +} +ul#title-tabs li a { + color:#333; +} +ul#title-tabs li a:hover, +ul#title-tabs li a:active { + color:#93C !important; +} + + /* content body */ @-webkit-keyframes glowheader { @@ -938,9 +1058,12 @@ dd { dd p { margin:10px 0 0; } -ul p, -ol p { - margin:5px 0 0; +li p, +li pre, +li ul, +li ol { + margin-top:5px; + margin-bottom:5px; } pre strong, pre b, a strong, a b, a code { color: inherit; @@ -1418,18 +1541,14 @@ Buttons color: #444; } a.button, a.button:visited, a.button-secondary, a.button-secondary:visited { - height: 28px; - line-height: 28px; margin-right: 16px; - font-weight: 400; + font-weight: 400; min-width: 54px; outline: 0; padding: 8px 15px; text-align: center; } .button, .button-secondary { - height: 34px; - line-height: 34px; margin-right: 16px; font-weight: 400; min-width: 54px; @@ -1455,6 +1574,9 @@ EndColorStr='#4cadcb',GradientType=0); background-image: none; border-color: #30b7e6; } +a.button.big.subtitle { + line-height:18px; +} .button-secondary:hover, a.button-secondary:hover { border-color: #dbdbdb; background-color: #f3f3f3; @@ -1469,7 +1591,7 @@ EndColorStr='#ececec'); color: #33B5E5 !important; } .button-secondary:active, a.button-secondary:active { - border-color: #dadada; + border-color: #dadada; background: #ebebeb; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: @@ -1510,12 +1632,20 @@ endColorstr='#ffffff',GradientType=0 ); /* IE6-8 */ font-size:20px; display:inline-block; } +.button.big span.small { + font-size:14px; +} +.button-caption { + margin-top:10px; + font-size:12px; + font-style:italic; +} .button.disabled, .button.disabled:hover, .button.disabled:active { background:#ebebeb; - color:#999; + color:#999 !important; border-color:#999; cursor:default; } @@ -1832,15 +1962,54 @@ form .form-error input[type='text'], form .form-error textarea { border-color: #eff2f9; } */ + +/* SDK TOS styles */ + +div.sdk-terms { + white-space: pre-wrap; + word-wrap: break-word; + font-family: inherit; + font-size: inherit; + padding: 10px; + height: 370px; + width: 738px; + border: 1px solid #444; + background: transparent; + overflow:auto; + margin:0 0 10px; +} + +div.sdk-terms.fullsize { + padding: 0; + height: auto; + width: auto; + border:none; +} + +div.sdk-terms h3, +div.sdk-terms h2 { + margin:0; +} + +div#sdk-terms-form { + padding:0 0 0 10px; +} + +div#sdk-terms-form input { + display:inline; + margin:4px 4px 4px 0; +} + + /* -------------------------------------------------------------------------- Code Style */ pre { - margin:0 0 1em 0; - padding: 1em; - overflow: auto; - border: solid 1px #ddd; - background: #f7f7f7; + margin:0 0 1em 0; + padding: 1em; + overflow: auto; + border: solid 1px #ddd; + background: #f7f7f7; } .str { color: #080; } .kwd { color: #008; } @@ -2332,6 +2501,29 @@ div.design-announce p { line-height:30px; } +.expandable { + height:34px; + padding-left:20px; + position:relative; +} +.expandable:before { + content: ''; + background-image: url(../images/styles/disclosure_down.png); + background-repeat:no-repeat; + background-position: -12px -9px; + width: 20px; + height: 20px; + display: inline-block; + position: absolute; + top: 0; + left: 0; } +} +.expandable.expanded:before { + background-image: url(../images/styles/disclosure_up.png); +} + + + /* ----------------------------------------------- Dialog box for popup messages */ diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index d18c4906e8..f1fbfff21a 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -28,7 +28,7 @@ $(document).ready(function() { $('.scroll-pane').jScrollPane( {verticalGutter:0} ); // add HRs below all H2s (except for a few other h2 variants) - $('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').css({marginBottom:0}).after('
'); + $('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').not('h2.norule').css({marginBottom:0}).after('
'); // set search's onkeyup handler here so we can show suggestions // even while search results are visible @@ -135,6 +135,7 @@ $(document).ready(function() { // select current page in sidenav and set up prev/next links if they exist var $selNavLink = $('#nav').find('a[href="' + pagePath + '"]'); + var $selListItem; if ($selNavLink.length) { $selListItem = $selNavLink.closest('li'); @@ -156,11 +157,9 @@ $(document).ready(function() { false; // navigate across topic boundaries only in design docs if ($prevListItem.length) { if ($prevListItem.hasClass('nav-section')) { - if (crossBoundaries) { - // jump to last topic of previous section - $prevLink = $prevListItem.find('a:last'); - } - } else { + // jump to last topic of previous section + $prevLink = $prevListItem.find('a:last'); + } else if (!$selListItem.hasClass('nav-section')) { // jump to previous topic in this section $prevLink = $prevListItem.find('a:eq(0)'); } @@ -177,18 +176,8 @@ false; // navigate across topic boundaries only in design docs } } - if ($prevLink.length) { - var prevHref = $prevLink.attr('href'); - if (prevHref == SITE_ROOT + 'index.html') { - // Don't show Previous when it leads to the homepage - } else { - $('.prev-page-link').attr('href', $prevLink.attr('href')).removeClass("hide"); - } - } - // set up next links var $nextLink = []; - var startCourse = false; var startClass = false; var training = $(".next-class-link").length; // decides whether to provide "next class" link var isCrossingBoundary = false; @@ -206,53 +195,103 @@ false; // navigate across topic boundaries only in design docs $('.topic-start-link').text($nextLink.text().toUpperCase()); } - // Handle some Training specialties - if ($selListItem.parent().is("#nav") && $(".start-course-link").length) { - // this means we're at the very top of the TOC hierarchy - startCourse = true; - } else if ($(".start-class-link").length) { - // this means this page has children but is not at the top (it's a class, not a course) + // If the selected page has a description, then it's a class or article homepage + if ($selListItem.find('a[description]').length) { + // this means we're on a class landing page startClass = true; } } else { // jump to the next topic in this section (if it exists) $nextLink = $selListItem.next('li').find('a:eq(0)'); if (!$nextLink.length) { - if (crossBoundaries || training) { - // no more topics in this section, jump to the first topic in the next section - $nextLink = $selListItem.parents('li:eq(0)').next('li.nav-section').find('a:eq(0)'); - isCrossingBoundary = true; + isCrossingBoundary = true; + // no more topics in this section, jump to the first topic in the next section + $nextLink = $selListItem.parents('li:eq(0)').next('li.nav-section').find('a:eq(0)'); + if (!$nextLink.length) { // Go up another layer to look for next page (lesson > class > course) + $nextLink = $selListItem.parents('li:eq(1)').next('li.nav-section').find('a:eq(0)'); } } } - if ($nextLink.length) { - if (startCourse || startClass) { - if (startCourse) { - $('.start-course-link').attr('href', $nextLink.attr('href')).removeClass("hide"); - } else { - $('.start-class-link').attr('href', $nextLink.attr('href')).removeClass("hide"); - } - // if there's no training bar (below the start button), - // then we need to add a bottom border to button - if (!$("#tb").length) { - $('.start-course-link').css({'border-bottom':'1px solid #DADADA'}); - $('.start-class-link').css({'border-bottom':'1px solid #DADADA'}); - } - } else if (training && isCrossingBoundary) { - $('.content-footer.next-class').show(); - $('.next-page-link').attr('href','') - .removeClass("hide").addClass("disabled") - .click(function() { return false; }); - - $('.next-class-link').attr('href',$nextLink.attr('href')) - .removeClass("hide").append($nextLink.html()); - $('.next-class-link').find('.new').empty(); - } else { - $('.next-page-link').attr('href', $nextLink.attr('href')).removeClass("hide"); + + if (startClass) { + $('.start-class-link').attr('href', $nextLink.attr('href')).removeClass("hide"); + + // if there's no training bar (below the start button), + // then we need to add a bottom border to button + if (!$("#tb").length) { + $('.start-class-link').css({'border-bottom':'1px solid #DADADA'}); } + } else if (isCrossingBoundary && !$('body.design').length) { // Design always crosses boundaries + $('.content-footer.next-class').show(); + $('.next-page-link').attr('href','') + .removeClass("hide").addClass("disabled") + .click(function() { return false; }); + + $('.next-class-link').attr('href',$nextLink.attr('href')) + .removeClass("hide").append($nextLink.html()); + $('.next-class-link').find('.new').empty(); + } else { + $('.next-page-link').attr('href', $nextLink.attr('href')).removeClass("hide"); + } + + if (!startClass && $prevLink.length) { + var prevHref = $prevLink.attr('href'); + if (prevHref == SITE_ROOT + 'index.html') { + // Don't show Previous when it leads to the homepage + } else { + $('.prev-page-link').attr('href', $prevLink.attr('href')).removeClass("hide"); + } + } + + // If this is a training 'article', there should be no prev/next nav + // ... if the grandparent is the "nav" ... and it has no child list items... + if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') && + !$selListItem.find('li').length) { + $('.next-page-link,.prev-page-link').attr('href','').addClass("disabled") + .click(function() { return false; }); } } + + + + // Set up the course landing pages for Training with class names and descriptions + if ($('body.trainingcourse').length) { + var $classLinks = $selListItem.find('ul li a').not('#nav .nav-section .nav-section ul a'); + var $classDescriptions = $classLinks.attr('description'); + + var $olClasses = $('
    '); + var $liClass; + var $imgIcon; + var $h2Title; + var $pSummary; + var $olLessons; + var $liLesson; + $classLinks.each(function(index) { + $liClass = $('
  1. '); + $h2Title = $('

    ' + $(this).html()+'

    '); + $pSummary = $('

    ' + $(this).attr('description') + '

    '); + + $olLessons = $('
      '); + + $lessons = $(this).closest('li').find('ul li a'); + + if ($lessons.length) { + $imgIcon = $(''); + $lessons.each(function(index) { + $olLessons.append('
    1. ' + $(this).html()+'
    2. '); + }); + } else { + $imgIcon = $(''); + $pSummary.addClass('article'); + } + + $liClass.append($h2Title).append($imgIcon).append($pSummary).append($olLessons); + $olClasses.append($liClass); + }); + $('.jd-descr').append($olClasses); + } + @@ -384,11 +423,11 @@ false; // navigate across topic boundaries only in design docs // Set up tooltips var TOOLTIP_MARGIN = 10; - $('acronym').each(function() { + $('acronym,.tooltip-link').each(function() { var $target = $(this); var $tooltip = $('
      ') .addClass('tooltip-box') - .text($target.attr('title')) + .append($target.attr('title')) .hide() .appendTo('body'); $target.removeAttr('title'); @@ -1052,6 +1091,22 @@ function toggleContent(obj) { } +/* New version of expandable content */ +function toggleExpandable(link,id) { + if($(id).is(':visible')) { + $(id).slideUp(); + $(link).removeClass('expanded'); + } else { + $(id).slideDown(); + $(link).addClass('expanded'); + } +} + +function hideExpandable(ids) { + $(ids).slideUp(); + $(ids).prev('h4').find('a.expandable').removeClass('expanded'); +} + @@ -1883,11 +1938,18 @@ function changeApiLevel() { if (selectedLevel < minLevel) { var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class"; - $("#naMessage").show().html("

      This " + thing + " is not available with API level " + selectedLevel + ".

      " - + "

      To use this " + thing + ", you must develop your app using a build target " - + "that supports API level " + $("#doc-api-level").attr("class") + " or higher. To read these " - + "APIs, change the value of the API level filter above.

      " - + "

      What is the API level?

      "); + $("#naMessage").show().html("

      This " + thing + + " requires API level " + minLevel + " or higher.

      " + + "

      This document is hidden because your selected API level for the documentation is " + + selectedLevel + ". You can change the documentation API level with the selector " + + "above the left navigation.

      " + + "

      For more information about specifying the API level your app requires, " + + "read Supporting Different Platform Versions.

      " + + "" + + "
      "); } else { $("#naMessage").hide(); } diff --git a/tools/droiddoc/templates-sdk/docpage.cs b/tools/droiddoc/templates-sdk/docpage.cs index 63abceba4d..3feb00f1ea 100644 --- a/tools/droiddoc/templates-sdk/docpage.cs +++ b/tools/droiddoc/templates-sdk/docpage.cs @@ -7,7 +7,8 @@ elif:about ?>aboutdesigndistribute" itemscope itemtype="http://schema.org/Article"> + /if ?> trainingcourse" itemscope itemtype="http://schema.org/Article"> @@ -16,7 +17,7 @@ ?>class="col-13" id="doc-col"class="col-12" id="doc-col" > - + - + -

      +
      +

      class="with-title-tabs">

      + +
      @@ -128,7 +131,7 @@
      + + + + + + - - + + + + + + +