OSDN Git Service

docs: make the apidemos app index page only display the
authorScott Main <smain@google.com>
Fri, 20 Nov 2009 22:38:29 +0000 (14:38 -0800)
committerScott Main <smain@google.com>
Fri, 20 Nov 2009 22:55:07 +0000 (14:55 -0800)
shortcut links when the docs are online, because these
links will not resolve when the docs are offline.

this is a silly hack, but a temporary one until these
samples are moved.

Change-Id: I53e268db265cec143ca5e561ca2d6b4df3dba3e2

samples/ApiDemos/_index.html

index 6b30303..5e7ebfc 100755 (executable)
@@ -16,27 +16,29 @@ that illustrate the use of various Android APIs. It includes samples of:
   <li>And many many more...</li>  
 </ul>
 
-<p>You'll notice that all the samples are included in a single Android project,
-so the application code and other resource files for all samples are batched together. 
-To help you find the code that's relevant to you, here's a directory that
-points to the program code for the different topics included in the project:</p>
+<script type="text/javascript">
 
-<ul>
-    <li><a href="src/com/example/android/apis/animation/index.html">Animation</a></li>
+// This is a totally temporary hack to display the following content only
+// when the docs are online. This will be changed once the samples get moved.
 
-    <li><a href="src/com/example/android/apis/app/index.html">App</a></li>
+if (toRoot == "/") {
 
-    <li><a href="src/com/example/android/apis/appwidget/index.html">App Widgets</a></li>
+document.write(""+
+"<p>You'll notice that all the samples are included in a single Android"+
+"project,so the application code and other resource files for all samples are batched"+
+"together.To help you find the code that's relevant to you, here's a directory that"+
+"points to the program code for the different topics included in the project:</p>"+
 
-    <li><a href="src/com/example/android/apis/content/index.html">Content</a></li>
-    
-    <li><a href="src/com/example/android/apis/graphics/index.html">Graphics</a></li>
-    
-    <li><a href="src/com/example/android/apis/media/index.html">Media</a></li>
-    
-    <li><a href="src/com/example/android/apis/os/index.html">OS</a></li>
+"<ul><li><a href='src/com/example/android/apis/animation/index.html'>Animation</a></li>"+
+"    <li><a href='src/com/example/android/apis/app/index.html'>App</a></li>"+
+"    <li><a href='src/com/example/android/apis/appwidget/index.html'>App Widgets</a></li>"+
+"    <li><a href='src/com/example/android/apis/content/index.html'>Content</a></li>"+
+"    <li><a href='src/com/example/android/apis/graphics/index.html'>Graphics</a></li>"+
+"    <li><a href='src/com/example/android/apis/media/index.html'>Media</a></li>"+
+"    <li><a href='src/com/example/android/apis/os/index.html'>OS</a></li>"+
+"    <li><a href='src/com/example/android/apis/text/index.html'>Text</a></li>"+
+"    <li><a href='src/com/example/android/apis/view/index.html'>Views</a></li></ul>");
 
-    <li><a href="src/com/example/android/apis/text/index.html">Text</a></li>
-    
-    <li><a href="src/com/example/android/apis/view/index.html">Views</a></li>
-</ul>
+}
+
+</script>