summaryrefslogtreecommitdiffstats
path: root/tools/droiddoc/templates-sdk/assets/customizations.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/droiddoc/templates-sdk/assets/customizations.js')
-rw-r--r--tools/droiddoc/templates-sdk/assets/customizations.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/customizations.js b/tools/droiddoc/templates-sdk/assets/customizations.js
new file mode 100644
index 000000000..52589024c
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/customizations.js
@@ -0,0 +1,14 @@
+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();
+ }
+}
+
+// Direct searches to search.html
+HAS_SEARCH_PAGE = true;