Permalink
Browse files

Add wh-app-android files.

  • Loading branch information...
1 parent d861525 commit cfdffe82180ce07116815e1ed44d4c6f505a0fc3 @WH-NewMedia WH-NewMedia committed with Bryan Hirsch Sep 3, 2012
Showing with 8,548 additions and 0 deletions.
  1. +25 −0 .gitignore
  2. +11 −0 .gitmodules
  3. +61 −0 AndroidManifest.xml
  4. +136 −0 README.md
  5. +6 −0 assets/airshipconfig.properties
  6. BIN assets/branding.png
  7. BIN assets/play.png
  8. +32 −0 assets/post.html
  9. +32 −0 assets/underscore-min.js
  10. +97 −0 assets/wh.css
  11. +86 −0 assets/wh.js
  12. +2 −0 assets/zepto.min.js
  13. +92 −0 build.xml
  14. BIN libs/android-query.jar
  15. BIN libs/android-support-v4.jar
  16. BIN libs/bugsense-1.9.jar
  17. BIN libs/gson-2.2.2-javadoc.jar
  18. BIN libs/gson-2.2.2-sources.jar
  19. BIN libs/gson-2.2.2.jar
  20. BIN libs/libGoogleAnalytics.jar
  21. BIN libs/urbanairship-lib-1.1.4.jar
  22. +20 −0 proguard-project.txt
  23. +19 −0 project.properties
  24. +26 −0 res/anim/slide_out_left.xml
  25. +6 −0 res/color/primary_feed_text.xml
  26. BIN res/drawable-hdpi/ab_bottom_solid_whitehouse.9.png
  27. BIN res/drawable-hdpi/ab_solid_whitehouse.9.png
  28. BIN res/drawable-hdpi/ab_stacked_solid_whitehouse.9.png
  29. BIN res/drawable-hdpi/ab_transparent_whitehouse.9.png
  30. BIN res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
  31. BIN res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
  32. BIN res/drawable-hdpi/btn_default_focused_holo_dark.9.png
  33. BIN res/drawable-hdpi/btn_default_normal_holo_dark.9.png
  34. BIN res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
  35. BIN res/drawable-hdpi/ic_favorite.png
  36. BIN res/drawable-hdpi/ic_launcher.png
  37. BIN res/drawable-hdpi/ic_menu.png
  38. BIN res/drawable-hdpi/ic_menu_search.png
  39. BIN res/drawable-hdpi/ic_unfavorite.png
  40. BIN res/drawable-hdpi/list_focused_whitehouse.9.png
  41. BIN res/drawable-hdpi/logo_wh.png
  42. BIN res/drawable-hdpi/menu_dropdown_panel_whitehouse.9.png
  43. BIN res/drawable-hdpi/menu_hardkey_panel_whitehouse.9.png
  44. BIN res/drawable-hdpi/progress_bg_whitehouse.9.png
  45. BIN res/drawable-hdpi/progress_primary_whitehouse.9.png
  46. BIN res/drawable-hdpi/progress_secondary_whitehouse.9.png
  47. BIN res/drawable-hdpi/spinner_ab_default_whitehouse.9.png
  48. BIN res/drawable-hdpi/spinner_ab_disabled_whitehouse.9.png
  49. BIN res/drawable-hdpi/spinner_ab_focused_whitehouse.9.png
  50. BIN res/drawable-hdpi/spinner_ab_pressed_whitehouse.9.png
  51. BIN res/drawable-hdpi/tab_selected_focused_whitehouse.9.png
  52. BIN res/drawable-hdpi/tab_selected_pressed_whitehouse.9.png
  53. BIN res/drawable-hdpi/tab_selected_whitehouse.9.png
  54. BIN res/drawable-hdpi/tab_unselected_focused_whitehouse.9.png
  55. BIN res/drawable-hdpi/tab_unselected_pressed_whitehouse.9.png
  56. BIN res/drawable-ldpi/ic_launcher.png
  57. BIN res/drawable-mdpi/ab_bottom_solid_whitehouse.9.png
  58. BIN res/drawable-mdpi/ab_solid_whitehouse.9.png
  59. BIN res/drawable-mdpi/ab_stacked_solid_whitehouse.9.png
  60. BIN res/drawable-mdpi/ab_transparent_whitehouse.9.png
  61. BIN res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
  62. BIN res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
  63. BIN res/drawable-mdpi/btn_default_focused_holo_dark.9.png
  64. BIN res/drawable-mdpi/btn_default_normal_holo_dark.9.png
  65. BIN res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
  66. BIN res/drawable-mdpi/ic_favorite.png
  67. BIN res/drawable-mdpi/ic_launcher.png
  68. BIN res/drawable-mdpi/ic_menu.png
  69. BIN res/drawable-mdpi/ic_menu_search.png
  70. BIN res/drawable-mdpi/ic_unfavorite.png
  71. BIN res/drawable-mdpi/list_focused_whitehouse.9.png
  72. BIN res/drawable-mdpi/logo_wh.png
  73. BIN res/drawable-mdpi/menu_dropdown_panel_whitehouse.9.png
  74. BIN res/drawable-mdpi/menu_hardkey_panel_whitehouse.9.png
  75. BIN res/drawable-mdpi/progress_bg_whitehouse.9.png
  76. BIN res/drawable-mdpi/progress_primary_whitehouse.9.png
  77. BIN res/drawable-mdpi/progress_secondary_whitehouse.9.png
  78. BIN res/drawable-mdpi/spinner_ab_default_whitehouse.9.png
  79. BIN res/drawable-mdpi/spinner_ab_disabled_whitehouse.9.png
  80. BIN res/drawable-mdpi/spinner_ab_focused_whitehouse.9.png
  81. BIN res/drawable-mdpi/spinner_ab_pressed_whitehouse.9.png
  82. BIN res/drawable-mdpi/tab_selected_focused_whitehouse.9.png
  83. BIN res/drawable-mdpi/tab_selected_pressed_whitehouse.9.png
  84. BIN res/drawable-mdpi/tab_selected_whitehouse.9.png
  85. BIN res/drawable-mdpi/tab_unselected_focused_whitehouse.9.png
  86. BIN res/drawable-mdpi/tab_unselected_pressed_whitehouse.9.png
  87. BIN res/drawable-xhdpi/ab_bottom_solid_whitehouse.9.png
  88. BIN res/drawable-xhdpi/ab_solid_whitehouse.9.png
  89. BIN res/drawable-xhdpi/ab_stacked_solid_whitehouse.9.png
  90. BIN res/drawable-xhdpi/ab_transparent_whitehouse.9.png
  91. BIN res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png
  92. BIN res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png
  93. BIN res/drawable-xhdpi/btn_default_focused_holo_dark.9.png
  94. BIN res/drawable-xhdpi/btn_default_normal_holo_dark.9.png
  95. BIN res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png
  96. BIN res/drawable-xhdpi/ic_favorite.png
  97. BIN res/drawable-xhdpi/ic_launcher.png
  98. BIN res/drawable-xhdpi/ic_menu.png
  99. BIN res/drawable-xhdpi/ic_menu_search.png
  100. BIN res/drawable-xhdpi/ic_unfavorite.png
  101. BIN res/drawable-xhdpi/list_focused_whitehouse.9.png
  102. BIN res/drawable-xhdpi/logo_wh.png
  103. BIN res/drawable-xhdpi/menu_dropdown_panel_whitehouse.9.png
  104. BIN res/drawable-xhdpi/menu_hardkey_panel_whitehouse.9.png
  105. BIN res/drawable-xhdpi/progress_bg_whitehouse.9.png
  106. BIN res/drawable-xhdpi/progress_primary_whitehouse.9.png
  107. BIN res/drawable-xhdpi/progress_secondary_whitehouse.9.png
  108. BIN res/drawable-xhdpi/spinner_ab_default_whitehouse.9.png
  109. BIN res/drawable-xhdpi/spinner_ab_disabled_whitehouse.9.png
  110. BIN res/drawable-xhdpi/spinner_ab_focused_whitehouse.9.png
  111. BIN res/drawable-xhdpi/spinner_ab_pressed_whitehouse.9.png
  112. BIN res/drawable-xhdpi/tab_selected_focused_whitehouse.9.png
  113. BIN res/drawable-xhdpi/tab_selected_pressed_whitehouse.9.png
  114. BIN res/drawable-xhdpi/tab_selected_whitehouse.9.png
  115. BIN res/drawable-xhdpi/tab_unselected_focused_whitehouse.9.png
  116. BIN res/drawable-xhdpi/tab_unselected_pressed_whitehouse.9.png
  117. +9 −0 res/drawable/ab_background.xml
  118. +13 −0 res/drawable/btn_dashboard_search_background.xml
  119. +8 −0 res/drawable/dashboard_item_selector.xml
  120. +9 −0 res/drawable/details_shadow.xml
  121. +26 −0 res/drawable/feed_item_selector.xml
  122. +9 −0 res/drawable/feed_row_date_gradient.xml
  123. +8 −0 res/drawable/feedrow_bottom_gradient.xml
  124. +9 −0 res/drawable/photos_background.xml
  125. BIN res/drawable/presidential_seal.png
  126. +21 −0 res/drawable/pressed_background_whitehouse.xml
  127. +34 −0 res/drawable/progress_horizontal_whitehouse.xml
  128. +25 −0 res/drawable/selectable_background_whitehouse.xml
  129. +27 −0 res/drawable/spinner_background_ab_whitehouse.xml
  130. +44 −0 res/drawable/tab_indicator_ab_whitehouse.xml
  131. +26 −0 res/layout-sw600dp-land/main.xml
  132. +22 −0 res/layout-sw600dp-land/videos_fragment.xml
  133. +26 −0 res/layout-sw720dp/main.xml
  134. +22 −0 res/layout-sw720dp/videos_fragment.xml
  135. +22 −0 res/layout-w500dp/videos_fragment.xml
  136. +16 −0 res/layout/article_view.xml
  137. +49 −0 res/layout/dashboard.xml
  138. +13 −0 res/layout/dashboard_list_item.xml
  139. +31 −0 res/layout/detailed_photo_item.xml
  140. +68 −0 res/layout/feedrow.xml
  141. +11 −0 res/layout/loading_home.xml
  142. +9 −0 res/layout/main.xml
  143. +12 −0 res/layout/menu.xml
  144. +24 −0 res/layout/photo_detail_fragment.xml
  145. +11 −0 res/layout/photo_item.xml
  146. +25 −0 res/layout/photos_fragment.xml
  147. +50 −0 res/layout/search_row.xml
  148. +31 −0 res/layout/video_list_item.xml
  149. +11 −0 res/layout/video_player.xml
  150. +22 −0 res/layout/videos_fragment.xml
  151. +11 −0 res/menu/article.xml
  152. +8 −0 res/menu/feedlist.xml
  153. +17 −0 res/menu/menu.xml
  154. +7 −0 res/values-sw600dp-land/attrs.xml
  155. +7 −0 res/values-sw720dp/attrs.xml
  156. +21 −0 res/values/attrs.xml
  157. +29 −0 res/values/colors.xml
  158. +35 −0 res/values/preferences.xml
  159. +48 −0 res/values/strings.xml
  160. +130 −0 res/values/styles.xml
  161. +10 −0 res/xml/general_preferences.xml
  162. +9 −0 res/xml/preference_headers.xml
  163. +5 −0 res/xml/searchable.xml
  164. +50 −0 src/gov/whitehouse/core/DashboardConfig.java
  165. +95 −0 src/gov/whitehouse/core/DashboardItem.java
  166. +84 −0 src/gov/whitehouse/core/FavoritesMap.java
  167. +144 −0 src/gov/whitehouse/core/FeedHandler.java
  168. +176 −0 src/gov/whitehouse/core/FeedItem.java
  169. +109 −0 src/gov/whitehouse/core/SearchResponse.java
  170. +180 −0 src/gov/whitehouse/core/SearchResult.java
  171. +48 −0 src/gov/whitehouse/receivers/BootReceiver.java
  172. +98 −0 src/gov/whitehouse/receivers/PushReceiver.java
  173. +221 −0 src/gov/whitehouse/services/FeedService.java
  174. +280 −0 src/gov/whitehouse/services/LiveService.java
  175. +121 −0 src/gov/whitehouse/ui/WhiteHouseApplication.java
  176. +123 −0 src/gov/whitehouse/ui/activities/BaseActivity.java
  177. +332 −0 src/gov/whitehouse/ui/activities/BaseDashboardActivity.java
  178. +50 −0 src/gov/whitehouse/ui/activities/app/ArticleListActivity.java
  179. +77 −0 src/gov/whitehouse/ui/activities/app/ArticleViewerActivity.java
  180. +51 −0 src/gov/whitehouse/ui/activities/app/FavoritesActivity.java
  181. +133 −0 src/gov/whitehouse/ui/activities/app/HomeActivity.java
  182. +50 −0 src/gov/whitehouse/ui/activities/app/LiveFeedActivity.java
  183. +227 −0 src/gov/whitehouse/ui/activities/app/PhotoGalleryActivity.java
  184. +60 −0 src/gov/whitehouse/ui/activities/app/VideoGalleryActivity.java
  185. +210 −0 src/gov/whitehouse/ui/activities/app/VideoPlayerActivity.java
  186. +77 −0 src/gov/whitehouse/ui/activities/app/WHPreferencesActivity.java
  187. +107 −0 src/gov/whitehouse/ui/adapters/DashboardListAdapter.java
  188. +178 −0 src/gov/whitehouse/ui/adapters/FavoritesListAdapter.java
  189. +206 −0 src/gov/whitehouse/ui/adapters/FeedItemsListAdapter.java
  190. +119 −0 src/gov/whitehouse/ui/adapters/PhotosListAdapter.java
  191. +179 −0 src/gov/whitehouse/ui/adapters/SearchResultsListAdapter.java
  192. +82 −0 src/gov/whitehouse/ui/fragments/BaseFragment.java
  193. +83 −0 src/gov/whitehouse/ui/fragments/BaseListFragment.java
  194. +44 −0 src/gov/whitehouse/ui/fragments/StockPreferenceFragment.java
  195. +289 −0 src/gov/whitehouse/ui/fragments/app/ArticleListFragment.java
  196. +279 −0 src/gov/whitehouse/ui/fragments/app/ArticleViewerFragment.java
  197. +157 −0 src/gov/whitehouse/ui/fragments/app/LiveEventListFragment.java
  198. +328 −0 src/gov/whitehouse/ui/fragments/app/PhotoDetailFragment.java
  199. +116 −0 src/gov/whitehouse/ui/fragments/app/PhotosFragment.java
  200. +143 −0 src/gov/whitehouse/ui/fragments/app/SearchResultsFragment.java
  201. +169 −0 src/gov/whitehouse/ui/fragments/app/VideoListFragment.java
  202. +105 −0 src/gov/whitehouse/ui/loaders/AsyncLoader.java
  203. +129 −0 src/gov/whitehouse/ui/loaders/DashboardLoader.java
  204. +112 −0 src/gov/whitehouse/ui/loaders/FavoritesLoader.java
  205. +126 −0 src/gov/whitehouse/ui/loaders/FeedReaderLoader.java
  206. +118 −0 src/gov/whitehouse/ui/loaders/SearchResultsLoader.java
  207. +73 −0 src/gov/whitehouse/utils/DashboardItemUtils.java
  208. +95 −0 src/gov/whitehouse/utils/DateFormatter.java
  209. +76 −0 src/gov/whitehouse/utils/DateUtils.java
  210. +231 −0 src/gov/whitehouse/utils/FavoritesUtils.java
  211. +124 −0 src/gov/whitehouse/utils/GATrackingManager.java
  212. +153 −0 src/gov/whitehouse/utils/GsonUtils.java
View
25 .gitignore
@@ -0,0 +1,25 @@
+# built application files
+*.apk
+*.ap_
+
+# files for the dex VM
+*.dex
+
+# Java class files
+*.class
+
+# generated files
+bin/
+gen/
+out/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Eclipse project files
+.classpath
+.project
+
+# IntelliJ project files
+.idea/
+*.iml
View
11 .gitmodules
@@ -0,0 +1,11 @@
+[submodule "contrib/actionbarsherlock"]
+ path = contrib/actionbarsherlock
+ url = git://github.com/JakeWharton/ActionBarSherlock.git
+ ignore = dirty
+[submodule "contrib/viewpagerindicator"]
+ path = contrib/viewpagerindicator
+ url = git://github.com/JakeWharton/Android-ViewPagerIndicator.git
+ ignore = dirty
+[submodule "contrib/android-undergarment"]
+ path = contrib/android-undergarment
+ url = git://github.com/eddieringle/android-undergarment.git
View
61 AndroidManifest.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="gov.whitehouse"
+ android:versionCode="2"
+ android:versionName="2.0" >
+ <!--
+ The package name MUST be changed if you intend to fork and customize this app. The most
+ efficient way to do this is to use an IDE with refactoring support to rename the entire
+ package in all places and move the files into the new package directory.
+ -->
+
+ <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.VIBRATE" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+ <application android:name=".ui.WhiteHouseApplication"
+ android:icon="@drawable/ic_launcher"
+ android:theme="@style/Theme.WhiteHouse"
+ android:label="@string/app_name">
+ <activity android:name=".ui.activities.app.HomeActivity" android:label="Your App Label">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity android:name=".ui.activities.app.ArticleListActivity" />
+ <activity android:name=".ui.activities.app.PhotoGalleryActivity" />
+ <activity android:name=".ui.activities.app.VideoGalleryActivity" />
+ <activity android:name=".ui.activities.app.LiveFeedActivity" />
+ <activity android:name=".ui.activities.app.FavoritesActivity" />
+ <activity android:name=".ui.activities.app.ArticleViewerActivity" />
+ <activity android:name=".ui.activities.app.VideoPlayerActivity"
+ android:screenOrientation="landscape" />
+ <activity android:name=".ui.activities.app.WHPreferencesActivity" />
+
+ <receiver android:name="com.urbanairship.CoreReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ <action android:name="android.intent.action.ACTION_SHUTDOWN" />
+ </intent-filter>
+ </receiver>
+ <receiver android:name=".receivers.BootReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ <action android:name="android.intent.action.ACTION_SHUTDOWN" />
+ </intent-filter>
+ </receiver>
+
+ <receiver android:name=".receivers.PushReceiver"></receiver>
+
+ <service android:name=".services.FeedService" />
+ <service android:name=".services.LiveService" />
+ <service android:name="com.urbanairship.push.PushService"
+ android:process=":com.urbanairship.push.process" />
+ </application>
+
+</manifest>
View
136 README.md
@@ -0,0 +1,136 @@
+# White House for Android mobile application
+
+A native Android (Java) app designed to fetch, cache, and display
+multiple feeds containing articles, photos, and live and on demand
+video. These are displayed in a web view. Includes support for push
+notifications.
+
+This application is under active development and will continue to be
+modified and improved over time.
+
+## Goals
+
+By releasing the source code for this app we hope to empower other
+governments and organizations to build and release mobile apps to
+engage their own citizens and constituencies. In addition, public
+review and contribution to the application's code base will help
+strengthen and improve the app.
+
+## Requirements
+
+1. Android 2.2 "Froyo" or higher
+2. RSS feeds for content to be aggregated and displayed by the app
+
+## Recommended
+
+1. Android 3.1 "Honeycomb" or higher is required for live video streaming.
+
+## Usage
+
+Mobile developers will be able to configure the application to
+retrieve and display content from arbitrary RSS feeds. The developer
+will be able to configure the app to receive push
+notifications. Placeholder assets may be replaced to customize the
+app's look and feel.
+
+### Building the App
+
+The Android SDK for API level 16 is require to build the app.
+
+The White House app uses the following libraries, which are all
+included as submodules in `contrib/`:
+
+* [ActionBarSherlock][] - action bar for older versions of Android
+* [ViewPagerIndicator][] - paging indicators widgets
+* [Undergarment][] - slide-out view (side nav) support library
+
+To initialize the submodules, run:
+
+ git submodule update --init
+
+The following libraries are included as source:
+
+* [Zepto.js][]
+* [Underscore.js][]
+
+### Code Style
+
+Contributers are expected to adhere to the official [Android
+Code Style Guidelines][style].
+
+
+NOTE: Setting up the application and configuring it for use in your
+organization's context requires Android development experience. The
+application ships with a similar design to what is used in the White
+House for Android mobile application. The application ships with
+"white label" placeholder assets that should be replaced by the
+developer.
+
+##Roadmap
+
+Have an idea or question about future features for White House for
+Android? Let us know by opening a ticket on GitHub, tweeting @WHWeb,
+or via our tech feedback form:
+http://www.whitehouse.gov/tech/feedback.
+
+##Contributing
+
+Anyone is encouraged to contribute to the project by
+[forking][] and submitting
+a pull request. (If you are new to GitHub, you might start with a
+[basic tutorial][].)
+
+By contributing to this project, you grant a world-wide, royalty-free,
+perpetual, irrevocable, non-exclusive, transferable license, free of
+charge, to any person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the conditions that any appropriate copyright
+notices and this permission notice are included in all copies or
+substantial portions of the Software.
+
+All comments, messages, pull requests, and other submissions received
+through official White House pages including this GitHub page are
+subject to the Presidential Records Act and may be archived. Learn
+more http://WhiteHouse.gov/privacy
+
+## License
+
+This project constitutes a work of the United States Government and is
+not subject to domestic copyright protection under 17 USC § 105.
+
+However, because the project utilizes code licensed from contributors
+and other third parties, it therefore is licensed under the MIT
+License. http://opensource.org/licenses/mit-license.php. Under that
+license, permission is granted free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the conditions that any appropriate copyright notices and this
+permission notice are included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+[ActionBarSherlock]: http://actionbarsherlock.com/
+[ViewPagerIndicator]: https://github.com/JakeWharton/Android-ViewPagerIndicator
+[Undergarment]: https://github.com/eddieringle/android-undergarment
+[Underscore.js]: http://underscorejs.org/
+[Zepto.js]: http://zeptojs.com/
+
+[style]: http://source.android.com/source/code-style.html
+[forking]: https://help.github.com/articles/fork-a-repo
+[basic tutorial]: https://help.github.com/articles/set-up-git
View
6 assets/airshipconfig.properties
@@ -0,0 +1,6 @@
+transport = helium
+developmentAppKey = Your development app key
+developmentAppSecret = Your development app secret
+productionAppKey = Your production app key
+productionAppSecret = Your production app secret
+inProduction = false
View
BIN assets/branding.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
32 assets/post.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width">
+ <script type="text/javascript" src="file:///android_asset/zepto.min.js"></script>
+ <script type="text/javascript" src="file:///android_asset/underscore-min.js"></script>
+ <script type="text/javascript" src="file:///android_asset/wh.js"></script>
+ <link rel="stylesheet" type="text/css" href="file:///android_asset/wh.css"></link>
+</head>
+<body>
+ <script id="video-template" type="text/template">
+ <a href="http://www.youtube.com/watch?v=<%= videoId %>">
+ <div class="video-thumbnail">
+ <img class="thumbnail" src="http://img.youtube.com/vi/<%= videoId %>/0.jpg" />
+ <img class="play-button" src="file:///android_asset/play.png" />
+ </div>
+ </a>
+ </script>
+ <script id="template" type="text/template">
+ <h1><%= title %></h1>
+ <p class="dateline">
+ by <%= creator %><br />
+ <%= date %>
+ </p>
+ <div class="content">
+ <%= description %>
+ </div>
+ <div class="branding"><img src="file:///android_asset/branding.png" /></div>
+ </script>
+ <div id="article"></div>
+</body>
+</html>
View
32 assets/underscore-min.js
@@ -0,0 +1,32 @@
+// Underscore.js 1.3.3
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+(function(){function r(a,c,d){if(a===c)return 0!==a||1/a==1/c;if(null==a||null==c)return a===c;a._chain&&(a=a._wrapped);c._chain&&(c=c._wrapped);if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return!1;switch(e){case "[object String]":return a==""+c;case "[object Number]":return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
+c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==a)return!0;d.push(a);var f=0,g=!0;if("[object Array]"==e){if(f=a.length,g=f==c.length)for(;f--&&(g=f in a==f in c&&r(a[f],c[f],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return!1;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,h)&&!f--)break;
+g=!f}}d.pop();return g}var s=this,I=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,J=k.unshift,l=p.toString,K=p.hasOwnProperty,y=k.forEach,z=k.map,A=k.reduce,B=k.reduceRight,C=k.filter,D=k.every,E=k.some,q=k.indexOf,F=k.lastIndexOf,p=Array.isArray,L=Object.keys,t=Function.prototype.bind,b=function(a){return new m(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=b),exports._=b):s._=b;b.VERSION="1.3.3";var j=b.each=b.forEach=function(a,
+c,d){if(a!=null)if(y&&a.forEach===y)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===o)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===o)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.map===z)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(A&&
+a.reduce===A){e&&(c=b.bind(c,e));return f?a.reduce(c,d):a.reduce(c)}j(a,function(a,b,i){if(f)d=c.call(e,d,a,b,i);else{d=a;f=true}});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(B&&a.reduceRight===B){e&&(c=b.bind(c,e));return f?a.reduceRight(c,d):a.reduceRight(c)}var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,
+c,b){var e;G(a,function(a,g,h){if(c.call(b,a,g,h)){e=a;return true}});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(C&&a.filter===C)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(D&&a.every===D)return a.every(c,b);j(a,function(a,g,h){if(!(e=e&&c.call(b,
+a,g,h)))return o});return!!e};var G=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(E&&a.some===E)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;if(q&&a.indexOf===q)return a.indexOf(c)!=-1;return b=G(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
+function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&
+(e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){d=Math.floor(Math.random()*(f+1));b[f]=b[d];b[d]=a});return b};b.sortBy=function(a,c,d){var e=b.isFunction(c)?c:function(a){return a[c]};return b.pluck(b.map(a,function(a,b,c){return{value:a,criteria:e.call(d,a,b,c)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c===void 0?1:d===void 0?-1:c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};
+j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:b.isArray(a)||b.isArguments(a)?i.call(a):a.toArray&&b.isFunction(a.toArray)?a.toArray():b.values(a)};b.size=function(a){return b.isArray(a)?a.length:b.keys(a).length};b.first=b.head=b.take=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,
+0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,
+e=[];a.length<3&&(c=true);b.reduce(d,function(d,g,h){if(c?b.last(d)!==g||!d.length:!b.include(d,g)){d.push(g);e.push(a[h])}return d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1),true);return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=
+i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d){d=b.sortedIndex(a,c);return a[d]===c?d:-1}if(q&&a.indexOf===q)return a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(F&&a.lastIndexOf===F)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){if(arguments.length<=
+1){b=a||0;a=0}for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;){g[f++]=a;a=a+d}return g};var H=function(){};b.bind=function(a,c){var d,e;if(a.bind===t&&t)return t.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));H.prototype=a.prototype;var b=new H,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=
+i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(null,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i,j=b.debounce(function(){h=
+g=false},c);return function(){d=this;e=arguments;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);j()},c));g?h=true:i=a.apply(d,e);j();g=true;return i}};b.debounce=function(a,b,d){var e;return function(){var f=this,g=arguments;d&&!e&&a.apply(f,g);clearTimeout(e);e=setTimeout(function(){e=null;d||a.apply(f,g)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));
+return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=L||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&
+c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.pick=function(a){var c={};j(b.flatten(i.call(arguments,1)),function(b){b in a&&(c[b]=a[b])});return c};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=
+function(a){if(a==null)return true;if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};b.isArguments(arguments)||(b.isArguments=function(a){return!(!a||!b.has(a,"callee"))});b.isFunction=function(a){return l.call(a)=="[object Function]"};
+b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isFinite=function(a){return b.isNumber(a)&&isFinite(a)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,
+b){return K.call(a,b)};b.noConflict=function(){s._=I;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.result=function(a,c){if(a==null)return null;var d=a[c];return b.isFunction(d)?d.call(a):d};b.mixin=function(a){j(b.functions(a),function(c){M(c,b[c]=a[c])})};var N=0;b.uniqueId=
+function(a){var b=N++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var u=/.^/,n={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},v;for(v in n)n[n[v]]=v;var O=/\\|'|\r|\n|\t|\u2028|\u2029/g,P=/\\(\\|'|r|n|t|u2028|u2029)/g,w=function(a){return a.replace(P,function(a,b){return n[b]})};b.template=function(a,c,d){d=b.defaults(d||{},b.templateSettings);a="__p+='"+a.replace(O,function(a){return"\\"+n[a]}).replace(d.escape||
+u,function(a,b){return"'+\n_.escape("+w(b)+")+\n'"}).replace(d.interpolate||u,function(a,b){return"'+\n("+w(b)+")+\n'"}).replace(d.evaluate||u,function(a,b){return"';\n"+w(b)+"\n;__p+='"})+"';\n";d.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",e=new Function(d.variable||"obj","_",a);if(c)return e(c,b);c=function(a){return e.call(this,a,b)};c.source="function("+(d.variable||"obj")+"){\n"+a+"}";return c};
+b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var x=function(a,c){return c?b(a).chain():a},M=function(a,c){m.prototype[a]=function(){var a=i.call(arguments);J.call(a,this._wrapped);return x(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return x(d,
+this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return x(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
View
97 assets/wh.css
@@ -0,0 +1,97 @@
+body {
+ font-family: Arial;
+ font-size: 16px;
+ color: #333333;
+}
+
+@media screen and (min-width: 475px) {
+ body {
+ padding: 5% 10% 5% 10%;
+ }
+
+ .video-thumbnail img.thumbnail {
+ width: 400px;
+ height: 300px;
+ }
+}
+
+@media screen and (max-width: 475px) {
+ .video-thumbnail img.thumbnail {
+ width: 300px;
+ height: 225px;
+ }
+}
+
+.content img {
+ width: 100%;
+ height: auto;
+ display: block;
+}
+
+.content img[width="1"] {
+ display:none;
+}
+
+.content p {
+ line-height: 1.4;
+}
+
+.content img + p {
+ color: #666666;
+ font-size: 14px;
+ line-height: 1.0;
+}
+
+h1 {
+ color: black;
+ font-family: Georgia;
+ font-weight: normal;
+ font-size: 20px;
+}
+
+.dateline {
+ color: #666666;
+ font-size: 14px;
+}
+
+.dateline a {
+ text-decoration: none;
+ color: #666666;
+}
+
+.content blockquote {
+ margin: 8px;
+ padding-left: 10px;
+ border-left: solid #003366 1px;
+}
+
+div.branding {
+ text-align: center;
+ border-top: solid #CCC 1px;
+ padding-top: 10px;
+}
+
+div.branding img {
+ width: 180px;
+ height: auto;
+}
+
+div.video-thumbnail {
+ position: relative;
+}
+
+div.video-thumbnail img.thumbnail {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+div.video-thumbnail img.play-button {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 80px;
+ height: 80px;
+ margin-top: -40px;
+ margin-left: -40px;
+ background: none;
+}
View
86 assets/wh.js
@@ -0,0 +1,86 @@
+var WhiteHouse = {
+ transformFontSize: function(f) {
+ var $target = $("div.content");
+ var fontSize = parseInt($target.css("font-size"));
+ var newFontSize = f(fontSize);
+ $target.css("font-size", newFontSize);
+ },
+ textUp: function() {
+ this.transformFontSize(function(x) {
+ return x + 5;
+ });
+ },
+ textDown: function() {
+ this.transformFontSize(function(x) {
+ if (0 < x - 5) {
+ return x - 5;
+ } else {
+ return x;
+ }
+ });
+ }
+};
+
+WhiteHouse.loadPage = function(pageInfo) {
+ try {
+ WhiteHouse.loadPageInternal(pageInfo);
+ } catch (e) {
+ console.log("Error in loadPage: " + e.name + "; " + e.message);
+ }
+}
+
+
+WhiteHouse.loadPageInternal = function(pageInfo) {
+ var container = $('#article');
+ try {
+ var t = _.template(document.getElementById("template").innerText);
+ container.html(t(pageInfo));
+ } catch (e) {
+ alert("Error in template: " + e.name + "; " + e.message);
+ }
+
+ $.fn.fixLinks = function(attr) {
+ return this.each(function() {
+ var url = $(this).attr(attr);
+ if (url && url.indexOf("/") == 0) {
+ $(this).attr(attr, "http://example.com/" + url);
+ }
+ });
+ };
+
+ container.find("a").fixLinks("href");
+ container.find("img").fixLinks("src");
+
+ container.find("div[style]").each(function(idx, div) {
+ div.removeAttribute("style");
+ });
+
+ var youTubeElements = [];
+
+ console.log("[YOUTUBE HANDLING] Searching for YouTube videos in <object> and <iframe> elements");
+
+ container.find("object param[name=movie]").each(function(idx, param) {
+ console.log("[YOUTUBE HANDLING] Found <param>: " + param);
+ var matches = $(param).attr('value').match(/youtube.*\/v\/(\w+)\b/);
+ if (matches) {
+ var el = $(param).parent();
+ console.log("[YOUTUBE HANDLING] Parent <object>(?) element: " + el);
+ youTubeElements.push({"el": el, "videoId": matches[1]});
+ }
+ });
+
+ container.find("iframe").each(function(idx, iframe) {
+ console.log("[YOUTUBE HANDLING] Found iframe: " + iframe);
+ var matches = $(iframe).attr("src").match(/youtube.*\/embed\/(\w+)\b/);
+ if (matches) {
+ console.log("[YOUTUBE HANDLING] iframe is a YouTube video");
+ youTubeElements.push({"el": iframe, "videoId": matches[1]});
+ }
+ });
+
+ for (var ii = 0; ii < youTubeElements.length; ii++) {
+ var obj = youTubeElements[ii];
+ var template = _.template($("#video-template").text());
+ $(obj.el).replaceWith($(template(obj)));
+ }
+}
View
2 assets/zepto.min.js
@@ -0,0 +1,2 @@
+/* Zepto v1.0rc1 - polyfill zepto event detect fx ajax form touch - zeptojs.com/license */
+(function(a){String.prototype.trim===a&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===a&&(Array.prototype.reduce=function(b){if(this===void 0||this===null)throw new TypeError;var c=Object(this),d=c.length>>>0,e=0,f;if(typeof b!="function")throw new TypeError;if(d==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)f=arguments[1];else do{if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError}while(!0);while(e<d)e in c&&(f=b.call(a,f,c[e],e,c)),e++;return f})})();var Zepto=function(){function A(a){return v.call(a)=="[object Function]"}function B(a){return a instanceof Object}function C(b){var c,d;if(v.call(b)!=="[object Object]")return!1;d=A(b.constructor)&&b.constructor.prototype;if(!d||!hasOwnProperty.call(d,"isPrototypeOf"))return!1;for(c in b);return c===a||hasOwnProperty.call(b,c)}function D(a){return a instanceof Array}function E(a){return typeof a.length=="number"}function F(b){return b.filter(function(b){return b!==a&&b!==null})}function G(a){return a.length>0?[].concat.apply([],a):a}function H(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function I(a){return a in i?i[a]:i[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function J(a,b){return typeof b=="number"&&!k[H(a)]?b+"px":b}function K(a){var b,c;return h[a]||(b=g.createElement(a),g.body.appendChild(b),c=j(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),c=="none"&&(c="block"),h[a]=c),h[a]}function L(b,d){return d===a?c(b):c(b).filter(d)}function M(a,b,c,d){return A(b)?b.call(a,c,d):b}function N(a,b,d){var e=a%2?b:b.parentNode;e?e.insertBefore(d,a?a==1?e.firstChild:a==2?b:null:b.nextSibling):c(d).remove()}function O(a,b){b(a);for(var c in a.childNodes)O(a.childNodes[c],b)}var a,b,c,d,e=[],f=e.slice,g=window.document,h={},i={},j=g.defaultView.getComputedStyle,k={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,m=[1,3,8,9,11],n=["after","prepend","before","append"],o=g.createElement("table"),p=g.createElement("tr"),q={tr:g.createElement("tbody"),tbody:o,thead:o,tfoot:o,td:p,th:p,"*":g.createElement("div")},r=/complete|loaded|interactive/,s=/^\.([\w-]+)$/,t=/^#([\w-]+)$/,u=/^[\w-]+$/,v={}.toString,w={},x,y,z=g.createElement("div");return w.matches=function(a,b){if(!a||a.nodeType!==1)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=z).appendChild(a),d=~w.qsa(e,b).indexOf(a),f&&z.removeChild(a),d},x=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},y=function(a){return a.filter(function(b,c){return a.indexOf(b)==c})},w.fragment=function(b,d){d===a&&(d=l.test(b)&&RegExp.$1),d in q||(d="*");var e=q[d];return e.innerHTML=""+b,c.each(f.call(e.childNodes),function(){e.removeChild(this)})},w.Z=function(a,b){return a=a||[],a.__proto__=arguments.callee.prototype,a.selector=b||"",a},w.isZ=function(a){return a instanceof w.Z},w.init=function(b,d){if(!b)return w.Z();if(A(b))return c(g).ready(b);if(w.isZ(b))return b;var e;if(D(b))e=F(b);else if(C(b))e=[c.extend({},b)],b=null;else if(m.indexOf(b.nodeType)>=0||b===window)e=[b],b=null;else if(l.test(b))e=w.fragment(b.trim(),RegExp.$1),b=null;else{if(d!==a)return c(d).find(b);e=w.qsa(g,b)}return w.Z(e,b)},c=function(a,b){return w.init(a,b)},c.extend=function(c){return f.call(arguments,1).forEach(function(d){for(b in d)d[b]!==a&&(c[b]=d[b])}),c},w.qsa=function(a,b){var c;return a===g&&t.test(b)?(c=a.getElementById(RegExp.$1))?[c]:e:a.nodeType!==1&&a.nodeType!==9?e:f.call(s.test(b)?a.getElementsByClassName(RegExp.$1):u.test(b)?a.getElementsByTagName(b):a.querySelectorAll(b))},c.isFunction=A,c.isObject=B,c.isArray=D,c.isPlainObject=C,c.inArray=function(a,b,c){return e.indexOf.call(b,a,c)},c.trim=function(a){return a.trim()},c.uuid=0,c.map=function(a,b){var c,d=[],e,f;if(E(a))for(e=0;e<a.length;e++)c=b(a[e],e),c!=null&&d.push(c);else for(f in a)c=b(a[f],f),c!=null&&d.push(c);return G(d)},c.each=function(a,b){var c,d;if(E(a)){for(c=0;c<a.length;c++)if(b.call(a[c],c,a[c])===!1)return a}else for(d in a)if(b.call(a[d],d,a[d])===!1)return a;return a},c.fn={forEach:e.forEach,reduce:e.reduce,push:e.push,indexOf:e.indexOf,concat:e.concat,map:function(a){return c.map(this,function(b,c){return a.call(b,c,b)})},slice:function(){return c(f.apply(this,arguments))},ready:function(a){return r.test(g.readyState)?a(c):g.addEventListener("DOMContentLoaded",function(){a(c)},!1),this},get:function(b){return b===a?f.call(this):this[b]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(a){return this.forEach(function(b,c){a.call(b,c,b)}),this},filter:function(a){return c([].filter.call(this,function(b){return w.matches(b,a)}))},add:function(a,b){return c(y(this.concat(c(a,b))))},is:function(a){return this.length>0&&w.matches(this[0],a)},not:function(b){var d=[];if(A(b)&&b.call!==a)this.each(function(a){b.call(this,a)||d.push(this)});else{var e=typeof b=="string"?this.filter(b):E(b)&&A(b.item)?f.call(b):c(b);this.forEach(function(a){e.indexOf(a)<0&&d.push(a)})}return c(d)},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!B(a)?a:c(a)},last:function(){var a=this[this.length-1];return a&&!B(a)?a:c(a)},find:function(a){var b;return this.length==1?b=w.qsa(this[0],a):b=this.map(function(){return w.qsa(this,a)}),c(b)},closest:function(a,b){var d=this[0];while(d&&!w.matches(d,a))d=d!==b&&d!==g&&d.parentNode;return c(d)},parents:function(a){var b=[],d=this;while(d.length>0)d=c.map(d,function(a){if((a=a.parentNode)&&a!==g&&b.indexOf(a)<0)return b.push(a),a});return L(b,a)},parent:function(a){return L(y(this.pluck("parentNode")),a)},children:function(a){return L(this.map(function(){return f.call(this.children)}),a)},siblings:function(a){return L(this.map(function(a,b){return f.call(b.parentNode.children).filter(function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return this.map(function(){return this[a]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=null),j(this,"").getPropertyValue("display")=="none"&&(this.style.display=K(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){return this.each(function(){c(this).wrapAll(c(a)[0].cloneNode(!1))})},wrapAll:function(a){return this[0]&&(c(this[0]).before(a=c(a)),a.append(this)),this},unwrap:function(){return this.parent().each(function(){c(this).replaceWith(c(this).children())}),this},clone:function(){return c(this.map(function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(b){return(b===a?this.css("display")=="none":b)?this.show():this.hide()},prev:function(){return c(this.pluck("previousElementSibling"))},next:function(){return c(this.pluck("nextElementSibling"))},html:function(b){return b===a?this.length>0?this[0].innerHTML:null:this.each(function(a){var d=this.innerHTML;c(this).empty().append(M(this,b,a,d))})},text:function(b){return b===a?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=b})},attr:function(c,d){var e;return typeof c=="string"&&d===a?this.length==0||this[0].nodeType!==1?a:c=="value"&&this[0].nodeName=="INPUT"?this.val():!(e=this[0].getAttribute(c))&&c in this[0]?this[0][c]:e:this.each(function(a){if(this.nodeType!==1)return;if(B(c))for(b in c)this.setAttribute(b,c[b]);else this.setAttribute(c,M(this,d,a,this.getAttribute(c)))})},removeAttr:function(a){return this.each(function(){this.nodeType===1&&this.removeAttribute(a)})},prop:function(b,c){return c===a?this[0]?this[0][b]:a:this.each(function(a){this[b]=M(this,c,a,this[b])})},data:function(b,c){var d=this.attr("data-"+H(b),c);return d!==null?d:a},val:function(b){return b===a?this.length>0?this[0].value:a:this.each(function(a){this.value=M(this,b,a,this.value)})},offset:function(){if(this.length==0)return null;var a=this[0].getBoundingClientRect();return{left:a.left+window.pageXOffset,top:a.top+window.pageYOffset,width:a.width,height:a.height}},css:function(c,d){if(d===a&&typeof c=="string")return this.length==0?a:this[0].style[x(c)]||j(this[0],"").getPropertyValue(c);var e="";for(b in c)typeof c[b]=="string"&&c[b]==""?this.each(function(){this.style.removeProperty(H(b))}):e+=H(b)+":"+J(b,c[b])+";";return typeof c=="string"&&(d==""?this.each(function(){this.style.removeProperty(H(c))}):e=H(c)+":"+J(c,d)),this.each(function(){this.style.cssText+=";"+e})},index:function(a){return a?this.indexOf(c(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return this.length<1?!1:I(a).test(this[0].className)},addClass:function(a){return this.each(function(b){d=[];var e=this.className,f=M(this,a,b,e);f.split(/\s+/g).forEach(function(a){c(this).hasClass(a)||d.push(a)},this),d.length&&(this.className+=(e?" ":"")+d.join(" "))})},removeClass:function(b){return this.each(function(c){if(b===a)return this.className="";d=this.className,M(this,b,c,d).split(/\s+/g).forEach(function(a){d=d.replace(I(a)," ")}),this.className=d.trim()})},toggleClass:function(b,d){return this.each(function(e){var f=M(this,b,e,this.className);(d===a?!c(this).hasClass(f):d)?c(this).addClass(f):c(this).removeClass(f)})}},["width","height"].forEach(function(b){c.fn[b]=function(d){var e,f=b.replace(/./,function(a){return a[0].toUpperCase()});return d===a?this[0]==window?window["inner"+f]:this[0]==g?g.documentElement["offset"+f]:(e=this.offset())&&e[b]:this.each(function(a){var e=c(this);e.css(b,M(this,d,a,e[b]()))})}}),n.forEach(function(a,b){c.fn[a]=function(){var a=c.map(arguments,function(a){return B(a)?a:w.fragment(a)});if(a.length<1)return this;var d=this.length,e=d>1,f=b<2;return this.each(function(c,g){for(var h=0;h<a.length;h++){var i=a[f?a.length-h-1:h];O(i,function(a){a.nodeName!=null&&a.nodeName.toUpperCase()==="SCRIPT"&&(!a.type||a.type==="text/javascript")&&window.eval.call(window,a.innerHTML)}),e&&c<d-1&&(i=i.cloneNode(!0)),N(b,g,i)}})},c.fn[b%2?a+"To":"insert"+(b?"Before":"After")]=function(b){return c(b)[a](this),this}}),w.Z.prototype=c.fn,w.camelize=x,w.uniq=y,c.zepto=w,c}();window.Zepto=Zepto,"$"in window||(window.$=Zepto),function(a){function f(a){return a._zid||(a._zid=d++)}function g(a,b,d,e){b=h(b);if(b.ns)var g=i(b.ns);return(c[f(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||g.test(a.ns))&&(!d||f(a.fn)===f(d))&&(!e||a.sel==e)})}function h(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function i(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function j(b,c,d){a.isObject(b)?a.each(b,d):b.split(/\s/).forEach(function(a){d(a,c)})}function k(b,d,e,g,i,k){k=!!k;var l=f(b),m=c[l]||(c[l]=[]);j(d,e,function(c,d){var e=i&&i(d,c),f=e||d,j=function(a){var c=f.apply(b,[a].concat(a.data));return c===!1&&a.preventDefault(),c},l=a.extend(h(c),{fn:d,proxy:j,sel:g,del:e,i:m.length});m.push(l),b.addEventListener(l.e,j,k)})}function l(a,b,d,e){var h=f(a);j(b||"",d,function(b,d){g(a,b,d,e).forEach(function(b){delete c[h][b.i],a.removeEventListener(b.e,b.proxy,!1)})})}function p(b){var c=a.extend({originalEvent:b},b);return a.each(o,function(a,d){c[a]=function(){return this[d]=m,b[a].apply(b,arguments)},c[d]=n}),c}function q(a){if(!("defaultPrevented"in a)){a.defaultPrevented=!1;var b=a.preventDefault;a.preventDefault=function(){this.defaultPrevented=!0,b.call(this)}}}var b=a.zepto.qsa,c={},d=1,e={};e.click=e.mousedown=e.mouseup=e.mousemove="MouseEvents",a.event={add:k,remove:l},a.proxy=function(b,c){if(a.isFunction(b)){var d=function(){return b.apply(c,arguments)};return d._zid=f(b),d}if(typeof c=="string")return a.proxy(b[c],b);throw new TypeError("expected function")},a.fn.bind=function(a,b){return this.each(function(){k(this,a,b)})},a.fn.unbind=function(a,b){return this.each(function(){l(this,a,b)})},a.fn.one=function(a,b){return this.each(function(c,d){k(this,a,b,null,function(a,b){return function(){var c=a.apply(d,arguments);return l(d,b,a),c}})})};var m=function(){return!0},n=function(){return!1},o={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(b,c,d){var e=!1;if(c=="blur"||c=="focus")a.iswebkit?c=c=="blur"?"focusout":c=="focus"?"focusin":c:e=!0;return this.each(function(f,g){k(g,c,d,b,function(c){return function(d){var e,f=a(d.target).closest(b,g).get(0);if(f)return e=a.extend(p(d),{currentTarget:f,liveFired:g}),c.apply(f,[e].concat([].slice.call(arguments,1)))}},e)})},a.fn.undelegate=function(a,b,c){return this.each(function(){l(this,b,c,a)})},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,d){return c==undefined||a.isFunction(c)?this.bind(b,c):this.delegate(c,b,d)},a.fn.off=function(b,c,d){return c==undefined||a.isFunction(c)?this.unbind(b,c):this.undelegate(c,b,d)},a.fn.trigger=function(b,c){return typeof b=="string"&&(b=a.Event(b)),q(b),b.data=c,this.each(function(){"dispatchEvent"in this&&this.dispatchEvent(b)})},a.fn.triggerHandler=function(b,c){var d,e;return this.each(function(f,h){d=p(typeof b=="string"?a.Event(b):b),d.data=c,d.target=h,a.each(g(h,b.type||b),function(a,b){e=b.proxy(d);if(d.isImmediatePropagationStopped())return!1})}),e},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return this.bind(b,a)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){if(a)this.bind(b,a);else if(this.length)try{this.get(0)[b]()}catch(c){}return this}}),a.Event=function(a,b){var c=document.createEvent(e[a]||"Events"),d=!0;if(b)for(var f in b)f=="bubbles"?d=!!b[f]:c[f]=b[f];return c.initEvent(a,d,!0,null,null,null,null,null,null,null,null,null,null,null,null),c}}(Zepto),function(a){function b(a){var b=this.os={},c=this.browser={},d=a.match(/WebKit\/([\d.]+)/),e=a.match(/(Android)\s+([\d.]+)/),f=a.match(/(iPad).*OS\s([\d_]+)/),g=!f&&a.match(/(iPhone\sOS)\s([\d_]+)/),h=a.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),i=h&&a.match(/TouchPad/),j=a.match(/Kindle\/([\d.]+)/),k=a.match(/Silk\/([\d._]+)/),l=a.match(/(BlackBerry).*Version\/([\d.]+)/);if(c.webkit=!!d)c.version=d[1];e&&(b.android=!0,b.version=e[2]),g&&(b.ios=b.iphone=!0,b.version=g[2].replace(/_/g,".")),f&&(b.ios=b.ipad=!0,b.version=f[2].replace(/_/g,".")),h&&(b.webos=!0,b.version=h[2]),i&&(b.touchpad=!0),l&&(b.blackberry=!0,b.version=l[2]),j&&(b.kindle=!0,b.version=j[1]),k&&(c.silk=!0,c.version=k[1]),!k&&b.android&&a.match(/Kindle Fire/)&&(c.silk=!0)}b.call(a,navigator.userAgent),a.__detect=b}(Zepto),function(a,b){function l(a){return a.toLowerCase()}function m(a){return d?d+a:l(a)}var c="",d,e,f,g={Webkit:"webkit",Moz:"",O:"o",ms:"MS"},h=window.document,i=h.createElement("div"),j=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,k={};a.each(g,function(a,e){if(i.style[a+"TransitionProperty"]!==b)return c="-"+l(a)+"-",d=e,!1}),k[c+"transition-property"]=k[c+"transition-duration"]=k[c+"transition-timing-function"]=k[c+"animation-name"]=k[c+"animation-duration"]="",a.fx={off:d===b&&i.style.transitionProperty===b,cssPrefix:c,transitionEnd:m("TransitionEnd"),animationEnd:m("AnimationEnd")},a.fn.animate=function(b,c,d,e){return a.isObject(c)&&(d=c.easing,e=c.complete,c=c.duration),c&&(c/=1e3),this.anim(b,c,d,e)},a.fn.anim=function(d,e,f,g){var h,i={},l,m=this,n,o=a.fx.transitionEnd;e===b&&(e=.4),a.fx.off&&(e=0);if(typeof d=="string")i[c+"animation-name"]=d,i[c+"animation-duration"]=e+"s",o=a.fx.animationEnd;else{for(l in d)j.test(l)?(h||(h=[]),h.push(l+"("+d[l]+")")):i[l]=d[l];h&&(i[c+"transform"]=h.join(" ")),!a.fx.off&&typeof d=="object"&&(i[c+"transition-property"]=Object.keys(d).join(", "),i[c+"transition-duration"]=e+"s",i[c+"transition-timing-function"]=f||"linear")}return n=function(b){if(typeof b!="undefined"){if(b.target!==b.currentTarget)return;a(b.target).unbind(o,arguments.callee)}a(this).css(k),g&&g.call(this)},e>0&&this.bind(o,n),setTimeout(function(){m.css(i),e<=0&&setTimeout(function(){m.each(function(){n.call(this)})},0)},0),this},i=null}(Zepto),function($){function triggerAndReturn(a,b,c){var d=$.Event(b);return $(a).trigger(d,c),!d.defaultPrevented}function triggerGlobal(a,b,c,d){if(a.global)return triggerAndReturn(b||document,c,d)}function ajaxStart(a){a.global&&$.active++===0&&triggerGlobal(a,null,"ajaxStart")}function ajaxStop(a){a.global&&!--$.active&&triggerGlobal(a,null,"ajaxStop")}function ajaxBeforeSend(a,b){var c=b.context;if(b.beforeSend.call(c,a,b)===!1||triggerGlobal(b,c,"ajaxBeforeSend",[a,b])===!1)return!1;triggerGlobal(b,c,"ajaxSend",[a,b])}function ajaxSuccess(a,b,c){var d=c.context,e="success";c.success.call(d,a,e,b),triggerGlobal(c,d,"ajaxSuccess",[b,c,a]),ajaxComplete(e,b,c)}function ajaxError(a,b,c,d){var e=d.context;d.error.call(e,c,b,a),triggerGlobal(d,e,"ajaxError",[c,d,a]),ajaxComplete(b,c,d)}function ajaxComplete(a,b,c){var d=c.context;c.complete.call(d,b,a),triggerGlobal(c,d,"ajaxComplete",[b,c]),ajaxStop(c)}function empty(){}function mimeToDataType(a){return a&&(a==htmlType?"html":a==jsonType?"json":scriptTypeRE.test(a)?"script":xmlTypeRE.test(a)&&"xml")||"text"}function appendQuery(a,b){return(a+"&"+b).replace(/[&?]{1,2}/,"?")}function serializeData(a){isObject(a.data)&&(a.data=$.param(a.data)),a.data&&(!a.type||a.type.toUpperCase()=="GET")&&(a.url=appendQuery(a.url,a.data))}function serialize(a,b,c,d){var e=$.isArray(b);$.each(b,function(b,f){d&&(b=c?d:d+"["+(e?"":b)+"]"),!d&&e?a.add(f.name,f.value):(c?$.isArray(f):isObject(f))?serialize(a,f,c,b):a.add(b,f)})}var jsonpID=0,isObject=$.isObject,document=window.document,key,name,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,scriptTypeRE=/^(?:text|application)\/javascript/i,xmlTypeRE=/^(?:text|application)\/xml/i,jsonType="application/json",htmlType="text/html",blankRE=/^\s*$/;$.active=0,$.ajaxJSONP=function(a){var b="jsonp"+ ++jsonpID,c=document.createElement("script"),d=function(){$(c).remove(),b in window&&(window[b]=empty),ajaxComplete("abort",e,a)},e={abort:d},f;return a.error&&(c.onerror=function(){e.abort(),a.error()}),window[b]=function(d){clearTimeout(f),$(c).remove(),delete window[b],ajaxSuccess(d,e,a)},serializeData(a),c.src=a.url.replace(/=\?/,"="+b),$("head").append(c),a.timeout>0&&(f=setTimeout(function(){e.abort(),ajaxComplete("timeout",e,a)},a.timeout)),e},$.ajaxSettings={type:"GET",beforeSend:empty,success:empty,error:empty,complete:empty,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript",json:jsonType,xml:"application/xml, text/xml",html:htmlType,text:"text/plain"},crossDomain:!1,timeout:0},$.ajax=function(options){var settings=$.extend({},options||{});for(key in $.ajaxSettings)settings[key]===undefined&&(settings[key]=$.ajaxSettings[key]);ajaxStart(settings),settings.crossDomain||(settings.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(settings.url)&&RegExp.$2!=window.location.host);var dataType=settings.dataType,hasPlaceholder=/=\?/.test(settings.url);if(dataType=="jsonp"||hasPlaceholder)return hasPlaceholder||(settings.url=appendQuery(settings.url,"callback=?")),$.ajaxJSONP(settings);settings.url||(settings.url=window.location.toString()),serializeData(settings);var mime=settings.accepts[dataType],baseHeaders={},protocol=/^([\w-]+:)\/\//.test(settings.url)?RegExp.$1:window.location.protocol,xhr=$.ajaxSettings.xhr(),abortTimeout;settings.crossDomain||(baseHeaders["X-Requested-With"]="XMLHttpRequest"),mime&&(baseHeaders.Accept=mime,mime.indexOf(",")>-1&&(mime=mime.split(",",2)[0]),xhr.overrideMimeType&&xhr.overrideMimeType(mime));if(settings.contentType||settings.data&&settings.type.toUpperCase()!="GET")baseHeaders["Content-Type"]=settings.contentType||"application/x-www-form-urlencoded";settings.headers=$.extend(baseHeaders,settings.headers||{}),xhr.onreadystatechange=function(){if(xhr.readyState==4){clearTimeout(abortTimeout);var result,error=!1;if(xhr.status>=200&&xhr.status<300||xhr.status==304||xhr.status==0&&protocol=="file:"){dataType=dataType||mimeToDataType(xhr.getResponseHeader("content-type")),result=xhr.responseText;try{dataType=="script"?(1,eval)(result):dataType=="xml"?result=xhr.responseXML:dataType=="json"&&(result=blankRE.test(result)?null:JSON.parse(result))}catch(e){error=e}error?ajaxError(error,"parsererror",xhr,settings):ajaxSuccess(result,xhr,settings)}else ajaxError(null,"error",xhr,settings)}};var async="async"in settings?settings.async:!0;xhr.open(settings.type,settings.url,async);for(name in settings.headers)xhr.setRequestHeader(name,settings.headers[name]);return ajaxBeforeSend(xhr,settings)===!1?(xhr.abort(),!1):(settings.timeout>0&&(abortTimeout=setTimeout(function(){xhr.onreadystatechange=empty,xhr.abort(),ajaxError(null,"timeout",xhr,settings)},settings.timeout)),xhr.send(settings.data?settings.data:null),xhr)},$.get=function(a,b){return $.ajax({url:a,success:b})},$.post=function(a,b,c,d){return $.isFunction(b)&&(d=d||c,c=b,b=null),$.ajax({type:"POST",url:a,data:b,success:c,dataType:d})},$.getJSON=function(a,b){return $.ajax({url:a,success:b,dataType:"json"})},$.fn.load=function(a,b){if(!this.length)return this;var c=this,d=a.split(/\s/),e;return d.length>1&&(a=d[0],e=d[1]),$.get(a,function(a){c.html(e?$(document.createElement("div")).html(a.replace(rscript,"")).find(e).html():a),b&&b.call(c)}),this};var escape=encodeURIComponent;$.param=function(a,b){var c=[];return c.add=function(a,b){this.push(escape(a)+"="+escape(b))},serialize(c,a,b),c.join("&").replace("%20","+")}}(Zepto),function(a){a.fn.serializeArray=function(){var b=[],c;return a(Array.prototype.slice.call(this.get(0).elements)).each(function(){c=a(this);var d=c.attr("type");this.nodeName.toLowerCase()!="fieldset"&&!this.disabled&&d!="submit"&&d!="reset"&&d!="button"&&(d!="radio"&&d!="checkbox"||this.checked)&&b.push({name:c.attr("name"),value:c.val()})}),b},a.fn.serialize=function(){var a=[];return this.serializeArray().forEach(function(b){a.push(encodeURIComponent(b.name)+"="+encodeURIComponent(b.value))}),a.join("&")},a.fn.submit=function(b){if(b)this.bind("submit",b);else if(this.length){var c=a.Event("submit");this.eq(0).trigger(c),c.defaultPrevented||this.get(0).submit()}return this}}(Zepto),function(a){function d(a){return"tagName"in a?a:a.parentNode}function e(a,b,c,d){var e=Math.abs(a-b),f=Math.abs(c-d);return e>=f?a-b>0?"Left":"Right":c-d>0?"Up":"Down"}function h(){g=null,b.last&&(b.el.trigger("longTap"),b={})}function i(){g&&clearTimeout(g),g=null}var b={},c,f=750,g;a(document).ready(function(){var j,k;a(document.body).bind("touchstart",function(e){j=Date.now(),k=j-(b.last||j),b.el=a(d(e.touches[0].target)),c&&clearTimeout(c),b.x1=e.touches[0].pageX,b.y1=e.touches[0].pageY,k>0&&k<=250&&(b.isDoubleTap=!0),b.last=j,g=setTimeout(h,f)}).bind("touchmove",function(a){i(),b.x2=a.touches[0].pageX,b.y2=a.touches[0].pageY}).bind("touchend",function(a){i(),b.isDoubleTap?(b.el.trigger("doubleTap"),b={}):b.x2&&Math.abs(b.x1-b.x2)>30||b.y2&&Math.abs(b.y1-b.y2)>30?(b.el.trigger("swipe")&&b.el.trigger("swipe"+e(b.x1,b.x2,b.y1,b.y2)),b={}):"last"in b&&(b.el.trigger("tap"),c=setTimeout(function(){c=null,b.el.trigger("singleTap"),b={}},250))}).bind("touchcancel",function(){c&&clearTimeout(c),g&&clearTimeout(g),g=c=null,b={}})}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(b){a.fn[b]=function(a){return this.bind(b,a)}})}(Zepto);
View
92 build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="FeedListActivity" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- if sdk.dir was not set from one of the property file, then
+ get it from the ANDROID_HOME env var.
+ This must be done before we load project.properties since
+ the proguard config can use sdk.dir -->
+ <property environment="env" />
+ <condition property="sdk.dir" value="${env.ANDROID_HOME}">
+ <isset property="env.ANDROID_HOME" />
+ </condition>
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
+ unless="sdk.dir"
+ />
+
+ <!--
+ Import per project custom build rules if present at the root of the project.
+ This is the place to put custom intermediary targets such as:
+ -pre-build
+ -pre-compile
+ -post-compile (This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir})
+ -post-package
+ -post-build
+ -pre-clean
+ -->
+ <import file="custom_rules.xml" optional="true" />
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
View
BIN libs/android-query.jar
Binary file not shown.
View
BIN libs/android-support-v4.jar
Binary file not shown.
View
BIN libs/bugsense-1.9.jar
Binary file not shown.
View
BIN libs/gson-2.2.2-javadoc.jar
Binary file not shown.
View
BIN libs/gson-2.2.2-sources.jar
Binary file not shown.
View
BIN libs/gson-2.2.2.jar
Binary file not shown.
View
BIN libs/libGoogleAnalytics.jar
Binary file not shown.
View
BIN libs/urbanairship-lib-1.1.4.jar
Binary file not shown.
View
20 proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
View
19 project.properties
@@ -0,0 +1,19 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+
+target=android-16
+android.library.reference.1=contrib/actionbarsherlock/library
+android.library.reference.2=contrib/viewpagerindicator/library
+android.library.reference.3=contrib/android-undergarment
+
View
26 res/anim/slide_out_left.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/slide_out_left.xml
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <translate android:fromXDelta="0" android:toXDelta="-50%p"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+ <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+</set>
View
6 res/color/primary_feed_text.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:color="@color/feed_item_text_focused"/>
+ <item android:state_selected="true" android:color="@color/feed_item_text_focused"/>
+ <item android:color="@color/feed_item_text_normal"/>
+</selector>
View
BIN res/drawable-hdpi/ab_bottom_solid_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ab_solid_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ab_stacked_solid_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ab_transparent_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/btn_default_focused_holo_dark.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/btn_default_normal_holo_dark.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ic_favorite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ic_menu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ic_menu_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/ic_unfavorite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/list_focused_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/logo_wh.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/menu_dropdown_panel_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/menu_hardkey_panel_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/progress_bg_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/progress_primary_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/progress_secondary_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/spinner_ab_default_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/spinner_ab_disabled_whitehouse.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/spinner_ab_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/spinner_ab_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/tab_selected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/tab_selected_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/tab_selected_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/tab_unselected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-hdpi/tab_unselected_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-ldpi/ic_launcher.png
Diff not rendered.
View
BIN res/drawable-mdpi/ab_bottom_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/ab_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/ab_stacked_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/ab_transparent_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/btn_default_focused_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/btn_default_normal_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/ic_favorite.png
Diff not rendered.
View
BIN res/drawable-mdpi/ic_launcher.png
Diff not rendered.
View
BIN res/drawable-mdpi/ic_menu.png
Diff not rendered.
View
BIN res/drawable-mdpi/ic_menu_search.png
Diff not rendered.
View
BIN res/drawable-mdpi/ic_unfavorite.png
Diff not rendered.
View
BIN res/drawable-mdpi/list_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/logo_wh.png
Diff not rendered.
View
BIN res/drawable-mdpi/menu_dropdown_panel_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/menu_hardkey_panel_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/progress_bg_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/progress_primary_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/progress_secondary_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/spinner_ab_default_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/spinner_ab_disabled_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/spinner_ab_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/spinner_ab_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/tab_selected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/tab_selected_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/tab_selected_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/tab_unselected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-mdpi/tab_unselected_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ab_bottom_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ab_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ab_stacked_solid_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ab_transparent_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/btn_default_focused_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/btn_default_normal_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ic_favorite.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ic_launcher.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ic_menu.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ic_menu_search.png
Diff not rendered.
View
BIN res/drawable-xhdpi/ic_unfavorite.png
Diff not rendered.
View
BIN res/drawable-xhdpi/list_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/logo_wh.png
Diff not rendered.
View
BIN res/drawable-xhdpi/menu_dropdown_panel_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/menu_hardkey_panel_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/progress_bg_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/progress_primary_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/progress_secondary_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/spinner_ab_default_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/spinner_ab_disabled_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/spinner_ab_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/spinner_ab_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/tab_selected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/tab_selected_pressed_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/tab_selected_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/tab_unselected_focused_whitehouse.9.png
Diff not rendered.
View
BIN res/drawable-xhdpi/tab_unselected_pressed_whitehouse.9.png
Diff not rendered.
View
9 res/drawable/ab_background.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <gradient
+ android:startColor="@color/wh_blue_light"
+ android:centerColor="@color/wh_blue"
+ android:endColor="@color/wh_blue"
+ android:angle="270"
+ android:type="linear"/>
+</shape>
View
13 res/drawable/btn_dashboard_search_background.xml
@@ -0,0 +1,13 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"
+ android:state_window_focused="false"/>
+ <item android:drawable="@drawable/btn_default_disabled_holo_dark" android:state_enabled="false"
+ android:state_window_focused="false"/>
+ <item android:drawable="@drawable/btn_default_pressed_holo_dark" android:state_pressed="true"/>
+ <item android:drawable="@drawable/btn_default_focused_holo_dark" android:state_enabled="true"
+ android:state_focused="true"/>
+ <item android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"/>
+ <item android:drawable="@drawable/btn_default_disabled_focused_holo_dark"
+ android:state_focused="true"/>
+ <item android:drawable="@drawable/btn_default_disabled_holo_dark"/>
+</selector>
View
8 res/drawable/dashboard_item_selector.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@color/dashboard_item_focused"/>
+ <item android:state_pressed="true" android:drawable="@color/dashboard_item_focused"/>
+ <item android:drawable="@color/dashboard_item_normal"/>
+</selector>
View
9 res/drawable/details_shadow.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient android:angle="180"
+ android:type="linear"
+ android:startColor="#e4e4e4"
+ android:centerColor="#ffffff"
+ android:endColor="#e4e4e4"/>
+</shape>
View
26 res/drawable/feed_item_selector.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+ <!--
+ yes, these shapes are necessary to avoid drawing the selector
+ over the entire list on 2.2, etc.
+
+ http://stackoverflow.com/questions/2183447/listselector-applies-to-the-entire-list
+ -->
+ <item android:state_pressed="false" android:state_focused="true">
+ <shape>
+ <solid android:color="@color/feed_item_focused" />
+ </shape>
+ </item>
+ <item android:state_pressed="true">
+ <shape>
+ <solid android:color="@color/feed_item_focused" />
+ </shape>
+ </item>
+ <item android:state_selected="true">
+ <shape>
+ <solid android:color="@color/feed_item_focused" />
+ </shape>
+ </item>
+ <item android:drawable="@color/feed_item_normal"/>
+</selector>
View
9 res/drawable/feed_row_date_gradient.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient android:angle="270"
+ android:type="linear"
+ android:startColor="#ffffff"
+ android:centerColor="#ffffff"
+ android:endColor="#eeeeee"/>
+</shape>
View
8 res/drawable/feedrow_bottom_gradient.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient android:angle="270"
+ android:type="linear"
+ android:startColor="#2a333333"
+ android:endColor="#00333333"/>
+</shape>
View
9 res/drawable/photos_background.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <gradient android:type="radial"
+ android:startColor="#66ffffff"
+ android:endColor="#33ffffff"
+ android:centerX="50%"
+ android:centerY="50%"
+ android:gradientRadius="500"/>
+</shape>
View
BIN res/drawable/presidential_seal.png
Diff not rendered.
View
21 res/drawable/pressed_background_whitehouse.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- File created by the Android Action Bar Style Generator
+
+ Copyright (C) 2012 readyState Software Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <solid android:color="@color/pressed_whitehouse"/>
+</shape>
View
34 res/drawable/progress_horizontal_whitehouse.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- File created by the Android Action Bar Style Generator
+
+ Copyright (C) 2012 readyState Software Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background"
+ android:drawable="@drawable/progress_bg_whitehouse"/>
+
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/progress_secondary_whitehouse"/>
+ </item>
+
+ <item android:id="@android:id/progress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/progress_primary_whitehouse"/>
+ </item>
+
+</layer-list>
View
25 res/drawable/selectable_background_whitehouse.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- File created by the Android Action Bar Style Generator
+
+ Copyright (C) 2012 readyState Software Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/list_focused_whitehouse"/>
+ <item android:state_pressed="true" android:drawable="@drawable/pressed_background_whitehouse"/>
+ <item android:drawable="@android:color/transparent"/>
+</selector>
View
27 res/drawable/spinner_background_ab_whitehouse.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- File created by the Android Action Bar Style Generator
+
+ Copyright (C) 2012 readyState Software Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/spinner_ab_disabled_whitehouse"/>
+ <item android:state_pressed="true"
+ android:drawable="@drawable/spinner_ab_pressed_whitehouse"/>
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/spinner_ab_focused_whitehouse"/>
+ <item android:drawable="@drawable/spinner_ab_default_whitehouse"/>
+</selector>
View
44 res/drawable/tab_indicator_ab_whitehouse.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- File created by the Android Action Bar Style Generator
+
+ Copyright (C) 2012 readyState Software Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Non focused states -->
+ <item android:state_focused="false" android:state_selected="false" android:state_pressed="false"
+ android:drawable="@android:color/transparent"/>
+ <item android:state_focused="false" android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/tab_selected_whitehouse"/>
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="false"
+ android:drawable="@drawable/tab_unselected_focused_whitehouse"/>
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/tab_selected_focused_whitehouse"/>
+
+ <!-- Pressed -->
+ <!-- Non focused states -->
+ <item android:state_focused="false" android:state_selected="false" android:state_pressed="true"
+ android:drawable="@drawable/tab_unselected_pressed_whitehouse"/>
+ <item android:state_focused="false" android:state_selected="true" android:state_pressed="true"
+ android:drawable="@drawable/tab_selected_pressed_whitehouse"/>
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="true"
+ android:drawable="@drawable/tab_unselected_pressed_whitehouse"/>
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="true"
+ android:drawable="@drawable/tab_selected_pressed_whitehouse"/>
+</selector>
View
26 res/layout-sw600dp-land/main.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+ <FrameLayout android:id="@+id/main_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="#eeeeee"/>
+ <LinearLayout android:id="@+id/details_shadow"
+ android:layout_width="5dp"
+ android:layout_height="match_parent"
+ android:background="@drawable/details_shadow"/>
+ <FrameLayout android:id="@+id/details_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="2"
+ android:background="#dddddd">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="Select an item to view it in this pane with more detail."/>
+ </FrameLayout>
+</LinearLayout>
View
22 res/layout-sw600dp-land/videos_fragment.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center">
+ <ProgressBar android:id="@+id/progress"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:indeterminateOnly="true"
+ style="@style/Widget.Sherlock.ProgressBar"
+ android:visibility="gone"/>
+ <GridView android:id="@+id/gv_videos"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:horizontalSpacing="10dp"
+ android:verticalSpacing="10dp"
+ android:stretchMode="columnWidth"
+ android:numColumns="2"
+ android:padding="10dp"
+ android:scrollbarStyle="outsideOverlay"
+ android:gravity="center"/>
+</LinearLayout>
View
26 res/layout-sw720dp/main.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+ <FrameLayout android:id="@+id/main_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="#eeeeee"/>
+ <LinearLayout android:id="@+id/details_shadow"
+ android:layout_width="5dp"
+ android:layout_height="match_parent"
+ android:background="@drawable/details_shadow"/>
+ <FrameLayout android:id="@+id/details_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="2"
+ android:background="#dddddd">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="Select an item to view it in this pane with more detail."/>
+ </FrameLayout>
+</LinearLayout>
View
22 res/layout-sw720dp/videos_fragment.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center">
+ <ProgressBar android:id="@+id/progress"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:indeterminateOnly="true"
+ style="@style/Widget.Sherlock.ProgressBar"
+ android:visibility="gone"/>
+ <GridView android:id="@+id/gv_videos"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:horizontalSpacing="10dp"
+ android:verticalSpacing="10dp"
+ android:stretchMode="columnWidth"
+ android:numColumns="2"
+ android:padding="10dp"
+ android:scrollbarStyle="outsideOverlay"
+ android:gravity="center"/>
+</LinearLayout>
View
22 res/layout-w500dp/videos_fragment.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center">
+ <ProgressBar android:id="@+id/progress"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:indeterminateOnly="true"
+ style="@style/Widget.Sherlock.ProgressBar"
+ android:visibility="gone"/>
+ <GridView android:id="@+id/gv_videos"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:horizontalSpacing="10dp"
+ android:verticalSpacing="10dp"
+ android:stretchMode="columnWidth"
+ android:numColumns="2"
+ android:padding="10dp"
+ android:scrollbarStyle="outsideOverlay"
+ android:gravity="center"/>
+</LinearLayout>
View
16 res/layout/article_view.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"