Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add wh-app-android files.

  • Loading branch information...
commit cfdffe82180ce07116815e1ed44d4c6f505a0fc3 1 parent d861525
The White House WH-NewMedia authored bryanhirsch committed

Showing 212 changed files with 8,548 additions and 0 deletions. Show diff stats Hide diff stats

  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
25 .gitignore
... ... @@ -0,0 +1,25 @@
  1 +# built application files
  2 +*.apk
  3 +*.ap_
  4 +
  5 +# files for the dex VM
  6 +*.dex
  7 +
  8 +# Java class files
  9 +*.class
  10 +
  11 +# generated files
  12 +bin/
  13 +gen/
  14 +out/
  15 +
  16 +# Local configuration file (sdk path, etc)
  17 +local.properties
  18 +
  19 +# Eclipse project files
  20 +.classpath
  21 +.project
  22 +
  23 +# IntelliJ project files
  24 +.idea/
  25 +*.iml
11 .gitmodules
... ... @@ -0,0 +1,11 @@
  1 +[submodule "contrib/actionbarsherlock"]
  2 + path = contrib/actionbarsherlock
  3 + url = git://github.com/JakeWharton/ActionBarSherlock.git
  4 + ignore = dirty
  5 +[submodule "contrib/viewpagerindicator"]
  6 + path = contrib/viewpagerindicator
  7 + url = git://github.com/JakeWharton/Android-ViewPagerIndicator.git
  8 + ignore = dirty
  9 +[submodule "contrib/android-undergarment"]
  10 + path = contrib/android-undergarment
  11 + url = git://github.com/eddieringle/android-undergarment.git
61 AndroidManifest.xml
... ... @@ -0,0 +1,61 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3 + package="gov.whitehouse"
  4 + android:versionCode="2"
  5 + android:versionName="2.0" >
  6 + <!--
  7 + The package name MUST be changed if you intend to fork and customize this app. The most
  8 + efficient way to do this is to use an IDE with refactoring support to rename the entire
  9 + package in all places and move the files into the new package directory.
  10 + -->
  11 +
  12 + <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
  13 + <uses-permission android:name="android.permission.INTERNET" />
  14 + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  15 + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
  16 + <uses-permission android:name="android.permission.VIBRATE" />
  17 + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  18 + <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  19 +
  20 + <application android:name=".ui.WhiteHouseApplication"
  21 + android:icon="@drawable/ic_launcher"
  22 + android:theme="@style/Theme.WhiteHouse"
  23 + android:label="@string/app_name">
  24 + <activity android:name=".ui.activities.app.HomeActivity" android:label="Your App Label">
  25 + <intent-filter>
  26 + <action android:name="android.intent.action.MAIN" />
  27 + <category android:name="android.intent.category.LAUNCHER" />
  28 + </intent-filter>
  29 + </activity>
  30 + <activity android:name=".ui.activities.app.ArticleListActivity" />
  31 + <activity android:name=".ui.activities.app.PhotoGalleryActivity" />
  32 + <activity android:name=".ui.activities.app.VideoGalleryActivity" />
  33 + <activity android:name=".ui.activities.app.LiveFeedActivity" />
  34 + <activity android:name=".ui.activities.app.FavoritesActivity" />
  35 + <activity android:name=".ui.activities.app.ArticleViewerActivity" />
  36 + <activity android:name=".ui.activities.app.VideoPlayerActivity"
  37 + android:screenOrientation="landscape" />
  38 + <activity android:name=".ui.activities.app.WHPreferencesActivity" />
  39 +
  40 + <receiver android:name="com.urbanairship.CoreReceiver">
  41 + <intent-filter>
  42 + <action android:name="android.intent.action.BOOT_COMPLETED" />
  43 + <action android:name="android.intent.action.ACTION_SHUTDOWN" />
  44 + </intent-filter>
  45 + </receiver>
  46 + <receiver android:name=".receivers.BootReceiver">
  47 + <intent-filter>
  48 + <action android:name="android.intent.action.BOOT_COMPLETED" />
  49 + <action android:name="android.intent.action.ACTION_SHUTDOWN" />
  50 + </intent-filter>
  51 + </receiver>
  52 +
  53 + <receiver android:name=".receivers.PushReceiver"></receiver>
  54 +
  55 + <service android:name=".services.FeedService" />
  56 + <service android:name=".services.LiveService" />
  57 + <service android:name="com.urbanairship.push.PushService"
  58 + android:process=":com.urbanairship.push.process" />
  59 + </application>
  60 +
  61 +</manifest>
136 README.md
Source Rendered
... ... @@ -0,0 +1,136 @@
  1 +# White House for Android mobile application
  2 +
  3 +A native Android (Java) app designed to fetch, cache, and display
  4 +multiple feeds containing articles, photos, and live and on demand
  5 +video. These are displayed in a web view. Includes support for push
  6 +notifications.
  7 +
  8 +This application is under active development and will continue to be
  9 +modified and improved over time.
  10 +
  11 +## Goals
  12 +
  13 +By releasing the source code for this app we hope to empower other
  14 +governments and organizations to build and release mobile apps to
  15 +engage their own citizens and constituencies. In addition, public
  16 +review and contribution to the application's code base will help
  17 +strengthen and improve the app.
  18 +
  19 +## Requirements
  20 +
  21 +1. Android 2.2 "Froyo" or higher
  22 +2. RSS feeds for content to be aggregated and displayed by the app
  23 +
  24 +## Recommended
  25 +
  26 +1. Android 3.1 "Honeycomb" or higher is required for live video streaming.
  27 +
  28 +## Usage
  29 +
  30 +Mobile developers will be able to configure the application to
  31 +retrieve and display content from arbitrary RSS feeds. The developer
  32 +will be able to configure the app to receive push
  33 +notifications. Placeholder assets may be replaced to customize the
  34 +app's look and feel.
  35 +
  36 +### Building the App
  37 +
  38 +The Android SDK for API level 16 is require to build the app.
  39 +
  40 +The White House app uses the following libraries, which are all
  41 +included as submodules in `contrib/`:
  42 +
  43 +* [ActionBarSherlock][] - action bar for older versions of Android
  44 +* [ViewPagerIndicator][] - paging indicators widgets
  45 +* [Undergarment][] - slide-out view (side nav) support library
  46 +
  47 +To initialize the submodules, run:
  48 +
  49 + git submodule update --init
  50 +
  51 +The following libraries are included as source:
  52 +
  53 +* [Zepto.js][]
  54 +* [Underscore.js][]
  55 +
  56 +### Code Style
  57 +
  58 +Contributers are expected to adhere to the official [Android
  59 +Code Style Guidelines][style].
  60 +
  61 +
  62 +NOTE: Setting up the application and configuring it for use in your
  63 +organization's context requires Android development experience. The
  64 +application ships with a similar design to what is used in the White
  65 +House for Android mobile application. The application ships with
  66 +"white label" placeholder assets that should be replaced by the
  67 +developer.
  68 +
  69 +##Roadmap
  70 +
  71 +Have an idea or question about future features for White House for
  72 +Android? Let us know by opening a ticket on GitHub, tweeting @WHWeb,
  73 +or via our tech feedback form:
  74 +http://www.whitehouse.gov/tech/feedback.
  75 +
  76 +##Contributing
  77 +
  78 +Anyone is encouraged to contribute to the project by
  79 +[forking][] and submitting
  80 +a pull request. (If you are new to GitHub, you might start with a
  81 +[basic tutorial][].)
  82 +
  83 +By contributing to this project, you grant a world-wide, royalty-free,
  84 +perpetual, irrevocable, non-exclusive, transferable license, free of
  85 +charge, to any person obtaining a copy of this software and associated
  86 +documentation files (the "Software"), to deal in the Software without
  87 +restriction, including without limitation the rights to use, copy,
  88 +modify, merge, publish, distribute, sublicense, and/or sell copies of
  89 +the Software, and to permit persons to whom the Software is furnished
  90 +to do so, subject to the conditions that any appropriate copyright
  91 +notices and this permission notice are included in all copies or
  92 +substantial portions of the Software.
  93 +
  94 +All comments, messages, pull requests, and other submissions received
  95 +through official White House pages including this GitHub page are
  96 +subject to the Presidential Records Act and may be archived. Learn
  97 +more http://WhiteHouse.gov/privacy
  98 +
  99 +## License
  100 +
  101 +This project constitutes a work of the United States Government and is
  102 +not subject to domestic copyright protection under 17 USC § 105.
  103 +
  104 +However, because the project utilizes code licensed from contributors
  105 +and other third parties, it therefore is licensed under the MIT
  106 +License. http://opensource.org/licenses/mit-license.php. Under that
  107 +license, permission is granted free of charge, to any person obtaining
  108 +a copy of this software and associated documentation files (the
  109 +"Software"), to deal in the Software without restriction, including
  110 +without limitation the rights to use, copy, modify, merge, publish,
  111 +distribute, sublicense, and/or sell copies of the Software, and to
  112 +permit persons to whom the Software is furnished to do so, subject to
  113 +the conditions that any appropriate copyright notices and this
  114 +permission notice are included in all copies or substantial portions
  115 +of the Software.
  116 +
  117 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  118 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  119 +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  120 +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  121 +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  122 +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  123 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  124 +
  125 +
  126 +
  127 +
  128 +[ActionBarSherlock]: http://actionbarsherlock.com/
  129 +[ViewPagerIndicator]: https://github.com/JakeWharton/Android-ViewPagerIndicator
  130 +[Undergarment]: https://github.com/eddieringle/android-undergarment
  131 +[Underscore.js]: http://underscorejs.org/
  132 +[Zepto.js]: http://zeptojs.com/
  133 +
  134 +[style]: http://source.android.com/source/code-style.html
  135 +[forking]: https://help.github.com/articles/fork-a-repo
  136 +[basic tutorial]: https://help.github.com/articles/set-up-git
6 assets/airshipconfig.properties
... ... @@ -0,0 +1,6 @@
  1 +transport = helium
  2 +developmentAppKey = Your development app key
  3 +developmentAppSecret = Your development app secret
  4 +productionAppKey = Your production app key
  5 +productionAppSecret = Your production app secret
  6 +inProduction = false
BIN  assets/branding.png
BIN  assets/play.png
32 assets/post.html
... ... @@ -0,0 +1,32 @@
  1 +<!doctype html>
  2 +<html>
  3 +<head>
  4 + <meta name="viewport" content="width=device-width">
  5 + <script type="text/javascript" src="file:///android_asset/zepto.min.js"></script>
  6 + <script type="text/javascript" src="file:///android_asset/underscore-min.js"></script>
  7 + <script type="text/javascript" src="file:///android_asset/wh.js"></script>
  8 + <link rel="stylesheet" type="text/css" href="file:///android_asset/wh.css"></link>
  9 +</head>
  10 +<body>
  11 + <script id="video-template" type="text/template">
  12 + <a href="http://www.youtube.com/watch?v=<%= videoId %>">
  13 + <div class="video-thumbnail">
  14 + <img class="thumbnail" src="http://img.youtube.com/vi/<%= videoId %>/0.jpg" />
  15 + <img class="play-button" src="file:///android_asset/play.png" />
  16 + </div>
  17 + </a>
  18 + </script>
  19 + <script id="template" type="text/template">
  20 + <h1><%= title %></h1>
  21 + <p class="dateline">
  22 + by <%= creator %><br />
  23 + <%= date %>
  24 + </p>
  25 + <div class="content">
  26 + <%= description %>
  27 + </div>
  28 + <div class="branding"><img src="file:///android_asset/branding.png" /></div>
  29 + </script>
  30 + <div id="article"></div>
  31 +</body>
  32 +</html>
32 assets/underscore-min.js
... ... @@ -0,0 +1,32 @@
  1 +// Underscore.js 1.3.3
  2 +// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
  3 +// Underscore is freely distributable under the MIT license.
  4 +// Portions of Underscore are inspired or borrowed from Prototype,
  5 +// Oliver Steele's Functional, and John Resig's Micro-Templating.
  6 +// For all details and documentation:
  7 +// http://documentcloud.github.com/underscore
  8 +(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==
  9 +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;
  10 +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,
  11 +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&&
  12 +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,
  13 +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,
  14 +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=
  15 +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&&
  16 +(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]};
  17 +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,
  18 +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,
  19 +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=
  20 +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<=
  21 +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=
  22 +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=
  23 +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));
  24 +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])&&
  25 +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=
  26 +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]"};
  27 +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,
  28 +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=
  29 +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||
  30 +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};
  31 +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,
  32 +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);
97 assets/wh.css
... ... @@ -0,0 +1,97 @@
  1 +body {
  2 + font-family: Arial;
  3 + font-size: 16px;
  4 + color: #333333;
  5 +}
  6 +
  7 +@media screen and (min-width: 475px) {
  8 + body {
  9 + padding: 5% 10% 5% 10%;
  10 + }
  11 +
  12 + .video-thumbnail img.thumbnail {
  13 + width: 400px;
  14 + height: 300px;
  15 + }
  16 +}
  17 +
  18 +@media screen and (max-width: 475px) {
  19 + .video-thumbnail img.thumbnail {
  20 + width: 300px;
  21 + height: 225px;
  22 + }
  23 +}
  24 +
  25 +.content img {
  26 + width: 100%;
  27 + height: auto;
  28 + display: block;
  29 +}
  30 +
  31 +.content img[width="1"] {
  32 + display:none;
  33 +}
  34 +
  35 +.content p {
  36 + line-height: 1.4;
  37 +}
  38 +
  39 +.content img + p {
  40 + color: #666666;
  41 + font-size: 14px;
  42 + line-height: 1.0;
  43 +}
  44 +
  45 +h1 {
  46 + color: black;
  47 + font-family: Georgia;
  48 + font-weight: normal;
  49 + font-size: 20px;
  50 +}
  51 +
  52 +.dateline {
  53 + color: #666666;
  54 + font-size: 14px;
  55 +}
  56 +
  57 +.dateline a {
  58 + text-decoration: none;
  59 + color: #666666;
  60 +}
  61 +
  62 +.content blockquote {
  63 + margin: 8px;
  64 + padding-left: 10px;
  65 + border-left: solid #003366 1px;
  66 +}
  67 +
  68 +div.branding {
  69 + text-align: center;
  70 + border-top: solid #CCC 1px;
  71 + padding-top: 10px;
  72 +}
  73 +
  74 +div.branding img {
  75 + width: 180px;
  76 + height: auto;
  77 +}
  78 +
  79 +div.video-thumbnail {
  80 + position: relative;
  81 +}
  82 +
  83 +div.video-thumbnail img.thumbnail {
  84 + margin-left: auto;
  85 + margin-right: auto;
  86 +}
  87 +
  88 +div.video-thumbnail img.play-button {
  89 + position: absolute;
  90 + top: 50%;
  91 + left: 50%;
  92 + width: 80px;
  93 + height: 80px;
  94 + margin-top: -40px;
  95 + margin-left: -40px;
  96 + background: none;
  97 +}
86 assets/wh.js
... ... @@ -0,0 +1,86 @@
  1 +var WhiteHouse = {
  2 + transformFontSize: function(f) {
  3 + var $target = $("div.content");
  4 + var fontSize = parseInt($target.css("font-size"));
  5 + var newFontSize = f(fontSize);
  6 + $target.css("font-size", newFontSize);
  7 + },
  8 + textUp: function() {
  9 + this.transformFontSize(function(x) {
  10 + return x + 5;
  11 + });
  12 + },
  13 + textDown: function() {
  14 + this.transformFontSize(function(x) {
  15 + if (0 < x - 5) {
  16 + return x - 5;
  17 + } else {
  18 + return x;
  19 + }
  20 + });
  21 + }
  22 +};
  23 +
  24 +WhiteHouse.loadPage = function(pageInfo) {
  25 + try {
  26 + WhiteHouse.loadPageInternal(pageInfo);
  27 + } catch (e) {
  28 + console.log("Error in loadPage: " + e.name + "; " + e.message);
  29 + }
  30 +}
  31 +
  32 +
  33 +WhiteHouse.loadPageInternal = function(pageInfo) {
  34 + var container = $('#article');
  35 + try {
  36 + var t = _.template(document.getElementById("template").innerText);
  37 + container.html(t(pageInfo));
  38 + } catch (e) {
  39 + alert("Error in template: " + e.name + "; " + e.message);
  40 + }
  41 +
  42 + $.fn.fixLinks = function(attr) {
  43 + return this.each(function() {
  44 + var url = $(this).attr(attr);
  45 + if (url && url.indexOf("/") == 0) {
  46 + $(this).attr(attr, "http://example.com/" + url);
  47 + }
  48 + });
  49 + };
  50 +
  51 + container.find("a").fixLinks("href");
  52 + container.find("img").fixLinks("src");
  53 +
  54 + container.find("div[style]").each(function(idx, div) {
  55 + div.removeAttribute("style");
  56 + });
  57 +
  58 + var youTubeElements = [];
  59 +
  60 + console.log("[YOUTUBE HANDLING] Searching for YouTube videos in <object> and <iframe> elements");
  61 +
  62 + container.find("object param[name=movie]").each(function(idx, param) {
  63 + console.log("[YOUTUBE HANDLING] Found <param>: " + param);
  64 + var matches = $(param).attr('value').match(/youtube.*\/v\/(\w+)\b/);
  65 + if (matches) {
  66 + var el = $(param).parent();
  67 + console.log("[YOUTUBE HANDLING] Parent <object>(?) element: " + el);
  68 + youTubeElements.push({"el": el, "videoId": matches[1]});
  69 + }
  70 + });
  71 +
  72 + container.find("iframe").each(function(idx, iframe) {
  73 + console.log("[YOUTUBE HANDLING] Found iframe: " + iframe);
  74 + var matches = $(iframe).attr("src").match(/youtube.*\/embed\/(\w+)\b/);
  75 + if (matches) {
  76 + console.log("[YOUTUBE HANDLING] iframe is a YouTube video");
  77 + youTubeElements.push({"el": iframe, "videoId": matches[1]});
  78 + }
  79 + });
  80 +
  81 + for (var ii = 0; ii < youTubeElements.length; ii++) {
  82 + var obj = youTubeElements[ii];
  83 + var template = _.template($("#video-template").text());
  84 + $(obj.el).replaceWith($(template(obj)));
  85 + }
  86 +}
2  assets/zepto.min.js
... ... @@ -0,0 +1,2 @@
  1 +/* Zepto v1.0rc1 - polyfill zepto event detect fx ajax form touch - zeptojs.com/license */
  2 +(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);
92 build.xml
... ... @@ -0,0 +1,92 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project name="FeedListActivity" default="help">
  3 +
  4 + <!-- The local.properties file is created and updated by the 'android' tool.
  5 + It contains the path to the SDK. It should *NOT* be checked into
  6 + Version Control Systems. -->
  7 + <property file="local.properties" />
  8 +
  9 + <!-- The ant.properties file can be created by you. It is only edited by the
  10 + 'android' tool to add properties to it.
  11 + This is the place to change some Ant specific build properties.
  12 + Here are some properties you may want to change/update:
  13 +
  14 + source.dir
  15 + The name of the source directory. Default is 'src'.
  16 + out.dir
  17 + The name of the output directory. Default is 'bin'.
  18 +
  19 + For other overridable properties, look at the beginning of the rules
  20 + files in the SDK, at tools/ant/build.xml
  21 +
  22 + Properties related to the SDK location or the project target should
  23 + be updated using the 'android' tool with the 'update' action.
  24 +
  25 + This file is an integral part of the build system for your
  26 + application and should be checked into Version Control Systems.
  27 +
  28 + -->
  29 + <property file="ant.properties" />
  30 +
  31 + <!-- if sdk.dir was not set from one of the property file, then
  32 + get it from the ANDROID_HOME env var.
  33 + This must be done before we load project.properties since
  34 + the proguard config can use sdk.dir -->
  35 + <property environment="env" />
  36 + <condition property="sdk.dir" value="${env.ANDROID_HOME}">
  37 + <isset property="env.ANDROID_HOME" />
  38 + </condition>
  39 +
  40 + <!-- The project.properties file is created and updated by the 'android'
  41 + tool, as well as ADT.
  42 +
  43 + This contains project specific properties such as project target, and library
  44 + dependencies. Lower level build properties are stored in ant.properties
  45 + (or in .classpath for Eclipse projects).
  46 +
  47 + This file is an integral part of the build system for your
  48 + application and should be checked into Version Control Systems. -->
  49 + <loadproperties srcFile="project.properties" />
  50 +
  51 + <!-- quick check on sdk.dir -->
  52 + <fail
  53 + 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."
  54 + unless="sdk.dir"
  55 + />
  56 +
  57 + <!--
  58 + Import per project custom build rules if present at the root of the project.
  59 + This is the place to put custom intermediary targets such as:
  60 + -pre-build
  61 + -pre-compile
  62 + -post-compile (This is typically used for code obfuscation.
  63 + Compiled code location: ${out.classes.absolute.dir}
  64 + If this is not done in place, override ${out.dex.input.absolute.dir})
  65 + -post-package
  66 + -post-build
  67 + -pre-clean
  68 + -->
  69 + <import file="custom_rules.xml" optional="true" />
  70 +
  71 + <!-- Import the actual build file.
  72 +
  73 + To customize existing targets, there are two options:
  74 + - Customize only one target:
  75 + - copy/paste the target into this file, *before* the
  76 + <import> task.
  77 + - customize it to your needs.
  78 + - Customize the whole content of build.xml
  79 + - copy/paste the content of the rules files (minus the top node)
  80 + into this file, replacing the <import> task.
  81 + - customize to your needs.
  82 +
  83 + ***********************
  84 + ****** IMPORTANT ******
  85 + ***********************
  86 + In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
  87 + in order to avoid having your file be overridden by tools such as "android update project"
  88 + -->
  89 + <!-- version-tag: 1 -->
  90 + <import file="${sdk.dir}/tools/ant/build.xml" />
  91 +
  92 +</project>
BIN  libs/android-query.jar
Binary file not shown
BIN  libs/android-support-v4.jar
Binary file not shown
BIN  libs/bugsense-1.9.jar
Binary file not shown
BIN  libs/gson-2.2.2-javadoc.jar
Binary file not shown
BIN  libs/gson-2.2.2-sources.jar
Binary file not shown
BIN  libs/gson-2.2.2.jar
Binary file not shown
BIN  libs/libGoogleAnalytics.jar
Binary file not shown
BIN  libs/urbanairship-lib-1.1.4.jar
Binary file not shown
20 proguard-project.txt
... ... @@ -0,0 +1,20 @@
  1 +# To enable ProGuard in your project, edit project.properties
  2 +# to define the proguard.config property as described in that file.
  3 +#
  4 +# Add project specific ProGuard rules here.
  5 +# By default, the flags in this file are appended to flags specified
  6 +# in ${sdk.dir}/tools/proguard/proguard-android.txt
  7 +# You can edit the include path and order by changing the ProGuard
  8 +# include property in project.properties.
  9 +#
  10 +# For more details, see
  11 +# http://developer.android.com/guide/developing/tools/proguard.html
  12 +
  13 +# Add any project specific keep options here:
  14 +
  15 +# If your project uses WebView with JS, uncomment the following
  16 +# and specify the fully qualified class name to the JavaScript interface
  17 +# class:
  18 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  19 +# public *;
  20 +#}
19 project.properties
... ... @@ -0,0 +1,19 @@
  1 +# This file is automatically generated by Android Tools.
  2 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
  3 +#
  4 +# This file must be checked in Version Control Systems.
  5 +#
  6 +# To customize properties used by the Ant build system edit
  7 +# "ant.properties", and override values to adapt the script to your
  8 +# project structure.
  9 +#
  10 +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
  11 +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
  12 +
  13 +# Project target.
  14 +
  15 +target=android-16
  16 +android.library.reference.1=contrib/actionbarsherlock/library
  17 +android.library.reference.2=contrib/viewpagerindicator/library
  18 +android.library.reference.3=contrib/android-undergarment
  19 +
26 res/anim/slide_out_left.xml
... ... @@ -0,0 +1,26 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!--
  3 +/* //device/apps/common/res/anim/slide_out_left.xml
  4 +**
  5 +** Copyright 2007, The Android Open Source Project
  6 +**
  7 +** Licensed under the Apache License, Version 2.0 (the "License");
  8 +** you may not use this file except in compliance with the License.
  9 +** You may obtain a copy of the License at
  10 +**
  11 +** http://www.apache.org/licenses/LICENSE-2.0
  12 +**
  13 +** Unless required by applicable law or agreed to in writing, software
  14 +** distributed under the License is distributed on an "AS IS" BASIS,
  15 +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 +** See the License for the specific language governing permissions and
  17 +** limitations under the License.
  18 +*/
  19 +-->
  20 +
  21 +<set xmlns:android="http://schemas.android.com/apk/res/android">
  22 + <translate android:fromXDelta="0" android:toXDelta="-50%p"
  23 + android:duration="@android:integer/config_mediumAnimTime"/>
  24 + <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
  25 + android:duration="@android:integer/config_mediumAnimTime"/>
  26 +</set>
6 res/color/primary_feed_text.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <item android:state_pressed="true" android:color="@color/feed_item_text_focused"/>
  4 + <item android:state_selected="true" android:color="@color/feed_item_text_focused"/>
  5 + <item android:color="@color/feed_item_text_normal"/>
  6 +</selector>
BIN  res/drawable-hdpi/ab_bottom_solid_whitehouse.9.png
BIN  res/drawable-hdpi/ab_solid_whitehouse.9.png
BIN  res/drawable-hdpi/ab_stacked_solid_whitehouse.9.png
BIN  res/drawable-hdpi/ab_transparent_whitehouse.9.png
BIN  res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
BIN  res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
BIN  res/drawable-hdpi/btn_default_focused_holo_dark.9.png
BIN  res/drawable-hdpi/btn_default_normal_holo_dark.9.png
BIN  res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
BIN  res/drawable-hdpi/ic_favorite.png
BIN  res/drawable-hdpi/ic_launcher.png
BIN  res/drawable-hdpi/ic_menu.png
BIN  res/drawable-hdpi/ic_menu_search.png
BIN  res/drawable-hdpi/ic_unfavorite.png
BIN  res/drawable-hdpi/list_focused_whitehouse.9.png
BIN  res/drawable-hdpi/logo_wh.png
BIN  res/drawable-hdpi/menu_dropdown_panel_whitehouse.9.png
BIN  res/drawable-hdpi/menu_hardkey_panel_whitehouse.9.png
BIN  res/drawable-hdpi/progress_bg_whitehouse.9.png
BIN  res/drawable-hdpi/progress_primary_whitehouse.9.png
BIN  res/drawable-hdpi/progress_secondary_whitehouse.9.png
BIN  res/drawable-hdpi/spinner_ab_default_whitehouse.9.png
BIN  res/drawable-hdpi/spinner_ab_disabled_whitehouse.9.png
BIN  res/drawable-hdpi/spinner_ab_focused_whitehouse.9.png
BIN  res/drawable-hdpi/spinner_ab_pressed_whitehouse.9.png
BIN  res/drawable-hdpi/tab_selected_focused_whitehouse.9.png
BIN  res/drawable-hdpi/tab_selected_pressed_whitehouse.9.png
BIN  res/drawable-hdpi/tab_selected_whitehouse.9.png
BIN  res/drawable-hdpi/tab_unselected_focused_whitehouse.9.png
BIN  res/drawable-hdpi/tab_unselected_pressed_whitehouse.9.png
BIN  res/drawable-ldpi/ic_launcher.png
BIN  res/drawable-mdpi/ab_bottom_solid_whitehouse.9.png
BIN  res/drawable-mdpi/ab_solid_whitehouse.9.png
BIN  res/drawable-mdpi/ab_stacked_solid_whitehouse.9.png
BIN  res/drawable-mdpi/ab_transparent_whitehouse.9.png
BIN  res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
BIN  res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
BIN  res/drawable-mdpi/btn_default_focused_holo_dark.9.png
BIN  res/drawable-mdpi/btn_default_normal_holo_dark.9.png
BIN  res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
BIN  res/drawable-mdpi/ic_favorite.png
BIN  res/drawable-mdpi/ic_launcher.png
BIN  res/drawable-mdpi/ic_menu.png
BIN  res/drawable-mdpi/ic_menu_search.png
BIN  res/drawable-mdpi/ic_unfavorite.png
BIN  res/drawable-mdpi/list_focused_whitehouse.9.png
BIN  res/drawable-mdpi/logo_wh.png
BIN  res/drawable-mdpi/menu_dropdown_panel_whitehouse.9.png
BIN  res/drawable-mdpi/menu_hardkey_panel_whitehouse.9.png
BIN  res/drawable-mdpi/progress_bg_whitehouse.9.png
BIN  res/drawable-mdpi/progress_primary_whitehouse.9.png
BIN  res/drawable-mdpi/progress_secondary_whitehouse.9.png
BIN  res/drawable-mdpi/spinner_ab_default_whitehouse.9.png
BIN  res/drawable-mdpi/spinner_ab_disabled_whitehouse.9.png
BIN  res/drawable-mdpi/spinner_ab_focused_whitehouse.9.png
BIN  res/drawable-mdpi/spinner_ab_pressed_whitehouse.9.png
BIN  res/drawable-mdpi/tab_selected_focused_whitehouse.9.png
BIN  res/drawable-mdpi/tab_selected_pressed_whitehouse.9.png
BIN  res/drawable-mdpi/tab_selected_whitehouse.9.png
BIN  res/drawable-mdpi/tab_unselected_focused_whitehouse.9.png
BIN  res/drawable-mdpi/tab_unselected_pressed_whitehouse.9.png
BIN  res/drawable-xhdpi/ab_bottom_solid_whitehouse.9.png
BIN  res/drawable-xhdpi/ab_solid_whitehouse.9.png
BIN  res/drawable-xhdpi/ab_stacked_solid_whitehouse.9.png
BIN  res/drawable-xhdpi/ab_transparent_whitehouse.9.png
BIN  res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png
BIN  res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png
BIN  res/drawable-xhdpi/btn_default_focused_holo_dark.9.png
BIN  res/drawable-xhdpi/btn_default_normal_holo_dark.9.png
BIN  res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png
BIN  res/drawable-xhdpi/ic_favorite.png
BIN  res/drawable-xhdpi/ic_launcher.png
BIN  res/drawable-xhdpi/ic_menu.png
BIN  res/drawable-xhdpi/ic_menu_search.png
BIN  res/drawable-xhdpi/ic_unfavorite.png
BIN  res/drawable-xhdpi/list_focused_whitehouse.9.png
BIN  res/drawable-xhdpi/logo_wh.png
BIN  res/drawable-xhdpi/menu_dropdown_panel_whitehouse.9.png
BIN  res/drawable-xhdpi/menu_hardkey_panel_whitehouse.9.png
BIN  res/drawable-xhdpi/progress_bg_whitehouse.9.png
BIN  res/drawable-xhdpi/progress_primary_whitehouse.9.png
BIN  res/drawable-xhdpi/progress_secondary_whitehouse.9.png
BIN  res/drawable-xhdpi/spinner_ab_default_whitehouse.9.png
BIN  res/drawable-xhdpi/spinner_ab_disabled_whitehouse.9.png
BIN  res/drawable-xhdpi/spinner_ab_focused_whitehouse.9.png
BIN  res/drawable-xhdpi/spinner_ab_pressed_whitehouse.9.png
BIN  res/drawable-xhdpi/tab_selected_focused_whitehouse.9.png
BIN  res/drawable-xhdpi/tab_selected_pressed_whitehouse.9.png
BIN  res/drawable-xhdpi/tab_selected_whitehouse.9.png
BIN  res/drawable-xhdpi/tab_unselected_focused_whitehouse.9.png
BIN  res/drawable-xhdpi/tab_unselected_pressed_whitehouse.9.png
9 res/drawable/ab_background.xml
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
  3 + <gradient
  4 + android:startColor="@color/wh_blue_light"
  5 + android:centerColor="@color/wh_blue"
  6 + android:endColor="@color/wh_blue"
  7 + android:angle="270"
  8 + android:type="linear"/>
  9 +</shape>
13 res/drawable/btn_dashboard_search_background.xml
... ... @@ -0,0 +1,13 @@
  1 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  2 + <item android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"
  3 + android:state_window_focused="false"/>
  4 + <item android:drawable="@drawable/btn_default_disabled_holo_dark" android:state_enabled="false"
  5 + android:state_window_focused="false"/>
  6 + <item android:drawable="@drawable/btn_default_pressed_holo_dark" android:state_pressed="true"/>
  7 + <item android:drawable="@drawable/btn_default_focused_holo_dark" android:state_enabled="true"
  8 + android:state_focused="true"/>
  9 + <item android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"/>
  10 + <item android:drawable="@drawable/btn_default_disabled_focused_holo_dark"
  11 + android:state_focused="true"/>
  12 + <item android:drawable="@drawable/btn_default_disabled_holo_dark"/>
  13 +</selector>
8 res/drawable/dashboard_item_selector.xml
... ... @@ -0,0 +1,8 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:exitFadeDuration="@android:integer/config_mediumAnimTime">
  4 + <item android:state_pressed="false" android:state_focused="true"
  5 + android:drawable="@color/dashboard_item_focused"/>
  6 + <item android:state_pressed="true" android:drawable="@color/dashboard_item_focused"/>
  7 + <item android:drawable="@color/dashboard_item_normal"/>
  8 +</selector>
9 res/drawable/details_shadow.xml
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:shape="rectangle">
  4 + <gradient android:angle="180"
  5 + android:type="linear"
  6 + android:startColor="#e4e4e4"
  7 + android:centerColor="#ffffff"
  8 + android:endColor="#e4e4e4"/>
  9 +</shape>
26 res/drawable/feed_item_selector.xml
... ... @@ -0,0 +1,26 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:exitFadeDuration="@android:integer/config_mediumAnimTime">
  4 + <!--
  5 + yes, these shapes are necessary to avoid drawing the selector
  6 + over the entire list on 2.2, etc.
  7 +
  8 + http://stackoverflow.com/questions/2183447/listselector-applies-to-the-entire-list
  9 + -->
  10 + <item android:state_pressed="false" android:state_focused="true">
  11 + <shape>
  12 + <solid android:color="@color/feed_item_focused" />
  13 + </shape>
  14 + </item>
  15 + <item android:state_pressed="true">
  16 + <shape>
  17 + <solid android:color="@color/feed_item_focused" />
  18 + </shape>
  19 + </item>
  20 + <item android:state_selected="true">
  21 + <shape>
  22 + <solid android:color="@color/feed_item_focused" />
  23 + </shape>
  24 + </item>
  25 + <item android:drawable="@color/feed_item_normal"/>
  26 +</selector>
9 res/drawable/feed_row_date_gradient.xml
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:shape="rectangle">
  4 + <gradient android:angle="270"
  5 + android:type="linear"
  6 + android:startColor="#ffffff"
  7 + android:centerColor="#ffffff"
  8 + android:endColor="#eeeeee"/>
  9 +</shape>
8 res/drawable/feedrow_bottom_gradient.xml
... ... @@ -0,0 +1,8 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:shape="rectangle">
  4 + <gradient android:angle="270"
  5 + android:type="linear"
  6 + android:startColor="#2a333333"
  7 + android:endColor="#00333333"/>
  8 +</shape>
9 res/drawable/photos_background.xml
... ... @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
  3 + <gradient android:type="radial"
  4 + android:startColor="#66ffffff"
  5 + android:endColor="#33ffffff"
  6 + android:centerX="50%"
  7 + android:centerY="50%"
  8 + android:gradientRadius="500"/>
  9 +</shape>
BIN  res/drawable/presidential_seal.png
21 res/drawable/pressed_background_whitehouse.xml
... ... @@ -0,0 +1,21 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- File created by the Android Action Bar Style Generator
  3 +
  4 + Copyright (C) 2012 readyState Software Ltd
  5 +
  6 + Licensed under the Apache License, Version 2.0 (the "License");
  7 + you may not use this file except in compliance with the License.
  8 + You may obtain a copy of the License at
  9 +
  10 + http://www.apache.org/licenses/LICENSE-2.0
  11 +
  12 + Unless required by applicable law or agreed to in writing, software
  13 + distributed under the License is distributed on an "AS IS" BASIS,
  14 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15 + See the License for the specific language governing permissions and
  16 + limitations under the License.
  17 +-->
  18 +
  19 +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">