Permalink
Browse files

button theme

  • Loading branch information...
1 parent 801182b commit da11dc72176cbcc0328efda81982e8dd2bf21d87 Jonas Gehring committed Sep 13, 2011
Showing with 71 additions and 0 deletions.
  1. +33 −0 index.html
  2. +2 −0 jquery.mobile.android-theme.css
  3. +14 −0 jquery.mobile.android-theme.js
  4. +22 −0 themes/android/jquery.mobile.button.css
View
33 index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Page Title</title>
+
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css" />
+<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
+<script type="text/javascript" src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"></script>
+
+<link rel="stylesheet" href="jquery.mobile.android-theme.css" />
+<script type="text/javascript">
+var DEBUG_ANDROID_THEME=true
+</script>
+<script type="text/javascript" src="jquery.mobile.android-theme.js"></script>
+
+</head>
+<body>
+ <div data-role="page">
+ <div data-role="header">
+ <h1>Page Title</h1>
+ </div><!-- /header -->
+ <div data-role="content">
+ <p>Page content goes here.</p>
+ <a href="#" data-role="button">Go</a>
+ </div><!-- /content -->
+ <div data-role="footer">
+ <h4>Page Footer</h4>
+ </div><!-- /footer -->
+ </div><!-- /page -->
+</body>
+</html>
View
2 jquery.mobile.android-theme.css
@@ -0,0 +1,2 @@
+@import url(themes/android/jquery.mobile.button.css);
+
View
14 jquery.mobile.android-theme.js
@@ -0,0 +1,14 @@
+function isAndroid() {
+ if (typeof(DEBUG_ANDROID_THEME) != 'undefined' && DEBUG_ANDROID_THEME) return true
+
+ var ua = navigator.userAgent.toLowerCase()
+ return ua.indexOf("android") > -1
+}
+
+$(function() {
+ if (isAndroid()) {
+ // add android class to body
+ $('body').addClass('android')
+ }
+})
+
View
22 themes/android/jquery.mobile.button.css
@@ -0,0 +1,22 @@
+.android .ui-btn-corner-all {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ font-weight: normal;
+}
+
+.android .ui-shadow {
+ -moz-box-shadow: 0 0 0 0;
+ -webkit-box-shadow: 0 0 0 0;
+ box-shadow: 0 0 0 0;
+}
+
+/* theme C */
+.android .ui-btn-up-c {
+ border: 1px solid #AAA;
+}
+
+.android .ui-btn-down-c {
+ background: #ffae00;
+}
+

0 comments on commit da11dc7

Please sign in to comment.