Update 'added in' text to provide a different message for previews
and add CSS to style the APIs that are marked with this new since tag.

If the API level is not a number, then I assume the 'since' tag
given for the API level is a letter, which is what we use for
the developer previews, so it shows the new label.

Change-Id: I0e569e28144a5df37bd41a23e9d3918a0443e0a3
diff --git a/res/assets/templates-sdk/assets/css/default.css b/res/assets/templates-sdk/assets/css/default.css
index 9e5df48..65d7fde 100644
--- a/res/assets/templates-sdk/assets/css/default.css
+++ b/res/assets/templates-sdk/assets/css/default.css
@@ -3277,6 +3277,45 @@
   color:inherit;
 }
 
+
+/* Must be updated with each letter-appropriate preview */
+body.apilevel-O #jd-content {
+  background: url('../images/preview.png') repeat;
+}
+
+/* Must be updated with each letter-appropriate preview */
+#jd-content .apilevel-O:not(.absent) h3 {
+  color: #f5ba15;
+}
+
+/* Must be updated with each letter-appropriate preview */
+#jd-content .apilevel-O:not(.absent) .api-level a,
+body.apilevel-O #api-info-block .api-level a  {
+  color: #f5ba15;
+  font-size: 14px;
+}
+
+/* Must be updated with each letter-appropriate preview */
+#jd-content .apilevel-O:not(.absent) td,
+#jd-content .apilevel-O:not(.absent) th,
+body.apilevel-O #jd-content table:not(.jd-inheritance-table) td,
+body.apilevel-O #jd-content th {
+  background: rgba(245, 185, 16, 0.2);
+  border: solid 1px #f5ba15;
+}
+
+/* Must be updated with each letter-appropriate preview */
+#jd-content tr.apilevel-O:not(.absent) td {
+  background: rgba(245, 185, 16, 0.2);
+  border: solid 1px #ddd;
+}
+
+/* Must be updated with each letter-appropriate preview */
+#jd-content .apilevel-O:not(.absent) th,
+body.apilevel-O #jd-content th {
+  background: #f5ba15;
+}
+
 /************ STICKY NAV BAR ******************/
 
 #context {
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index bcb9a1d..eae1d8d 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -248,8 +248,12 @@
 
 # print the API Level ?><?cs
 def:since_tags(obj) ?><?cs
-if:reference.apilevels && obj.since ?>
-  Added in <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level <?cs var:obj.since ?></a><?cs
+if:reference.apilevels && obj.since ?><?cs
+  if:obj.since > 0 ?>
+    added in <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level <?cs var:obj.since ?></a><?cs
+  else ?>
+    <b><a href="<?cs var:toroot ?>preview/">Android <?cs var:obj.since ?> Developer Preview</a></b><?cs
+  /if?><?cs
 /if ?><?cs
 /def ?><?cs