1 <?cs
2 def:fullpage() ?>
3   <div id="body-content">
4 <?cs /def ?>
5 <?cs
6 def:sdk_nav() ?>
7   <div class="wrap clearfix" id="body-content">
8     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
9       <div id="devdoc-nav" class="scroll-pane">
10 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
11 
12 <?cs
13         include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
14 
15 
16       </div>
17     </div> <!-- end side-nav -->
18 <?cs /def ?>
19 <?cs
20 def:resources_tab_nav() ?>
21   <div class="wrap clearfix" id="body-content">
22     <a
23     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
24       <div id="devdoc-nav" class="scroll-pane">
25 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
26 
27 <?cs
28         include:"../../../../frameworks/base/docs/html/resources/resources_toc.cs" ?>
29 
30 
31       </div>
32     </div> <!-- end side-nav -->
33     <script>
34       $(document).ready(function() {
35         scrollIntoView("devdoc-nav");
36         });
37     </script>
38 <?cs /def ?>
39 <?cs
40 def:tools_nav() ?>
41   <div class="wrap clearfix" id="body-content">
42     <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
43       <div id="devdoc-nav" class="scroll-pane">
44 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
45 <?cs
46         include:"../../../../frameworks/base/docs/html/tools/tools_toc.cs" ?>
47 
48 
49       </div>
50     </div> <!-- end side-nav -->
51     <script>
52       $(document).ready(function() {
53         scrollIntoView("devdoc-nav");
54         });
55     </script>
56 <?cs /def ?>
57 <?cs
58 def:training_nav() ?>
59   <div class="wrap clearfix" id="body-content">
60     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
61       <div id="devdoc-nav" class="scroll-pane">
62 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
63 
64 
65 <?cs
66         include:"../../../../frameworks/base/docs/html/training/training_toc.cs" ?>
67 
68 
69       </div>
70     </div> <!-- end side-nav -->
71     <script>
72       $(document).ready(function() {
73         scrollIntoView("devdoc-nav");
74         });
75     </script>
76 <?cs /def ?>
77 <?cs
78 def:guide_nav() ?>
79   <div class="wrap clearfix" id="body-content">
80     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
81       <div id="devdoc-nav" class="scroll-pane">
82 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
83 
84 
85 <?cs
86         include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
87 
88 
89       </div>
90     </div> <!-- end side-nav -->
91     <script>
92       $(document).ready(function() {
93         scrollIntoView("devdoc-nav");
94         });
95     </script>
96 <?cs /def ?>
97 <?cs
98 def:design_nav() ?>
99   <div class="wrap clearfix" id="body-content">
100     <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
101       <div id="devdoc-nav" class="scroll-pane">
102 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
103 
104 
105 <?cs
106         include:"../../../../frameworks/base/docs/html/design/design_toc.cs" ?>
107 
108 
109       </div>
110     </div> <!-- end side-nav -->
111     <script>
112       $(document).ready(function() {
113         scrollIntoView("devdoc-nav");
114         });
115     </script>
116 <?cs /def ?>
117 <?cs
118 def:distribute_nav() ?>
119   <div class="wrap clearfix" id="body-content">
120     <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
121       <div id="devdoc-nav" class="scroll-pane">
122 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
123 
124 <?cs
125         include:"../../../../frameworks/base/docs/html/distribute/distribute_toc.cs" ?>
126 
127 
128       </div>
129     </div> <!-- end side-nav -->
130     <script>
131       $(document).ready(function() {
132         scrollIntoView("devdoc-nav");
133         });
134     </script>
135 <?cs /def ?>
136 
137 <?cs
138 def:google_nav() ?>
139   <div class="wrap clearfix" id="body-content">
140     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
141       <div id="devdoc-nav" class="scroll-pane">
142 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
143 
144 <?cs
145         include:"../../../../frameworks/base/docs/html/google/google_toc.cs" ?>
146 
147 
148       </div>
149       <script type="text/javascript">
150        showGoogleRefTree();
151 
152       </script>
153     </div> <!-- end side-nav -->
154     <script>
155       $(document).ready(function() {
156         scrollIntoView("devdoc-nav");
157         });
158     </script>
159 <?cs /def ?>
160 
161 <?cs
162 def:about_nav() ?>
163   <div class="wrap clearfix" id="body-content">
164     <div class="col-3" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
165       <div id="devdoc-nav" class="scroll-pane">
166 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
167 
168 <?cs
169         include:"../../../../frameworks/base/docs/html/about/about_toc.cs" ?>
170 
171 
172       </div>
173     </div> <!-- end side-nav -->
174     <script>
175       $(document).ready(function() {
176         scrollIntoView("devdoc-nav");
177         });
178     </script>
179 <?cs /def ?>
180 <?cs
181 def:dist_more_nav() ?>
182   <div class="wrap clearfix" id="body-content">
183     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
184       <div id="devdoc-nav" class="scroll-pane">
185 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
186 
187 
188 <?cs
189         include:"../../../../frameworks/base/docs/html/distribute/more/more_toc.cs" ?>
190 
191 
192       </div>
193     </div> <!-- end side-nav -->
194     <script>
195       $(document).ready(function() {
196         scrollIntoView("devdoc-nav");
197         });
198     </script>
199 :
200 
201 <?cs /def ?>
202 <?cs # The default side navigation for the reference docs ?><?cs
203 def:default_left_nav() ?>
204 <?cs if:reference.gcm || reference.gms ?>
205   <?cs call:google_nav() ?>
206 <?cs else ?>
207   <div class="wrap clearfix" id="body-content">
208     <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
209       <div id="devdoc-nav">
210 
211 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
212       <div id="api-nav-header">
213         <div id="api-level-toggle">
214           <label for="apiLevelCheckbox" class="disabled">API level: </label>
215           <div class="select-wrapper">
216             <select id="apiLevelSelector">
217               <!-- option elements added by buildApiLevelSelector() -->
218             </select>
219           </div>
220         </div><!-- end toggle -->
221         <div id="api-nav-title">Android APIs</div>
222         </div><!-- end nav header -->
223       <script>
224         var SINCE_DATA = [ <?cs
225           each:since = since ?>'<?cs
226             var:since.name ?>'<?cs
227             if:!last(since) ?>, <?cs /if ?><?cs
228           /each
229         ?> ];
buildApiLevelSelector()230         buildApiLevelSelector();
231       </script>
232 
233       <div id="swapper">
234         <div id="nav-panels">
235           <div id="resize-packages-nav">
236             <div id="packages-nav" class="scroll-pane">
237 
238               <ul>
239               	<?cs call:package_link_list(docs.packages) ?>
240               </ul><br/>
241 
242             </div> <!-- end packages-nav -->
243           </div> <!-- end resize-packages -->
244           <div id="classes-nav" class="scroll-pane">
245 
246 
247 <?cs
248             if:subcount(class.package) ?>
249             <ul>
250               <?cs call:list("Interfaces", class.package.interfaces) ?>
251               <?cs call:list("Classes", class.package.classes) ?>
252               <?cs call:list("Enums", class.package.enums) ?>
253               <?cs call:list("Exceptions", class.package.exceptions) ?>
254               <?cs call:list("Errors", class.package.errors) ?>
255             </ul><?cs
256             elif:subcount(package) ?>
257             <ul>
258               <?cs call:class_link_list("Interfaces", package.interfaces) ?>
259               <?cs call:class_link_list("Classes", package.classes) ?>
260               <?cs call:class_link_list("Enums", package.enums) ?>
261               <?cs call:class_link_list("Exceptions", package.exceptions) ?>
262               <?cs call:class_link_list("Errors", package.errors) ?>
263             </ul><?cs
264             else ?>
265               <p style="padding:10px">Select a package to view its members</p><?cs
266             /if ?><br/>
267 
268 
269           </div><!-- end classes -->
270         </div><!-- end nav-panels -->
271         <div id="nav-tree" style="display:none" class="scroll-pane">
272           <div id="tree-list"></div>
273         </div><!-- end nav-tree -->
274       </div><!-- end swapper -->
275       <div id="nav-swap">
276       <a class="fullscreen">fullscreen</a>
277       <a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
278       </div>
279     </div> <!-- end devdoc-nav -->
280     </div> <!-- end side-nav -->
281     <script type="text/javascript">
282       // init fullscreen based on user pref
283       var fullscreen = readCookie("fullscreen");
284       if (fullscreen != 0) {
285         if (fullscreen == "false") {
286           toggleFullscreen(false);
287         } else {
288           toggleFullscreen(true);
289         }
290       }
291       // init nav version for mobile
292       if (isMobile) {
293         swapNav(); // tree view should be used on mobile
294         $('#nav-swap').hide();
295       } else {
296         chooseDefaultNav();
297         if ($("#nav-tree").is(':visible')) {
298           init_default_navtree("<?cs var:toroot ?>");
299         }
300       }
301       // scroll the selected page into view
function()302       $(document).ready(function() {
303         scrollIntoView("packages-nav");
304         scrollIntoView("classes-nav");
305         });
306     </script>
307 <?cs /if ?>
308     <?cs
309 /def ?>
310 
311 <?cs
312 def:custom_left_nav() ?><?cs
313   if:fullpage ?><?cs
314     call:fullpage() ?><?cs
315   elif:guide ?><?cs
316     call:guide_nav() ?><?cs
317   elif:design ?><?cs
318     call:design_nav() ?><?cs
319   elif:training ?><?cs
320     call:training_nav() ?><?cs
321   elif:tools ?><?cs
322     call:tools_nav() ?><?cs
323   elif:google ?><?cs
324     call:google_nav() ?><?cs
325   elif:more ?><?cs
326     call:dist_more_nav() ?><?cs
327   elif:distribute ?><?cs
328     call:distribute_nav() ?><?cs
329   elif:about ?><?cs
330     call:about_nav() ?><?cs
331   else ?><?cs
332     call:default_left_nav() ?> <?cs
333   /if ?><?cs
334 /def ?>
335 
336 <?cs # appears at the bottom of every page ?><?cs
337 def:custom_cc_copyright() ?>
338   Except as noted, this content is
339   licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
340   Creative Commons Attribution 2.5</a>. For details and
341   restrictions, see the <a href="<?cs var:toroot ?>license.html">Content
342   License</a>.<?cs
343 /def ?>
344 
345 <?cs
346 def:custom_copyright() ?>
347   Except as noted, this content is licensed under <a
348   href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
349   For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
350   Content License</a>.<?cs
351 /def ?>
352 
353 <?cs
354 def:custom_footerlinks() ?>
355   <p>
356     <a href="<?cs var:toroot ?>about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
357     <a href="<?cs var:toroot ?>legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
358     <a href="<?cs var:toroot ?>support.html">Support</a>
359   </p><?cs
360 /def ?>
361 
362 <?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs
363 def:custom_buildinfo() ?><?cs
364   if:!google ?>
365     Android <?cs var:sdk.version ?>&nbsp;r<?cs var:sdk.rel.id ?> &mdash; <?cs
366   /if ?>
367 <script src="<?cs var:toroot ?>timestamp.js" type="text/javascript"></script>
368 <script>document.write(BUILD_TIMESTAMP)</script>
369 <?cs /def ?>
370 
371