OSDN Git Service

Adding android-specific customization for warning of minimum api level
authorBen Dodson <bjdodson@google.com>
Tue, 24 Aug 2010 21:39:58 +0000 (14:39 -0700)
committerBen Dodson <bjdodson@google.com>
Tue, 24 Aug 2010 21:39:58 +0000 (14:39 -0700)
Change-Id: Id211e250f3c42d0239ce9bf126a74997c8b0dc3f

tools/droiddoc/templates/assets/customizations.js [new file with mode: 0644]

diff --git a/tools/droiddoc/templates/assets/customizations.js b/tools/droiddoc/templates/assets/customizations.js
new file mode 100644 (file)
index 0000000..26eb59f
--- /dev/null
@@ -0,0 +1,11 @@
+function showApiWarning(thing, selectedLevel, minLevel) {
+  if (selectedLevel < minLevel) {
+         $("#naMessage").show().html("<div><p><strong>This " + thing + " is not available with API Level " + selectedLevel + ".</strong></p>"
+             + "<p>To use this " + thing + ", your application must specify API Level " + minLevel + " or higher in its manifest "
+             + "and be compiled against a version of the Android library that supports an equal or higher API Level. To reveal this "
+             + "document, change the value of the API Level filter above.</p>"
+             + "<p><a href='" +toRoot+ "guide/appendix/api-levels.html'>What is the API Level?</a></p></div>");
+  } else {
+    $("#naMessage").hide();
+  }
+}