blob: 32a0788efca1053a3364f96cbbaa78aa0279f061 [file] [log] [blame]
Dirk Dougherty4f7e5152010-09-16 10:43:40 -07001<?cs include:"doctype.cs" ?>
2<?cs include:"macros.cs" ?>
3<html<?cs if:devsite ?> devsite<?cs /if ?>>
4<?cs include:"head_tag.cs" ?>
Scott Maindc63dda2013-08-22 16:03:21 -07005<body class="gc-documentation develop samples" itemscope itemtype="http://schema.org/Article">
Dirk Dougherty4f7e5152010-09-16 10:43:40 -07006<?cs include:"header.cs" ?>
7
8<div <?cs if:fullpage
9?>class="fullpage"<?cs elif:design||tools||about||sdk||distribute
Scott Main79a55d32013-12-09 17:13:56 -080010?>class="col-13" id="doc-col"<?cs else
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070011?>class="col-12" id="doc-col"<?cs /if ?> >
12
Dirk Dougherty981effc2013-08-22 21:26:54 -070013<!-- start breadcrumb block -->
14<div id="api-info-block">
Dirk Dougherty6fb7e232013-08-30 19:06:57 -070015 <div class="sum-details-links">
Dirk Dougherty981effc2013-08-22 21:26:54 -070016
Dirk Dougherty6fb7e232013-08-30 19:06:57 -070017 <!-- related links -->
18 <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/index.html">Overview</a>
19 &#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a>
Scott Main79a55d32013-12-09 17:13:56 -080020 &#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip"
smain@google.com633f3222014-10-03 15:49:45 -070021 onclick="ga('send', 'event', 'Samples', 'Download', <?cs var:projectDir ?>);"
Scott Main79a55d32013-12-09 17:13:56 -080022 >Download</a>
Dirk Dougherty981effc2013-08-22 21:26:54 -070023
Dirk Dougherty4bddbb12013-10-29 14:33:15 -070024</div><!-- end sum-details-links -->
25
26</div><!-- end breadcurmb block -->
Dirk Dougherty6fb7e232013-08-30 19:06:57 -070027
28<div id="jd-header" style="border:0;">
Dirk Doughertyf2bd4eb2013-09-04 17:54:49 -070029
30<div id="pathCrumb">
31<?cs each:item = parentdirs ?>
Dirk Doughertyd239e4c2013-11-25 11:35:03 -080032 <?cs if:LinkifyPathCrumb
Dirk Doughertybb94d792013-11-25 11:35:03 -080033 ?><a href="<?cs var:toroot ?><?cs var:item.Link ?>"><?cs var:item.Name ?></a> /
Dirk Doughertyf2bd4eb2013-09-04 17:54:49 -070034 <?cs else
35 ?><?cs var:item.Name ?> / <?cs /if ?>
36<?cs /each ?>
37</div>
38
Dirk Dougherty6fb7e232013-08-30 19:06:57 -070039 <h1 itemprop="name"><?cs var:page.title ?></h1>
Dirk Dougherty981effc2013-08-22 21:26:54 -070040</div>
Dirk Dougherty6fb7e232013-08-30 19:06:57 -070041<!-- end breadcrumb block -->
Dirk Dougherty981effc2013-08-22 21:26:54 -070042
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070043
Scott Maindc63dda2013-08-22 16:03:21 -070044<?cs # THIS IS THE MAIN DOC CONTENT ?>
45<div id="jd-content">
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070046
47<?cs if:android.whichdoc == "online" ?>
48
49<?cs # If this is the online docs, build the src code navigation links ?>
50
51
52<?cs var:summary ?>
53
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070054<!-- begin file contents -->
Dirk Doughertybb2b5532013-11-16 16:07:51 -080055
56<?cs # embed image/videos if below maxsize (show message otherwise), else display source code ?>
57<?cs if:resType == "img" ?>
58 <div id="codesample-resource"
59 <?cs if:noDisplay ?>
60 class="noDisplay"><div class="noDisplay-message"></div>
61 <?cs else ?>
62 ><img src="<?cs var:realFile ?>" title="<?cs var:page.title ?>">
63 <?cs /if ?>
64 </div>
65<?cs elif:resType == "video" ?>
66 <div id="codesample-resource"
67 <?cs if:noDisplay ?>
68 class="noDisplay"><div class="noDisplay-message"></div>
69 <?cs else ?>
70 ><video class="play-on-hover" controls style="border:1px solid #ececec;background-color:#f9f9f9;" poster="">
71 <source src="<?cs var:page.title ?>">
72 </video>
73 <?cs /if ?>
74 </div>
75<?cs else ?>
76 <div id="codesample-wrapper">
77 <pre id="codesample-line-numbers" class="no-pretty-print hidden"></pre>
78 <pre id="codesample-block"><?cs var:fileContents ?></pre>
79 </div>
80 <script type="text/javascript">
81 initCodeLineNumbers();
82 </script>
83<?cs /if ?>
Dirk Dougherty981effc2013-08-22 21:26:54 -070084
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070085<!-- end file contents -->
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070086
87<?cs else ?><?cs
88 # else, this means it's offline docs,
89 so don't show src links (we dont have the pages!) ?>
90
Dirk Dougherty4f7e5152010-09-16 10:43:40 -070091<?cs /if ?><?cs # end if/else online docs ?>
92
Dirk Doughertybb2b5532013-11-16 16:07:51 -080093 <div class="content-footer <?cs
94 if:fullpage ?>wrap<?cs
95 else ?>layout-content-row<?cs /if ?>"
96 itemscope itemtype="http://schema.org/SiteNavigationElement">
97 <div class="layout-content-col <?cs
98 if:fullpage ?>col-16<?cs
99 elif:training||guide ?>col-8<?cs
100 else ?>col-9<?cs /if ?>" style="padding-top:4px">
101 <?cs if:!page.noplus ?><?cs if:fullpage ?><style>#___plusone_0 {float:right !important;}</style><?cs /if ?>
102 <div class="g-plusone" data-size="medium"></div>
103 <?cs /if ?>
104 </div>
105 <?cs if:!fullscreen ?>
106 <div class="paging-links layout-content-col col-4">
107 <?cs if:(design||training||walkthru) && !page.landing && !page.trainingcourse && !footer.hide ?>
108 <a href="#" class="prev-page-link hide"
109 zh-tw-lang="上一堂課"
110 zh-cn-lang="上一课"
111 ru-lang="Предыдущий"
112 ko-lang="이전"
113 ja-lang="前へ"
114 es-lang="Anterior"
115 >Previous</a>
116 <a href="#" class="next-page-link hide"
117 zh-tw-lang="下一堂課"
118 zh-cn-lang="下一课"
119 ru-lang="Следующий"
120 ko-lang="다음"
121 ja-lang="次へ"
122 es-lang="Siguiente"
123 >Next</a>
124 <?cs /if ?>
125 </div>
126 <?cs /if ?>
127 </div>
128
129 <?cs # for training classes, provide a different kind of link when the next page is a different class ?>
130 <?cs if:training && !page.article ?>
131 <div class="layout-content-row content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
132 <a href="#" class="next-class-link hide">Next class: </a>
133 </div>
134 <?cs /if ?>
135
Dirk Dougherty4f7e5152010-09-16 10:43:40 -0700136 </div> <!-- end jd-content -->
137
138<?cs include:"footer.cs" ?>
139</div><!-- end doc-content -->
140
141<?cs include:"trailer.cs" ?>
142
143</body>
144</html>
145
146
147
148
149
150
151