Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--android/.gitignore10
-rw-r--r--android/3rd_party/HoloEverywhere/LICENSE7
-rw-r--r--android/3rd_party/HoloEverywhere/README.md52
-rw-r--r--android/3rd_party/HoloEverywhere/checkstyle.xml113
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/.travis.yml18
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CHANGELOG.md496
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CONTRIBUTING.md11
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/LICENSE.txt202
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/README.md60
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/RELEASING.md24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/AndroidManifest.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/README.md15
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/build.xml92
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/libs/android-support-v4-r13.jarbin0 -> 484258 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/lint.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/pom.xml137
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/proguard-project.txt20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/project.properties12
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_dark.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_light.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_dark.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_light.xml25
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_dark_holo.9.pngbin0 -> 144 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_inverse_holo.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.pngbin0 -> 144 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_dark_holo.9.pngbin0 -> 135 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_light_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_dark.9.pngbin0 -> 2863 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_light.9.pngbin0 -> 2859 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_dark_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_light_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_shadow_holo.9.pngbin0 -> 192 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_dark_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_light_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_dark_holo.9.pngbin0 -> 139 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_dark_holo.9.pngbin0 -> 155 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_light_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_dark.9.pngbin0 -> 104 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_light.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_dark.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_light.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_dark.9.pngbin0 -> 110 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_light.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_dark.9.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_light.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_dark.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_light.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_dark.pngbin0 -> 602 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_light.pngbin0 -> 546 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_dark.pngbin0 -> 713 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_light.pngbin0 -> 737 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_disabled.pngbin0 -> 1774 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_normal.pngbin0 -> 1945 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_disabled_holo_light.pngbin0 -> 1504 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_holo_light.pngbin0 -> 1540 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_dark.pngbin0 -> 597 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_light.pngbin0 -> 616 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go.pngbin0 -> 1415 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go_search_api_holo_light.pngbin0 -> 1252 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 144 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 148 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_dark.pngbin0 -> 467 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_light.pngbin0 -> 505 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search.pngbin0 -> 2558 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search_api_holo_light.pngbin0 -> 2271 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search.pngbin0 -> 2070 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search_api_holo_light.pngbin0 -> 1833 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_activated_holo.9.pngbin0 -> 154 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_focused_holo.9.pngbin0 -> 159 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_longpressed_holo.9.pngbin0 -> 154 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_dark.9.pngbin0 -> 159 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_light.9.pngbin0 -> 159 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_dark.9.pngbin0 -> 189 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_light.9.pngbin0 -> 189 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_dark.9.pngbin0 -> 922 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_light.9.pngbin0 -> 1061 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_dark.9.pngbin0 -> 178 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_light.9.pngbin0 -> 174 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_dark.9.pngbin0 -> 917 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_light.9.pngbin0 -> 917 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_dark.9.pngbin0 -> 188 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_light.9.pngbin0 -> 188 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_inner_holo.pngbin0 -> 2081 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_outer_holo.pngbin0 -> 1811 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_dark.9.pngbin0 -> 311 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_light.9.pngbin0 -> 312 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_dark.9.pngbin0 -> 306 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_light.9.pngbin0 -> 306 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_dark.9.pngbin0 -> 524 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_light.9.pngbin0 -> 523 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_dark.9.pngbin0 -> 464 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_light.9.pngbin0 -> 458 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_focused_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_holo.9.pngbin0 -> 148 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_pressed_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_unselected_pressed_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_dark.9.pngbin0 -> 110 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_light.9.pngbin0 -> 105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_dark.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_light.9.pngbin0 -> 103 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_light.9.pngbin0 -> 111 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_light.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__toast_frame.9.pngbin0 -> 1319 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_dark_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_inverse_holo.9.pngbin0 -> 129 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_dark_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_light_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_dark.9.pngbin0 -> 2849 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_light.9.pngbin0 -> 191 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_dark_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_shadow_holo.9.pngbin0 -> 168 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_dark_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_dark_holo.9.pngbin0 -> 127 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_light_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_dark_holo.9.pngbin0 -> 139 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_dark.9.pngbin0 -> 101 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_light.9.pngbin0 -> 99 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_dark.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_light.9.pngbin0 -> 105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_dark.9.pngbin0 -> 107 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_light.9.pngbin0 -> 105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_dark.9.pngbin0 -> 127 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_light.9.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_dark.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_dark.pngbin0 -> 466 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_light.pngbin0 -> 438 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_dark.pngbin0 -> 566 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_light.pngbin0 -> 552 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_disabled.pngbin0 -> 1775 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_normal.pngbin0 -> 1869 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_disabled_holo_light.pngbin0 -> 740 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_holo_light.pngbin0 -> 743 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_dark.pngbin0 -> 511 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_light.pngbin0 -> 532 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go.pngbin0 -> 1538 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go_search_api_holo_light.pngbin0 -> 570 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 122 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 131 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_dark.pngbin0 -> 332 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_light.pngbin0 -> 355 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search.pngbin0 -> 2280 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search_api_holo_light.pngbin0 -> 1541 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search.pngbin0 -> 1937 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search_api_holo_light.pngbin0 -> 794 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_activated_holo.9.pngbin0 -> 151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_focused_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_longpressed_holo.9.pngbin0 -> 151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_dark.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_light.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_dark.9.pngbin0 -> 172 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_light.9.pngbin0 -> 171 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_dark.9.pngbin0 -> 651 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_light.9.pngbin0 -> 720 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_dark.9.pngbin0 -> 165 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_light.9.pngbin0 -> 159 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_dark.9.pngbin0 -> 572 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_light.9.pngbin0 -> 572 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_dark.9.pngbin0 -> 170 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_light.9.pngbin0 -> 170 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_inner_holo.pngbin0 -> 1336 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_outer_holo.pngbin0 -> 1165 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_dark.9.pngbin0 -> 254 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_light.9.pngbin0 -> 255 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_dark.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_light.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_dark.9.pngbin0 -> 417 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_light.9.pngbin0 -> 424 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_dark.9.pngbin0 -> 370 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_light.9.pngbin0 -> 370 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_focused_holo.9.pngbin0 -> 148 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_holo.9.pngbin0 -> 151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_pressed_holo.9.pngbin0 -> 150 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_unselected_pressed_holo.9.pngbin0 -> 155 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_dark.9.pngbin0 -> 106 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_light.9.pngbin0 -> 100 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_dark.9.pngbin0 -> 105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_light.9.pngbin0 -> 98 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_dark.9.pngbin0 -> 107 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_light.9.pngbin0 -> 107 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_dark.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_light.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__toast_frame.9.pngbin0 -> 839 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-v11/abs__progress_medium_holo.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_dark_holo.9.pngbin0 -> 165 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_inverse_holo.9.pngbin0 -> 157 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.pngbin0 -> 166 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_dark_holo.9.pngbin0 -> 153 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_light_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_dark.9.pngbin0 -> 2878 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_light.9.pngbin0 -> 2873 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_dark_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_light_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_shadow_holo.9.pngbin0 -> 290 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_dark_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_light_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_dark_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_light_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_dark_holo.9.pngbin0 -> 171 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_light_holo.9.pngbin0 -> 160 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_dark.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_light.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_dark.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_light.9.pngbin0 -> 113 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_dark.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_light.9.pngbin0 -> 113 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_dark.9.pngbin0 -> 166 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_light.9.pngbin0 -> 161 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_dark.9.pngbin0 -> 174 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_light.9.pngbin0 -> 161 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_dark.pngbin0 -> 741 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_light.pngbin0 -> 661 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_dark.pngbin0 -> 970 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_light.pngbin0 -> 915 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_disabled.pngbin0 -> 2531 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_disabled_holo_light.pngbin0 -> 1315 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_holo_light.pngbin0 -> 1447 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_dark.pngbin0 -> 703 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_light.pngbin0 -> 712 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go.pngbin0 -> 1983 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go_search_api_holo_light.pngbin0 -> 836 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 184 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_dark.pngbin0 -> 699 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_light.pngbin0 -> 935 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search.pngbin0 -> 3784 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search_api_holo_light.pngbin0 -> 3037 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search.pngbin0 -> 3053 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search_api_holo_light.pngbin0 -> 1414 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_activated_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_dark.9.pngbin0 -> 83 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_light.9.pngbin0 -> 83 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_focused_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_longpressed_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_dark.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_light.9.pngbin0 -> 163 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_dark.9.pngbin0 -> 190 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_light.9.pngbin0 -> 188 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_dark.9.pngbin0 -> 1362 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_light.9.pngbin0 -> 1551 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_dark.9.pngbin0 -> 174 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_light.9.pngbin0 -> 172 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_dark.9.pngbin0 -> 1309 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_light.9.pngbin0 -> 1309 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_dark.9.pngbin0 -> 184 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_light.9.pngbin0 -> 184 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.pngbin0 -> 2769 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.pngbin0 -> 2432 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_dark.9.pngbin0 -> 395 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_light.9.pngbin0 -> 394 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_dark.9.pngbin0 -> 381 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_light.9.pngbin0 -> 381 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_dark.9.pngbin0 -> 680 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_light.9.pngbin0 -> 671 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_dark.9.pngbin0 -> 609 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_light.9.pngbin0 -> 602 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_focused_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_holo.9.pngbin0 -> 153 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_pressed_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_unselected_pressed_holo.9.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_dark.9.pngbin0 -> 126 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_light.9.pngbin0 -> 126 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_dark.9.pngbin0 -> 125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_light.9.pngbin0 -> 127 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_dark.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_light.9.pngbin0 -> 126 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__toast_frame.9.pngbin0 -> 1956 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_dark.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_light.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_dark.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_light.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear_holo_light.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_dark.xml18
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_light.xml18
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_dark.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_light.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_dark.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_light.xml20
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_dark.xml27
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_light.xml28
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_dark.xml32
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_light.xml32
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_medium_holo.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_dark.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_light.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_dark.xml25
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_light.xml25
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__tab_indicator_ab_holo.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_dark.xml21
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_light.xml21
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_dark.xml21
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_light.xml21
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-large/abs__action_mode_close_item.xml40
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_dropdown_item.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_item.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar.xml51
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar_overlay.xml50
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_home.xml38
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab.xml7
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab_bar_view.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_title_item.xml50
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_item_layout.xml56
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_layout.xml23
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_bar.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_close_item.xml31
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view.xml70
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view_list_item.xml53
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_checkbox.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_icon.xml27
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_radio.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__popup_menu_item_layout.xml60
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar.xml58
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar_overlay.xml60
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple.xml38
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple_overlay_action_mode.xml38
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_dropdown_item_icons_2line.xml89
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_view.xml159
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__simple_dropdown_hint.xml29
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_dropdown_item.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_item.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-land/abs__dimens.xml33
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-hdpi-1024x600/abs__dimens.xml33
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-hdpi-1024x600/abs__dimens.xml33
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-mdpi-1024x600/abs__dimens.xml33
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-mdpi-1024x600/abs__dimens.xml36
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__bools.xml19
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__dimens.xml38
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v11/abs__themes.xml12
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__styles.xml123
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__themes.xml29
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w360dp/abs__dimens.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__bools.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__config.xml29
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w500dp/abs__dimens.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w600dp/abs__dimens.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-xlarge/abs__dimens.xml45
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__attrs.xml432
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__bools.xml22
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__colors.xml24
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__config.xml43
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__dimens.xml55
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__ids.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__strings.xml49
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__styles.xml412
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__themes.xml207
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/android/support/v4/app/Watson.java143
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/ActionBarSherlock.java799
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/ActionBar.java956
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockActivity.java276
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java68
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java265
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java68
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java309
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListActivity.java276
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListFragment.java68
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java276
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java1177
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java352
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java182
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarImpl.java1031
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java480
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Animator.java278
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorListenerAdapter.java54
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorSet.java1111
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatEvaluator.java42
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatKeyframeSet.java135
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntEvaluator.java42
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntKeyframeSet.java134
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Keyframe.java361
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/KeyframeSet.java227
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ObjectAnimator.java491
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/PropertyValuesHolder.java1012
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/TypeEvaluator.java44
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ValueAnimator.java1266
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/NineViewGroup.java79
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java212
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineFrameLayout.java57
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineHorizontalScrollView.java41
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineLinearLayout.java57
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/ActionProviderWrapper.java40
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/StandaloneActionMode.java148
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_HasStateListenerSupport.java6
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_OnAttachStateChangeListener.java8
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenu.java264
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItem.java278
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItemView.java296
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java714
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuView.java575
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/BaseMenuPresenter.java231
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ListMenuItemView.java278
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java1341
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemImpl.java647
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemWrapper.java310
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPopupHelper.java376
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPresenter.java148
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuView.java120
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuWrapper.java206
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuBuilder.java134
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuWrapper.java72
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/AbsActionBarView.java291
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContainer.java251
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContextView.java518
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java1465
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingButton.java45
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingTextView.java50
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java30
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAbsSpinner.java479
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java1160
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsColorDrawable.java51
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java280
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsListPopupWindow.java661
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsProgressBar.java1193
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java703
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsToast.java60
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsView.java21
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ScrollingTabContainerView.java546
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/TabsLinearLayout.java113
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionMode.java224
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionProvider.java170
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/CollapsibleActionView.java39
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Menu.java446
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuInflater.java495
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuItem.java598
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/SubMenu.java110
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Window.java65
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java1104
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserView.java839
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SearchView.java1811
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ShareActionProvider.java316
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java758
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/test/com/actionbarsherlock/internal/ResourcesCompatTest.java23
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/checkstyle.xml120
-rw-r--r--android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/pom.xml219
-rw-r--r--android/3rd_party/HoloEverywhere/formatting.xml252
-rw-r--r--android/3rd_party/HoloEverywhere/library/AndroidManifest.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/build.xml92
-rw-r--r--android/3rd_party/HoloEverywhere/library/lint.xml21
-rw-r--r--android/3rd_party/HoloEverywhere/library/proguard-project.txt20
-rw-r--r--android/3rd_party/HoloEverywhere/library/project.properties13
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/dialog_enter.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/dialog_exit.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/fade_in.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/fade_out.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_center.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_from_bottom.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_center.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_from_bottom.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_dark.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_light.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_dark.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_light.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_dark.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_light.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_dark.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_light.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_dark.xml7
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_light.xml7
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_activated.9.pngbin0 -> 326 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_focused.9.pngbin0 -> 263 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_label_background.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_focused_holo_light.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_dark.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_light.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.pngbin0 -> 273 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.pngbin0 -> 273 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_dark.pngbin0 -> 159 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_light.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_dark.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_light.pngbin0 -> 356 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_dark.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_light.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_dark.pngbin0 -> 366 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_light.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_dark.pngbin0 -> 2058 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_light.pngbin0 -> 2021 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.pngbin0 -> 863 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_dark.pngbin0 -> 950 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_light.pngbin0 -> 863 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.pngbin0 -> 762 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.pngbin0 -> 610 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_dark.pngbin0 -> 385 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_light.pngbin0 -> 460 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_dark.pngbin0 -> 2130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_light.pngbin0 -> 2136 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_dark.pngbin0 -> 1846 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_light.pngbin0 -> 1839 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_dark.pngbin0 -> 2621 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_light.pngbin0 -> 2273 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.pngbin0 -> 291 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.pngbin0 -> 291 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_dark.9.pngbin0 -> 272 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_light.9.pngbin0 -> 272 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_dark.9.pngbin0 -> 311 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_light.9.pngbin0 -> 311 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_dark.9.pngbin0 -> 298 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_light.9.pngbin0 -> 303 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_dark.9.pngbin0 -> 458 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_light.9.pngbin0 -> 458 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_dark.9.pngbin0 -> 181 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_light.9.pngbin0 -> 171 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_dark.9.pngbin0 -> 282 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_light.9.pngbin0 -> 282 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_dark.9.pngbin0 -> 182 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_light.9.pngbin0 -> 171 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_dark.9.pngbin0 -> 276 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_light.9.pngbin0 -> 277 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_label_background.9.pngbin0 -> 125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.pngbin0 -> 1212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.pngbin0 -> 1291 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.pngbin0 -> 434 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_light.pngbin0 -> 493 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_dark.pngbin0 -> 1495 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_light.pngbin0 -> 1674 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo.pngbin0 -> 871 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_dark.pngbin0 -> 559 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_light.pngbin0 -> 756 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.pngbin0 -> 2070 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_light.pngbin0 -> 2195 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.pngbin0 -> 1851 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.pngbin0 -> 1955 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.pngbin0 -> 1058 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_light.pngbin0 -> 1145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_dark.pngbin0 -> 1875 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_light.pngbin0 -> 1990 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_dark.pngbin0 -> 1648 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_light.pngbin0 -> 1515 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.pngbin0 -> 2805 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_light.pngbin0 -> 2433 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_dark.pngbin0 -> 2229 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_light.pngbin0 -> 2456 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_dark.pngbin0 -> 1264 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_light.pngbin0 -> 1388 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_dark.pngbin0 -> 2444 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_light.pngbin0 -> 2612 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_dark.pngbin0 -> 1601 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_light.pngbin0 -> 1664 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_dark.pngbin0 -> 2762 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_light.pngbin0 -> 2920 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_dark.pngbin0 -> 2404 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_light.pngbin0 -> 2461 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_dark.pngbin0 -> 1496 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_light.pngbin0 -> 1503 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_dark.pngbin0 -> 2551 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_light.pngbin0 -> 2615 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_dark.pngbin0 -> 1572 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_light.pngbin0 -> 1638 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_dark.pngbin0 -> 2851 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_light.pngbin0 -> 2898 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin0 -> 310 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin0 -> 310 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.pngbin0 -> 284 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.pngbin0 -> 284 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.pngbin0 -> 325 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.pngbin0 -> 325 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.pngbin0 -> 310 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.pngbin0 -> 310 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.pngbin0 -> 471 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.pngbin0 -> 471 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin0 -> 388 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin0 -> 388 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.pngbin0 -> 382 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.pngbin0 -> 382 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.pngbin0 -> 411 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.pngbin0 -> 411 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.pngbin0 -> 402 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.pngbin0 -> 402 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.pngbin0 -> 555 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.pngbin0 -> 555 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_dark.9.pngbin0 -> 864 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_light.9.pngbin0 -> 913 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.pngbin0 -> 125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.pngbin0 -> 125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_dark.9.pngbin0 -> 1414 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_light.9.pngbin0 -> 1365 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo.9.pngbin0 -> 242 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_dark.9.pngbin0 -> 193 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_light.9.pngbin0 -> 193 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_dark.9.pngbin0 -> 816 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_light.9.pngbin0 -> 685 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_dark.9.pngbin0 -> 421 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_light.9.pngbin0 -> 344 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_maximized.9.pngbin0 -> 1976 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_minimized.9.pngbin0 -> 1720 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_dark.9.pngbin0 -> 434 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_light.9.pngbin0 -> 348 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.pngbin0 -> 923 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_light.9.pngbin0 -> 922 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.pngbin0 -> 931 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_light.9.pngbin0 -> 906 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_default_holo.pngbin0 -> 166 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_pressed_holo.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_light.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_activated_holo.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_focused_holo.9.pngbin0 -> 125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_longpressed_holo.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_dark.9.pngbin0 -> 113 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_light.9.pngbin0 -> 113 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_dark.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_light.9.pngbin0 -> 111 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_dark.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_dark.9.pngbin0 -> 816 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_light.9.pngbin0 -> 685 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.pngbin0 -> 922 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.pngbin0 -> 951 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.pngbin0 -> 713 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.pngbin0 -> 634 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/numberpicker_selection_divider.9.pngbin0 -> 101 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_dark.9.pngbin0 -> 506 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_light.9.pngbin0 -> 509 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_dark.9.pngbin0 -> 378 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_light.9.pngbin0 -> 363 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_dark.9.pngbin0 -> 486 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_light.9.pngbin0 -> 440 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_dark.9.pngbin0 -> 510 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_light.9.pngbin0 -> 514 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_edge.pngbin0 -> 1345 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_glow.pngbin0 -> 24314 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_dark.9.pngbin0 -> 251 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_light.9.pngbin0 -> 580 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_dark.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_light.9.pngbin0 -> 116 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_dark.9.pngbin0 -> 869 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_light.9.pngbin0 -> 873 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_dark.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_light.9.pngbin0 -> 122 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo1.pngbin0 -> 598 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo2.pngbin0 -> 726 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo3.pngbin0 -> 748 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo4.pngbin0 -> 792 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo5.pngbin0 -> 672 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo6.pngbin0 -> 807 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo7.pngbin0 -> 655 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo8.pngbin0 -> 706 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_dark.pngbin0 -> 1780 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_light.pngbin0 -> 1895 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_dark.pngbin0 -> 1232 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_light.pngbin0 -> 1312 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_dark.pngbin0 -> 1731 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_light.pngbin0 -> 1797 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_dark.pngbin0 -> 812 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_light.pngbin0 -> 838 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_dark.pngbin0 -> 757 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_light.pngbin0 -> 764 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_dark.pngbin0 -> 793 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_light.pngbin0 -> 818 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_dark.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_light.9.pngbin0 -> 142 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_disabled_holo.pngbin0 -> 663 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_focused_holo.pngbin0 -> 925 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_normal_holo.pngbin0 -> 1038 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_pressed_holo.pngbin0 -> 1411 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_primary_holo.9.pngbin0 -> 122 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_secondary_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_dark.9.pngbin0 -> 117 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_light.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_inner_holo.pngbin0 -> 733 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_outer_holo.pngbin0 -> 654 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_inner_holo.pngbin0 -> 664 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_outer_holo.pngbin0 -> 759 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_inner_holo.pngbin0 -> 1794 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_outer_holo.pngbin0 -> 1811 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_inner_holo.pngbin0 -> 2936 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_outer_holo.pngbin0 -> 2876 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_dark.9.pngbin0 -> 244 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_light.9.pngbin0 -> 243 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_dark.9.pngbin0 -> 235 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_light.9.pngbin0 -> 233 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_dark.9.pngbin0 -> 416 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_light.9.pngbin0 -> 401 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_dark.9.pngbin0 -> 367 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_light.9.pngbin0 -> 362 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_light.9.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_dark.9.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_light.9.pngbin0 -> 167 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_dark.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_light.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.pngbin0 -> 430 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_light.9.pngbin0 -> 430 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.pngbin0 -> 395 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.pngbin0 -> 395 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_dark.9.pngbin0 -> 419 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_light.9.pngbin0 -> 419 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.pngbin0 -> 421 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.pngbin0 -> 421 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_light.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.pngbin0 -> 142 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_default_holo_dark.9.pngbin0 -> 141 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.pngbin0 -> 141 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.pngbin0 -> 146 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_light.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_dark.9.pngbin0 -> 204 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_light.9.pngbin0 -> 195 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_light.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_dark.9.pngbin0 -> 202 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_light.9.pngbin0 -> 202 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_activated_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_default_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_focused_holo_dark.9.pngbin0 -> 209 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_focused_holo_dark.9.pngbin0 -> 205 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/toast_frame.9.pngbin0 -> 1319 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_activated.9.pngbin0 -> 284 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_focused.9.pngbin0 -> 242 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_label_background.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_dark.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_light.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.pngbin0 -> 212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.pngbin0 -> 212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_dark.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_light.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_dark.pngbin0 -> 210 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_light.pngbin0 -> 265 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_dark.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_light.pngbin0 -> 149 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_dark.pngbin0 -> 472 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_light.pngbin0 -> 357 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_dark.pngbin0 -> 1398 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_light.pngbin0 -> 1385 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_dark.pngbin0 -> 531 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_light.pngbin0 -> 497 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.pngbin0 -> 527 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.pngbin0 -> 467 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_dark.pngbin0 -> 291 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_light.pngbin0 -> 364 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_dark.pngbin0 -> 1507 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_light.pngbin0 -> 1503 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_dark.pngbin0 -> 1395 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_light.pngbin0 -> 1370 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_dark.pngbin0 -> 1558 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_light.pngbin0 -> 1727 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.pngbin0 -> 219 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.pngbin0 -> 219 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_dark.9.pngbin0 -> 203 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_light.9.pngbin0 -> 203 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_dark.9.pngbin0 -> 235 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_light.9.pngbin0 -> 235 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_dark.9.pngbin0 -> 211 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_light.9.pngbin0 -> 217 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_dark.9.pngbin0 -> 320 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_light.9.pngbin0 -> 320 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_dark.9.pngbin0 -> 150 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_light.9.pngbin0 -> 147 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_dark.9.pngbin0 -> 219 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_light.9.pngbin0 -> 219 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_dark.9.pngbin0 -> 152 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_light.9.pngbin0 -> 150 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_dark.9.pngbin0 -> 212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_light.9.pngbin0 -> 212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_label_background.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.pngbin0 -> 733 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.pngbin0 -> 755 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.pngbin0 -> 288 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_light.pngbin0 -> 299 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_dark.pngbin0 -> 825 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_light.pngbin0 -> 889 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo.pngbin0 -> 519 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_dark.pngbin0 -> 335 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_light.pngbin0 -> 426 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.pngbin0 -> 1520 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_light.pngbin0 -> 1624 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.pngbin0 -> 1015 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.pngbin0 -> 1097 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.pngbin0 -> 573 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_light.pngbin0 -> 736 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_dark.pngbin0 -> 1185 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_light.pngbin0 -> 1231 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_dark.pngbin0 -> 803 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_light.pngbin0 -> 837 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.pngbin0 -> 1854 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_light.pngbin0 -> 1602 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_dark.pngbin0 -> 1511 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_light.pngbin0 -> 1593 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_dark.pngbin0 -> 979 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_light.pngbin0 -> 1060 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_dark.pngbin0 -> 1615 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_light.pngbin0 -> 1650 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_dark.pngbin0 -> 1057 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_light.pngbin0 -> 1116 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_dark.pngbin0 -> 1777 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_light.pngbin0 -> 1862 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_dark.pngbin0 -> 1560 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.pngbin0 -> 1567 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_dark.pngbin0 -> 1025 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.pngbin0 -> 1023 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_dark.pngbin0 -> 1643 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.pngbin0 -> 1637 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_dark.pngbin0 -> 1059 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.pngbin0 -> 1108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_dark.pngbin0 -> 1820 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.pngbin0 -> 1830 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin0 -> 228 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin0 -> 228 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.pngbin0 -> 213 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.pngbin0 -> 213 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.pngbin0 -> 222 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.pngbin0 -> 222 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.pngbin0 -> 334 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.pngbin0 -> 334 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin0 -> 254 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin0 -> 254 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.pngbin0 -> 246 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.pngbin0 -> 246 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.pngbin0 -> 285 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.pngbin0 -> 285 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.pngbin0 -> 258 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.pngbin0 -> 258 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.pngbin0 -> 364 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.pngbin0 -> 364 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.pngbin0 -> 105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_dark.9.pngbin0 -> 582 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_light.9.pngbin0 -> 622 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_dark.9.pngbin0 -> 882 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_light.9.pngbin0 -> 1003 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo.9.pngbin0 -> 219 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo_dark.9.pngbin0 -> 165 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_dark.9.pngbin0 -> 553 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_light.9.pngbin0 -> 494 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_dark.9.pngbin0 -> 311 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_light.9.pngbin0 -> 242 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_maximized.9.pngbin0 -> 1407 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_minimized.9.pngbin0 -> 1460 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_dark.9.pngbin0 -> 305 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_light.9.pngbin0 -> 243 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_dark.9.pngbin0 -> 952 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_light.9.pngbin0 -> 943 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.pngbin0 -> 937 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_light.9.pngbin0 -> 967 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_default_holo.pngbin0 -> 136 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_pressed_holo.pngbin0 -> 222 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.pngbin0 -> 99 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_light.9.pngbin0 -> 99 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.pngbin0 -> 99 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.pngbin0 -> 99 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_activated_holo.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_focused_holo.9.pngbin0 -> 116 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_longpressed_holo.9.pngbin0 -> 108 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_dark.9.pngbin0 -> 110 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_light.9.pngbin0 -> 110 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_dark.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_light.9.pngbin0 -> 109 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_light.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_dark.9.pngbin0 -> 553 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_light.9.pngbin0 -> 494 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.pngbin0 -> 651 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.pngbin0 -> 720 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.pngbin0 -> 480 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.pngbin0 -> 431 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/numberpicker_selection_divider.9.pngbin0 -> 97 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_dark.9.pngbin0 -> 351 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_light.9.pngbin0 -> 360 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_dark.9.pngbin0 -> 301 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_light.9.pngbin0 -> 280 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_dark.9.pngbin0 -> 349 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_light.9.pngbin0 -> 330 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_dark.9.pngbin0 -> 365 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_light.9.pngbin0 -> 375 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_edge.pngbin0 -> 903 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_glow.pngbin0 -> 13556 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_dark.9.pngbin0 -> 218 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_light.9.pngbin0 -> 209 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_light.9.pngbin0 -> 114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_dark.9.pngbin0 -> 559 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_light.9.pngbin0 -> 561 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_dark.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_light.9.pngbin0 -> 119 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo1.pngbin0 -> 317 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo2.pngbin0 -> 370 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo3.pngbin0 -> 426 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo4.pngbin0 -> 427 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo5.pngbin0 -> 407 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo6.pngbin0 -> 438 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo7.pngbin0 -> 390 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo8.pngbin0 -> 389 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_dark.pngbin0 -> 1184 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_light.pngbin0 -> 1255 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_dark.pngbin0 -> 1072 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_light.pngbin0 -> 1090 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_dark.pngbin0 -> 1155 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_light.pngbin0 -> 1207 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_dark.pngbin0 -> 517 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_light.pngbin0 -> 517 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_dark.pngbin0 -> 538 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_light.pngbin0 -> 523 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_dark.pngbin0 -> 496 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_light.pngbin0 -> 506 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_dark.9.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_light.9.pngbin0 -> 126 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_disabled_holo.pngbin0 -> 408 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_focused_holo.pngbin0 -> 504 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_normal_holo.pngbin0 -> 568 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_pressed_holo.pngbin0 -> 752 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_primary_holo.9.pngbin0 -> 120 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_secondary_holo.9.pngbin0 -> 120 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_dark.9.pngbin0 -> 111 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_light.9.pngbin0 -> 112 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_inner_holo.pngbin0 -> 520 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_outer_holo.pngbin0 -> 451 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_inner_holo.pngbin0 -> 598 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_outer_holo.pngbin0 -> 548 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_inner_holo.pngbin0 -> 1076 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_outer_holo.pngbin0 -> 1165 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_inner_holo.pngbin0 -> 1787 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_outer_holo.pngbin0 -> 1808 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_dark.9.pngbin0 -> 198 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_light.9.pngbin0 -> 197 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_dark.9.pngbin0 -> 190 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_light.9.pngbin0 -> 186 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_dark.9.pngbin0 -> 315 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_light.9.pngbin0 -> 303 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_dark.9.pngbin0 -> 274 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_light.9.pngbin0 -> 272 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.pngbin0 -> 131 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_light.9.pngbin0 -> 131 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_dark.9.pngbin0 -> 139 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_light.9.pngbin0 -> 141 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_dark.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_light.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.pngbin0 -> 259 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_light.9.pngbin0 -> 259 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.pngbin0 -> 252 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.pngbin0 -> 252 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_dark.9.pngbin0 -> 272 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_light.9.pngbin0 -> 272 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.pngbin0 -> 263 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.pngbin0 -> 263 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_activated_holo_light.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.pngbin0 -> 142 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_default_holo_dark.9.pngbin0 -> 141 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.pngbin0 -> 145 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.pngbin0 -> 141 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.pngbin0 -> 146 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_dark.9.pngbin0 -> 121 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_light.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_dark.9.pngbin0 -> 162 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_light.9.pngbin0 -> 157 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_dark.9.pngbin0 -> 121 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_light.9.pngbin0 -> 118 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_dark.9.pngbin0 -> 210 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_light.9.pngbin0 -> 210 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_activated_holo_dark.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_default_holo_dark.9.pngbin0 -> 121 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_focused_holo_dark.9.pngbin0 -> 162 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_holo_dark.9.pngbin0 -> 121 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_focused_holo_dark.9.pngbin0 -> 164 bytes
-rwxr-xr-xandroid/3rd_party/HoloEverywhere/library/res/drawable-mdpi/toast_frame.9.pngbin0 -> 839 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_activated.9.pngbin0 -> 413 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_focused.9.pngbin0 -> 324 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_label_background.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_dark.pngbin0 -> 182 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_light.pngbin0 -> 188 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_dark.pngbin0 -> 314 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_light.pngbin0 -> 314 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_dark.pngbin0 -> 178 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_light.pngbin0 -> 178 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_dark.pngbin0 -> 322 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_light.pngbin0 -> 487 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo.pngbin0 -> 264 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_dark.pngbin0 -> 178 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_light.pngbin0 -> 178 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_dark.pngbin0 -> 683 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_light.pngbin0 -> 601 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_dark.pngbin0 -> 2629 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_light.pngbin0 -> 2599 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_dark.pngbin0 -> 1023 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_light.pngbin0 -> 760 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_dark.pngbin0 -> 471 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_light.pngbin0 -> 583 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_dark.pngbin0 -> 3021 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_light.pngbin0 -> 3014 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo.pngbin0 -> 2973 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_dark.pngbin0 -> 2616 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_light.pngbin0 -> 2622 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_dark.pngbin0 -> 3787 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_light.pngbin0 -> 3127 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.pngbin0 -> 394 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.pngbin0 -> 394 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.pngbin0 -> 387 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_light.9.pngbin0 -> 387 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_dark.9.pngbin0 -> 412 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_light.9.pngbin0 -> 412 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_dark.9.pngbin0 -> 418 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_light.9.pngbin0 -> 425 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.pngbin0 -> 653 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_light.9.pngbin0 -> 653 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.pngbin0 -> 213 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_light.9.pngbin0 -> 206 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_dark.9.pngbin0 -> 355 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_light.9.pngbin0 -> 355 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_dark.9.pngbin0 -> 212 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_light.9.pngbin0 -> 206 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.pngbin0 -> 354 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_light.9.pngbin0 -> 356 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_label_background.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.pngbin0 -> 1512 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.pngbin0 -> 1615 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.pngbin0 -> 552 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.pngbin0 -> 641 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.pngbin0 -> 1933 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_light.pngbin0 -> 2153 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo.pngbin0 -> 1211 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_dark.pngbin0 -> 741 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_light.pngbin0 -> 968 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.pngbin0 -> 2984 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.pngbin0 -> 3136 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.pngbin0 -> 2151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.pngbin0 -> 2228 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.pngbin0 -> 1446 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.pngbin0 -> 1643 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.pngbin0 -> 2920 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_light.pngbin0 -> 2991 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_dark.pngbin0 -> 2160 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_light.pngbin0 -> 2236 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.pngbin0 -> 4259 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.pngbin0 -> 3394 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_dark.pngbin0 -> 3540 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_light.pngbin0 -> 3613 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_dark.pngbin0 -> 1725 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_light.pngbin0 -> 1895 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_dark.pngbin0 -> 3834 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_light.pngbin0 -> 3845 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_dark.pngbin0 -> 1939 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_light.pngbin0 -> 1735 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_dark.pngbin0 -> 4300 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_light.pngbin0 -> 4325 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_dark.pngbin0 -> 3802 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_light.pngbin0 -> 3605 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_dark.pngbin0 -> 2327 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_light.pngbin0 -> 2122 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_dark.pngbin0 -> 4061 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_light.pngbin0 -> 3843 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_dark.pngbin0 -> 2456 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_light.pngbin0 -> 2361 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_dark.pngbin0 -> 4565 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_light.pngbin0 -> 4298 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin0 -> 410 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin0 -> 410 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.pngbin0 -> 402 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.pngbin0 -> 402 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.pngbin0 -> 429 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.pngbin0 -> 429 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.pngbin0 -> 434 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.pngbin0 -> 434 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.pngbin0 -> 673 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.pngbin0 -> 673 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin0 -> 498 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin0 -> 498 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.pngbin0 -> 514 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.pngbin0 -> 514 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.pngbin0 -> 532 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.pngbin0 -> 532 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.pngbin0 -> 548 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.pngbin0 -> 548 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.pngbin0 -> 761 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.pngbin0 -> 761 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.pngbin0 -> 113 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_dark.9.pngbin0 -> 1263 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_light.9.pngbin0 -> 1256 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.pngbin0 -> 140 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_dark.9.pngbin0 -> 2018 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_light.9.pngbin0 -> 1889 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_dark.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_light.9.pngbin0 -> 249 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_dark.9.pngbin0 -> 1155 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_light.9.pngbin0 -> 863 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_dark.9.pngbin0 -> 573 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_light.9.pngbin0 -> 458 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_maximized.9.pngbin0 -> 3869 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_minimized.9.pngbin0 -> 3963 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_dark.9.pngbin0 -> 600 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_light.9.pngbin0 -> 461 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.pngbin0 -> 1351 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_light.9.pngbin0 -> 1347 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_dark.9.pngbin0 -> 1316 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_light.9.pngbin0 -> 1279 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_default_holo.pngbin0 -> 198 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.pngbin0 -> 383 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.pngbin0 -> 101 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.pngbin0 -> 101 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.pngbin0 -> 102 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_activated_holo.9.pngbin0 -> 111 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_dark.9.pngbin0 -> 83 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_light.9.pngbin0 -> 83 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_focused_holo.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_longpressed_holo.9.pngbin0 -> 111 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_dark.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_light.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_dark.9.pngbin0 -> 119 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_light.9.pngbin0 -> 115 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_light.9.pngbin0 -> 130 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_dark.9.pngbin0 -> 1155 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_light.9.pngbin0 -> 863 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.pngbin0 -> 1334 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.pngbin0 -> 1306 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.pngbin0 -> 997 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.pngbin0 -> 861 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/numberpicker_selection_divider.9.pngbin0 -> 101 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_dark.9.pngbin0 -> 627 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_light.9.pngbin0 -> 636 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_dark.9.pngbin0 -> 482 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_light.9.pngbin0 -> 453 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_dark.9.pngbin0 -> 628 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_light.9.pngbin0 -> 558 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_dark.9.pngbin0 -> 644 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_light.9.pngbin0 -> 650 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_edge.pngbin0 -> 1378 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_glow.pngbin0 -> 33690 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_dark.9.pngbin0 -> 265 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_light.9.pngbin0 -> 702 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_dark.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_light.9.pngbin0 -> 122 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_dark.9.pngbin0 -> 1105 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_light.9.pngbin0 -> 1104 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_dark.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo1.pngbin0 -> 627 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo2.pngbin0 -> 761 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo3.pngbin0 -> 874 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo4.pngbin0 -> 856 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo5.pngbin0 -> 827 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo6.pngbin0 -> 945 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo7.pngbin0 -> 782 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo8.pngbin0 -> 809 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_dark.pngbin0 -> 2358 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_light.pngbin0 -> 2526 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_dark.pngbin0 -> 1671 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_light.pngbin0 -> 1783 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_dark.pngbin0 -> 2303 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_light.pngbin0 -> 2412 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_dark.pngbin0 -> 1114 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_light.pngbin0 -> 1158 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_dark.pngbin0 -> 1018 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_light.pngbin0 -> 1032 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_dark.pngbin0 -> 1076 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_light.pngbin0 -> 1125 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_dark.9.pngbin0 -> 152 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_light.9.pngbin0 -> 151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_disabled_holo.pngbin0 -> 877 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_focused_holo.pngbin0 -> 1381 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_normal_holo.pngbin0 -> 1526 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_pressed_holo.pngbin0 -> 1986 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_primary_holo.9.pngbin0 -> 131 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_secondary_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_dark.9.pngbin0 -> 123 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_light.9.pngbin0 -> 124 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_inner_holo.pngbin0 -> 729 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_outer_holo.pngbin0 -> 808 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_inner_holo.pngbin0 -> 943 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_outer_holo.pngbin0 -> 1007 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_inner_holo.pngbin0 -> 2411 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_outer_holo.pngbin0 -> 2432 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_inner_holo.pngbin0 -> 3869 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_outer_holo.pngbin0 -> 3476 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_dark.9.pngbin0 -> 298 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_light.9.pngbin0 -> 298 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_dark.9.pngbin0 -> 285 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_light.9.pngbin0 -> 283 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_dark.9.pngbin0 -> 496 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_light.9.pngbin0 -> 480 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_dark.9.pngbin0 -> 451 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_light.9.pngbin0 -> 446 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.pngbin0 -> 136 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.pngbin0 -> 136 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.pngbin0 -> 151 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_light.9.pngbin0 -> 164 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_dark.9.pngbin0 -> 129 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_light.9.pngbin0 -> 129 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.pngbin0 -> 484 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.pngbin0 -> 484 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.pngbin0 -> 487 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.pngbin0 -> 487 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_dark.9.pngbin0 -> 550 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_light.9.pngbin0 -> 550 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.pngbin0 -> 479 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.pngbin0 -> 479 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_dark.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_light.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_dark.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_light.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_dark.9.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_light.9.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_dark.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_light.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_dark.9.pngbin0 -> 300 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_light.9.pngbin0 -> 300 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_dark.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_light.9.pngbin0 -> 137 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_dark.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_dark.9.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_light.9.pngbin0 -> 292 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_dark.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_light.9.pngbin0 -> 138 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_dark.9.pngbin0 -> 556 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_light.9.pngbin0 -> 556 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/toast_frame.9.pngbin0 -> 1793 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/activated_background_holo.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/activity_picker_bg.xml10
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_dark.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_light.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_dark.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_light.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_dark.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_light.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_dark.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_light.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_dark.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_light.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_dark.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_light.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/expander_group.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_thumb_holo.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_dark.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_light.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_dark.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_light.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_dark.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_light.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_dark.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_light.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_indeterminate_horizontal_holo.xml10
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_large_holo.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_medium_holo.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/progress_small_holo.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_dark.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_light.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_dark.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_light.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_dark.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_light.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_dark.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_light.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_dark.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_light.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_control_selector_holo.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_dark.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_light.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_dark.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_light.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_dark.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_light.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_dark.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_light.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_dark.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_light.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/drawable/transparent.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_cubic.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_decelerate.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quad.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quint.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate_overshoot.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/bounce.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/cycle.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_cubic.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quad.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quint.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/linear.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/interpolator/overshoot.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout-sw600dp/date_picker_dialog.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_item_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_multichoice_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_singlechoice_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_holo.xml26
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_progress_holo.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/calendar_view.xml16
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/date_picker_dialog.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/date_picker_holo.xml8
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/expandable_list_content.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/expanded_menu_layout.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/grid_content.xml10
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/list_content.xml10
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_checkbox.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_icon.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_layout.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_radio.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/number_picker_with_selector_wheel.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/popup_menu_item_layout.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/progress_dialog_holo.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/resolve_list_item.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/resolver_grid.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_item_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_multichoice_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_singlechoice_holo.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_hint.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_item_1line.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_1.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2_single_choice.xml7
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_1.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_2.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_checked.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_multiple_choice.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_single_choice.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_dropdown_item.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_item.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/tab_swipe.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/time_picker_dialog.xml1
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/layout/time_picker_holo.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/raw/roboto_bold.ttfbin0 -> 163448 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/raw/roboto_bolditalic.ttfbin0 -> 165864 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/raw/roboto_italic.ttfbin0 -> 160736 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/raw/roboto_regular.ttfbin0 -> 158604 bytes
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-af/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-am/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ar/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-be/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-bg/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ca/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-cs/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-da/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-de/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-el/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-en-rGB/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-es-rUS/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-es/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-et/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-fa/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-fi/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-fr/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-h720dp/dimens.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-hi/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-hr/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-hu/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-in/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-it/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-iw/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ja/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ko/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-large/config.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-large/dimens.xml4
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-large/themes.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-lt/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-lv/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ms/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-nb/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-nl/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-pl/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-pt-rPT/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-pt/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-rm/strings.xml10
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ro/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-ru/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sk/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sl/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sr/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sv/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sw/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sw600dp/config.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sw600dp/dimens.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sw720dp/config.xml3
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-sw720dp/dimens.xml6
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-th/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-tl/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-tr/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-uk/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-v11/themes.xml59
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-vi/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-xlarge/dimens.xml5
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-zh-rCN/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-zh-rTW/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values-zu/strings.xml34
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/attrs.xml378
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/colors.xml55
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/config.xml9
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/dialogs.xml149
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/dimens.xml13
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/ids.xml11
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/strings.xml35
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/styles.xml404
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/text.xml153
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/themes-core.xml263
-rw-r--r--android/3rd_party/HoloEverywhere/library/res/values/themes.xml326
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloActivity.java696
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragment.java282
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragmentInflater.java119
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuBuilder.java99
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuCallbackGetter.java8
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuDecorView.java101
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuItemWrapper.java17
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuListener.java16
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuWrapper.java56
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ExpandedMenuView.java54
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/HoloListMenuItemView.java259
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ListMenuPresenter.java254
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/MenuDialogHelper.java131
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/PopupMenuHelper.java356
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/view/ContextMenu.java19
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ArrayAdapter.java328
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ChooserActivity.java42
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ContentResolverCompat.java67
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/FontLoader.java277
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/HoloEverywhere.java73
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHolo.java21
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloActivity.java67
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloFragment.java47
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ITabSwipe.java61
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IntentCompat.java59
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/LayoutInflater.java811
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/SystemServiceManager.java104
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ThemeManager.java982
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/AddonSherlock.java239
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddon.java99
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonActivity.java124
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonApplication.java14
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonAttacher.java66
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBase.java27
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBasicAttacher.java131
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonFragment.java21
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonThemes.java136
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Activity.java596
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertActivity.java53
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialog.java514
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialogFragment.java21
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Application.java198
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ContextThemeWrapperPlus.java24
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DatePickerDialog.java125
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Dialog.java199
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DialogFragment.java406
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ExpandableListActivity.java104
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Fragment.java146
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/GridFragment.java217
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListActivity.java106
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListFragment.java217
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ProgressDialog.java314
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ResolverActivity.java703
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeActivity.java156
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeFragment.java305
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TimePickerDialog.java99
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/ColorDrawable.java138
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableCompat.java172
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableContainer.java643
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/LayerDrawable.java584
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/RotateDrawable.java300
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/StateListDrawable.java236
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/AlertController.java811
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/DialogTitle.java53
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/GenericInflater.java278
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/NumberPickerEditText.java22
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/WindowDecorView.java163
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_View.java236
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_ViewGroup.java52
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/PreferenceManagerHelper.java70
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/SharedPreferences.java154
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/AllCapsTransformationMethod.java35
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/TransformationMethod.java17
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ArrayUtils.java187
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Arrays.java27
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/CharSequences.java89
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FastXmlSerializer.java385
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FinitePool.java61
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pair.java42
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pool.java8
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Poolable.java12
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/PoolableManager.java10
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pools.java26
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ReflectHelper.java38
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseArray.java230
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseIntArray.java197
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SynchronizedPool.java31
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/WeaklyMap.java183
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/XmlUtils.java658
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSeekBar.java414
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSpinner.java382
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AdapterView.java677
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AutoCompleteTextView.java722
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/BaseExpandableListAdapter.java77
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Button.java84
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CalendarView.java906
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckBox.java84
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckedTextView.java85
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/DatePicker.java559
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Divider.java42
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/EditText.java98
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListConnector.java594
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListPosition.java92
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListView.java645
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FastScroller.java754
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FrameLayout.java19
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/GridView.java688
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeaderViewListAdapter.java180
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeterogeneousExpandableList.java12
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/LinearLayout.java1220
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListAdapterWrapper.java135
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListPopupWindow.java858
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListView.java1029
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/MultiAutoCompleteTextView.java179
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/NumberPicker.java1388
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupMenu.java102
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupWindow.java844
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ProgressBar.java870
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/RadioButton.java84
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Scroller.java307
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SeekBar.java75
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SimpleExpandableListAdapter.java149
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Spinner.java699
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Switch.java593
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TextView.java84
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TimePicker.java464
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Toast.java48
-rw-r--r--android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ToggleButton.java84
-rw-r--r--android/3rd_party/HoloEverywhere/support-library/android-support-v4-r13.jarbin0 -> 484258 bytes
-rwxr-xr-xandroid/MapsWithMePro/install-run.sh14
1554 files changed, 76813 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 94f75852e0..0fe7dcddcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,6 +63,9 @@ bada/Maps/Res
bada/Maps/Home
bada/Maps/*.zip
+# android temporal
+mobile_api
+
# android
android/bin
android/gen
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000000..db834245bf
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,10 @@
+#local files
+.classpath
+.cproject
+.project
+local.properties
+
+#dirs
+bin/
+gen/
+resbuilder/ \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/LICENSE b/android/3rd_party/HoloEverywhere/LICENSE
new file mode 100644
index 0000000000..8b5169554d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/LICENSE
@@ -0,0 +1,7 @@
+Copyright (C) 2013 Sergey Shatunov
+
+Permission is hereby 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 following conditions:
+
+The above copyright notice and this permission notice shall be 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.
diff --git a/android/3rd_party/HoloEverywhere/README.md b/android/3rd_party/HoloEverywhere/README.md
new file mode 100644
index 0000000000..f4579731ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/README.md
@@ -0,0 +1,52 @@
+![HoloEverywhere](http://holoeverywhere.org/github-res/logo.png "HoloEverywhere")
+
+[![Build Status](https://travis-ci.org/Prototik/HoloEverywhere.png?branch=master)](https://travis-ci.org/Prototik/HoloEverywhere)
+
+## What is it?
+Bringing Holo Theme from Android 4.1 to 2.1 and above.
+## Links
+[![Play Store](http://holoeverywhere.org/github-res/play_store_button.png)][Play Store]
+[![Donate](http://holoeverywhere.org/github-res/donate_button.png)][Donate]
+
+## How to use?
+### [Eclipse](https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE#eclipse)
+### [Eclipse + Maven](https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE#eclipse--maven)
+### [IntelliJ IDEA](https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE#intellij-idea)
+
+## Screenshots
+![Screenshot 1](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/1.png "Screenshot 1")
+![Screenshot 2](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/2.png "Screenshot 2")
+![Screenshot 3](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/3.png "Screenshot 3")
+![Screenshot 4](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/4.png "Screenshot 4")
+![Screenshot 5](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/5.png "Screenshot 5")
+![Screenshot 6](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/6.png "Screenshot 6")
+![Screenshot 7](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/7.png "Screenshot 7")
+![Screenshot 8](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/8.png "Screenshot 8")
+![Screenshot 9](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/9.png "Screenshot 9")
+![Screenshot 10](https://github.com/Prototik/HoloEverywhere/raw/gh-pages/img/screenshots/10.png "Screenshot 10")
+
+## Featured implementations
+ * [Project Euler](https://play.google.com/store/apps/details?id=ie.cathalcoffey.android.projecteuler)
+ * [Meditation Assistant](https://play.google.com/store/apps/details?id=sh.ftp.rocketninelabs.meditationassistant)
+ * [Ragnabase MVP](https://play.google.com/store/apps/details?id=com.ragnabase.mvp)
+ * [noodles - To Do List](https://play.google.com/store/apps/details?id=com.makeramen.noodles)
+
+Write to [Sergey](mailto:prototypegamez@gmail.com) for add your application to this list.
+
+## Contact
+
+Sergey:
+ * [Email](mailto:prototypegamez@gmail.com "Send email to Sergey")
+ * [Google Plus](https://plus.google.com/103272077758668000975/posts "Google Plus")
+ * [Habrahabr](http://habrahabr.ru/users/prototik/)
+
+Christophe:
+ * [Google Plus](https://plus.google.com/108315424589085456181/posts "Google Plus")
+
+## License
+MIT License, full text of license see [here][License]
+
+[Play Store]: https://play.google.com/store/apps/details?id=org.holoeverywhere.demo "Play Store"
+[Donate]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X7E7U7HNR36YN&lc=US&item_name=HoloEverywhere&currency_code=USD&bn=PP%2dDonationsBF%3adonate_button%2epng%3aNonHosted "Donate"
+[Build with Maven]: https://github.com/Prototik/HoloEverywhere/wiki/Maven "Build with maven"
+[License]: https://raw.github.com/Prototik/HoloEverywhere/master/LICENSE "LGPLv3"
diff --git a/android/3rd_party/HoloEverywhere/checkstyle.xml b/android/3rd_party/HoloEverywhere/checkstyle.xml
new file mode 100644
index 0000000000..56f743584b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/checkstyle.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="Checker">
+ <module name="NewlineAtEndOfFile" />
+ <module name="FileLength" />
+ <module name="FileTabCharacter" />
+
+ <module name="TreeWalker">
+ <property name="cacheFile" value="${checkstyle.cache.file}" />
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <!--module name="JavadocMethod"/ -->
+ <!--module name="JavadocType"/ -->
+ <!--module name="JavadocVariable"/ -->
+ <!--module name="JavadocStyle"/ -->
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <!--module name="ConstantName"/ -->
+ <!--module name="LocalFinalVariableName"/ -->
+ <!--module name="LocalVariableName"/ -->
+ <module name="MemberName" />
+ <!--module name="MethodName"/ -->
+ <module name="PackageName" />
+ <!--module name="ParameterName"/ -->
+ <!--module name="StaticVariableName"/ -->
+ <!--module name="TypeName"/ -->
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport" />
+ <module name="IllegalImport" /> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport" />
+ <module name="UnusedImports" />
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <!--module name="LineLength"/ -->
+ <!--module name="MethodLength"/ -->
+ <!--module name="ParameterNumber"/ -->
+
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <!--module name="EmptyForIteratorPad"/ -->
+ <!--module name="MethodParamPad"/ -->
+ <!--module name="NoWhitespaceAfter"/ -->
+ <!--module name="NoWhitespaceBefore"/ -->
+ <!--module name="OperatorWrap"/ -->
+ <!--module name="ParenPad"/ -->
+ <!--module name="TypecastParenPad"/ -->
+ <!--module name="WhitespaceAfter"/ -->
+ <!--module name="WhitespaceAround"/ -->
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <!--module name="ModifierOrder"/ -->
+ <!--module name="RedundantModifier"/ -->
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <!--module name="AvoidNestedBlocks"/ -->
+ <!--module name="EmptyBlock"/ -->
+ <!--module name="LeftCurly"/ -->
+ <!--module name="NeedBraces"/ -->
+ <!--module name="RightCurly"/ -->
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <!--module name="AvoidInlineConditionals"/ -->
+ <!--module name="EmptyStatement"/ -->
+ <!--module name="EqualsHashCode"/ -->
+ <!--module name="HiddenField"/ -->
+ <!--module name="IllegalInstantiation"/ -->
+ <!--module name="InnerAssignment"/ -->
+ <!--module name="MagicNumber"/ -->
+ <!--module name="MissingSwitchDefault"/ -->
+ <!--module name="RedundantThrows" /-->
+ <!--module name="SimplifyBooleanExpression"/ -->
+ <!--module name="SimplifyBooleanReturn"/ -->
+ <module name="StringLiteralEquality" />
+ <module name="CovariantEquals" />
+ <!--module name="NoClone"/ -->
+ <module name="NoFinalizer" />
+ <module name="PackageDeclaration" />
+ <!--module name="FallThrough"/ -->
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--module name="DesignForExtension"/ -->
+ <!--module name="FinalClass"/ -->
+ <!--module name="HideUtilityClassConstructor"/ -->
+ <!--module name="InterfaceIsType"/ -->
+ <!--module name="VisibilityModifier"/ -->
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <!--module name="ArrayTypeStyle"/ -->
+ <!--module name="FinalParameters"/ -->
+ <!--module name="TodoComment"/ -->
+ <module name="UpperEll" />
+ </module>
+</module>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/.travis.yml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/.travis.yml
new file mode 100644
index 0000000000..480bfd898c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/.travis.yml
@@ -0,0 +1,18 @@
+language: java
+
+branches:
+ excludes:
+ - gh-pages
+
+notifications:
+ email: false
+
+before_install:
+ - wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
+ - tar -zxf android-sdk_r20.0.3-linux.tgz
+ - export ANDROID_HOME=~/builds/JakeWharton/ActionBarSherlock/android-sdk-linux
+ - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
+ - TOOLS=$(android list sdk --no-ui | grep "Android SDK Platform-tools" | cut -d"-" -f1)
+ - android update sdk --filter "$TOOLS" --no-ui --force
+ - SDK=$(android list sdk --no-ui | grep ", API 14," | cut -d"-" -f1)
+ - android update sdk --filter "$SDK" --no-ui --force
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CHANGELOG.md b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CHANGELOG.md
new file mode 100644
index 0000000000..63f84f4375
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CHANGELOG.md
@@ -0,0 +1,496 @@
+Change Log
+===============================================================================
+
+Version 4.3.1 *(2013-04-28)*
+----------------------------
+
+ * Fix: Importing library into Eclipse as a Maven module now works correctly.
+ * Prevent dispatching touch events to both action bar and content view on API
+ 11 and up.
+ * Add Hebrew and Brazillian translations to i18n module.
+
+
+Version 4.3.0 *(2013-04-15)*
+----------------------------
+
+ * New: FEST module for testing ActionBarSherlock classes.
+ * New: i18n module for including internationalized strings used by actionbar.
+ * Removed dialog themes.
+ * Fix: `SearchView` suggestions now work properly.
+ * Fix: Prevent rare NPE when restoring state on pre-Honeycomb devices.
+ * Fix: Correct behavior of `IcsColorDrawable`'s `setAlpha` method.
+ * Fix: Handle cases where `Locale.ROOT` is not present on pre-Honeycomb.
+ * Fix: Correct tab measurement edge-case on pre-Honeycomb.
+ * Use custom Toast layout to ensure consistent look and feel.
+ * Fix: Prevent monkey runners from uselessly crashing.
+ * Fix: Do not hold on to old menu items after a call to `invalidateOptionsMenu`.
+ * Fix: Ensure `ShareActionProvider` works when only one intent is available.
+ * Fix: Scroll list navigation to the selected item when opened.
+
+
+Version 4.2.0 *(2012-10-07)*
+----------------------------
+
+**Maven `artifactId` is now 'actionbarsherlock'.**
+
+Note: The `.Dialog` themes are now deprecated. These will be removed in a future
+version of the library.
+
+ * Add `SearchView` widget for standard search interaction (API 8+ only)
+ * Fix: `ShareActionProvider` in the split action bar no longer fills the entire
+ screen.
+ * Fix: `ShareActionProvider` now does file I/O on a background thread.
+ * Fix: Automatically correct `ColorDrawable` not respecting bounds when used as
+ a stacked background.
+ * Fix: Ensure fragments collection is present before dispatching events.
+ * Fix: XML-defined `onClick` searches the correct context for the declared
+ method.
+ * Fix: Ensure action mode start/finish callbacks are invoked on the activity
+ for the native action bar.
+ * Fix: Allow tab callbacks to have a fragment transaction instance for any
+ `FragmentActivity`.
+ * Fix: Ensure `CollapsibleActionView` callbacks are dispatched in both native
+ and compatbility action bars.
+ * Fix: Remove `.ForceOverflow` themes. These never should have been included.
+
+
+Version 4.1.0 *(2012-05-17)*
+----------------------------
+
+ * Fix: Altered technique used for menu event dispatching through the fragment
+ manager for greater control.
+ * Fix: Do not dispatch menu creation event if the activity has been destroyed.
+ * Fix: Correct potential `NullPointerException` when expanding an action item.
+ * Fix: Correct potential `NullPointerException` when the hardware menu key was
+ pressed in an activity that is forcing the overflow menu.
+ * Fix: Do not set a listener on the native action bar tab wrapper unless a
+ compatibility listener has been set.
+ * Fix: Ensure the compatibility animation framework is always available on
+ views even if they were previously detached from the view hierarchy.
+
+
+Version 4.0.2 *(2012-04-15)*
+----------------------------
+
+ * Upgrade to r7 support library.
+ * Fix: Do not trigger menu creation after `onCreate` if activity is finishing.
+ * Fix: Prevent overflow from displaying if there are no overflow action items.
+ * Fix: Long-pressing menu key no longer triggers overflow.
+ * Fix: Use proper tab state-list drawable to mimic ICS.
+ * Fix: Ensure dispatching menu creation and preparation to fragments can
+ properly return `false` when appropriate to avoid rendering artifacts.
+ * Fix: Properly save and fetch action mode tag on ICS.
+ * Fix: Add missing density-specific resources for certain asssets and remove
+ unused assets.
+
+
+Version 4.0.1 *(2012-03-25)*
+----------------------------
+
+ * Add `ShareActionProvider` widget for use as action items.
+ * Re-add 'Styled' sample to provide a more comprehensive theming example.
+ * Fix: Do not dispatch options item selection to fragments if the activity
+ handles the callback.
+ * Fix: Prevent menu key from opening the overflow menu when an action mode is
+ currently displayed.
+ * Fix: Ensure fragment transaction instance is not `null` on initial tab
+ selection callback.
+ * Fix: Displaying an action mode while using stacked tab navigation no longer
+ throws an exception.
+ * Fix: Using expandable action item callbacks no longer results in a possible
+ exception on older devices.
+
+
+Version 4.0.0 *(2012-03-07)*
+----------------------------
+
+Complete rewrite of the library to backport the Android 4.0 action bar.
+
+ * The minimum supported version of Android is now 2.1 (API 7).
+ * New base activities are provided (e.g., `SherlockActivity` and
+ `SherlockFragmentActivity`) which extend from the native activities.
+ * The support library sources are no longer included in the library. You must
+ include `android-support-v4.jar` in your project separately.
+ * Theming now mirrors that of the native action bar through the use of multiple
+ styles rather than through `ab`- and `am`-prefixed attributes in the theme.
+ * The action bar can be statically attached to an activity view without the
+ requirement of using one of the provided base activities.
+
+
+Version 3.5.1 *(2012-01-03)*
+----------------------------
+
+ * Fix: `NullPointerException` in `FragmentManager` can no longer occur when an
+ attempt is being made to save to a `Bundle` that has not yet been created.
+ * Fix: Pre-3.0 action item submenu dialogs now properly dismiss themselves when
+ an item of theirs is selected.
+
+
+Version 3.5.0 *(2011-12-18)*
+----------------------------
+
+ * Library now uses the `r6` version of the compatibility library for its base.
+ Ice Cream Sandwich-specific implementations are currently disabled, however,
+ but will be added in a future version of the library.
+
+ `MenuCompat`, `MenuItemCompat`, and `ActivityCompat` have be added back in
+ to ease transition to this library but all their methods and the classes
+ themselves have been deprecated.
+ * Rewritten menu and action item support from Ice Cream Sandwich.
+
+ * Removed the need for the custom `Window.FEATURE_ACTION_ITEM_TEXT` flag.
+ You should now use the `showAsAction` attribute and/or the
+ `setShowAsAction(int)` method on each `MenuItem` to control whether or
+ not text is shown
+ * Action item dividers are now added automatically only when necessary
+ to distinguish possible confusion between action items.
+ * Fix: Action views now properly size themselves within the bounded space
+ of the menu.
+
+ * Fix: List navigation no longer becomes unusable on certain device
+ configurations.
+ * Fix: `SubMenu`'s `findItem(int)` method now properly returns the support
+ version of `MenuItem`.
+ * Fix: Invisible sub-menu items are no longer shown on the pre-3.0 popup list.
+
+
+Version 3.4.2 *(2001-11-09)*
+----------------------------
+
+ * Fix: Stacked action bar now properly sets the tab bar background based on
+ the theme.
+
+
+Version 3.4.1 *(2011-11-09)*
+----------------------------
+
+ * The `makeFragmentName` method in `FragmentPagerAdapter` has been changed to
+ `public` scope to allow for easier access to your fragments that it is
+ managing.
+ * Action bar will now animate when calling `show()` or `hide()`.
+ * `SherlockPreferenceActivity` now provides full fragment and loader support.
+ * Examples for the plugins are now in their own sample application.
+ * Fix: Home icon no longer erroneously clipped when it exceeds the size of the
+ action bar.
+ * Fix: Tabs will now scroll horizontally to mimic the native action bar
+ behavior.
+ * Fix: Plugins now properly DO NOT inline their `R.java` integer constants.
+ * Fix: Tabs below the action bar are now styled with a default background so
+ that they do not incorrectly inherit an applied background unless explicity
+ declared.
+
+
+Version 3.4.0 *(2011-10-30)*
+----------------------------
+
+ * Library now uses the `r4` version of the compatibility library for its base.
+ Ice Cream Sandwich-specific implementations are currently disabled, however,
+ but will be added in a future version of the library.
+ * Context menu callbacks now use the support version of `MenuItem` to maintain
+ consistency.
+ * Added preference plugin which provides an action bar enhanced preference
+ screen.
+ * Fix: `abHomeLayout` theme attribute is now honored.
+ * Fix: `onPrepareOptionsMenu` is now properly dispatched upon menu
+ invalidation.
+
+
+Version 3.3.1 *(2011-10-20)*
+----------------------------
+
+ADT 14 is now required. Maven 3 is required if building from the command line.
+
+ * XML-defined `onClick` attributes will now check for an `onClick` method that
+ takes an `android.support.v4.view.MenuItem` instance.
+ * Tabs on medium screens in landscape now display inline rather than below the
+ action bar to mirror how Android 4.0 behaves with the same configuration.
+ * Fix: Menu inflater properly checks activity context for `onClick` method
+ declared in the XML.
+ * Fix: Dialog fragment properly saves its `showDialog` state when not being
+ used as a popup.
+ * Fix: Return `-1` when in tab navigation but no tab is selected. This brings
+ the library in line with the post-3.0 behavior.
+ * Fix: Removing a menu group no longer throws an `IndexOutOfBoundsException`.
+ * Fix: `getSelectedTab` and `getTabAt` no longer throw `NullPointerException`s
+ on post-3.0 when no tab was selected or no tab existed at the specified
+ position, respectively.
+ * Fix: `findFragmentById` now properly returns fragments attached to
+ `android.R.id.content` when run on pre-3.0 devices.
+
+
+Version 3.3.0 *(2011-10-11)*
+----------------------------
+
+ * Tabs are now displayed below the action bar on all medium-screen devices and
+ portrait large-screen devices.
+ * Fix: Dialog fragments no longer throw an `IllegalStateException` when being
+ used as a regular fragment (i.e., not as a popup). See
+ [StackOverflow](http://stackoverflow.com/questions/5637894/dialogfragments-with-devices-api-level-11/7560686#7560686)
+ for more information.
+ * Fix: Popping a fragment off of the back stack now properly assigns its parent
+ activity.
+ * Fix: An activity result no longer causes a `NullPointerException` when the
+ target fragment no longer exists.
+ * Fix: Action item dividers are now properly initially hidden when their
+ associated action items are as well.
+
+
+Version 3.2.3 *(2011-09-16)*
+----------------------------
+
+ * Fix: Fragments in a `ViewPager` that contributed items to the options menu
+ were caught in a race condition causing inconsistent results when a new page
+ was selected. This regression was introduced in version 3.2.2.
+
+
+Version 3.2.2 *(2011-09-15)*
+----------------------------
+
+ * Fix: Side-effects related to using `FragmentMapActivity` due to how it was
+ referencing resources from the main library.
+ * Fix: Fragments adjacent to the currently selected fragment in a `ViewPager`
+ no longer receive context menu events.
+ * Fix: Eliminate exception when inflating context menus on 3.0+ when using
+ `getMenuInflater()`.
+ * Fix: `ViewPager` now determines whether or not an activity menu invalidation
+ is required independently of whether or not fragments were created or
+ destroyed. This should fix an edge case where an activity with a `ViewPager`
+ containing only two fragments would not get its menu properly invalidated.
+
+
+Version 3.2.1 *(2011-09-12)*
+----------------------------
+
+ * Fix: Action mode API incorrectly using the native `Menu` and `MenuItem`
+ classes causing an easy pitfall for `ClassCastExceptions`.
+ * Fix: Large action bar backgrounds increasing the size beyond that alloted in
+ the theme.
+
+
+Version 3.2.0 *(2011-09-05)*
+----------------------------
+
+ * Added support for `MapView` and the Google APIs through the use of
+ `FragmentMapActivity`. If you are using a map within a fragment you must
+ ensure it is always attached to an activity which extends from this new base
+ class.
+
+ Since supporting maps requires compiling against the Google APIs, this
+ functionality is implemented in the form of a plugin which is to be used
+ alongside the normal library. You can choose to add it as an additional
+ library project or by including it as a `.jar`. Maven users may simply
+ include the additional dependency (artifactId: `plugin-maps`).
+ * Fix: Fragments adjacent to the currently selected fragment in a `ViewPager`
+ no longer contribute to the activity menu.
+ * `ActionBar.Tab` has been changed from an interface to an abstract class to
+ mirror its native counterpart.
+
+
+Version 3.1.3 *(2011-08-14)*
+----------------------------
+
+ * Renamed all resources to be prefixed with `abs__` to avoid conflicts when
+ including in your project.
+ * Fix: Action bar background being set on two views causing artifacts to remain
+ on screen when the action bar was hidden.
+ * Fix: Incorrect sub-menu item being selected by default when the sub-menu was
+ triggered from the native options menu on pre-3.0.
+ * Fix: `MenuItem.setVisible` now properly updates the associated action item and
+ native menu item visible state.
+ * Fix: Adding items to a menu now honors its ordering and category.
+ * Fix: Fragment options item selected callback now uses the proper version of
+ `MenuItem`.
+
+
+Version 3.1.2 *(2011-08-07)*
+----------------------------
+
+ * Fix: `MenuItem.getMenuInfo()` was throwing runtime exception. Will now just
+ return `null`.
+ * Fix: Dragging over a `WebView` contained in a `ViewPager` would not register.
+ * Fix: Inflation of context menu incorrectly being handled by the custom menu
+ inflater for the library.
+
+
+Version 3.1.1 *(2011-07-31)*
+----------------------------
+
+ * Fix: `MenuItem.getSubMenu` now returns a support instance rather than a
+ native instance.
+ * Fix: Fragment methods `onAttach` and `onInflate` incorrectly regressed to use
+ `Activity` instead of a `FragmentActivity` in their method signatures.
+ * Fix: Retained fragments not being re-attached on pre-3.0 when attached to
+ `android.R.id.content` upon activity recreation.
+ * Fix: `onPrepareOptionsMenu` not dispatched to fragments. This still will only
+ occur if the activity method returns true (which is the default).
+ * Fix: `Menu.findItem` not returning `null` when the item was not found on
+ Android 3.0+.
+
+
+Version 3.1.0 *(2011-07-22)*
+----------------------------
+
+Due to shortcomings in the Android theming system, a small change must be made
+in how this library handles themes. If you were using a custom style for
+`actionBarStyle` you must now specify its attributes in the root of the theme
+and prefix them with 'ab'.
+
+You can see an example of this in the `SherlockCustom` theme in
+`samples/demos/res/values/styles.xml`.
+
+ * Library now uses the `r3` version of the compatibility library for its base.
+ * `actionBarStyle` is no longer a valid theme attribute (see note above).
+ * Added the demo project included with the new compatibility library under
+ `samples/demos/` and merged in the old 'featuredemo'.
+ * Dividers are now shown on pre-3.0 devices between all action items.
+ * `Window.FEATURE_ACTION_BAR_OVERLAY` is now honored on pre-3.0 devices.
+ * Inflation of XML menu resources will now honor `android:actionLayout` and
+ `android:actionViewClass` attributes.
+ * Buttons for displaying the determinate and indeterminate progress bars have
+ been added to the feature toggle demo.
+ * Added support for indeterminate progress bar. Due to the `final` modifier on
+ the native type, you must use `setIndeterminateProgressBarVisibility(Boolean)`
+ and pass `Boolean.TRUE` or `Boolean.FALSE`.
+ * Fix: `MenuBuilder#removeItem(int)` and `MenuBuilder#findItem(int)` throwing
+ `IndexOutOfBoundsException`s when the item was not found.
+ * Fix: Theme attributes for home item data (e.g., icon, logo) will not be
+ overwritten by the special `MenuItem` instance for home.
+ * Fix: Native strings can now be specified for an XML menu `<item>` in
+ `android:title` and `android:titleCondensed`.
+ * `Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT` is now
+ `Window.FEATURE_ACTION_BAR_ITEM_TEXT`.
+ * `Widget.Sherlock.Spinner.DropDown.ActionBar` and
+ `Widget.Sherlock.Light.Spinner.DropDown.ActionBar` styles are now
+ `Widget.Sherlock.Spinner` and `Widget.Sherlock.Light.Spinner`, respectively.
+ * `Widget.Sherlock.ActionBarView_TabXXX` styles are now
+ `Widget.Sherlock.ActionBar.TabXXX`.
+
+
+Version 3.0.3 *(2011-07-17)*
+----------------------------
+
+This version is a hotfix for incompatibilities introduced with the SDKs for
+3.1 r2 and 3.2 r1. Due to unavoidable changes in the underlying SDK, the library
+must now be compiled against API level 13.
+
+ * `actionModeStyle` and `actionModePopupWindowStyle` are no longer valid theme
+ attributes.
+
+
+Version 3.0.2 *(2011-06-23)*
+----------------------------
+
+ * Sub-menus for action items are now shown in a list dialog.
+ * Moved certain classes to the `com.actionbarsherlock.internal` package which
+ were not meant for public consumption. Despite being given `public` scope in
+ this new package, these classes should **NOT** be used under any circumstances
+ as their API can be considered highly volatile and is subject to change often
+ and without warning.
+
+
+Version 3.0.1 *(2011-06-08)*
+----------------------------
+
+ * Fix: `onOptionsItemSelected()` not being called in fragments if the activity
+ version returns `false`.
+ * Fix: `onCreateOptionsMenu()` not being called in fragments on Android 3.0+.
+ * New: Enable action item text display on pre-Android 3.0 by calling
+ `requestWindowFeature` with `Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT`.
+ * Fix: `setCustomView()` no longer automatically enables the custom view on
+ pre-3.0. You must call `setDisplayShowCustomEnabled()` in order to display
+ the view.
+
+
+Version 3.0.0 *(2011-06-05)*
+----------------------------
+
+The API has been rewritten to mimic that of the native action bar. As a result,
+usage now only requires changing a few imports to use the support versions
+of classes and calling `getSupportActionBar()`. See the README for more info.
+
+The rewrite necessitated tight interaction with the
+[compatibility library](http://android-developers.blogspot.com/2011/03/fragments-for-all.html)
+to the point where its sources are now included. You are no longer required to
+have the standalone `.jar` file.
+
+Also included is a default custom action bar for use by default on pre-3.0
+devices. This custom implementation is based off of Johan Nilsson's
+[Android-ActionBar](https://github.com/johannilsson/android-actionbar) and the
+[work that I have done](https://github.com/johannilsson/android-actionbar/pull/25)
+on it.
+
+More details are available at http://actionbarsherlock.com
+
+
+Version 2.1.1 *(2011-03-21)*
+----------------------------
+
+**No changes to library code.**
+
+ * Moved library to the root of the repository.
+ * Added `samples/dependencies.py` script to automatically download the needed
+ dependencies for the sample projects.
+
+
+Version 2.1.0 *(2011-03-21)*
+----------------------------
+
+**WARNING**: The
+[Android Compatibility Library (v4)](http://android-developers.blogspot.com/2011/03/fragments-for-all.html)
+is now required.
+
+ * Added `ActionBarSherlock.Activity`, `ActionBarSherlock.FragmentActivity`,
+ and `ActionBarSherlock.ListActivity` for extension by implementing
+ activities, the latter of which is deprecated. This affords a much tighter
+ integration and allows for the use of other new features listed below.
+ * New API method: `layout(Fragment)` will use the fragment argument as the
+ content to the activity.
+ * New API method: `menu(int)` allows for the inflation of menu XMLs from a
+ resource. For the non-native implementation, the XML can be inflated to a
+ custom Menu which can then be applied appropriately to the third-party
+ action bar. Sub-menus are also supported. Third-party action bar handlers
+ should implement `ActionBarSherlock.HasMenu` for this functionality. *This
+ feature requires that activities extend from one of the provided activity
+ base classes.*
+ * New API method: `homeAsUp(boolean)`. This mimics the native method
+ `setDisplayHomeAsUpEnalbed` on the native action bar. Third-party action bar
+ handlers should implement `ActionBarSherlock.HasHomeAsUp` for this
+ functionality.
+ * New API method: `useLogo(boolean)` will trigger the action bar to hide the
+ application icon/home button and title and show a larger logo representing
+ the application. Third-party action bar handlers should implement
+ `ActionBarSherlock.HasLogo` for this functionality.
+ * New API method: `listNavigation(SpinnerAdapter, OnNavigationListener)`. Tells
+ the action bar to use drop-down style navigation with the specified list of
+ items and callback listener. Third-party action bar handlers should
+ implement `ActionBarSherlock.HasListNavigation` for this functionality.
+ * Javadocs are now available at
+ [jakewharton.github.com/ActionBarSherlock](http://jakewharton.github.com/ActionBarSherlock/).
+ * A standalone JAR is now available via the
+ [GitHub downloads page](https://github.com/JakeWharton/ActionBarSherlock/downloads)
+ or in my
+ [personal maven repository](http://r.jakewharton.com/maven/)
+ as `com.jakewharton:android-actionbarsherlock:2.1.0`.
+
+
+Version 2.0.1 *(2011-03-11)*
+----------------------------
+
+ * Use `Class.forName()` for detection of native action bar. This provides
+ compatability all the way back to Android 1.5.
+
+
+Version 2.0.0 *(2011-03-09)*
+----------------------------
+Complete rewrite!
+
+ * New and better API.
+ * More sane logic and attachment to activity.
+ * Extensible via generics. Implement any ActionBar or roll your own with
+ minimal effort.
+ * Now a library project for easy inclusion in applications.
+
+
+Version 1.0.0 *(2011-03-07)*
+----------------------------
+Initial release.
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CONTRIBUTING.md b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CONTRIBUTING.md
new file mode 100644
index 0000000000..30d383364e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/CONTRIBUTING.md
@@ -0,0 +1,11 @@
+Contributing
+============
+
+If you would like to contribute code to ActionBarSherlock you can do so through
+GitHub by forking the repository and sending a pull request.
+
+When submitting code, please make every effort to follow existing conventions
+and style in order to keep the code as readable as possible. Please also make
+sure your code compiles by running `mvn clean verify`. Checkstyle failures
+during compilation indicate errors in your style and can be viewed in the
+`checkstyle-result.xml` file.
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/LICENSE.txt b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/README.md b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/README.md
new file mode 100644
index 0000000000..6506c361d2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/README.md
@@ -0,0 +1,60 @@
+ActionBarSherlock
+=================
+
+ActionBarSherlock is an standalone library designed to facilitate the use of
+the action bar design pattern across all versions of Android through a single
+API.
+
+The library will automatically use the [native ActionBar][2] implementation on
+Android 4.0 or later. For previous versions which do not include ActionBar, a
+custom action bar implementation based on the sources of Ice Cream Sandwich
+will automatically be wrapped around the layout. This allows you to easily
+develop an application with an action bar for every version of Android from 2.x
+and up.
+
+**See http://actionbarsherlock.com for more information.**
+
+![Example Image][3]
+
+Try out the sample applications on the Android Market: [Feature Demos][4],
+[Fragments][5], and [RoboGuice][6].
+
+Continuous integration is provided by [Travis CI][7].
+
+
+
+Developed By
+============
+
+* Jake Wharton - <jakewharton@gmail.com>
+
+
+
+License
+=======
+
+ Copyright 2012 Jake Wharton
+
+ 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.
+
+
+
+
+
+ [1]: http://android-developers.blogspot.com/2011/03/fragments-for-all.html
+ [2]: http://developer.android.com/guide/topics/ui/actionbar.html
+ [3]: http://actionbarsherlock.com/static/feature.png
+ [4]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
+ [5]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.fragments
+ [6]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.roboguice
+ [7]: https://travis-ci.org/JakeWharton/ActionBarSherlock
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/RELEASING.md b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/RELEASING.md
new file mode 100644
index 0000000000..7fe25faf46
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/RELEASING.md
@@ -0,0 +1,24 @@
+ActionBarSherlock Release Process
+=================================
+
+ 1. Make sure she builds!
+
+ mvn clean verify
+
+ 2. Ensure the `CHANGELOG.md` file has up-to-date information and the current date.
+ 3. Pull in the latest translations in the i18n module.
+ 4. Change all of the sample `AndroidManifest.xml` files to the correct version and bump the
+ version code arbitrarily.
+
+ find actionbarsherlock-samples -name AndroidManifest.xml -exec sed -i '' 's|versionCode="[0-9]*"|versionCode="431"|g' {} \;
+ find actionbarsherlock-samples -name AndroidManifest.xml -exec sed -i '' 's|versionName="[0-9.]*"|versionName="4.3.1"|g' {} \;
+
+ 5. Make the release!
+
+ mvn clean release:clean
+ mvn release:prepare release:perform
+
+ 6. Promote the Maven artifact on Sonatype's OSS Nexus install.
+ 7. Deploy the latest website.
+
+ ./deploy_website.sh
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/AndroidManifest.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/AndroidManifest.xml
new file mode 100644
index 0000000000..7b8a848240
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/AndroidManifest.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="100" android:versionName="4.2.0" package="com.actionbarsherlock">
+
+ <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
+
+</manifest>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/README.md b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/README.md
new file mode 100644
index 0000000000..e8a2c080e6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/README.md
@@ -0,0 +1,15 @@
+ActionBarSherlock Library
+=========================
+
+This folder contains the main library which should be linked against as an
+Android library project in your application.
+
+For more information see the "Including In Your Project" section of the
+[usage page][1].
+
+
+
+
+
+
+ [1]: http://actionbarsherlock.com/usage.html
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/build.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/build.xml
new file mode 100644
index 0000000000..2af40096c4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="actionbarsherlock" 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>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/libs/android-support-v4-r13.jar b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/libs/android-support-v4-r13.jar
new file mode 100644
index 0000000000..428bdbc02a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/libs/android-support-v4-r13.jar
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/lint.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/lint.xml
new file mode 100644
index 0000000000..fe7707cf72
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/lint.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+ <issue id="ObsoleteLayoutParam" severity="ignore"/>
+ <issue id="UnusedResources" severity="ignore"/>
+ <issue id="NewApi" severity="ignore"/>
+ <issue id="IconDuplicates" severity="ignore"/>
+ <issue id="IconDuplicatesConfig" severity="ignore"/>
+ <issue id="IconDensities" severity="ignore"/>
+ <issue id="ContentDescription" severity="ignore"/>
+ <issue id="SelectableText" severity="ignore"/>
+ <issue id="NestedWeights" severity="ignore"/>
+ <issue id="InefficientWeight" severity="ignore"/>
+ <issue id="UselessParent" severity="ignore"/>
+ <issue id="TypographyEllipsis" severity="ignore"/>
+ <issue id="InlinedApi" severity="ignore"/>
+ <issue id="DefaultLocale" severity="ignore"/>
+ <issue id="WrongCall" severity="ignore"/>
+ <issue id="DuplicateIds" severity="ignore"/>
+ <issue id="MissingPrefix" severity="ignore"/>
+ <issue id="UseCompoundDrawables" severity="ignore"/>
+ <issue id="Overdraw" severity="ignore"/>
+ <issue id="Registered" severity="ignore"/>
+ <issue id="ViewConstructor" severity="ignore"/>
+</lint>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/pom.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/pom.xml
new file mode 100644
index 0000000000..f9c9407c3f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.actionbarsherlock</groupId>
+ <artifactId>parent</artifactId>
+ <version>4.3.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>actionbarsherlock</artifactId>
+ <name>ActionBarSherlock</name>
+ <packaging>apklib</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.android</groupId>
+ <artifactId>android</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.android</groupId>
+ <artifactId>support-v4</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easytesting</groupId>
+ <artifactId>fest-assert-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.robolectric</groupId>
+ <artifactId>robolectric</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+
+ <plugins>
+ <plugin>
+ <groupId>com.jayway.maven.plugins.android.generation2</groupId>
+ <artifactId>android-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <ignoreMissingFile>false</ignoreMissingFile>
+ <file>target/generated-sources/r/com/actionbarsherlock/R.java</file>
+ <outputFile>target/generated-sources/r/com/actionbarsherlock/R.java</outputFile>
+ <regex>false</regex>
+ <token>static final int</token>
+ <value>static int</value>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <type>jar</type>
+ <file>${project.build.directory}/${project.build.finalName}.jar</file>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <versionRange>[1.4.0,)</versionRange>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/proguard-project.txt b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/proguard-project.txt
new file mode 100644
index 0000000000..f2fe1559a2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/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 *;
+#}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/project.properties b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/project.properties
new file mode 100644
index 0000000000..0e58ae1c0d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/project.properties
@@ -0,0 +1,12 @@
+# 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 use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+android.library=true
+# Project target.
+target=android-17
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_dark.xml
new file mode 100644
index 0000000000..048dc6e591
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
+ <item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_light.xml
new file mode 100644
index 0000000000..6aae62863d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_disable_only_holo_light.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
+ <item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_dark.xml
new file mode 100644
index 0000000000..9d6a3f237b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_dark.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
+ <item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_dark"/>
+ <item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_dark"/>
+ <item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_dark"/>
+ <item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_dark"/>
+ <item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_light.xml
new file mode 100644
index 0000000000..09802fdff8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/color/abs__primary_text_holo_light.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
+ <item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_light"/>
+ <item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_light"/>
+ <item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_light"/>
+ <item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_light"/>
+ <item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
+
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000000..769463b369
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_inverse_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_inverse_holo.9.png
new file mode 100644
index 0000000000..88f11dcb91
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000000..73050476e7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..712a551ece
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000000..bf3b9438b1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000000..81b87b86c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000000..8fc83e22ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_dark_holo.9.png
new file mode 100644
index 0000000000..cbbaec588e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_light_holo.9.png
new file mode 100644
index 0000000000..af917e5b6f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_shadow_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_shadow_holo.9.png
new file mode 100644
index 0000000000..2d59f354ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000000..0520e5a2f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000000..e3e3f93b9f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..1e39572224
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000000..a16db853e9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..0eff695d82
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_light_holo.9.png
new file mode 100644
index 0000000000..219b170fa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_dark.9.png
new file mode 100644
index 0000000000..b0dc31fb3d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_light.9.png
new file mode 100644
index 0000000000..4bc2683b15
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_dark.9.png
new file mode 100644
index 0000000000..4af38fb70b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_light.9.png
new file mode 100644
index 0000000000..d32f74cf4c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..66adffed63
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_light.9.png
new file mode 100644
index 0000000000..caeff9c331
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__btn_cab_done_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..1d836f65a1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000000..5818666d4e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000000..564fb34b43
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_light.9.png
new file mode 100644
index 0000000000..ae21b760fb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_dark.png
new file mode 100644
index 0000000000..897a1c11a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_light.png
new file mode 100644
index 0000000000..0c89f71407
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_ab_back_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_dark.png
new file mode 100644
index 0000000000..d8662e3f0f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_light.png
new file mode 100644
index 0000000000..ed03f620f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_cab_done_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_disabled.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_disabled.png
new file mode 100644
index 0000000000..d97c342d53
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_disabled.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_normal.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_normal.png
new file mode 100644
index 0000000000..33ad8d4b89
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_normal.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000000..3edbd74085
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000000..90db01b5bc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000000..83f36a94cf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000000..a3cc21e6ba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go.png
new file mode 100644
index 0000000000..97b825e831
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go_search_api_holo_light.png
new file mode 100644
index 0000000000..7e1ba2adc6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000000..2abc45809c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000000..bb6aef1d06
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_dark.png
new file mode 100644
index 0000000000..6f747c8f06
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_light.png
new file mode 100644
index 0000000000..682b2fdec4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_menu_share_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search.png
new file mode 100644
index 0000000000..bf8bd6670a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search_api_holo_light.png
new file mode 100644
index 0000000000..72e207bc5d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search.png
new file mode 100644
index 0000000000..66d14aec0c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000000..3481c98286
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_activated_holo.9.png
new file mode 100644
index 0000000000..4ea7afa00e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..986ab0b974
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.png
new file mode 100644
index 0000000000..0279e17a12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_focused_holo.9.png
new file mode 100644
index 0000000000..516f5c7399
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_longpressed_holo.9.png
new file mode 100644
index 0000000000..4ea7afa00e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..5654cd6942
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..5654cd6942
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..f6fd30dcdc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..ca8e9a2778
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..4d3d208578
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..924a99d173
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..310c368e7a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..70cb7fc7e0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..1c269205e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..1c269205e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..40d0d1645c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..40d0d1645c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_inner_holo.png
new file mode 100644
index 0000000000..c8358e9cef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_outer_holo.png
new file mode 100644
index 0000000000..f62f74bb38
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000000..eb28ff9a55
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000000..d281adb553
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..b298586090
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000000..4215396dd4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000000..a280eabf59
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000000..f8d619b4d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..955a2f3406
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000000..6c22e223ac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_focused_holo.9.png
new file mode 100644
index 0000000000..673e3bf10d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_holo.9.png
new file mode 100644
index 0000000000..d57df98b50
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000000..6278eef472
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_unselected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000000..aadc6f87b2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000000..70c0e7396e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000000..36e71d85d0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000000..4be4af5fab
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000000..e72193f592
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000000..8f20b9d267
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000000..04f657e1db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000000..99309ef6d3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000000..9bde7fbdce
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__toast_frame.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__toast_frame.9.png
new file mode 100644
index 0000000000..ad2cb5a965
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-hdpi/abs__toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000000..b2293670b7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_inverse_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_inverse_holo.9.png
new file mode 100644
index 0000000000..c65f443e33
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000000..0706c8af65
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..d814d02d31
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000000..b139c8e491
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000000..738cb38d07
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000000..2ed75a767a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_dark_holo.9.png
new file mode 100644
index 0000000000..743d00b6cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_light_holo.9.png
new file mode 100644
index 0000000000..17c1fb921f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_shadow_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_shadow_holo.9.png
new file mode 100644
index 0000000000..ddfc8e3d5c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000000..007a4b2392
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000000..ad6e1a4d9f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..0ad6c888b4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000000..19b50abcb5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..ad980b13fc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_light_holo.9.png
new file mode 100644
index 0000000000..60e6c52786
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_dark.9.png
new file mode 100644
index 0000000000..5461b9c00f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_light.9.png
new file mode 100644
index 0000000000..5dc6f804ae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_dark.9.png
new file mode 100644
index 0000000000..a70b53c59a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_light.9.png
new file mode 100644
index 0000000000..c7a9896b0d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..85d7aadd4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_light.9.png
new file mode 100644
index 0000000000..f7b01e012f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__btn_cab_done_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..d8f1c8bd54
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000000..31e49894ad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000000..7c2cbe5356
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_light.9.png
new file mode 100644
index 0000000000..30cbdc174a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_dark.png
new file mode 100644
index 0000000000..df2d3d158e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_light.png
new file mode 100644
index 0000000000..b2aa9c265b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_ab_back_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_dark.png
new file mode 100644
index 0000000000..a17b6a7892
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_light.png
new file mode 100644
index 0000000000..b28b3b54f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_cab_done_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_disabled.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_disabled.png
new file mode 100644
index 0000000000..79228baed0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_disabled.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_normal.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_normal.png
new file mode 100644
index 0000000000..86944a879b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_normal.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000000..c0bdf0641a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000000..15b86cbb21
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000000..844c99c22f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000000..86c170e97b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go.png
new file mode 100644
index 0000000000..bf19833f2e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go_search_api_holo_light.png
new file mode 100644
index 0000000000..8518498eb6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000000..ba704b67e3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000000..01d681697f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_dark.png
new file mode 100644
index 0000000000..6bf21e307e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_light.png
new file mode 100644
index 0000000000..70fe31aa22
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_menu_share_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search.png
new file mode 100644
index 0000000000..4be72f108b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search_api_holo_light.png
new file mode 100644
index 0000000000..f2e26f8838
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search.png
new file mode 100644
index 0000000000..73c6be654a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000000..71d838e736
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_activated_holo.9.png
new file mode 100644
index 0000000000..3bf8e03623
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..986ab0b974
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_light.9.png
new file mode 100644
index 0000000000..0279e17a12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_focused_holo.9.png
new file mode 100644
index 0000000000..7c0599e3a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_longpressed_holo.9.png
new file mode 100644
index 0000000000..3bf8e03623
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..6e77525d2d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..6e77525d2d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..92da2f0dd3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..42cb6463e4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..460ec46eb0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..e84adf2d41
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..3d946e545d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..4bb22f0e10
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..ab8ec69844
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..ab8ec69844
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..7274274b17
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..7274274b17
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_inner_holo.png
new file mode 100644
index 0000000000..9458668f02
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_outer_holo.png
new file mode 100644
index 0000000000..4ce73edce7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000000..29aff4d43f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000000..4055f70539
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..ea4ee042ea
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000000..f74c02b9e1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000000..09a2992cca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000000..6536ee6332
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..202b5b72ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000000..6de0ba8841
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_focused_holo.9.png
new file mode 100644
index 0000000000..c9972e74bb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_holo.9.png
new file mode 100644
index 0000000000..587337caf7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000000..155c4fc753
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_unselected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000000..b1223fe3c4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000000..081657ee7b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000000..3f312b4651
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000000..b086fae873
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000000..73c336a77a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000000..726e0ff427
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000000..726e0ff427
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000000..1767c169ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000000..1767c169ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__toast_frame.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__toast_frame.9.png
new file mode 100644
index 0000000000..b9105deeef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-mdpi/abs__toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-v11/abs__progress_medium_holo.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-v11/abs__progress_medium_holo.xml
new file mode 100644
index 0000000000..6bcbdb83f1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-v11/abs__progress_medium_holo.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010, 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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <rotate
+ android:drawable="@drawable/abs__spinner_48_outer_holo"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fromDegrees="0"
+ android:toDegrees="1080" />
+ </item>
+ <item>
+ <rotate
+ android:drawable="@drawable/abs__spinner_48_inner_holo"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fromDegrees="720"
+ android:toDegrees="0" />
+ </item>
+</layer-list>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000000..5753346996
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_inverse_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_inverse_holo.9.png
new file mode 100644
index 0000000000..7e6c047d66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_inverse_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000000..8155fe8405
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..6cee9a128d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000000..fa4d76af93
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000000..9a70a5d1e3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000000..14fbee101d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_dark_holo.9.png
new file mode 100644
index 0000000000..6622cbad34
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_light_holo.9.png
new file mode 100644
index 0000000000..c427297833
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_shadow_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_shadow_holo.9.png
new file mode 100644
index 0000000000..d0df29d8b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_solid_shadow_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000000..a0d9c1b957
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000000..d36f99fecf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..5ad475dc3f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000000..6ade5eeb37
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_dark_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000000..719b9234df
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_light_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_light_holo.9.png
new file mode 100644
index 0000000000..6da264db26
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_dark.9.png
new file mode 100644
index 0000000000..7ef2db75e2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_light.9.png
new file mode 100644
index 0000000000..2283b4c01f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_dark.9.png
new file mode 100644
index 0000000000..6d2039e284
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_light.9.png
new file mode 100644
index 0000000000..3c909b5130
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..131d1030c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_light.9.png
new file mode 100644
index 0000000000..3e7dcdfdba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__btn_cab_done_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..0bd09806f5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000000..43ed26d478
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000000..6b3157985e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_light.9.png
new file mode 100644
index 0000000000..df0121bb35
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_dark.png
new file mode 100644
index 0000000000..8ded62fb7b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_light.png
new file mode 100644
index 0000000000..517e9f72d0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_ab_back_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_dark.png
new file mode 100644
index 0000000000..2e06dd01be
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_light.png
new file mode 100644
index 0000000000..bb19810bc2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_cab_done_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_disabled.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_disabled.png
new file mode 100644
index 0000000000..e35c5f05ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_disabled.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000000..7fd7aeb2a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000000..53cfbd3115
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000000..d8faf900ae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000000..e7c7280add
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go.png
new file mode 100644
index 0000000000..1e2dcfa020
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go_search_api_holo_light.png
new file mode 100644
index 0000000000..f12eafcdcf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000000..a92fb1d4af
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000000..930ca8d95e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_dark.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_dark.png
new file mode 100644
index 0000000000..45a0f1da0d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_light.png
new file mode 100644
index 0000000000..528e554abe
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_menu_share_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search.png
new file mode 100644
index 0000000000..998f91be9c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search_api_holo_light.png
new file mode 100644
index 0000000000..a4cdf1c792
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search.png
new file mode 100644
index 0000000000..c625a3602b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search_api_holo_light.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000000..c332ba08c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_activated_holo.9.png
new file mode 100644
index 0000000000..eda10e6123
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..e62f011d45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_light.9.png
new file mode 100644
index 0000000000..65061c0f45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_focused_holo.9.png
new file mode 100644
index 0000000000..690cb1eb61
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_longpressed_holo.9.png
new file mode 100644
index 0000000000..eda10e6123
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..e4b33935a3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..e4b33935a3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..88726b6916
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..c6a7d4d87c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..e2aff72f48
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..93066c8403
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..345f5d3067
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..c843ef3af2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..c6c3f1ec24
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..c6c3f1ec24
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..205b66e2cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..205b66e2cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png
new file mode 100644
index 0000000000..19517c4b0a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png
new file mode 100644
index 0000000000..14143c51c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000000..d8929fcd18
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000000..9174c4e4bc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..3015d30708
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000000..126637d119
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d45c7a864d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000000..29036b907a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..2cb34d7f60
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000000..82f752fdc2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_focused_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_focused_holo.9.png
new file mode 100644
index 0000000000..03cfb0945d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_holo.9.png
new file mode 100644
index 0000000000..e4229f26b2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000000..e862cb1215
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_unselected_pressed_holo.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000000..f1eb67323a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000000..8fdbbf3ad7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000000..4e9ae43c25
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000000..98f4871bb5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000000..733373ed38
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000000..0c6bb036db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000000..0c6bb036db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_dark.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000000..e5bfd8ad33
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_light.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000000..1743da6b4e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__toast_frame.9.png b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__toast_frame.9.png
new file mode 100644
index 0000000000..9f39a77460
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable-xhdpi/abs__toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_dark.xml
new file mode 100644
index 0000000000..85c2c02129
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_activated="true" android:drawable="@drawable/abs__list_activated_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_light.xml
new file mode 100644
index 0000000000..85c2c02129
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__activated_background_holo_light.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_activated="true" android:drawable="@drawable/abs__list_activated_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_dark.xml
new file mode 100644
index 0000000000..cab896283c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_dark.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abs__btn_cab_done_pressed_holo_dark" />
+ <item android:state_focused="true" android:state_enabled="true"
+ android:drawable="@drawable/abs__btn_cab_done_focused_holo_dark" />
+ <item android:state_enabled="true"
+ android:drawable="@drawable/abs__btn_cab_done_default_holo_dark" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_light.xml
new file mode 100644
index 0000000000..42ba8a0df0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__btn_cab_done_holo_light.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abs__btn_cab_done_pressed_holo_light" />
+ <item android:state_focused="true" android:state_enabled="true"
+ android:drawable="@drawable/abs__btn_cab_done_focused_holo_light" />
+ <item android:state_enabled="true"
+ android:drawable="@drawable/abs__btn_cab_done_default_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear.xml
new file mode 100644
index 0000000000..a16f4b22e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/abs__ic_clear_disabled" />
+ <item
+ android:drawable="@drawable/abs__ic_clear_normal" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear_holo_light.xml
new file mode 100644
index 0000000000..256de80fb3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_clear_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/abs__ic_clear_search_api_disabled_holo_light" />
+ <item
+ android:drawable="@drawable/abs__ic_clear_search_api_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_dark.xml
new file mode 100644
index 0000000000..2588a492db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_dark.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/abs__ic_menu_moreoverflow_normal_holo_dark" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_light.xml
new file mode 100644
index 0000000000..e2078c9679
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__ic_menu_moreoverflow_holo_light.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/abs__ic_menu_moreoverflow_normal_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_dark.xml
new file mode 100644
index 0000000000..d99b7a426b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_dark.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
+ <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" />
+ <item android:state_focused="true" android:drawable="@drawable/abs__list_focused_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_light.xml
new file mode 100644
index 0000000000..da5fb2e86e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__item_background_holo_light.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
+ <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abs__list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_light" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_light" />
+ <item android:state_focused="true" android:drawable="@drawable/abs__list_focused_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_dark.xml
new file mode 100644
index 0000000000..b2ce4f0f77
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/abs__list_pressed_holo_dark" />
+ <item android:drawable="@drawable/abs__list_longpressed_holo" />
+</transition>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_light.xml
new file mode 100644
index 0000000000..d7e31b1d1f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_background_transition_holo_light.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/abs__list_pressed_holo_light" />
+ <item android:drawable="@drawable/abs__list_longpressed_holo" />
+</transition>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_dark.xml
new file mode 100644
index 0000000000..08b8b12f37
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_dark.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="false" android:drawable="@android:color/transparent" />
+
+ <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
+ <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" />
+ <item android:state_focused="true" android:drawable="@drawable/abs__list_focused_holo" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_light.xml
new file mode 100644
index 0000000000..ada490bf9f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__list_selector_holo_light.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="false" android:drawable="@android:color/transparent" />
+
+ <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
+ <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abs__list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_light" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_light" />
+ <item android:state_focused="true" android:drawable="@drawable/abs__list_focused_holo" />
+
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_dark.xml
new file mode 100644
index 0000000000..bd19140abf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_dark.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background"
+ android:drawable="@drawable/abs__progress_bg_holo_dark" />
+
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/abs__progress_secondary_holo_dark" />
+ </item>
+
+ <item android:id="@android:id/progress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/abs__progress_primary_holo_dark" />
+ </item>
+
+</layer-list>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_light.xml
new file mode 100644
index 0000000000..321f07c8b2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_horizontal_holo_light.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background"
+ android:drawable="@drawable/abs__progress_bg_holo_light" />
+
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/abs__progress_secondary_holo_light" />
+ </item>
+
+ <item android:id="@android:id/progress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/abs__progress_primary_holo_light" />
+ </item>
+
+</layer-list>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_medium_holo.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_medium_holo.xml
new file mode 100644
index 0000000000..6d4814f862
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__progress_medium_holo.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010, 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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <rotate
+ android:drawable="@drawable/abs__spinner_48_outer_holo"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fromDegrees="0"
+ android:toDegrees="1080" />
+ </item>
+ <item>
+ <rotate
+ android:drawable="@drawable/abs__spinner_48_inner_holo"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fromDegrees="0"
+ android:toDegrees="720" />
+ </item>
+</layer-list>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_dark.xml
new file mode 100644
index 0000000000..26284187a7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="#F0A0A0A0"/>
+ <stroke android:width="2dp" color="#A00080FF"/>
+ <padding android:left="5dp" android:top="0dp"
+ android:right="5dp" android:bottom="1dp" />
+</shape>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_light.xml
new file mode 100644
index 0000000000..0d00c58788
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__search_dropdown_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="#F0FFFFFF"/>
+ <stroke android:width="1dp" color="#A00080FF"/>
+ <padding android:left="5dp" android:top="0dp"
+ android:right="5dp" android:bottom="1dp" />
+</shape>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_dark.xml
new file mode 100644
index 0000000000..4af5e22a90
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_dark.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/abs__spinner_ab_disabled_holo_dark" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abs__spinner_ab_pressed_holo_dark" />
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/abs__spinner_ab_focused_holo_dark" />
+ <item android:drawable="@drawable/abs__spinner_ab_default_holo_dark" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_light.xml
new file mode 100644
index 0000000000..b785084782
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__spinner_ab_holo_light.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/abs__spinner_ab_disabled_holo_light" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abs__spinner_ab_pressed_holo_light" />
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/abs__spinner_ab_focused_holo_light" />
+ <item android:drawable="@drawable/abs__spinner_ab_default_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__tab_indicator_ab_holo.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__tab_indicator_ab_holo.xml
new file mode 100644
index 0000000000..d34e208117
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__tab_indicator_ab_holo.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<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/abs__tab_selected_holo" />
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/abs__list_focused_holo" />
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/abs__tab_selected_focused_holo" />
+
+ <!-- Pressed -->
+ <!-- Non focused states -->
+ <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/abs__list_pressed_holo_dark" />
+ <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/abs__tab_selected_pressed_holo" />
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/abs__tab_unselected_pressed_holo" />
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/abs__tab_selected_pressed_holo" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_dark.xml
new file mode 100644
index 0000000000..25d35cacad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_dark.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true"
+ android:drawable="@drawable/abs__textfield_search_selected_holo_dark" />
+ <item android:drawable="@drawable/abs__textfield_search_default_holo_dark" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_light.xml
new file mode 100644
index 0000000000..e624ee60d8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_holo_light.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true"
+ android:drawable="@drawable/abs__textfield_search_selected_holo_light" />
+ <item android:drawable="@drawable/abs__textfield_search_default_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_dark.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_dark.xml
new file mode 100644
index 0000000000..2e645ea9dd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_dark.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true"
+ android:drawable="@drawable/abs__textfield_search_right_selected_holo_dark" />
+ <item android:drawable="@drawable/abs__textfield_search_right_default_holo_dark" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_light.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_light.xml
new file mode 100644
index 0000000000..e5643d4a42
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/drawable/abs__textfield_searchview_right_holo_light.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true"
+ android:drawable="@drawable/abs__textfield_search_right_selected_holo_light" />
+ <item android:drawable="@drawable/abs__textfield_search_right_default_holo_light" />
+</selector>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-large/abs__action_mode_close_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-large/abs__action_mode_close_item.xml
new file mode 100644
index 0000000000..8811dad8d6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-large/abs__action_mode_close_item.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__action_mode_close_button"
+ android:focusable="true"
+ android:clickable="true"
+ android:paddingLeft="8dip"
+ style="?attr/actionModeCloseButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginRight="16dip">
+ <ImageView android:layout_width="48dip"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:scaleType="center"
+ android:src="?attr/actionModeCloseDrawable" />
+ <TextView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginLeft="4dip"
+ android:layout_marginRight="16dip"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textSize="12sp"
+ android:textAllCaps="true"
+ android:text="@string/abs__action_mode_done" />
+</com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_dropdown_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_dropdown_item.xml
new file mode 100644
index 0000000000..120f2f3c66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_dropdown_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
+**
+** Copyright 2008, 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.
+*/
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ style="?android:attr/spinnerDropDownItemStyle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:ellipsize="marquee" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_item.xml
new file mode 100644
index 0000000000..89268015ec
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-v14/sherlock_spinner_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ style="?android:attr/spinnerItemStyle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="marquee" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar.xml
new file mode 100644
index 0000000000..ab4fa28d80
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!--
+This is an optimized layout for a screen with the Action Bar enabled.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true"
+ android:splitMotionEvents="false"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <com.actionbarsherlock.internal.widget.ActionBarContainer
+ android:id="@+id/abs__action_bar_container"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle">
+ <com.actionbarsherlock.internal.widget.ActionBarView
+ android:id="@+id/abs__action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle" />
+ <com.actionbarsherlock.internal.widget.ActionBarContextView
+ android:id="@+id/abs__action_context_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
+ </com.actionbarsherlock.internal.widget.ActionBarContainer>
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout
+ android:id="@+id/abs__content"
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="?attr/windowContentOverlay" />
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar_overlay.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar_overlay.xml
new file mode 100644
index 0000000000..0ab3ae65c0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout-xlarge/abs__screen_action_bar_overlay.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!--
+This is an optimized layout for a screen with
+the Action Bar enabled overlaying application content.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fitsSystemWindows="true"
+ android:splitMotionEvents="false">
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout android:id="@+id/abs__content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+ <com.actionbarsherlock.internal.widget.ActionBarContainer android:id="@+id/abs__action_bar_container"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle"
+ android:gravity="top">
+ <com.actionbarsherlock.internal.widget.ActionBarView
+ android:id="@+id/abs__action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle" />
+ <com.actionbarsherlock.internal.widget.ActionBarContextView
+ android:id="@+id/abs__action_context_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
+ </com.actionbarsherlock.internal.widget.ActionBarContainer>
+ <ImageView android:src="?attr/windowContentOverlay"
+ android:scaleType="fitXY"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/abs__action_bar_container" />
+</RelativeLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_home.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_home.xml
new file mode 100644
index 0000000000..5c1e9ec4b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_home.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<view xmlns:android="http://schemas.android.com/apk/res/android"
+ class="com.actionbarsherlock.internal.widget.ActionBarView$HomeView"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:background="?attr/actionBarItemBackground">
+ <ImageView android:id="@id/abs__up"
+ android:src="?attr/homeAsUpIndicator"
+ android:layout_gravity="center_vertical|left"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="-8dip" />
+ <ImageView android:id="@id/abs__home"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="8dip"
+ android:layout_marginTop="@dimen/abs__action_bar_icon_vertical_padding"
+ android:layout_marginBottom="@dimen/abs__action_bar_icon_vertical_padding"
+ android:layout_gravity="center"
+ android:adjustViewBounds="true"
+ android:scaleType="fitCenter" />
+</view>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab.xml
new file mode 100644
index 0000000000..f46f7a044b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<view
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ class="com.actionbarsherlock.internal.widget.ScrollingTabContainerView$TabView"
+ style="?attr/actionBarTabStyle"
+/> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab_bar_view.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab_bar_view.xml
new file mode 100644
index 0000000000..9d8f759bc6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_tab_bar_view.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<com.actionbarsherlock.internal.widget.TabsLinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="?attr/actionBarTabBarStyle"
+/>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_title_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_title_item.xml
new file mode 100644
index 0000000000..557410502b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_bar_title_item.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingRight="16dip"
+ android:background="?attr/actionBarItemBackground"
+ android:enabled="false">
+
+ <ImageView android:id="@id/abs__up"
+ android:src="?attr/homeAsUpIndicator"
+ android:layout_gravity="center_vertical|left"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <LinearLayout android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|left"
+ android:orientation="vertical">
+ <TextView android:id="@+id/abs__action_bar_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="end" />
+ <TextView android:id="@+id/abs__action_bar_subtitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/abs__action_bar_subtitle_top_margin"
+ android:layout_marginBottom="@dimen/abs__action_bar_subtitle_bottom_margin"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:visibility="gone" />
+ </LinearLayout>
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_item_layout.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_item_layout.xml
new file mode 100644
index 0000000000..f72e05268b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_item_layout.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.actionbarsherlock.internal.view.menu.ActionMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:addStatesFromChildren="true"
+ android:gravity="center"
+ android:focusable="true"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
+ style="?attr/actionButtonStyle">
+ <ImageButton android:id="@+id/abs__imageButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone"
+ android:layout_marginTop="4dip"
+ android:layout_marginBottom="4dip"
+ android:layout_marginLeft="4dip"
+ android:layout_marginRight="4dip"
+ android:scaleType="fitCenter"
+ android:adjustViewBounds="true"
+ android:background="@null"
+ android:focusable="false" />
+ <com.actionbarsherlock.internal.widget.CapitalizingButton android:id="@+id/abs__textButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone"
+ android:textAppearance="?attr/actionMenuTextAppearance"
+ style="?attr/buttonStyleSmall"
+ android:textColor="?attr/actionMenuTextColor"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:background="@null"
+ android:paddingTop="4dip"
+ android:paddingBottom="4dip"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
+ android:focusable="false" />
+</com.actionbarsherlock.internal.view.menu.ActionMenuItemView>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_layout.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_layout.xml
new file mode 100644
index 0000000000..a6f8e53f8a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_menu_layout.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.actionbarsherlock.internal.view.menu.ActionMenuView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:divider="?attr/actionBarDivider"
+ android:dividerPadding="12dip"
+ android:gravity="center_vertical" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_bar.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_bar.xml
new file mode 100644
index 0000000000..7168dc77fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_bar.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, 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.
+*/
+-->
+<com.actionbarsherlock.internal.widget.ActionBarContextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_close_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_close_item.xml
new file mode 100644
index 0000000000..875ec3e1b0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__action_mode_close_item.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__action_mode_close_button"
+ android:focusable="true"
+ android:clickable="true"
+ android:paddingLeft="8dip"
+ style="?attr/actionModeCloseButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginRight="16dip">
+ <ImageView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:scaleType="fitCenter"
+ android:src="?attr/actionModeCloseDrawable" />
+</com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view.xml
new file mode 100644
index 0000000000..6a0ac9ece0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, 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.
+*/
+-->
+<com.actionbarsherlock.internal.widget.IcsLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__activity_chooser_view_content"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ style="?attr/activityChooserViewStyle">
+
+ <FrameLayout
+ android:id="@+id/abs__expand_activities_button"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center"
+ android:focusable="true"
+ android:addStatesFromChildren="true"
+ android:background="?attr/actionBarItemBackground">
+
+ <ImageView android:id="@+id/abs__image"
+ android:layout_width="56dip"
+ android:layout_height="36dip"
+ android:layout_gravity="center"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:paddingLeft="12dip"
+ android:paddingRight="12dip"
+ android:scaleType="fitCenter"
+ android:adjustViewBounds="true" />
+
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/abs__default_activity_button"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center"
+ android:focusable="true"
+ android:addStatesFromChildren="true"
+ android:background="?attr/actionBarItemBackground">
+
+ <ImageView android:id="@+id/abs__image"
+ android:layout_width="56dip"
+ android:layout_height="36dip"
+ android:layout_gravity="center"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:paddingLeft="12dip"
+ android:paddingRight="12dip"
+ android:scaleType="fitCenter"
+ android:adjustViewBounds="true" />
+
+ </FrameLayout>
+
+</com.actionbarsherlock.internal.widget.IcsLinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view_list_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view_list_item.xml
new file mode 100644
index 0000000000..b430032a14
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__activity_chooser_view_list_item.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__list_item"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:minWidth="196dip"
+ android:background="?attr/activatedBackgroundIndicator"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:duplicateParentState="true" >
+
+ <ImageView
+ android:id="@+id/abs__icon"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="8dip"
+ android:duplicateParentState="true" />
+
+ <TextView
+ android:id="@+id/abs__title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:textAppearance="?attr/textAppearanceLargePopupMenu"
+ android:duplicateParentState="true"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_checkbox.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_checkbox.xml
new file mode 100644
index 0000000000..71754924ae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_checkbox.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:focusable="false"
+ android:clickable="false"
+ android:duplicateParentState="true" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_icon.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_icon.xml
new file mode 100644
index 0000000000..1afb886d44
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_icon.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="-8dip"
+ android:layout_marginTop="8dip"
+ android:layout_marginBottom="8dip"
+ android:scaleType="centerInside"
+ android:duplicateParentState="true" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_radio.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_radio.xml
new file mode 100644
index 0000000000..f8e38d630b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__list_menu_item_radio.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__radio"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:focusable="false"
+ android:clickable="false"
+ android:duplicateParentState="true" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__popup_menu_item_layout.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__popup_menu_item_layout.xml
new file mode 100644
index 0000000000..8fc82d1c62
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__popup_menu_item_layout.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.actionbarsherlock.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:minWidth="196dip"
+ android:paddingRight="16dip">
+
+ <!-- Icon will be inserted here. -->
+
+ <!-- The title and summary have some gap between them, and this 'group' should be centered vertically. -->
+ <RelativeLayout
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="16dip"
+ android:duplicateParentState="true">
+
+ <TextView
+ android:id="@+id/abs__title"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:textAppearance="?attr/textAppearanceLargePopupMenu"
+ android:singleLine="true"
+ android:duplicateParentState="true"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+
+ <TextView
+ android:id="@+id/abs__shortcut"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/abs__title"
+ android:layout_alignParentLeft="true"
+ android:textAppearance="?attr/textAppearanceSmallPopupMenu"
+ android:singleLine="true"
+ android:duplicateParentState="true" />
+
+ </RelativeLayout>
+
+ <!-- Checkbox, and/or radio button will be inserted here. -->
+
+</com.actionbarsherlock.internal.view.menu.ListMenuItemView>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar.xml
new file mode 100644
index 0000000000..68dc7dfe57
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!--
+This is an optimized layout for a screen with the Action Bar enabled.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true"
+ android:splitMotionEvents="false">
+ <com.actionbarsherlock.internal.widget.ActionBarContainer
+ android:id="@+id/abs__action_bar_container"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle">
+ <com.actionbarsherlock.internal.widget.ActionBarView
+ android:id="@+id/abs__action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle" />
+ <com.actionbarsherlock.internal.widget.ActionBarContextView
+ android:id="@+id/abs__action_context_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
+ </com.actionbarsherlock.internal.widget.ActionBarContainer>
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout
+ android:id="@+id/abs__content"
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="?attr/windowContentOverlay" />
+ <com.actionbarsherlock.internal.widget.ActionBarContainer
+ android:id="@+id/abs__split_action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ android:gravity="center"
+ style="?attr/actionBarSplitStyle" />
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar_overlay.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar_overlay.xml
new file mode 100644
index 0000000000..45cd7239f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_action_bar_overlay.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!--
+This is an optimized layout for a screen with
+the Action Bar enabled overlaying application content.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
+ android:splitMotionEvents="false">
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout android:id="@+id/abs__content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ <com.actionbarsherlock.internal.widget.ActionBarContainer android:id="@+id/abs__action_bar_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ style="?attr/actionBarStyle"
+ android:gravity="top">
+ <com.actionbarsherlock.internal.widget.ActionBarView
+ android:id="@+id/abs__action_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle" />
+ <com.actionbarsherlock.internal.widget.ActionBarContextView
+ android:id="@+id/abs__action_context_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
+ </com.actionbarsherlock.internal.widget.ActionBarContainer>
+ <ImageView android:src="?attr/windowContentOverlay"
+ android:scaleType="fitXY"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/abs__action_bar_container" />
+ <com.actionbarsherlock.internal.widget.ActionBarContainer android:id="@+id/abs__split_action_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ style="?attr/actionBarSplitStyle"
+ android:visibility="gone"
+ android:gravity="center"/>
+</FrameLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple.xml
new file mode 100644
index 0000000000..dc47e46f71
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/layout/screen_simple.xml
+**
+** Copyright 2006, 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.
+*/
+
+This is an optimized layout for a screen, with the minimum set of features
+enabled.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fitsSystemWindows="true"
+ android:orientation="vertical">
+ <ViewStub android:id="@+id/abs__action_mode_bar_stub"
+ android:inflatedId="@+id/abs__action_mode_bar"
+ android:layout="@layout/abs__action_mode_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout
+ android:id="@+id/abs__content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="?attr/windowContentOverlay" />
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple_overlay_action_mode.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple_overlay_action_mode.xml
new file mode 100644
index 0000000000..f8b9fb1859
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__screen_simple_overlay_action_mode.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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.
+*/
+
+This is an optimized layout for a screen, with the minimum set of features
+enabled.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
+ <com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout
+ android:id="@+id/abs__content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="?attr/windowContentOverlay" />
+ <ViewStub android:id="@+id/abs__action_mode_bar_stub"
+ android:inflatedId="@+id/abs__action_mode_bar"
+ android:layout="@layout/abs__action_mode_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
+</FrameLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_dropdown_item_icons_2line.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_dropdown_item_icons_2line.xml
new file mode 100644
index 0000000000..e1d3dc49cb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_dropdown_item_icons_2line.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, 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.
+*/
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingLeft="@dimen/abs__dropdownitem_text_padding_left"
+ android:paddingRight="4dip"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/searchResultListItemHeight" >
+
+ <!-- Icons come first in the layout, since their placement doesn't depend on
+ the placement of the text views. -->
+ <ImageView android:id="@android:id/icon1"
+ android:layout_width="@dimen/abs__dropdownitem_icon_width"
+ android:layout_height="48dip"
+ android:scaleType="centerInside"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:visibility="invisible" />
+
+ <ImageView android:id="@+id/edit_query"
+ android:layout_width="48dip"
+ android:layout_height="48dip"
+ android:scaleType="centerInside"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:src="?attr/searchViewEditQuery"
+ android:background="?attr/searchViewEditQueryBackground"
+ android:visibility="gone" />
+
+ <ImageView android:id="@android:id/icon2"
+ android:layout_width="48dip"
+ android:layout_height="48dip"
+ android:scaleType="centerInside"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_toLeftOf="@id/edit_query"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:visibility="gone" />
+
+
+ <!-- The subtitle comes before the title, since the height of the title depends on whether the
+ subtitle is visible or gone. -->
+ <TextView android:id="@android:id/text2"
+ style="?android:attr/dropDownItemStyle"
+ android:textAppearance="?attr/textAppearanceSearchResultSubtitle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="29dip"
+ android:paddingBottom="4dip"
+ android:gravity="top"
+ android:layout_toRightOf="@android:id/icon1"
+ android:layout_toLeftOf="@android:id/icon2"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_alignParentBottom="true"
+ android:visibility="gone" />
+
+ <!-- The title is placed above the subtitle, if there is one. If there is no
+ subtitle, it fills the parent. -->
+ <TextView android:id="@android:id/text1"
+ style="?android:attr/dropDownItemStyle"
+ android:textAppearance="?attr/textAppearanceSearchResultTitle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_toRightOf="@android:id/icon1"
+ android:layout_toLeftOf="@android:id/icon2"
+ android:layout_above="@android:id/text2" />
+
+</RelativeLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_view.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_view.xml
new file mode 100644
index 0000000000..6ba319121c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__search_view.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2010 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.
+ */
+
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abs__search_bar"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ >
+
+ <!-- This is actually used for the badge icon *or* the badge label (or neither) -->
+ <TextView
+ android:id="@+id/abs__search_badge"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:layout_marginBottom="2dip"
+ android:drawablePadding="0dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?attr/textColorPrimary"
+ android:visibility="gone"
+ />
+
+ <ImageView
+ android:id="@+id/abs__search_button"
+ style="?android:attr/actionButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:src="?attr/searchViewSearchIcon"
+ android:contentDescription="@string/abs__searchview_description_search"
+ />
+
+ <LinearLayout
+ android:id="@+id/abs__search_edit_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:layout_marginTop="4dip"
+ android:layout_marginBottom="4dip"
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="8dip"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/abs__search_mag_icon"
+ android:layout_width="@dimen/abs__dropdownitem_icon_width"
+ android:layout_height="wrap_content"
+ android:scaleType="centerInside"
+ android:layout_marginLeft="@dimen/abs__dropdownitem_text_padding_left"
+ android:layout_gravity="center_vertical"
+ android:src="?attr/searchViewSearchIcon"
+ android:visibility="gone"
+ />
+
+ <!-- Inner layout contains the app icon, button(s) and EditText -->
+ <LinearLayout
+ android:id="@+id/abs__search_plate"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:orientation="horizontal"
+ android:background="?attr/searchViewTextField">
+
+ <view class="com.actionbarsherlock.widget.SearchView$SearchAutoComplete"
+ style="?attr/searchAutoCompleteTextView"
+ android:id="@+id/abs__search_src_text"
+ android:layout_height="36dip"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:minWidth="@dimen/abs__search_view_text_min_width"
+ android:layout_gravity="bottom"
+ android:paddingLeft="@dimen/abs__dropdownitem_text_padding_left"
+ android:paddingRight="@dimen/abs__dropdownitem_text_padding_right"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:background="@null"
+ android:inputType="text|textAutoComplete|textNoSuggestions"
+ android:imeOptions="actionSearch"
+ android:dropDownHeight="wrap_content"
+ android:dropDownAnchor="@id/abs__search_edit_frame"
+ android:dropDownVerticalOffset="0dip"
+ android:dropDownHorizontalOffset="0dip"
+ android:contentDescription="@string/abs__searchview_description_query"
+ />
+
+ <ImageView
+ android:id="@+id/abs__search_close_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:layout_gravity="center_vertical"
+ android:background="?attr/selectableItemBackground"
+ android:src="?attr/searchViewCloseIcon"
+ android:focusable="true"
+ android:contentDescription="@string/abs__searchview_description_clear"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/abs__submit_area"
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?attr/searchViewTextFieldRight">
+
+ <ImageView
+ android:id="@+id/abs__search_go_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:background="?attr/selectableItemBackground"
+ android:src="?attr/searchViewGoIcon"
+ android:visibility="gone"
+ android:focusable="true"
+ android:contentDescription="@string/abs__searchview_description_submit"
+ />
+
+ <ImageView
+ android:id="@+id/abs__search_voice_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:src="?attr/searchViewVoiceIcon"
+ android:background="?attr/selectableItemBackground"
+ android:visibility="gone"
+ android:focusable="true"
+ android:contentDescription="@string/abs__searchview_description_voice"
+ />
+
+ </LinearLayout>
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__simple_dropdown_hint.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__simple_dropdown_hint.xml
new file mode 100644
index 0000000000..0088e14a76
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/abs__simple_dropdown_hint.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, 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.
+*/
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ android:textAppearance="?attr/dropDownHintAppearance"
+ android:singleLine="true"
+ android:layout_marginLeft="3dip"
+ android:layout_marginTop="3dip"
+ android:layout_marginRight="3dip"
+ android:layout_marginBottom="3dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_dropdown_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_dropdown_item.xml
new file mode 100644
index 0000000000..f1f4eef42d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_dropdown_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
+**
+** Copyright 2008, 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.
+*/
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ style="?attr/spinnerDropDownItemStyle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:ellipsize="marquee" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_item.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_item.xml
new file mode 100644
index 0000000000..1bf3f3a165
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/layout/sherlock_spinner_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ style="?attr/spinnerItemStyle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="marquee" />
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-land/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-land/abs__dimens.xml
new file mode 100644
index 0000000000..502cc16a30
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-land/abs__dimens.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">40dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">16dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">12dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-2dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">4dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-hdpi-1024x600/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-hdpi-1024x600/abs__dimens.xml
new file mode 100644
index 0000000000..3312cfa7fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-hdpi-1024x600/abs__dimens.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">48dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">8dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">5dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-hdpi-1024x600/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-hdpi-1024x600/abs__dimens.xml
new file mode 100644
index 0000000000..502cc16a30
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-hdpi-1024x600/abs__dimens.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">40dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">16dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">12dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-2dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">4dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-mdpi-1024x600/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-mdpi-1024x600/abs__dimens.xml
new file mode 100644
index 0000000000..3312cfa7fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-land-mdpi-1024x600/abs__dimens.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">48dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">8dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">5dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-mdpi-1024x600/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-mdpi-1024x600/abs__dimens.xml
new file mode 100644
index 0000000000..d3a64c7d0b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-large-mdpi-1024x600/abs__dimens.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">9dip</dimen>
+
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abs__action_button_min_width">64dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__bools.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__bools.xml
new file mode 100644
index 0000000000..7a48e1542e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__bools.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<resources>
+ <bool name="abs__action_bar_expanded_action_views_exclusive">false</bool>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__dimens.xml
new file mode 100644
index 0000000000..70084166c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-sw600dp/abs__dimens.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">9dip</dimen>
+
+ <integer name="abs__max_action_buttons">5</integer>
+
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abs__action_button_min_width">64dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v11/abs__themes.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v11/abs__themes.xml
new file mode 100644
index 0000000000..03473572c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v11/abs__themes.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <style name="Sherlock.__Theme" parent="android:Theme.Holo">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowActionBar">false</item>
+ </style>
+ <style name="Sherlock.__Theme.Light" parent="android:Theme.Holo.Light">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowActionBar">false</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__styles.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__styles.xml
new file mode 100644
index 0000000000..88a60dd92d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__styles.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <style name="Widget.Sherlock.ActionBar" parent="android:Widget.Holo.ActionBar">
+ </style>
+ <style name="Widget.Sherlock.ActionBar.Solid" parent="android:Widget.Holo.ActionBar.Solid">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar" parent="android:Widget.Holo.Light.ActionBar">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.Solid" parent="android:Widget.Holo.Light.ActionBar.Solid">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.Solid.Inverse" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabView" parent="android:Widget.Holo.ActionBar.TabView">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabView" parent="android:Widget.Holo.Light.ActionBar.TabView">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabView.Inverse" parent="android:Widget.Holo.Light.ActionBar.TabView.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabBar" parent="android:Widget.Holo.ActionBar.TabBar">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabBar" parent="android:Widget.Holo.Light.ActionBar.TabBar">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabBar.Inverse" parent="android:Widget.Holo.Light.ActionBar.TabBar.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabText" parent="android:Widget.Holo.ActionBar.TabText">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabText" parent="android:Widget.Holo.Light.ActionBar.TabText">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabText.Inverse" parent="android:Widget.Holo.Light.ActionBar.TabText.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton" parent="android:Widget.Holo.ActionButton">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton" parent="android:Widget.Holo.Light.ActionButton">
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton.CloseMode" parent="android:Widget.Holo.ActionButton.CloseMode">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton.CloseMode" parent="android:Widget.Holo.Light.ActionButton.CloseMode">
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton.Overflow" parent="android:Widget.Holo.ActionButton.Overflow">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton.Overflow" parent="android:Widget.Holo.Light.ActionButton.Overflow">
+ </style>
+
+ <style name="Widget.Sherlock.ActionMode" parent="android:Widget.Holo.ActionMode">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionMode" parent="android:Widget.Holo.Light.ActionMode">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionMode.Inverse" parent="android:Widget.Holo.Light.ActionMode.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.PopupMenu" parent="android:Widget.Holo.PopupMenu">
+ </style>
+ <style name="Widget.Sherlock.Light.PopupMenu" parent="android:Widget.Holo.Light.PopupMenu">
+ </style>
+
+ <style name="Widget.Sherlock.Spinner.DropDown.ActionBar" parent="android:Widget.Holo.Spinner">
+ </style>
+ <style name="Widget.Sherlock.Light.Spinner.DropDown.ActionBar" parent="android:Widget.Holo.Light.Spinner">
+ </style>
+
+ <style name="Widget.Sherlock.ListView.DropDown" parent="android:Widget.Holo.ListView.DropDown">
+ </style>
+ <style name="Widget.Sherlock.Light.ListView.DropDown" parent="android:Widget.Holo.Light.ListView.DropDown">
+ </style>
+
+ <style name="Widget.Sherlock.PopupWindow.ActionMode" parent="android:Widget.Holo.PopupWindow">
+ </style>
+ <style name="Widget.Sherlock.Light.PopupWindow.ActionMode" parent="android:Widget.Holo.Light.PopupWindow">
+ </style>
+
+ <style name="Widget.Sherlock.ProgressBar" parent="android:Widget.Holo.ProgressBar">
+ </style>
+ <style name="Widget.Sherlock.Light.ProgressBar" parent="android:Widget.Holo.Light.ProgressBar">
+ </style>
+
+ <style name="Widget.Sherlock.ProgressBar.Horizontal" parent="android:Widget.Holo.ProgressBar.Horizontal">
+ </style>
+ <style name="Widget.Sherlock.Light.ProgressBar.Horizontal" parent="android:Widget.Holo.Light.ProgressBar.Horizontal">
+ </style>
+
+ <style name="Widget.Sherlock.SearchAutoCompleteTextView" parent="android:Widget.Holo.AutoCompleteTextView">
+ </style>
+ <style name="Widget.Sherlock.Light.SearchAutoCompleteTextView" parent="android:Widget.Holo.Light.AutoCompleteTextView">
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Menu" parent="android:TextAppearance.Holo.Widget.ActionBar.Menu">
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Title" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Title.Inverse" parent="android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Subtitle" parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Subtitle.Inverse" parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Title" parent="android:TextAppearance.Holo.Widget.ActionMode.Title">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Title.Inverse" parent="android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Subtitle" parent="android:TextAppearance.Holo.Widget.ActionMode.Subtitle">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Subtitle.Inverse" parent="android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse">
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu" parent="android:TextAppearance.Holo.Widget.PopupMenu">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu.Large" parent="android:TextAppearance.Holo.Widget.PopupMenu.Large">
+ </style>
+ <style name="TextAppearance.Sherlock.Light.Widget.PopupMenu.Large" parent="android:TextAppearance.Holo.Widget.PopupMenu.Large">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu.Small" parent="android:TextAppearance.Holo.Widget.PopupMenu.Small">
+ </style>
+ <style name="TextAppearance.Sherlock.Light.Widget.PopupMenu.Small" parent="android:TextAppearance.Holo.Widget.PopupMenu.Small">
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__themes.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__themes.xml
new file mode 100644
index 0000000000..75e317b4a1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-v14/abs__themes.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <style name="Sherlock.__Theme" parent="android:Theme.Holo">
+ </style>
+ <style name="Sherlock.__Theme.Light" parent="android:Theme.Holo.Light">
+ </style>
+ <style name="Sherlock.__Theme.DarkActionBar" parent="android:Theme.Holo.Light.DarkActionBar">
+ <!-- Useful for offsetting contents with an overlay action bar. -->
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <!-- Needed for our bug-fix dropdown list navigation layout. :( -->
+ <item name="dropdownListPreferredItemHeight">48dp</item>
+ <!-- Needed for our ShareActionProvider and SearchView implementation. -->
+ <item name="android:actionBarWidgetTheme">@style/Theme.Sherlock</item>
+ <!-- For crazy people who use IcsSpinner. -->
+ <item name="dropDownListViewStyle">?android:attr/dropDownListViewStyle</item>
+ <!-- Needed for our SearchView implementation. -->
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ </style>
+
+ <style name="Theme.Sherlock.NoActionBar">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+ <style name="Theme.Sherlock.Light.NoActionBar">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w360dp/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w360dp/abs__dimens.xml
new file mode 100644
index 0000000000..6f49d7e47b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w360dp/abs__dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <integer name="abs__max_action_buttons">3</integer>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__bools.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__bools.xml
new file mode 100644
index 0000000000..3eaf4aee9d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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.
+*/
+-->
+<resources>
+ <bool name="abs__action_bar_embed_tabs">true</bool>
+ <bool name="abs__split_action_bar_is_narrow">false</bool>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__config.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__config.xml
new file mode 100644
index 0000000000..88357b0a76
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w480dp/abs__config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether action menu items should obey the "withText" showAsAction
+ flag. This may be set to false for situations where space is
+ extremely limited. -->
+ <bool name="abs__config_allowActionMenuItemTextWithIcon">true</bool>
+
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w500dp/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w500dp/abs__dimens.xml
new file mode 100644
index 0000000000..2fd4deea2d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w500dp/abs__dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <integer name="abs__max_action_buttons">4</integer>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w600dp/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w600dp/abs__dimens.xml
new file mode 100644
index 0000000000..b085952d32
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-w600dp/abs__dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <integer name="abs__max_action_buttons">5</integer>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-xlarge/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-xlarge/abs__dimens.xml
new file mode 100644
index 0000000000..9ceb5b06f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values-xlarge/abs__dimens.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">9dip</dimen>
+
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abs__action_button_min_width">64dip</dimen>
+
+ <!-- The platform's desired minimum size for a dialog's width when it
+ is along the major axis (that is the screen is landscape). This may
+ be either a fraction or a dimension. -->
+ <item type="dimen" name="abs__dialog_min_width_major">45%</item>
+ <!-- The platform's desired minimum size for a dialog's width when it
+ is along the minor axis (that is the screen is portrait). This may
+ be either a fraction or a dimension. -->
+ <item type="dimen" name="abs__dialog_min_width_minor">72%</item>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__attrs.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__attrs.xml
new file mode 100644
index 0000000000..af5873d908
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__attrs.xml
@@ -0,0 +1,432 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <attr name="titleTextStyle" format="reference" />
+ <attr name="subtitleTextStyle" format="reference" />
+ <attr name="background" format="reference|color" />
+ <attr name="backgroundSplit" format="reference|color" />
+ <attr name="height" format="dimension" />
+ <attr name="divider" format="reference" />
+
+ <declare-styleable name="SherlockTheme">
+ <!-- =================== -->
+ <!-- Action bar styles -->
+ <!-- =================== -->
+ <eat-comment />
+ <!-- Default style for tabs within an action bar -->
+ <attr name="actionBarTabStyle" format="reference" />
+ <attr name="actionBarTabBarStyle" format="reference" />
+ <attr name="actionBarTabTextStyle" format="reference" />
+ <attr name="actionOverflowButtonStyle" format="reference" />
+ <!-- Reference to a style for the Action Bar -->
+ <attr name="actionBarStyle" format="reference" />
+ <!-- Reference to a style for the split Action Bar. This style
+ controls the split component that holds the menu/action
+ buttons. actionBarStyle is still used for the primary
+ bar. -->
+ <attr name="actionBarSplitStyle" format="reference" />
+ <!-- Reference to a theme that should be used to inflate widgets
+ and layouts destined for the action bar. Most of the time
+ this will be a reference to the current theme, but when
+ the action bar has a significantly different contrast
+ profile than the rest of the activity the difference
+ can become important. If this is set to @null the current
+ theme will be used.-->
+ <attr name="actionBarWidgetTheme" format="reference" />
+ <!-- Size of the Action Bar, including the contextual
+ bar used to present Action Modes. -->
+ <attr name="actionBarSize" format="dimension" >
+ <enum name="wrap_content" value="0" />
+ </attr>
+ <!-- Custom divider drawable to use for elements in the action bar. -->
+ <attr name="actionBarDivider" format="reference" />
+ <!-- Custom item state list drawable background for action bar items. -->
+ <attr name="actionBarItemBackground" format="reference" />
+ <!-- TextAppearance style that will be applied to text that
+ appears within action menu items. -->
+ <attr name="actionMenuTextAppearance" format="reference" />
+ <!-- Color for text that appears within action menu items. -->
+ <attr name="actionMenuTextColor" format="color|reference" />
+
+ <!-- =================== -->
+ <!-- Action mode styles -->
+ <!-- =================== -->
+ <eat-comment />
+ <attr name="actionModeStyle" format="reference" />
+ <attr name="actionModeCloseButtonStyle" format="reference" />
+ <!-- Background drawable to use for action mode UI -->
+ <attr name="actionModeBackground" format="reference" />
+ <!-- Background drawable to use for action mode UI in the lower split bar -->
+ <attr name="actionModeSplitBackground" format="reference" />
+ <!-- Drawable to use for the close action mode button -->
+ <attr name="actionModeCloseDrawable" format="reference" />
+ <!-- Drawable to use for the Share action button in WebView selection action modes -->
+ <attr name="actionModeShareDrawable" format="reference" />
+
+ <!-- PopupWindow style to use for action modes when showing as a window overlay. -->
+ <attr name="actionModePopupWindowStyle" format="reference" />
+
+ <!-- ============= -->
+ <!-- Button styles -->
+ <!-- ============= -->
+ <eat-comment />
+
+ <!-- Small Button style. -->
+ <attr name="buttonStyleSmall" format="reference" />
+
+ <!-- Background drawable for standalone items that need focus/pressed states. -->
+ <attr name="selectableItemBackground" format="reference" />
+
+
+
+ <!-- This Drawable is overlaid over the foreground of the Window's content area, usually
+ to place a shadow below the title. -->
+ <attr name="windowContentOverlay" format="reference" />
+
+ <!-- Text color, typeface, size, and style for the text inside of a popup menu. -->
+ <attr name="textAppearanceLargePopupMenu" format="reference" />
+
+ <!-- Text color, typeface, size, and style for small text inside of a popup menu. -->
+ <attr name="textAppearanceSmallPopupMenu" format="reference" />
+
+
+ <!-- Text color, typeface, size, and style for "small" text. Defaults to secondary text color. -->
+ <attr name="textAppearanceSmall" format="reference" />
+
+ <attr name="textColorPrimary" format="color" />
+ <attr name="textColorPrimaryDisableOnly" format="color" />
+ <attr name="textColorPrimaryInverse" format="color" />
+
+ <attr name="spinnerItemStyle" format="reference" />
+ <attr name="spinnerDropDownItemStyle" format="reference" />
+
+ <!-- ============================ -->
+ <!-- SearchView styles and assets -->
+ <!-- ============================ -->
+ <eat-comment />
+ <!-- SearchView AutoCompleteTextView style -->
+ <attr name="searchAutoCompleteTextView" format="reference" />
+ <!-- SearchView dropdown background -->
+ <attr name="searchDropdownBackground" format="reference" />
+ <!-- SearchView close button icon -->
+ <attr name="searchViewCloseIcon" format="reference" />
+ <!-- SearchView Go button icon -->
+ <attr name="searchViewGoIcon" format="reference" />
+ <!-- SearchView Search icon -->
+ <attr name="searchViewSearchIcon" format="reference" />
+ <!-- SearchView Voice button icon -->
+ <attr name="searchViewVoiceIcon" format="reference" />
+ <!-- SearchView query refinement icon -->
+ <attr name="searchViewEditQuery" format="reference" />
+ <!-- SearchView query refinement icon background -->
+ <attr name="searchViewEditQueryBackground" format="reference" />
+ <!-- SearchView text field background for the left section -->
+ <attr name="searchViewTextField" format="reference" />
+ <!-- SearchView text field background for the right section -->
+ <attr name="searchViewTextFieldRight" format="reference" />
+ <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide -->
+ <attr name="textColorSearchUrl" format="reference|color" />
+ <!-- The list item height for search results. @hide -->
+ <attr name="searchResultListItemHeight" format="dimension" />
+ <!-- Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. -->
+ <attr name="textAppearanceSearchResultTitle" format="reference" />
+ <!-- Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. -->
+ <attr name="textAppearanceSearchResultSubtitle" format="reference" />
+
+
+ <!-- =========== -->
+ <!-- List styles -->
+ <!-- =========== -->
+ <eat-comment />
+
+ <!-- A smaller, sleeker list item height. -->
+ <attr name="listPreferredItemHeightSmall" format="dimension" />
+
+ <!-- The preferred padding along the left edge of list items. -->
+ <attr name="listPreferredItemPaddingLeft" format="dimension" />
+ <!-- The preferred padding along the right edge of list items. -->
+ <attr name="listPreferredItemPaddingRight" format="dimension" />
+
+ <!-- The preferred TextAppearance for the primary text of small list items. -->
+ <attr name="textAppearanceListItemSmall" format="reference" />
+
+
+ <attr name="windowMinWidthMajor" format="dimension" />
+ <attr name="windowMinWidthMinor" format="dimension" />
+
+
+
+ <!-- Drawable to use for generic vertical dividers. -->
+ <attr name="dividerVertical" format="reference" />
+
+ <attr name="actionDropDownStyle" format="reference" />
+ <attr name="actionButtonStyle" format="reference" />
+ <attr name="homeAsUpIndicator" format="reference" />
+ <attr name="dropDownListViewStyle" format="reference" />
+ <attr name="popupMenuStyle" format="reference" />
+ <attr name="dropdownListPreferredItemHeight" format="dimension" />
+ <attr name="actionSpinnerItemStyle" format="reference" />
+ <attr name="windowNoTitle" format="boolean"/>
+ <attr name="windowActionBar" format="boolean"/>
+ <attr name="windowActionBarOverlay" format="boolean"/>
+ <attr name="windowActionModeOverlay" format="boolean"/>
+ <attr name="windowSplitActionBar" format="boolean" />
+
+
+ <attr name="listPopupWindowStyle" format="reference" />
+
+
+ <!-- Default ActivityChooserView style. -->
+ <attr name="activityChooserViewStyle" format="reference" />
+ <!-- Drawable used as a background for activated items. -->
+ <attr name="activatedBackgroundIndicator" format="reference" />
+
+ <attr name="dropDownHintAppearance" format="reference" />
+ </declare-styleable>
+
+
+ <!-- Attributes used to style the Action Bar. -->
+ <declare-styleable name="SherlockActionBar">
+ <!-- The type of navigation to use. -->
+ <attr name="navigationMode">
+ <!-- Normal static title text -->
+ <enum name="normal" value="0" />
+ <!-- The action bar will use a selection list for navigation. -->
+ <enum name="listMode" value="1" />
+ <!-- The action bar will use a series of horizontal tabs for navigation. -->
+ <enum name="tabMode" value="2" />
+ </attr>
+ <!-- Options affecting how the action bar is displayed. -->
+ <attr name="displayOptions">
+ <flag name="useLogo" value="0x1" />
+ <flag name="showHome" value="0x2" />
+ <flag name="homeAsUp" value="0x4" />
+ <flag name="showTitle" value="0x8" />
+ <flag name="showCustom" value="0x10" />
+ <flag name="disableHome" value="0x20" />
+ </attr>
+ <!-- Specifies title text used for navigationMode="normal" -->
+ <attr name="title" format="string" />
+ <!-- Specifies subtitle text used for navigationMode="normal" -->
+ <attr name="subtitle" format="string" />
+ <!-- Specifies a style to use for title text. -->
+ <attr name="titleTextStyle" />
+ <!-- Specifies a style to use for subtitle text. -->
+ <attr name="subtitleTextStyle" />
+ <!-- Specifies the drawable used for the application icon. -->
+ <attr name="icon" format="reference" />
+ <!-- Specifies the drawable used for the application logo. -->
+ <attr name="logo" format="reference" />
+ <!-- Specifies the drawable used for item dividers. -->
+ <attr name="divider" />
+ <!-- Specifies a background drawable for the action bar. -->
+ <attr name="background" />
+ <!-- Specifies a background drawable for a second stacked row of the action bar. -->
+ <attr name="backgroundStacked" format="reference|color" />
+ <!-- Specifies a background drawable for the bottom component of a split action bar. -->
+ <attr name="backgroundSplit" />
+ <!-- Specifies a layout for custom navigation. Overrides navigationMode. -->
+ <attr name="customNavigationLayout" format="reference" />
+ <!-- Specifies a fixed height. -->
+ <attr name="height" />
+ <!-- Specifies a layout to use for the "home" section of the action bar. -->
+ <attr name="homeLayout" format="reference" />
+ <!-- Specifies a style resource to use for an embedded progress bar. -->
+ <attr name="progressBarStyle" format="reference" />
+ <!-- Specifies a style resource to use for an indeterminate progress spinner. -->
+ <attr name="indeterminateProgressStyle" format="reference" />
+ <!-- Specifies the horizontal padding on either end for an embedded progress bar. -->
+ <attr name="progressBarPadding" format="dimension" />
+ <!-- Specifies padding that should be applied to the left and right sides of
+ system-provided items in the bar. -->
+ <attr name="itemPadding" format="dimension" />
+ </declare-styleable>
+
+
+ <declare-styleable name="SherlockActionMode">
+ <!-- Specifies a style to use for title text. -->
+ <attr name="titleTextStyle" />
+ <!-- Specifies a style to use for subtitle text. -->
+ <attr name="subtitleTextStyle" />
+ <!-- Specifies a background for the action mode bar. -->
+ <attr name="background" />
+ <!-- Specifies a background for the split action mode bar. -->
+ <attr name="backgroundSplit" />
+ <!-- Specifies a fixed height for the action mode bar. -->
+ <attr name="height" />
+ </declare-styleable>
+
+ <declare-styleable name="SherlockMenuView">
+ <!-- Default appearance of menu item text. -->
+ <attr name="itemTextAppearance" format="reference" />
+ <!-- Default horizontal divider between rows of menu items. -->
+ <attr name="horizontalDivider" format="reference" />
+ <!-- Default vertical divider between menu items. -->
+ <attr name="verticalDivider" format="reference" />
+ <!-- Default background for the menu header. -->
+ <attr name="headerBackground" format="color|reference" />
+ <!-- Default background for each menu item. -->
+ <attr name="itemBackground" format="color|reference" />
+ <!-- Default animations for the menu. -->
+ <attr name="windowAnimationStyle" format="reference" />
+ <!-- Default disabled icon alpha for each menu item that shows an icon. -->
+ <attr name="itemIconDisabledAlpha" format="float" />
+ <!-- Whether space should be reserved in layout when an icon is missing. -->
+ <attr name="preserveIconSpacing" format="boolean" />
+ </declare-styleable>
+
+ <declare-styleable name="SherlockActionMenuItemView">
+ <attr name="android:minWidth" />
+ </declare-styleable>
+
+ <declare-styleable name="SherlockActivityChooserView">
+ <!-- The maximal number of items initially shown in the activity list. -->
+ <attr name="initialActivityCount" format="string" />
+ <!-- The drawable to show in the button for expanding the activities overflow popup.
+ <strong>Note:</strong> Clients would like to set this drawable
+ as a clue about the action the chosen activity will perform. For
+ example, if share activity is to be chosen the drawable should
+ give a clue that sharing is to be performed.
+ -->
+ <attr name="expandActivityOverflowButtonDrawable" format="reference" />
+
+ <attr name="android:background" />
+ </declare-styleable>
+
+ <!-- Base attributes that are available to all groups. -->
+ <declare-styleable name="SherlockMenuGroup">
+
+ <!-- The ID of the group. -->
+ <attr name="android:id" />
+
+ <!-- The category applied to all items within this group.
+ (This will be or'ed with the orderInCategory attribute.) -->
+ <attr name="android:menuCategory" />
+
+ <!-- The order within the category applied to all items within this group.
+ (This will be or'ed with the category attribute.) -->
+ <attr name="android:orderInCategory" />
+
+ <!-- Whether the items are capable of displaying a check mark. -->
+ <attr name="android:checkableBehavior" />
+
+ <!-- Whether the items are shown/visible. -->
+ <attr name="android:visible" />
+
+ <!-- Whether the items are enabled. -->
+ <attr name="android:enabled" />
+
+ </declare-styleable>
+
+ <!-- Base attributes that are available to all Item objects. -->
+ <declare-styleable name="SherlockMenuItem">
+
+ <!-- The ID of the item. -->
+ <attr name="android:id" />
+
+ <!-- The category applied to the item.
+ (This will be or'ed with the orderInCategory attribute.) -->
+ <attr name="android:menuCategory" />
+
+ <!-- The order within the category applied to the item.
+ (This will be or'ed with the category attribute.) -->
+ <attr name="android:orderInCategory" />
+
+ <!-- The title associated with the item. -->
+ <attr name="android:title" />
+
+ <!-- The condensed title associated with the item. This is used in situations where the
+ normal title may be too long to be displayed. -->
+ <attr name="android:titleCondensed" />
+
+ <!-- The icon associated with this item. This icon will not always be shown, so
+ the title should be sufficient in describing this item. -->
+ <attr name="android:icon" />
+
+ <!-- The alphabetic shortcut key. This is the shortcut when using a keyboard
+ with alphabetic keys. -->
+ <attr name="android:alphabeticShortcut" />
+
+ <!-- The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key)
+ keyboard. -->
+ <attr name="android:numericShortcut" />
+
+ <!-- Whether the item is capable of displaying a check mark. -->
+ <attr name="android:checkable" />
+
+ <!-- Whether the item is checked. Note that you must first have enabled checking with
+ the checkable attribute or else the check mark will not appear. -->
+ <attr name="android:checked" />
+
+ <!-- Whether the item is shown/visible. -->
+ <attr name="android:visible" />
+
+ <!-- Whether the item is enabled. -->
+ <attr name="android:enabled" />
+
+ <!-- Name of a method on the Context used to inflate the menu that will be
+ called when the item is clicked. -->
+ <attr name="android:onClick" />
+
+ <!-- How this item should display in the Action Bar, if present. -->
+ <attr name="android:showAsAction" />
+
+ <!-- An optional layout to be used as an action view.
+ See {@link android.view.MenuItem#setActionView(android.view.View)}
+ for more info. -->
+ <attr name="android:actionLayout" />
+
+ <!-- The name of an optional View class to instantiate and use as an
+ action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
+ for more info. -->
+ <attr name="android:actionViewClass" />
+
+ <!-- The name of an optional ActionProvider class to instantiate an action view
+ and perform operations such as default action for that menu item.
+ See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
+ for more info. -->
+ <attr name="android:actionProviderClass" />
+
+ </declare-styleable>
+
+ <declare-styleable name="SherlockSpinner">
+ <!-- The prompt to display when the spinner's dialog is shown. -->
+ <attr name="android:prompt" />
+ <!-- List selector to use for spinnerMode="dropdown" display. -->
+ <attr name="android:dropDownSelector" />
+ <!-- Background drawable to use for the dropdown in spinnerMode="dropdown". -->
+ <attr name="android:popupBackground" />
+ <!-- Vertical offset from the spinner widget for positioning the dropdown in
+ spinnerMode="dropdown". -->
+ <attr name="android:dropDownVerticalOffset" />
+ <!-- Horizontal offset from the spinner widget for positioning the dropdown
+ in spinnerMode="dropdown". -->
+ <attr name="android:dropDownHorizontalOffset" />
+ <!-- Width of the dropdown in spinnerMode="dropdown". -->
+ <attr name="android:dropDownWidth" />
+ <!-- Reference to a layout to use for displaying a prompt in the dropdown for
+ spinnerMode="dropdown". This layout must contain a TextView with the id
+ @android:id/text1 to be populated with the prompt text. -->
+ <attr name="android:popupPromptView" />
+ <!-- Gravity setting for positioning the currently selected item. -->
+ <attr name="android:gravity" />
+ </declare-styleable>
+
+ <declare-styleable name="SherlockSearchView">
+ <!-- The default state of the SearchView. If true, it will be iconified when not in
+ use and expanded when clicked. -->
+ <attr name="iconifiedByDefault" format="boolean"/>
+ <!-- An optional maximum width of the SearchView. -->
+ <attr name="android:maxWidth" />
+ <!-- An optional query hint string to be displayed in the empty query field. -->
+ <attr name="queryHint" format="string" />
+ <!-- The IME options to set on the query text field. -->
+ <attr name="android:imeOptions" />
+ <!-- The input type to set on the query text field. -->
+ <attr name="android:inputType" />
+ </declare-styleable>
+
+ <declare-styleable name="SherlockView">
+ <attr name="android:focusable"/>
+ </declare-styleable>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__bools.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__bools.xml
new file mode 100644
index 0000000000..0b432448d9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<resources>
+ <bool name="abs__action_bar_embed_tabs">false</bool>
+ <bool name="abs__split_action_bar_is_narrow">true</bool>
+ <bool name="abs__action_bar_expanded_action_views_exclusive">true</bool>
+ <!--bool name="target_honeycomb_needs_options_menu">true</bool-->
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__colors.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__colors.xml
new file mode 100644
index 0000000000..b189e727a4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__colors.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<resources>
+ <color name="abs__background_holo_dark">#ff000000</color>
+ <color name="abs__background_holo_light">#fff3f3f3</color>
+ <color name="abs__bright_foreground_holo_dark">@color/abs__background_holo_light</color>
+ <color name="abs__bright_foreground_holo_light">@color/abs__background_holo_dark</color>
+ <color name="abs__bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
+ <color name="abs__bright_foreground_disabled_holo_light">#ffb2b2b2</color>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__config.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__config.xml
new file mode 100644
index 0000000000..4c7b5d4598
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- The maximum width we would prefer dialogs to be. 0 if there is no
+ maximum (let them grow as large as the screen). Actual values are
+ specified for -large and -xlarge configurations. -->
+ <dimen name="abs__config_prefDialogWidth">320dp</dimen>
+
+ <!-- Sets whether menu shortcuts should be displayed on panel menus when
+ a keyboard is present. -->
+ <bool name="abs__config_showMenuShortcutsWhenKeyboardPresent">false</bool>
+
+ <!-- Whether action menu items should be displayed in ALLCAPS or not.
+ Defaults to true. If this is not appropriate for specific locales
+ it should be disabled in that locale's resources. -->
+ <bool name="abs__config_actionMenuItemAllCaps">true</bool>
+
+ <!-- Whether action menu items should obey the "withText" showAsAction
+ flag. This may be set to false for situations where space is
+ extremely limited. -->
+ <bool name="abs__config_allowActionMenuItemTextWithIcon">false</bool>
+
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__dimens.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__dimens.xml
new file mode 100644
index 0000000000..9ded219786
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__dimens.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/dimens.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources>
+ <!-- Default height of an action bar. -->
+ <dimen name="abs__action_bar_default_height">48dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abs__action_bar_icon_vertical_padding">8dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abs__action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abs__action_bar_subtitle_bottom_margin">5dip</dimen>
+
+ <integer name="abs__max_action_buttons">2</integer>
+
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abs__action_button_min_width">56dip</dimen>
+
+
+ <!-- Text padding for dropdown items -->
+ <dimen name="abs__dropdownitem_text_padding_left">8dip</dimen>
+
+ <!-- Text padding for dropdown items -->
+ <dimen name="abs__dropdownitem_text_padding_right">8dip</dimen>
+
+ <!-- Width of the icon in a dropdown list -->
+ <dimen name="abs__dropdownitem_icon_width">32dip</dimen>
+
+
+ <!-- Minimum width of the search view text entry area. -->
+ <dimen name="abs__search_view_text_min_width">160dip</dimen>
+
+ <!-- Preferred width of the search view. -->
+ <dimen name="abs__search_view_preferred_width">320dip</dimen>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__ids.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__ids.xml
new file mode 100644
index 0000000000..f9f56045b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__ids.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** 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.
+*/
+-->
+<resources>
+ <item type="id" name="abs__home" />
+ <item type="id" name="abs__up" />
+ <item type="id" name="abs__action_menu_divider" />
+ <item type="id" name="abs__action_menu_presenter" />
+ <item type="id" name="abs__progress_circular" />
+ <item type="id" name="abs__progress_horizontal" />
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__strings.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__strings.xml
new file mode 100644
index 0000000000..cf0235922a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__strings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] -->
+ <string name="abs__action_bar_home_description">Navigate home</string>
+ <!-- Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] -->
+ <string name="abs__action_bar_up_description">Navigate up</string>
+ <!-- Content description for the action menu overflow button. [CHAR LIMIT=NONE] -->
+ <string name="abs__action_menu_overflow_description">More options</string>
+
+ <!-- Label for the "Done" button on the far left of action mode toolbars. -->
+ <string name="abs__action_mode_done">Done</string>
+
+ <!-- Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] -->
+ <string name="abs__activity_chooser_view_see_all">See all...</string>
+ <!-- Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] -->
+ <string name="abs__activitychooserview_choose_application">Choose an application</string>
+ <!-- Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
+ <string name="abs__shareactionprovider_share_with">Share with</string>
+ <!-- Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
+ <string name="abs__shareactionprovider_share_with_application">Share with <xliff:g id="application_name" example="Bluetooth">%s</xliff:g></string>
+
+ <!-- SearchView accessibility description for search button [CHAR LIMIT=NONE] -->
+ <string name="abs__searchview_description_search">Search</string>
+ <!-- SearchView accessibility description for search text field [CHAR LIMIT=NONE] -->
+ <string name="abs__searchview_description_query">Search query</string>
+ <!-- SearchView accessibility description for clear button [CHAR LIMIT=NONE] -->
+ <string name="abs__searchview_description_clear">Clear query</string>
+ <!-- SearchView accessibility description for submit button [CHAR LIMIT=NONE] -->
+ <string name="abs__searchview_description_submit">Submit query</string>
+ <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
+ <string name="abs__searchview_description_voice">Voice search</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__styles.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__styles.xml
new file mode 100644
index 0000000000..f86c1b8239
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__styles.xml
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <style name="Widget">
+ </style>
+
+ <style name="Sherlock.__Widget.ActionBar" parent="Widget">
+ <item name="displayOptions">useLogo|showHome|showTitle</item>
+ <item name="height">?attr/actionBarSize</item>
+ <item name="android:paddingLeft">0dip</item>
+ <item name="android:paddingTop">0dip</item>
+ <item name="android:paddingRight">0dip</item>
+ <item name="android:paddingBottom">0dip</item>
+ <item name="homeLayout">@layout/abs__action_bar_home</item>
+ </style>
+ <style name="Widget.Sherlock.ActionBar" parent="Sherlock.__Widget.ActionBar">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Subtitle</item>
+ <item name="background">@drawable/abs__ab_transparent_dark_holo</item>
+ <item name="backgroundStacked">@drawable/abs__ab_stacked_transparent_dark_holo</item>
+ <item name="backgroundSplit">@drawable/abs__ab_bottom_transparent_dark_holo</item>
+ <item name="divider">?attr/dividerVertical</item>
+ <item name="progressBarStyle">@style/Widget.Sherlock.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.Sherlock.ProgressBar</item>
+ <item name="progressBarPadding">32dip</item>
+ <item name="itemPadding">8dip</item>
+ </style>
+ <style name="Widget.Sherlock.ActionBar.Solid" parent="Sherlock.__Widget.ActionBar">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Subtitle</item>
+ <item name="background">@drawable/abs__ab_solid_dark_holo</item>
+ <item name="backgroundStacked">@drawable/abs__ab_stacked_solid_dark_holo</item>
+ <item name="backgroundSplit">@drawable/abs__ab_bottom_solid_dark_holo</item>
+ <item name="divider">?attr/dividerVertical</item>
+ <item name="progressBarStyle">@style/Widget.Sherlock.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.Sherlock.ProgressBar</item>
+ <item name="progressBarPadding">32dip</item>
+ <item name="itemPadding">8dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar" parent="Widget.Sherlock.ActionBar">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Subtitle</item>
+ <item name="background">@drawable/abs__ab_transparent_light_holo</item>
+ <item name="backgroundStacked">@drawable/abs__ab_stacked_transparent_light_holo</item>
+ <item name="backgroundSplit">@drawable/abs__ab_bottom_transparent_light_holo</item>
+ <item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_light</item>
+ <item name="progressBarStyle">@style/Widget.Sherlock.Light.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.Sherlock.Light.ProgressBar</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.Solid">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Subtitle</item>
+ <item name="background">@drawable/abs__ab_solid_light_holo</item>
+ <item name="backgroundStacked">@drawable/abs__ab_stacked_solid_light_holo</item>
+ <item name="backgroundSplit">@drawable/abs__ab_bottom_solid_light_holo</item>
+ <item name="divider">?attr/dividerVertical</item>
+ <item name="progressBarStyle">@style/Widget.Sherlock.Light.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.Sherlock.Light.ProgressBar</item>
+ <item name="progressBarPadding">32dip</item>
+ <item name="itemPadding">8dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Title.Inverse</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionBar.Subtitle.Inverse</item>
+ <item name="background">@drawable/abs__ab_solid_dark_holo</item>
+ <item name="backgroundStacked">@drawable/abs__ab_stacked_solid_dark_holo</item>
+ <item name="backgroundSplit">@drawable/abs__ab_bottom_solid_inverse_holo</item>
+ <item name="divider">@drawable/abs__list_divider_holo_dark</item>
+ <item name="progressBarStyle">@style/Widget.Sherlock.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.Sherlock.ProgressBar</item>
+ <item name="progressBarPadding">32dip</item>
+ <item name="itemPadding">8dip</item>
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabView" parent="Widget">
+ <item name="android:gravity">center_horizontal</item>
+ <item name="android:background">@drawable/abs__tab_indicator_ab_holo</item>
+ <item name="android:paddingLeft">16dip</item>
+ <item name="android:paddingRight">16dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabView" parent="Widget.Sherlock.ActionBar.TabView">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabView.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabBar" parent="Widget">
+ <item name="android:divider">?attr/actionBarDivider</item>
+ <item name="android:showDividers">middle</item>
+ <item name="android:dividerPadding">12dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabBar" parent="Widget.Sherlock.ActionBar.TabBar">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabBar.Inverse">
+ </style>
+
+ <style name="Widget.Sherlock.ActionBar.TabText" parent="Widget">
+ <item name="android:textAppearance">@null</item>
+ <item name="android:textColor">?attr/textColorPrimary</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textAllCaps">true</item>
+ <item name="android:ellipsize">marquee</item>
+ <item name="android:maxLines">2</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabText" parent="Widget.Sherlock.ActionBar.TabText">
+ </style>
+ <style name="Widget.Sherlock.Light.ActionBar.TabText.Inverse">
+ <item name="android:textColor">?attr/textColorPrimaryInverse</item>
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton" parent="Widget">
+ <item name="android:background">?attr/actionBarItemBackground</item>
+ <item name="android:minHeight">?attr/actionBarSize</item>
+
+ <item name="android:minWidth">@dimen/abs__action_button_min_width</item>
+ <item name="android:gravity">center</item>
+ <item name="android:paddingLeft">12dip</item>
+ <item name="android:paddingRight">12dip</item>
+ <item name="android:scaleType">center</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton" parent="Widget.Sherlock.ActionButton">
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton.CloseMode">
+ <item name="android:background">@drawable/abs__btn_cab_done_holo_dark</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton.CloseMode">
+ <item name="android:background">@drawable/abs__btn_cab_done_holo_light</item>
+ </style>
+
+ <style name="Widget.Sherlock.ActionButton.Overflow">
+ <item name="android:src">@drawable/abs__ic_menu_moreoverflow_holo_dark</item>
+ <item name="android:background">?attr/actionBarItemBackground</item>
+ <item name="android:contentDescription">@string/abs__action_menu_overflow_description</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionButton.Overflow">
+ <item name="android:src">@drawable/abs__ic_menu_moreoverflow_holo_light</item>
+ </style>
+
+ <style name="Sherlock.__Widget.ActionMode" parent="Widget">
+ <item name="background">?attr/actionModeBackground</item>
+ <item name="backgroundSplit">?attr/actionModeSplitBackground</item>
+ <item name="height">?attr/actionBarSize</item>
+ </style>
+ <style name="Widget.Sherlock.ActionMode" parent="Sherlock.__Widget.ActionMode">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Subtitle</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionMode" parent="Widget.Sherlock.ActionMode">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Subtitle</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ActionMode.Inverse" parent="Sherlock.__Widget.ActionMode">
+ <item name="titleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Title.Inverse</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.Sherlock.Widget.ActionMode.Subtitle.Inverse</item>
+ </style>
+
+
+ <style name="Widget.Sherlock.ListPopupWindow" parent="Widget">
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_dark</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_dark</item>
+ <item name="android:dropDownVerticalOffset">0dip</item>
+ <item name="android:dropDownHorizontalOffset">0dip</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ListPopupWindow" parent="Widget">
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_light</item>
+ <item name="android:dropDownVerticalOffset">0dip</item>
+ <item name="android:dropDownHorizontalOffset">0dip</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ </style>
+ <style name="Widget.Sherlock.PopupMenu" parent="Widget.Sherlock.ListPopupWindow">
+ </style>
+ <style name="Widget.Sherlock.Light.PopupMenu" parent="Widget.Sherlock.Light.ListPopupWindow">
+ </style>
+
+
+ <style name="Sherlock.__Widget.ActivityChooserView" parent="Widget">
+ <item name="android:gravity">center</item>
+ <item name="android:background">@drawable/abs__ab_share_pack_holo_dark</item>
+ <item name="android:divider">?attr/dividerVertical</item>
+ <item name="android:showDividers">middle</item>
+ <item name="android:dividerPadding">6dip</item>
+ <item name="android:minHeight">?attr/actionBarSize</item>
+ </style>
+ <style name="Widget.Sherlock.ActivityChooserView" parent="Sherlock.__Widget.ActivityChooserView">
+ </style>
+ <style name="Widget.Sherlock.Light.ActivityChooserView" parent="Widget.Sherlock.ActivityChooserView">
+ <item name="android:background">@drawable/abs__ab_share_pack_holo_light</item>
+ </style>
+
+ <style name="Widget.Sherlock.Button.Small" parent="Widget">
+ <item name="android:textAppearance">?attr/textAppearanceSmall</item>
+ <item name="android:textColor">@color/abs__primary_text_holo_dark</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:minWidth">48dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.Button.Small" parent="Widget">
+ <item name="android:textAppearance">?attr/textAppearanceSmall</item>
+ <item name="android:textColor">@color/abs__primary_text_holo_light</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:minWidth">48dip</item>
+ </style>
+
+
+ <style name="Sherlock.__Widget.Holo.Spinner" parent="Widget">
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_dark</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_dark</item>
+ <item name="android:dropDownVerticalOffset">0dip</item>
+ <item name="android:dropDownHorizontalOffset">0dip</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ <item name="android:gravity">left|center_vertical</item>
+ <item name="android:spinnerMode">dropdown</item>
+ <item name="android:clickable">true</item>
+ </style>
+ <style name="Widget.Sherlock.Spinner.DropDown.ActionBar" parent="Sherlock.__Widget.Holo.Spinner">
+ <item name="android:background">@drawable/abs__spinner_ab_holo_dark</item>
+ </style>
+ <style name="Widget.Sherlock.Light.Spinner.DropDown.ActionBar" parent="Sherlock.__Widget.Holo.Spinner">
+ <item name="android:background">@drawable/abs__spinner_ab_holo_light</item>
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_light</item>
+ </style>
+
+ <style name="Sherlock.__Widget.Holo.ListView" parent="android:Widget.ListView">
+ <item name="android:divider">@drawable/abs__list_divider_holo_dark</item>
+ <item name="android:listSelector">@drawable/abs__list_selector_holo_dark</item>
+ </style>
+ <style name="Widget.Sherlock.ListView.DropDown" parent="Sherlock.__Widget.Holo.ListView">
+ </style>
+ <style name="Widget.Sherlock.Light.ListView.DropDown" parent="Sherlock.__Widget.Holo.ListView">
+ <item name="android:divider">@drawable/abs__list_divider_holo_light</item>
+ <item name="android:listSelector">@drawable/abs__list_selector_holo_light</item>
+ </style>
+
+ <style name="Sherlock.__Widget.Holo.DropDownItem" parent="Widget">
+ <item name="android:textAppearance">@style/TextAppearance.Sherlock.Widget.DropDownItem</item>
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ <item name="android:gravity">center_vertical</item>
+ </style>
+ <style name="Widget.Sherlock.DropDownItem.Spinner" parent="Sherlock.__Widget.Holo.DropDownItem">
+ </style>
+ <style name="Widget.Sherlock.Light.DropDownItem.Spinner" parent="Sherlock.__Widget.Holo.DropDownItem">
+ </style>
+
+ <style name="Widget.Sherlock.PopupWindow.ActionMode" parent="Widget">
+ </style>
+ <style name="Widget.Sherlock.Light.PopupWindow.ActionMode" parent="Widget">
+ <item name="android:popupBackground">@android:color/white</item>
+ </style>
+
+
+
+ <style name="Widget.Sherlock.ProgressBar" parent="android:Widget.ProgressBar">
+ <item name="android:indeterminateDrawable">@drawable/abs__progress_medium_holo</item>
+ <item name="android:animationResolution">33</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ProgressBar" parent="Widget.Sherlock.ProgressBar">
+ </style>
+
+ <style name="Widget.Sherlock.ProgressBar.Horizontal" parent="android:Widget.ProgressBar.Horizontal">
+ <item name="android:progressDrawable">@drawable/abs__progress_horizontal_holo_dark</item>
+ <!--item name="android:indeterminateDrawable">@drawable/abs__progress_indeterminate_horizontal_holo</item-->
+ <item name="android:minHeight">16dip</item>
+ <item name="android:maxHeight">16dip</item>
+ </style>
+ <style name="Widget.Sherlock.Light.ProgressBar.Horizontal" parent="Widget.Sherlock.ProgressBar.Horizontal">
+ <item name="android:progressDrawable">@drawable/abs__progress_horizontal_holo_light</item>
+ </style>
+
+
+
+ <style name="Widget.Sherlock.TextView.SpinnerItem" parent="Widget">
+ <item name="android:textAppearance">@style/TextAppearance.Sherlock.Widget.TextView.SpinnerItem</item>
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ </style>
+
+
+
+ <style name="Sherlock.__Widget.SearchAutoCompleteTextView" parent="Widget">
+ <item name="android:focusable">true</item>
+ <item name="android:focusableInTouchMode">true</item>
+ <item name="android:clickable">true</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
+ <item name="android:textColor">?attr/textColorPrimary</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:completionHintView">@layout/abs__simple_dropdown_hint</item>
+ <item name="android:completionThreshold">2</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ </style>
+ <style name="Widget.Sherlock.SearchAutoCompleteTextView" parent="Sherlock.__Widget.SearchAutoCompleteTextView">
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_dark</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_dark</item>
+ </style>
+ <style name="Widget.Sherlock.Light.SearchAutoCompleteTextView" parent="Sherlock.__Widget.SearchAutoCompleteTextView">
+ <item name="android:dropDownSelector">@drawable/abs__list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abs__menu_dropdown_panel_holo_light</item>
+ </style>
+
+
+
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Menu" parent="Widget">
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textColor">?attr/actionMenuTextColor</item>
+ <item name="android:textAllCaps">@bool/abs__config_actionMenuItemAllCaps</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Title" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_title_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Title.Inverse" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_title_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Subtitle" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_subtitle_text_size</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionBar.Subtitle.Inverse" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_subtitle_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Title" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_title_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Title.Inverse" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_title_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Subtitle" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_subtitle_text_size</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.ActionMode.Subtitle.Inverse" parent="Widget">
+ <item name="android:textSize">@dimen/abs__action_bar_subtitle_text_size</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu" parent="Widget">
+ <item name="android:textColor">?attr/textColorPrimary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu.Large">
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Light.Widget.PopupMenu.Large" parent="TextAppearance.Sherlock.Widget.PopupMenu.Large">
+ </style>
+ <style name="TextAppearance.Sherlock.Widget.PopupMenu.Small">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Light.Widget.PopupMenu.Small" parent="TextAppearance.Sherlock.Widget.PopupMenu.Small">
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.TextView.SpinnerItem" parent="Widget">
+ <item name="android:textColor">?textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:textStyle">normal</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.DropDownItem" parent="Widget">
+ <item name="android:textColor">?textColorPrimaryDisableOnly</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:textStyle">normal</item>
+ </style>
+
+ <style name="Sherlock.__TextAppearance.Small" parent="Widget">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+ <style name="TextAppearance.Sherlock.Small" parent="Sherlock.__TextAppearance.Small">
+ </style>
+ <style name="TextAppearance.Sherlock.Light.Small" parent="TextAppearance.Sherlock.Small">
+ </style>
+
+ <style name="TextAppearance.Sherlock.Widget.DropDownHint" parent="Widget">
+ <item name="android:textColor">?textColorPrimary</item>
+ <item name="android:textSize">14sp</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock" parent="@android:style/TextAppearance"/>
+
+ <style name="TextAppearance.Sherlock.SearchResult">
+ <item name="android:textStyle">normal</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textColorHint">?android:attr/textColorHint</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.SearchResult.Title">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.SearchResult.Subtitle">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.Light.SearchResult" parent="TextAppearance.Sherlock.SearchResult"/>
+
+ <style name="TextAppearance.Sherlock.Light.SearchResult.Title">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextAppearance.Sherlock.Light.SearchResult.Subtitle">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__themes.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__themes.xml
new file mode 100644
index 0000000000..6215e048ff
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/res/values/abs__themes.xml
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+ <style name="Sherlock.__Theme" parent="android:Theme.NoTitleBar">
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
+ <style name="Sherlock.__Theme.Light" parent="android:Theme.Light.NoTitleBar">
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
+ <style name="Sherlock.__Theme.DarkActionBar" parent="Theme.Sherlock.Light">
+ </style>
+
+ <style name="Theme.Sherlock" parent="Sherlock.__Theme">
+ <!-- Action bar styles (from Theme.Holo) -->
+ <item name="actionDropDownStyle">@style/Widget.Sherlock.Spinner.DropDown.ActionBar</item>
+ <item name="actionButtonStyle">@style/Widget.Sherlock.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.Sherlock.ActionButton.Overflow</item>
+ <item name="actionModeBackground">@drawable/abs__cab_background_top_holo_dark</item>
+ <item name="actionModeSplitBackground">@drawable/abs__cab_background_bottom_holo_dark</item>
+ <item name="actionModeCloseDrawable">@drawable/abs__ic_cab_done_holo_dark</item>
+ <item name="actionBarTabStyle">@style/Widget.Sherlock.ActionBar.TabView</item>
+ <item name="actionBarTabBarStyle">@style/Widget.Sherlock.ActionBar.TabBar</item>
+ <item name="actionBarTabTextStyle">@style/Widget.Sherlock.ActionBar.TabText</item>
+ <item name="actionModeStyle">@style/Widget.Sherlock.ActionMode</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.Sherlock.ActionButton.CloseMode</item>
+ <item name="actionBarStyle">@style/Widget.Sherlock.ActionBar</item>
+ <item name="actionBarSize">@dimen/abs__action_bar_default_height</item>
+ <!-- Internal --><item name="actionModePopupWindowStyle">@style/Widget.Sherlock.PopupWindow.ActionMode</item>
+ <item name="actionBarWidgetTheme">@null</item>
+
+ <!-- Action bar styles (defaults from Theme) -->
+ <item name="actionBarSplitStyle">?attr/actionBarStyle</item>
+ <item name="actionMenuTextAppearance">@style/TextAppearance.Sherlock.Widget.ActionBar.Menu</item>
+ <item name="actionMenuTextColor">?attr/textColorPrimary</item>
+ <item name="actionBarDivider">?attr/dividerVertical</item>
+ <item name="actionBarItemBackground">?attr/selectableItemBackground</item>
+
+ <item name="buttonStyleSmall">@style/Widget.Sherlock.Button.Small</item>
+
+ <item name="selectableItemBackground">@drawable/abs__item_background_holo_dark</item>
+
+ <item name="activatedBackgroundIndicator">@drawable/abs__activated_background_holo_dark</item>
+ <item name="actionModeShareDrawable">@drawable/abs__ic_menu_share_holo_dark</item>
+ <item name="activityChooserViewStyle">@style/Widget.Sherlock.ActivityChooserView</item>
+
+ <item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_dark</item>
+
+ <item name="dividerVertical">@drawable/abs__list_divider_holo_dark</item>
+
+ <item name="spinnerDropDownItemStyle">@style/Widget.Sherlock.DropDownItem.Spinner</item>
+ <item name="spinnerItemStyle">@style/Widget.Sherlock.TextView.SpinnerItem</item>
+
+ <item name="textColorPrimary">@color/abs__primary_text_holo_dark</item>
+ <item name="textColorPrimaryDisableOnly">@color/abs__primary_text_disable_only_holo_dark</item>
+ <item name="textColorPrimaryInverse">@color/abs__primary_text_holo_light</item>
+
+ <!-- Internal --><item name="dropdownListPreferredItemHeight">48dip</item>
+ <item name="dropDownListViewStyle">@style/Widget.Sherlock.ListView.DropDown</item>
+
+ <item name="textAppearanceSmall">@style/TextAppearance.Sherlock.Small</item>
+ <item name="textAppearanceLargePopupMenu">@style/TextAppearance.Sherlock.Widget.PopupMenu.Large</item>
+ <item name="textAppearanceSmallPopupMenu">@style/TextAppearance.Sherlock.Widget.PopupMenu.Small</item>
+ <item name="textAppearanceSearchResultTitle">@style/TextAppearance.Sherlock.SearchResult.Title</item>
+ <item name="textAppearanceSearchResultSubtitle">@style/TextAppearance.Sherlock.SearchResult.Subtitle</item>
+
+ <item name="popupMenuStyle">@style/Widget.Sherlock.PopupMenu</item>
+ <!-- Internal --><item name="listPopupWindowStyle">@style/Widget.Sherlock.ListPopupWindow</item>
+
+ <item name="searchDropdownBackground">@drawable/abs__search_dropdown_dark</item>
+ <item name="searchViewTextField">@drawable/abs__textfield_searchview_holo_dark</item>
+ <item name="searchViewTextFieldRight">@drawable/abs__textfield_searchview_right_holo_dark</item>
+ <item name="searchViewCloseIcon">@drawable/abs__ic_clear</item>
+ <item name="searchViewSearchIcon">@drawable/abs__ic_search</item>
+ <item name="searchViewGoIcon">@drawable/abs__ic_go</item>
+ <item name="searchViewVoiceIcon">@drawable/abs__ic_voice_search</item>
+ <item name="searchAutoCompleteTextView">@style/Widget.Sherlock.SearchAutoCompleteTextView</item>
+ <item name="dropDownHintAppearance">@style/TextAppearance.Sherlock.Widget.DropDownHint</item>
+ <item name="searchViewEditQuery">@drawable/abs__ic_commit_search_api_holo_dark</item>
+ <item name="searchViewEditQueryBackground">?selectableItemBackground</item>
+ <item name="searchResultListItemHeight">58dp</item>
+
+ <item name="windowNoTitle">false</item>
+ <item name="windowActionBar">true</item>
+ <item name="windowActionModeOverlay">false</item>
+ <item name="windowContentOverlay">@null</item>
+ </style>
+ <style name="Theme.Sherlock.Light" parent="Sherlock.__Theme.Light">
+ <!-- Action bar styles (from Theme.Holo) -->
+ <item name="actionDropDownStyle">@style/Widget.Sherlock.Light.Spinner.DropDown.ActionBar</item>
+ <item name="actionButtonStyle">@style/Widget.Sherlock.Light.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.Sherlock.Light.ActionButton.Overflow</item>
+ <item name="actionModeBackground">@drawable/abs__cab_background_top_holo_light</item>
+ <item name="actionModeSplitBackground">@drawable/abs__cab_background_bottom_holo_light</item>
+ <item name="actionModeCloseDrawable">@drawable/abs__ic_cab_done_holo_light</item>
+ <item name="actionBarTabStyle">@style/Widget.Sherlock.Light.ActionBar.TabView</item>
+ <item name="actionBarTabBarStyle">@style/Widget.Sherlock.Light.ActionBar.TabBar</item>
+ <item name="actionBarTabTextStyle">@style/Widget.Sherlock.Light.ActionBar.TabText</item>
+ <item name="actionModeStyle">@style/Widget.Sherlock.Light.ActionMode</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.Sherlock.Light.ActionButton.CloseMode</item>
+ <item name="actionBarStyle">@style/Widget.Sherlock.Light.ActionBar.Solid</item>
+ <item name="actionBarSize">@dimen/abs__action_bar_default_height</item>
+ <!-- Internal --><item name="actionModePopupWindowStyle">@style/Widget.Sherlock.Light.PopupWindow.ActionMode</item>
+ <item name="actionBarWidgetTheme">@null</item>
+
+ <!-- Action bar styles (defaults from Theme) -->
+ <item name="actionBarSplitStyle">?attr/actionBarStyle</item>
+ <item name="actionMenuTextAppearance">@style/TextAppearance.Sherlock.Widget.ActionBar.Menu</item>
+ <item name="actionMenuTextColor">?attr/textColorPrimary</item>
+ <item name="actionBarDivider">?attr/dividerVertical</item>
+ <item name="actionBarItemBackground">?attr/selectableItemBackground</item>
+
+ <item name="buttonStyleSmall">@style/Widget.Sherlock.Light.Button.Small</item>
+
+ <item name="selectableItemBackground">@drawable/abs__item_background_holo_light</item>
+
+ <item name="activatedBackgroundIndicator">@drawable/abs__activated_background_holo_light</item>
+ <item name="actionModeShareDrawable">@drawable/abs__ic_menu_share_holo_light</item>
+ <item name="activityChooserViewStyle">@style/Widget.Sherlock.Light.ActivityChooserView</item>
+
+ <item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_light</item>
+
+ <item name="dividerVertical">@drawable/abs__list_divider_holo_light</item>
+
+ <item name="spinnerDropDownItemStyle">@style/Widget.Sherlock.Light.DropDownItem.Spinner</item>
+ <item name="spinnerItemStyle">@style/Widget.Sherlock.TextView.SpinnerItem</item>
+
+ <item name="textColorPrimary">@color/abs__primary_text_holo_light</item>
+ <item name="textColorPrimaryDisableOnly">@color/abs__primary_text_disable_only_holo_light</item>
+ <item name="textColorPrimaryInverse">@color/abs__primary_text_holo_dark</item>
+
+ <!-- Internal --><item name="dropdownListPreferredItemHeight">48dip</item>
+ <item name="dropDownListViewStyle">@style/Widget.Sherlock.Light.ListView.DropDown</item>
+
+ <item name="textAppearanceSmall">@style/TextAppearance.Sherlock.Light.Small</item>
+ <item name="textAppearanceLargePopupMenu">@style/TextAppearance.Sherlock.Light.Widget.PopupMenu.Large</item>
+ <item name="textAppearanceSmallPopupMenu">@style/TextAppearance.Sherlock.Light.Widget.PopupMenu.Small</item>
+ <item name="textAppearanceSearchResultTitle">@style/TextAppearance.Sherlock.Light.SearchResult.Title</item>
+ <item name="textAppearanceSearchResultSubtitle">@style/TextAppearance.Sherlock.Light.SearchResult.Subtitle</item>
+
+ <item name="popupMenuStyle">@style/Widget.Sherlock.Light.PopupMenu</item>
+ <!-- Internal --><item name="listPopupWindowStyle">@style/Widget.Sherlock.Light.ListPopupWindow</item>
+
+ <item name="searchDropdownBackground">@drawable/abs__search_dropdown_light</item>
+ <item name="searchViewTextField">@drawable/abs__textfield_searchview_holo_light</item>
+ <item name="searchViewTextFieldRight">@drawable/abs__textfield_searchview_right_holo_light</item>
+ <item name="searchViewCloseIcon">@drawable/abs__ic_clear_holo_light</item>
+ <item name="searchViewSearchIcon">@drawable/abs__ic_search_api_holo_light</item>
+ <item name="searchViewGoIcon">@drawable/abs__ic_go_search_api_holo_light</item>
+ <item name="searchViewVoiceIcon">@drawable/abs__ic_voice_search_api_holo_light</item>
+ <item name="searchAutoCompleteTextView">@style/Widget.Sherlock.Light.SearchAutoCompleteTextView</item>
+ <item name="dropDownHintAppearance">@style/TextAppearance.Sherlock.Widget.DropDownHint</item>
+ <item name="searchViewEditQuery">@drawable/abs__ic_commit_search_api_holo_light</item>
+ <item name="searchViewEditQueryBackground">?selectableItemBackground</item>
+ <item name="searchResultListItemHeight">58dp</item>
+
+ <item name="windowNoTitle">false</item>
+ <item name="windowActionBar">true</item>
+ <item name="windowActionModeOverlay">false</item>
+ <item name="windowContentOverlay">@null</item>
+ </style>
+ <style name="Theme.Sherlock.Light.DarkActionBar" parent="Sherlock.__Theme.DarkActionBar">
+ <item name="windowContentOverlay">@drawable/abs__ab_solid_shadow_holo</item>
+ <item name="actionBarStyle">@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse</item>
+ <item name="actionBarWidgetTheme">@style/Theme.Sherlock</item>
+
+ <item name="actionDropDownStyle">@style/Widget.Sherlock.Spinner.DropDown.ActionBar</item>
+ <item name="actionButtonStyle">@style/Widget.Sherlock.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.Sherlock.ActionButton.Overflow</item>
+ <item name="actionModeBackground">@drawable/abs__cab_background_top_holo_dark</item>
+ <item name="actionModeSplitBackground">@drawable/abs__cab_background_bottom_holo_dark</item>
+ <item name="actionModeCloseDrawable">@drawable/abs__ic_cab_done_holo_dark</item>
+ <item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_holo_dark</item>
+ <item name="actionBarTabStyle">@style/Widget.Sherlock.Light.ActionBar.TabView.Inverse</item>
+ <item name="actionBarTabBarStyle">@style/Widget.Sherlock.Light.ActionBar.TabBar.Inverse</item>
+ <item name="actionBarTabTextStyle">@style/Widget.Sherlock.Light.ActionBar.TabText.Inverse</item>
+ <item name="actionBarDivider">@drawable/abs__list_divider_holo_dark</item>
+ <item name="actionBarItemBackground">@drawable/abs__item_background_holo_dark</item>
+ <item name="actionMenuTextColor">?attr/textColorPrimaryInverse</item>
+ <item name="actionModeStyle">@style/Widget.Sherlock.Light.ActionMode.Inverse</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.Sherlock.ActionButton.CloseMode</item>
+ <item name="actionModePopupWindowStyle">@style/Widget.Sherlock.PopupWindow.ActionMode</item>
+
+ <item name="actionModeShareDrawable">@drawable/abs__ic_menu_share_holo_dark</item>
+
+ <!-- We want the dark action bar SearchView stuff -->
+ <item name="searchDropdownBackground">@drawable/abs__search_dropdown_dark</item>
+ <item name="searchViewTextField">@drawable/abs__textfield_searchview_holo_dark</item>
+ <item name="searchViewTextFieldRight">@drawable/abs__textfield_searchview_right_holo_dark</item>
+ <item name="searchViewCloseIcon">@drawable/abs__ic_clear</item>
+ <item name="searchViewSearchIcon">@drawable/abs__ic_search</item>
+ <item name="searchViewGoIcon">@drawable/abs__ic_go</item>
+ <item name="searchViewVoiceIcon">@drawable/abs__ic_voice_search</item>
+ <item name="searchAutoCompleteTextView">@style/Widget.Sherlock.SearchAutoCompleteTextView</item>
+ <item name="dropDownHintAppearance">@style/TextAppearance.Sherlock.Widget.DropDownHint</item>
+ <item name="searchViewEditQuery">@drawable/abs__ic_commit_search_api_holo_dark</item>
+ </style>
+
+
+ <style name="Theme.Sherlock.NoActionBar">
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+ <style name="Theme.Sherlock.Light.NoActionBar">
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/android/support/v4/app/Watson.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/android/support/v4/app/Watson.java
new file mode 100644
index 0000000000..ff72cdcfeb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/android/support/v4/app/Watson.java
@@ -0,0 +1,143 @@
+package android.support.v4.app;
+
+import android.util.Log;
+import android.view.View;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.BuildConfig;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+import java.util.ArrayList;
+
+/** I'm in ur package. Stealing ur variables. */
+public abstract class Watson extends FragmentActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener {
+ private static final String TAG = "Watson";
+
+ /** Fragment interface for menu creation callback. */
+ public interface OnCreateOptionsMenuListener {
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater);
+ }
+ /** Fragment interface for menu preparation callback. */
+ public interface OnPrepareOptionsMenuListener {
+ public void onPrepareOptionsMenu(Menu menu);
+ }
+ /** Fragment interface for menu item selection callback. */
+ public interface OnOptionsItemSelectedListener {
+ public boolean onOptionsItemSelected(MenuItem item);
+ }
+
+ private ArrayList<Fragment> mCreatedMenus;
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ boolean result = onCreateOptionsMenu(menu);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] activity create result: " + result);
+
+ MenuInflater inflater = getSupportMenuInflater();
+ boolean show = false;
+ ArrayList<Fragment> newMenus = null;
+ if (mFragments.mAdded != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnCreateOptionsMenuListener) {
+ show = true;
+ ((OnCreateOptionsMenuListener)f).onCreateOptionsMenu(menu, inflater);
+ if (newMenus == null) {
+ newMenus = new ArrayList<Fragment>();
+ }
+ newMenus.add(f);
+ }
+ }
+ }
+
+ if (mCreatedMenus != null) {
+ for (int i = 0; i < mCreatedMenus.size(); i++) {
+ Fragment f = mCreatedMenus.get(i);
+ if (newMenus == null || !newMenus.contains(f)) {
+ f.onDestroyOptionsMenu();
+ }
+ }
+ }
+
+ mCreatedMenus = newMenus;
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] fragments create result: " + show);
+ result |= show;
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result);
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + " menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ boolean result = onPrepareOptionsMenu(menu);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] activity prepare result: " + result);
+
+ boolean show = false;
+ if (mFragments.mAdded != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnPrepareOptionsMenuListener) {
+ show = true;
+ ((OnPrepareOptionsMenuListener)f).onPrepareOptionsMenu(menu);
+ }
+ }
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] fragments prepare result: " + show);
+ result |= show;
+
+ result &= menu.hasVisibleItems();
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result);
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ if (onOptionsItemSelected(item)) {
+ return true;
+ }
+
+ if (mFragments.mAdded != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnOptionsItemSelectedListener) {
+ if (((OnOptionsItemSelectedListener)f).onOptionsItemSelected(item)) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public abstract boolean onCreateOptionsMenu(Menu menu);
+
+ public abstract boolean onPrepareOptionsMenu(Menu menu);
+
+ public abstract boolean onOptionsItemSelected(MenuItem item);
+
+ public abstract MenuInflater getSupportMenuInflater();
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/ActionBarSherlock.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/ActionBarSherlock.java
new file mode 100644
index 0000000000..0151470aad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/ActionBarSherlock.java
@@ -0,0 +1,799 @@
+package com.actionbarsherlock;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.os.Build;
+import android.os.Bundle;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.ActionBarSherlockCompat;
+import com.actionbarsherlock.internal.ActionBarSherlockNative;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+
+/**
+ * <p>Helper for implementing the action bar design pattern across all versions
+ * of Android.</p>
+ *
+ * <p>This class will manage interaction with a custom action bar based on the
+ * Android 4.0 source code. The exposed API mirrors that of its native
+ * counterpart and you should refer to its documentation for instruction.</p>
+ *
+ * @author Jake Wharton <jakewharton@gmail.com>
+ */
+public abstract class ActionBarSherlock {
+ protected static final String TAG = "ActionBarSherlock";
+
+ private static final Class<?>[] CONSTRUCTOR_ARGS = new Class[] { Activity.class, int.class };
+ private static final HashMap<Implementation, Class<? extends ActionBarSherlock>> IMPLEMENTATIONS =
+ new HashMap<Implementation, Class<? extends ActionBarSherlock>>();
+
+ static {
+ //Register our two built-in implementations
+ registerImplementation(ActionBarSherlockCompat.class);
+ registerImplementation(ActionBarSherlockNative.class);
+ }
+
+
+ /**
+ * <p>Denotes an implementation of ActionBarSherlock which provides an
+ * action bar-enhanced experience.</p>
+ */
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface Implementation {
+ static final int DEFAULT_API = -1;
+ static final int DEFAULT_DPI = -1;
+
+ int api() default DEFAULT_API;
+ int dpi() default DEFAULT_DPI;
+ }
+
+
+ /** Activity interface for menu creation callback. */
+ public interface OnCreatePanelMenuListener {
+ public boolean onCreatePanelMenu(int featureId, Menu menu);
+ }
+ /** Activity interface for menu creation callback. */
+ public interface OnCreateOptionsMenuListener {
+ public boolean onCreateOptionsMenu(Menu menu);
+ }
+ /** Activity interface for menu item selection callback. */
+ public interface OnMenuItemSelectedListener {
+ public boolean onMenuItemSelected(int featureId, MenuItem item);
+ }
+ /** Activity interface for menu item selection callback. */
+ public interface OnOptionsItemSelectedListener {
+ public boolean onOptionsItemSelected(MenuItem item);
+ }
+ /** Activity interface for menu preparation callback. */
+ public interface OnPreparePanelListener {
+ public boolean onPreparePanel(int featureId, View view, Menu menu);
+ }
+ /** Activity interface for menu preparation callback. */
+ public interface OnPrepareOptionsMenuListener {
+ public boolean onPrepareOptionsMenu(Menu menu);
+ }
+ /** Activity interface for action mode finished callback. */
+ public interface OnActionModeFinishedListener {
+ public void onActionModeFinished(ActionMode mode);
+ }
+ /** Activity interface for action mode started callback. */
+ public interface OnActionModeStartedListener {
+ public void onActionModeStarted(ActionMode mode);
+ }
+
+
+ /**
+ * If set, the logic in these classes will assume that an {@link Activity}
+ * is dispatching all of the required events to the class. This flag should
+ * only be used internally or if you are creating your own base activity
+ * modeled after one of the included types (e.g., {@code SherlockActivity}).
+ */
+ public static final int FLAG_DELEGATE = 1;
+
+
+ /**
+ * Register an ActionBarSherlock implementation.
+ *
+ * @param implementationClass Target implementation class which extends
+ * {@link ActionBarSherlock}. This class must also be annotated with
+ * {@link Implementation}.
+ */
+ public static void registerImplementation(Class<? extends ActionBarSherlock> implementationClass) {
+ if (!implementationClass.isAnnotationPresent(Implementation.class)) {
+ throw new IllegalArgumentException("Class " + implementationClass.getSimpleName() + " is not annotated with @Implementation");
+ } else if (IMPLEMENTATIONS.containsValue(implementationClass)) {
+ if (BuildConfig.DEBUG) Log.w(TAG, "Class " + implementationClass.getSimpleName() + " already registered");
+ return;
+ }
+
+ Implementation impl = implementationClass.getAnnotation(Implementation.class);
+ if (BuildConfig.DEBUG) Log.i(TAG, "Registering " + implementationClass.getSimpleName() + " with qualifier " + impl);
+ IMPLEMENTATIONS.put(impl, implementationClass);
+ }
+
+ /**
+ * Unregister an ActionBarSherlock implementation. <strong>This should be
+ * considered very volatile and you should only use it if you know what
+ * you are doing.</strong> You have been warned.
+ *
+ * @param implementationClass Target implementation class.
+ * @return Boolean indicating whether the class was removed.
+ */
+ public static boolean unregisterImplementation(Class<? extends ActionBarSherlock> implementationClass) {
+ return IMPLEMENTATIONS.values().remove(implementationClass);
+ }
+
+ /**
+ * Wrap an activity with an action bar abstraction which will enable the
+ * use of a custom implementation on platforms where a native version does
+ * not exist.
+ *
+ * @param activity Activity to wrap.
+ * @return Instance to interact with the action bar.
+ */
+ public static ActionBarSherlock wrap(Activity activity) {
+ return wrap(activity, 0);
+ }
+
+ /**
+ * Wrap an activity with an action bar abstraction which will enable the
+ * use of a custom implementation on platforms where a native version does
+ * not exist.
+ *
+ * @param activity Owning activity.
+ * @param flags Option flags to control behavior.
+ * @return Instance to interact with the action bar.
+ */
+ public static ActionBarSherlock wrap(Activity activity, int flags) {
+ //Create a local implementation map we can modify
+ HashMap<Implementation, Class<? extends ActionBarSherlock>> impls =
+ new HashMap<Implementation, Class<? extends ActionBarSherlock>>(IMPLEMENTATIONS);
+ boolean hasQualfier;
+
+ /* DPI FILTERING */
+ hasQualfier = false;
+ for (Implementation key : impls.keySet()) {
+ //Only honor TVDPI as a specific qualifier
+ if (key.dpi() == DisplayMetrics.DENSITY_TV) {
+ hasQualfier = true;
+ break;
+ }
+ }
+ if (hasQualfier) {
+ final boolean isTvDpi = activity.getResources().getDisplayMetrics().densityDpi == DisplayMetrics.DENSITY_TV;
+ for (Iterator<Implementation> keys = impls.keySet().iterator(); keys.hasNext(); ) {
+ int keyDpi = keys.next().dpi();
+ if ((isTvDpi && keyDpi != DisplayMetrics.DENSITY_TV)
+ || (!isTvDpi && keyDpi == DisplayMetrics.DENSITY_TV)) {
+ keys.remove();
+ }
+ }
+ }
+
+ /* API FILTERING */
+ hasQualfier = false;
+ for (Implementation key : impls.keySet()) {
+ if (key.api() != Implementation.DEFAULT_API) {
+ hasQualfier = true;
+ break;
+ }
+ }
+ if (hasQualfier) {
+ final int runtimeApi = Build.VERSION.SDK_INT;
+ int bestApi = 0;
+ for (Iterator<Implementation> keys = impls.keySet().iterator(); keys.hasNext(); ) {
+ int keyApi = keys.next().api();
+ if (keyApi > runtimeApi) {
+ keys.remove();
+ } else if (keyApi > bestApi) {
+ bestApi = keyApi;
+ }
+ }
+ for (Iterator<Implementation> keys = impls.keySet().iterator(); keys.hasNext(); ) {
+ if (keys.next().api() != bestApi) {
+ keys.remove();
+ }
+ }
+ }
+
+ if (impls.size() > 1) {
+ throw new IllegalStateException("More than one implementation matches configuration.");
+ }
+ if (impls.isEmpty()) {
+ throw new IllegalStateException("No implementations match configuration.");
+ }
+ Class<? extends ActionBarSherlock> impl = impls.values().iterator().next();
+ if (BuildConfig.DEBUG) Log.i(TAG, "Using implementation: " + impl.getSimpleName());
+
+ try {
+ Constructor<? extends ActionBarSherlock> ctor = impl.getConstructor(CONSTRUCTOR_ARGS);
+ return ctor.newInstance(activity, flags);
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException(e);
+ } catch (InstantiationException e) {
+ throw new RuntimeException(e);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+ /** Activity which is displaying the action bar. Also used for context. */
+ protected final Activity mActivity;
+ /** Whether delegating actions for the activity or managing ourselves. */
+ protected final boolean mIsDelegate;
+
+ /** Reference to our custom menu inflater which supports action items. */
+ protected MenuInflater mMenuInflater;
+
+
+
+ protected ActionBarSherlock(Activity activity, int flags) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[<ctor>] activity: " + activity + ", flags: " + flags);
+
+ mActivity = activity;
+ mIsDelegate = (flags & FLAG_DELEGATE) != 0;
+ }
+
+
+ /**
+ * Get the current action bar instance.
+ *
+ * @return Action bar instance.
+ */
+ public abstract ActionBar getActionBar();
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Lifecycle and interaction callbacks when delegating
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Notify action bar of a configuration change event. Should be dispatched
+ * after the call to the superclass implementation.
+ *
+ * <blockquote><pre>
+ * @Override
+ * public void onConfigurationChanged(Configuration newConfig) {
+ * super.onConfigurationChanged(newConfig);
+ * mSherlock.dispatchConfigurationChanged(newConfig);
+ * }
+ * </pre></blockquote>
+ *
+ * @param newConfig The new device configuration.
+ */
+ public void dispatchConfigurationChanged(Configuration newConfig) {}
+
+ /**
+ * Notify the action bar that the activity has finished its resuming. This
+ * should be dispatched after the call to the superclass implementation.
+ *
+ * <blockquote><pre>
+ * @Override
+ * protected void onPostResume() {
+ * super.onPostResume();
+ * mSherlock.dispatchPostResume();
+ * }
+ * </pre></blockquote>
+ */
+ public void dispatchPostResume() {}
+
+ /**
+ * Notify the action bar that the activity is pausing. This should be
+ * dispatched before the call to the superclass implementation.
+ *
+ * <blockquote><pre>
+ * @Override
+ * protected void onPause() {
+ * mSherlock.dispatchPause();
+ * super.onPause();
+ * }
+ * </pre></blockquote>
+ */
+ public void dispatchPause() {}
+
+ /**
+ * Notify the action bar that the activity is stopping. This should be
+ * called before the superclass implementation.
+ *
+ * <blockquote><p>
+ * @Override
+ * protected void onStop() {
+ * mSherlock.dispatchStop();
+ * super.onStop();
+ * }
+ * </p></blockquote>
+ */
+ public void dispatchStop() {}
+
+ /**
+ * Indicate that the menu should be recreated by calling
+ * {@link OnCreateOptionsMenuListener#onCreateOptionsMenu(com.actionbarsherlock.view.Menu)}.
+ */
+ public abstract void dispatchInvalidateOptionsMenu();
+
+ /**
+ * Notify the action bar that it should display its overflow menu if it is
+ * appropriate for the device. The implementation should conditionally
+ * call the superclass method only if this method returns {@code false}.
+ *
+ * <blockquote><p>
+ * @Override
+ * public void openOptionsMenu() {
+ * if (!mSherlock.dispatchOpenOptionsMenu()) {
+ * super.openOptionsMenu();
+ * }
+ * }
+ * </p></blockquote>
+ *
+ * @return {@code true} if the opening of the menu was handled internally.
+ */
+ public boolean dispatchOpenOptionsMenu() {
+ return false;
+ }
+
+ /**
+ * Notify the action bar that it should close its overflow menu if it is
+ * appropriate for the device. This implementation should conditionally
+ * call the superclass method only if this method returns {@code false}.
+ *
+ * <blockquote><pre>
+ * @Override
+ * public void closeOptionsMenu() {
+ * if (!mSherlock.dispatchCloseOptionsMenu()) {
+ * super.closeOptionsMenu();
+ * }
+ * }
+ * </pre></blockquote>
+ *
+ * @return {@code true} if the closing of the menu was handled internally.
+ */
+ public boolean dispatchCloseOptionsMenu() {
+ return false;
+ }
+
+ /**
+ * Notify the class that the activity has finished its creation. This
+ * should be called after the superclass implementation.
+ *
+ * <blockquote><pre>
+ * @Override
+ * protected void onPostCreate(Bundle savedInstanceState) {
+ * mSherlock.dispatchPostCreate(savedInstanceState);
+ * super.onPostCreate(savedInstanceState);
+ * }
+ * </pre></blockquote>
+ *
+ * @param savedInstanceState If the activity is being re-initialized after
+ * previously being shut down then this Bundle
+ * contains the data it most recently supplied in
+ * {@link Activity#}onSaveInstanceState(Bundle)}.
+ * <strong>Note: Otherwise it is null.</strong>
+ */
+ public void dispatchPostCreate(Bundle savedInstanceState) {}
+
+ /**
+ * Notify the action bar that the title has changed and the action bar
+ * should be updated to reflect the change. This should be called before
+ * the superclass implementation.
+ *
+ * <blockquote><pre>
+ * @Override
+ * protected void onTitleChanged(CharSequence title, int color) {
+ * mSherlock.dispatchTitleChanged(title, color);
+ * super.onTitleChanged(title, color);
+ * }
+ * </pre></blockquote>
+ *
+ * @param title New activity title.
+ * @param color New activity color.
+ */
+ public void dispatchTitleChanged(CharSequence title, int color) {}
+
+ /**
+ * Notify the action bar the user has created a key event. This is used to
+ * toggle the display of the overflow action item with the menu key and to
+ * close the action mode or expanded action item with the back key.
+ *
+ * <blockquote><pre>
+ * @Override
+ * public boolean dispatchKeyEvent(KeyEvent event) {
+ * if (mSherlock.dispatchKeyEvent(event)) {
+ * return true;
+ * }
+ * return super.dispatchKeyEvent(event);
+ * }
+ * </pre></blockquote>
+ *
+ * @param event Description of the key event.
+ * @return {@code true} if the event was handled.
+ */
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ return false;
+ }
+
+ /**
+ * Notify the action bar that the Activity has triggered a menu creation
+ * which should happen on the conclusion of {@link Activity#onCreate}. This
+ * will be used to gain a reference to the native menu for native and
+ * overflow binding as well as to indicate when compatibility create should
+ * occur for the first time.
+ *
+ * @param menu Activity native menu.
+ * @return {@code true} since we always want to say that we have a native
+ */
+ public abstract boolean dispatchCreateOptionsMenu(android.view.Menu menu);
+
+ /**
+ * Notify the action bar that the Activity has triggered a menu preparation
+ * which usually means that the user has requested the overflow menu via a
+ * hardware menu key. You should return the result of this method call and
+ * not call the superclass implementation.
+ *
+ * <blockquote><p>
+ * @Override
+ * public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ * return mSherlock.dispatchPrepareOptionsMenu(menu);
+ * }
+ * </p></blockquote>
+ *
+ * @param menu Activity native menu.
+ * @return {@code true} if menu display should proceed.
+ */
+ public abstract boolean dispatchPrepareOptionsMenu(android.view.Menu menu);
+
+ /**
+ * Notify the action bar that a native options menu item has been selected.
+ * The implementation should return the result of this method call.
+ *
+ * <blockquote><p>
+ * @Override
+ * public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ * return mSherlock.dispatchOptionsItemSelected(item);
+ * }
+ * </p></blockquote>
+ *
+ * @param item Options menu item.
+ * @return @{code true} if the selection was handled.
+ */
+ public abstract boolean dispatchOptionsItemSelected(android.view.MenuItem item);
+
+ /**
+ * Notify the action bar that the overflow menu has been opened. The
+ * implementation should conditionally return {@code true} if this method
+ * returns {@code true}, otherwise return the result of the superclass
+ * method.
+ *
+ * <blockquote><p>
+ * @Override
+ * public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ * if (mSherlock.dispatchMenuOpened(featureId, menu)) {
+ * return true;
+ * }
+ * return super.onMenuOpened(featureId, menu);
+ * }
+ * </p></blockquote>
+ *
+ * @param featureId Window feature which triggered the event.
+ * @param menu Activity native menu.
+ * @return {@code true} if the event was handled by this method.
+ */
+ public boolean dispatchMenuOpened(int featureId, android.view.Menu menu) {
+ return false;
+ }
+
+ /**
+ * Notify the action bar that the overflow menu has been closed. This
+ * method should be called before the superclass implementation.
+ *
+ * <blockquote><p>
+ * @Override
+ * public void onPanelClosed(int featureId, android.view.Menu menu) {
+ * mSherlock.dispatchPanelClosed(featureId, menu);
+ * super.onPanelClosed(featureId, menu);
+ * }
+ * </p></blockquote>
+ *
+ * @param featureId
+ * @param menu
+ */
+ public void dispatchPanelClosed(int featureId, android.view.Menu menu) {}
+
+ /**
+ * Notify the action bar that the activity has been destroyed. This method
+ * should be called before the superclass implementation.
+ *
+ * <blockquote><p>
+ * @Override
+ * public void onDestroy() {
+ * mSherlock.dispatchDestroy();
+ * super.onDestroy();
+ * }
+ * </p></blockquote>
+ */
+ public void dispatchDestroy() {}
+
+ public void dispatchSaveInstanceState(Bundle outState) {}
+
+ public void dispatchRestoreInstanceState(Bundle savedInstanceState) {}
+
+ ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
+
+
+ /**
+ * Internal method to trigger the menu creation process.
+ *
+ * @return {@code true} if menu creation should proceed.
+ */
+ protected final boolean callbackCreateOptionsMenu(Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackCreateOptionsMenu] menu: " + menu);
+
+ boolean result = true;
+ if (mActivity instanceof OnCreatePanelMenuListener) {
+ OnCreatePanelMenuListener listener = (OnCreatePanelMenuListener)mActivity;
+ result = listener.onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu);
+ } else if (mActivity instanceof OnCreateOptionsMenuListener) {
+ OnCreateOptionsMenuListener listener = (OnCreateOptionsMenuListener)mActivity;
+ result = listener.onCreateOptionsMenu(menu);
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackCreateOptionsMenu] returning " + result);
+ return result;
+ }
+
+ /**
+ * Internal method to trigger the menu preparation process.
+ *
+ * @return {@code true} if menu preparation should proceed.
+ */
+ protected final boolean callbackPrepareOptionsMenu(Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackPrepareOptionsMenu] menu: " + menu);
+
+ boolean result = true;
+ if (mActivity instanceof OnPreparePanelListener) {
+ OnPreparePanelListener listener = (OnPreparePanelListener)mActivity;
+ result = listener.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu);
+ } else if (mActivity instanceof OnPrepareOptionsMenuListener) {
+ OnPrepareOptionsMenuListener listener = (OnPrepareOptionsMenuListener)mActivity;
+ result = listener.onPrepareOptionsMenu(menu);
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackPrepareOptionsMenu] returning " + result);
+ return result;
+ }
+
+ /**
+ * Internal method for dispatching options menu selection to the owning
+ * activity callback.
+ *
+ * @param item Selected options menu item.
+ * @return {@code true} if the item selection was handled in the callback.
+ */
+ protected final boolean callbackOptionsItemSelected(MenuItem item) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackOptionsItemSelected] item: " + item.getTitleCondensed());
+
+ boolean result = false;
+ if (mActivity instanceof OnMenuItemSelectedListener) {
+ OnMenuItemSelectedListener listener = (OnMenuItemSelectedListener)mActivity;
+ result = listener.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, item);
+ } else if (mActivity instanceof OnOptionsItemSelectedListener) {
+ OnOptionsItemSelectedListener listener = (OnOptionsItemSelectedListener)mActivity;
+ result = listener.onOptionsItemSelected(item);
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[callbackOptionsItemSelected] returning " + result);
+ return result;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
+
+
+ /**
+ * Query for the availability of a certain feature.
+ *
+ * @param featureId The feature ID to check.
+ * @return {@code true} if feature is enabled, {@code false} otherwise.
+ */
+ public abstract boolean hasFeature(int featureId);
+
+ /**
+ * Enable extended screen features. This must be called before
+ * {@code setContentView()}. May be called as many times as desired as long
+ * as it is before {@code setContentView()}. If not called, no extended
+ * features will be available. You can not turn off a feature once it is
+ * requested.
+ *
+ * @param featureId The desired features, defined as constants by Window.
+ * @return Returns true if the requested feature is supported and now
+ * enabled.
+ */
+ public abstract boolean requestFeature(int featureId);
+
+ /**
+ * Set extra options that will influence the UI for this window.
+ *
+ * @param uiOptions Flags specifying extra options for this window.
+ */
+ public abstract void setUiOptions(int uiOptions);
+
+ /**
+ * Set extra options that will influence the UI for this window. Only the
+ * bits filtered by mask will be modified.
+ *
+ * @param uiOptions Flags specifying extra options for this window.
+ * @param mask Flags specifying which options should be modified. Others
+ * will remain unchanged.
+ */
+ public abstract void setUiOptions(int uiOptions, int mask);
+
+ /**
+ * Set the content of the activity inside the action bar.
+ *
+ * @param layoutResId Layout resource ID.
+ */
+ public abstract void setContentView(int layoutResId);
+
+ /**
+ * Set the content of the activity inside the action bar.
+ *
+ * @param view The desired content to display.
+ */
+ public void setContentView(View view) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setContentView] view: " + view);
+
+ setContentView(view, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+ }
+
+ /**
+ * Set the content of the activity inside the action bar.
+ *
+ * @param view The desired content to display.
+ * @param params Layout parameters to apply to the view.
+ */
+ public abstract void setContentView(View view, ViewGroup.LayoutParams params);
+
+ /**
+ * Variation on {@link #setContentView(android.view.View, android.view.ViewGroup.LayoutParams)}
+ * to add an additional content view to the screen. Added after any
+ * existing ones on the screen -- existing views are NOT removed.
+ *
+ * @param view The desired content to display.
+ * @param params Layout parameters for the view.
+ */
+ public abstract void addContentView(View view, ViewGroup.LayoutParams params);
+
+ /**
+ * Change the title associated with this activity.
+ */
+ public abstract void setTitle(CharSequence title);
+
+ /**
+ * Change the title associated with this activity.
+ */
+ public void setTitle(int resId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setTitle] resId: " + resId);
+
+ setTitle(mActivity.getString(resId));
+ }
+
+ /**
+ * Sets the visibility of the progress bar in the title.
+ * <p>
+ * In order for the progress bar to be shown, the feature must be requested
+ * via {@link #requestWindowFeature(int)}.
+ *
+ * @param visible Whether to show the progress bars in the title.
+ */
+ public abstract void setProgressBarVisibility(boolean visible);
+
+ /**
+ * Sets the visibility of the indeterminate progress bar in the title.
+ * <p>
+ * In order for the progress bar to be shown, the feature must be requested
+ * via {@link #requestWindowFeature(int)}.
+ *
+ * @param visible Whether to show the progress bars in the title.
+ */
+ public abstract void setProgressBarIndeterminateVisibility(boolean visible);
+
+ /**
+ * Sets whether the horizontal progress bar in the title should be indeterminate (the circular
+ * is always indeterminate).
+ * <p>
+ * In order for the progress bar to be shown, the feature must be requested
+ * via {@link #requestWindowFeature(int)}.
+ *
+ * @param indeterminate Whether the horizontal progress bar should be indeterminate.
+ */
+ public abstract void setProgressBarIndeterminate(boolean indeterminate);
+
+ /**
+ * Sets the progress for the progress bars in the title.
+ * <p>
+ * In order for the progress bar to be shown, the feature must be requested
+ * via {@link #requestWindowFeature(int)}.
+ *
+ * @param progress The progress for the progress bar. Valid ranges are from
+ * 0 to 10000 (both inclusive). If 10000 is given, the progress
+ * bar will be completely filled and will fade out.
+ */
+ public abstract void setProgress(int progress);
+
+ /**
+ * Sets the secondary progress for the progress bar in the title. This
+ * progress is drawn between the primary progress (set via
+ * {@link #setProgress(int)} and the background. It can be ideal for media
+ * scenarios such as showing the buffering progress while the default
+ * progress shows the play progress.
+ * <p>
+ * In order for the progress bar to be shown, the feature must be requested
+ * via {@link #requestWindowFeature(int)}.
+ *
+ * @param secondaryProgress The secondary progress for the progress bar. Valid ranges are from
+ * 0 to 10000 (both inclusive).
+ */
+ public abstract void setSecondaryProgress(int secondaryProgress);
+
+ /**
+ * Get a menu inflater instance which supports the newer menu attributes.
+ *
+ * @return Menu inflater instance.
+ */
+ public MenuInflater getMenuInflater() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[getMenuInflater]");
+
+ // Make sure that action views can get an appropriate theme.
+ if (mMenuInflater == null) {
+ if (getActionBar() != null) {
+ mMenuInflater = new MenuInflater(getThemedContext(), mActivity);
+ } else {
+ mMenuInflater = new MenuInflater(mActivity);
+ }
+ }
+ return mMenuInflater;
+ }
+
+ protected abstract Context getThemedContext();
+
+ /**
+ * Start an action mode.
+ *
+ * @param callback Callback that will manage lifecycle events for this
+ * context mode.
+ * @return The ContextMode that was started, or null if it was canceled.
+ * @see ActionMode
+ */
+ public abstract ActionMode startActionMode(ActionMode.Callback callback);
+
+ /**
+ * Ensure that the action bar is attached.
+ */
+ public void ensureActionBar() {}
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/ActionBar.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/ActionBar.java
new file mode 100644
index 0000000000..94fdd9e70e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/ActionBar.java
@@ -0,0 +1,956 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.app;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.support.v4.app.FragmentTransaction;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.ViewGroup;
+import android.view.ViewGroup.MarginLayoutParams;
+import android.widget.SpinnerAdapter;
+
+/**
+ * A window feature at the top of the activity that may display the activity title, navigation
+ * modes, and other interactive items.
+ * <p>Beginning with Android 3.0 (API level 11), the action bar appears at the top of an
+ * activity's window when the activity uses the system's {@link
+ * android.R.style#Theme_Holo Holo} theme (or one of its descendant themes), which is the default.
+ * You may otherwise add the action bar by calling {@link
+ * android.view.Window#requestFeature requestFeature(FEATURE_ACTION_BAR)} or by declaring it in a
+ * custom theme with the {@link android.R.styleable#Theme_windowActionBar windowActionBar} property.
+ * <p>By default, the action bar shows the application icon on
+ * the left, followed by the activity title. If your activity has an options menu, you can make
+ * select items accessible directly from the action bar as "action items". You can also
+ * modify various characteristics of the action bar or remove it completely.</p>
+ * <p>From your activity, you can retrieve an instance of {@link ActionBar} by calling {@link
+ * android.app.Activity#getActionBar getActionBar()}.</p>
+ * <p>In some cases, the action bar may be overlayed by another bar that enables contextual actions,
+ * using an {@link android.view.ActionMode}. For example, when the user selects one or more items in
+ * your activity, you can enable an action mode that offers actions specific to the selected
+ * items, with a UI that temporarily replaces the action bar. Although the UI may occupy the
+ * same space, the {@link android.view.ActionMode} APIs are distinct and independent from those for
+ * {@link ActionBar}.
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about how to use the action bar, including how to add action items, navigation
+ * modes and more, read the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action
+ * Bar</a> developer guide.</p>
+ * </div>
+ */
+public abstract class ActionBar {
+ /**
+ * Standard navigation mode. Consists of either a logo or icon
+ * and title text with an optional subtitle. Clicking any of these elements
+ * will dispatch onOptionsItemSelected to the host Activity with
+ * a MenuItem with item ID android.R.id.home.
+ */
+ public static final int NAVIGATION_MODE_STANDARD = android.app.ActionBar.NAVIGATION_MODE_STANDARD;
+
+ /**
+ * List navigation mode. Instead of static title text this mode
+ * presents a list menu for navigation within the activity.
+ * e.g. this might be presented to the user as a dropdown list.
+ */
+ public static final int NAVIGATION_MODE_LIST = android.app.ActionBar.NAVIGATION_MODE_LIST;
+
+ /**
+ * Tab navigation mode. Instead of static title text this mode
+ * presents a series of tabs for navigation within the activity.
+ */
+ public static final int NAVIGATION_MODE_TABS = android.app.ActionBar.NAVIGATION_MODE_TABS;
+
+ /**
+ * Use logo instead of icon if available. This flag will cause appropriate
+ * navigation modes to use a wider logo in place of the standard icon.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public static final int DISPLAY_USE_LOGO = android.app.ActionBar.DISPLAY_USE_LOGO;
+
+ /**
+ * Show 'home' elements in this action bar, leaving more space for other
+ * navigation elements. This includes logo and icon.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public static final int DISPLAY_SHOW_HOME = android.app.ActionBar.DISPLAY_SHOW_HOME;
+
+ /**
+ * Display the 'home' element such that it appears as an 'up' affordance.
+ * e.g. show an arrow to the left indicating the action that will be taken.
+ *
+ * Set this flag if selecting the 'home' button in the action bar to return
+ * up by a single level in your UI rather than back to the top level or front page.
+ *
+ * <p>Setting this option will implicitly enable interaction with the home/up
+ * button. See {@link #setHomeButtonEnabled(boolean)}.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public static final int DISPLAY_HOME_AS_UP = android.app.ActionBar.DISPLAY_HOME_AS_UP;
+
+ /**
+ * Show the activity title and subtitle, if present.
+ *
+ * @see #setTitle(CharSequence)
+ * @see #setTitle(int)
+ * @see #setSubtitle(CharSequence)
+ * @see #setSubtitle(int)
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public static final int DISPLAY_SHOW_TITLE = android.app.ActionBar.DISPLAY_SHOW_TITLE;
+
+ /**
+ * Show the custom view if one has been set.
+ * @see #setCustomView(View)
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public static final int DISPLAY_SHOW_CUSTOM = android.app.ActionBar.DISPLAY_SHOW_CUSTOM;
+
+ /**
+ * Set the action bar into custom navigation mode, supplying a view
+ * for custom navigation.
+ *
+ * Custom navigation views appear between the application icon and
+ * any action buttons and may use any space available there. Common
+ * use cases for custom navigation views might include an auto-suggesting
+ * address bar for a browser or other navigation mechanisms that do not
+ * translate well to provided navigation modes.
+ *
+ * @param view Custom navigation view to place in the ActionBar.
+ */
+ public abstract void setCustomView(View view);
+
+ /**
+ * Set the action bar into custom navigation mode, supplying a view
+ * for custom navigation.
+ *
+ * <p>Custom navigation views appear between the application icon and
+ * any action buttons and may use any space available there. Common
+ * use cases for custom navigation views might include an auto-suggesting
+ * address bar for a browser or other navigation mechanisms that do not
+ * translate well to provided navigation modes.</p>
+ *
+ * <p>The display option {@link #DISPLAY_SHOW_CUSTOM} must be set for
+ * the custom view to be displayed.</p>
+ *
+ * @param view Custom navigation view to place in the ActionBar.
+ * @param layoutParams How this custom view should layout in the bar.
+ *
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setCustomView(View view, LayoutParams layoutParams);
+
+ /**
+ * Set the action bar into custom navigation mode, supplying a view
+ * for custom navigation.
+ *
+ * <p>Custom navigation views appear between the application icon and
+ * any action buttons and may use any space available there. Common
+ * use cases for custom navigation views might include an auto-suggesting
+ * address bar for a browser or other navigation mechanisms that do not
+ * translate well to provided navigation modes.</p>
+ *
+ * <p>The display option {@link #DISPLAY_SHOW_CUSTOM} must be set for
+ * the custom view to be displayed.</p>
+ *
+ * @param resId Resource ID of a layout to inflate into the ActionBar.
+ *
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setCustomView(int resId);
+
+ /**
+ * Set the icon to display in the 'home' section of the action bar.
+ * The action bar will use an icon specified by its style or the
+ * activity icon by default.
+ *
+ * Whether the home section shows an icon or logo is controlled
+ * by the display option {@link #DISPLAY_USE_LOGO}.
+ *
+ * @param resId Resource ID of a drawable to show as an icon.
+ *
+ * @see #setDisplayUseLogoEnabled(boolean)
+ * @see #setDisplayShowHomeEnabled(boolean)
+ */
+ public abstract void setIcon(int resId);
+
+ /**
+ * Set the icon to display in the 'home' section of the action bar.
+ * The action bar will use an icon specified by its style or the
+ * activity icon by default.
+ *
+ * Whether the home section shows an icon or logo is controlled
+ * by the display option {@link #DISPLAY_USE_LOGO}.
+ *
+ * @param icon Drawable to show as an icon.
+ *
+ * @see #setDisplayUseLogoEnabled(boolean)
+ * @see #setDisplayShowHomeEnabled(boolean)
+ */
+ public abstract void setIcon(Drawable icon);
+
+ /**
+ * Set the logo to display in the 'home' section of the action bar.
+ * The action bar will use a logo specified by its style or the
+ * activity logo by default.
+ *
+ * Whether the home section shows an icon or logo is controlled
+ * by the display option {@link #DISPLAY_USE_LOGO}.
+ *
+ * @param resId Resource ID of a drawable to show as a logo.
+ *
+ * @see #setDisplayUseLogoEnabled(boolean)
+ * @see #setDisplayShowHomeEnabled(boolean)
+ */
+ public abstract void setLogo(int resId);
+
+ /**
+ * Set the logo to display in the 'home' section of the action bar.
+ * The action bar will use a logo specified by its style or the
+ * activity logo by default.
+ *
+ * Whether the home section shows an icon or logo is controlled
+ * by the display option {@link #DISPLAY_USE_LOGO}.
+ *
+ * @param logo Drawable to show as a logo.
+ *
+ * @see #setDisplayUseLogoEnabled(boolean)
+ * @see #setDisplayShowHomeEnabled(boolean)
+ */
+ public abstract void setLogo(Drawable logo);
+
+ /**
+ * Set the adapter and navigation callback for list navigation mode.
+ *
+ * The supplied adapter will provide views for the expanded list as well as
+ * the currently selected item. (These may be displayed differently.)
+ *
+ * The supplied OnNavigationListener will alert the application when the user
+ * changes the current list selection.
+ *
+ * @param adapter An adapter that will provide views both to display
+ * the current navigation selection and populate views
+ * within the dropdown navigation menu.
+ * @param callback An OnNavigationListener that will receive events when the user
+ * selects a navigation item.
+ */
+ public abstract void setListNavigationCallbacks(SpinnerAdapter adapter,
+ OnNavigationListener callback);
+
+ /**
+ * Set the selected navigation item in list or tabbed navigation modes.
+ *
+ * @param position Position of the item to select.
+ */
+ public abstract void setSelectedNavigationItem(int position);
+
+ /**
+ * Get the position of the selected navigation item in list or tabbed navigation modes.
+ *
+ * @return Position of the selected item.
+ */
+ public abstract int getSelectedNavigationIndex();
+
+ /**
+ * Get the number of navigation items present in the current navigation mode.
+ *
+ * @return Number of navigation items.
+ */
+ public abstract int getNavigationItemCount();
+
+ /**
+ * Set the action bar's title. This will only be displayed if
+ * {@link #DISPLAY_SHOW_TITLE} is set.
+ *
+ * @param title Title to set
+ *
+ * @see #setTitle(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setTitle(CharSequence title);
+
+ /**
+ * Set the action bar's title. This will only be displayed if
+ * {@link #DISPLAY_SHOW_TITLE} is set.
+ *
+ * @param resId Resource ID of title string to set
+ *
+ * @see #setTitle(CharSequence)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setTitle(int resId);
+
+ /**
+ * Set the action bar's subtitle. This will only be displayed if
+ * {@link #DISPLAY_SHOW_TITLE} is set. Set to null to disable the
+ * subtitle entirely.
+ *
+ * @param subtitle Subtitle to set
+ *
+ * @see #setSubtitle(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setSubtitle(CharSequence subtitle);
+
+ /**
+ * Set the action bar's subtitle. This will only be displayed if
+ * {@link #DISPLAY_SHOW_TITLE} is set.
+ *
+ * @param resId Resource ID of subtitle string to set
+ *
+ * @see #setSubtitle(CharSequence)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setSubtitle(int resId);
+
+ /**
+ * Set display options. This changes all display option bits at once. To change
+ * a limited subset of display options, see {@link #setDisplayOptions(int, int)}.
+ *
+ * @param options A combination of the bits defined by the DISPLAY_ constants
+ * defined in ActionBar.
+ */
+ public abstract void setDisplayOptions(int options);
+
+ /**
+ * Set selected display options. Only the options specified by mask will be changed.
+ * To change all display option bits at once, see {@link #setDisplayOptions(int)}.
+ *
+ * <p>Example: setDisplayOptions(0, DISPLAY_SHOW_HOME) will disable the
+ * {@link #DISPLAY_SHOW_HOME} option.
+ * setDisplayOptions(DISPLAY_SHOW_HOME, DISPLAY_SHOW_HOME | DISPLAY_USE_LOGO)
+ * will enable {@link #DISPLAY_SHOW_HOME} and disable {@link #DISPLAY_USE_LOGO}.
+ *
+ * @param options A combination of the bits defined by the DISPLAY_ constants
+ * defined in ActionBar.
+ * @param mask A bit mask declaring which display options should be changed.
+ */
+ public abstract void setDisplayOptions(int options, int mask);
+
+ /**
+ * Set whether to display the activity logo rather than the activity icon.
+ * A logo is often a wider, more detailed image.
+ *
+ * <p>To set several display options at once, see the setDisplayOptions methods.
+ *
+ * @param useLogo true to use the activity logo, false to use the activity icon.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setDisplayUseLogoEnabled(boolean useLogo);
+
+ /**
+ * Set whether to include the application home affordance in the action bar.
+ * Home is presented as either an activity icon or logo.
+ *
+ * <p>To set several display options at once, see the setDisplayOptions methods.
+ *
+ * @param showHome true to show home, false otherwise.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setDisplayShowHomeEnabled(boolean showHome);
+
+ /**
+ * Set whether home should be displayed as an "up" affordance.
+ * Set this to true if selecting "home" returns up by a single level in your UI
+ * rather than back to the top level or front page.
+ *
+ * <p>To set several display options at once, see the setDisplayOptions methods.
+ *
+ * @param showHomeAsUp true to show the user that selecting home will return one
+ * level up rather than to the top level of the app.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setDisplayHomeAsUpEnabled(boolean showHomeAsUp);
+
+ /**
+ * Set whether an activity title/subtitle should be displayed.
+ *
+ * <p>To set several display options at once, see the setDisplayOptions methods.
+ *
+ * @param showTitle true to display a title/subtitle if present.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setDisplayShowTitleEnabled(boolean showTitle);
+
+ /**
+ * Set whether a custom view should be displayed, if set.
+ *
+ * <p>To set several display options at once, see the setDisplayOptions methods.
+ *
+ * @param showCustom true if the currently set custom view should be displayed, false otherwise.
+ *
+ * @see #setDisplayOptions(int)
+ * @see #setDisplayOptions(int, int)
+ */
+ public abstract void setDisplayShowCustomEnabled(boolean showCustom);
+
+ /**
+ * Set the ActionBar's background. This will be used for the primary
+ * action bar.
+ *
+ * @param d Background drawable
+ * @see #setStackedBackgroundDrawable(Drawable)
+ * @see #setSplitBackgroundDrawable(Drawable)
+ */
+ public abstract void setBackgroundDrawable(Drawable d);
+
+ /**
+ * Set the ActionBar's stacked background. This will appear
+ * in the second row/stacked bar on some devices and configurations.
+ *
+ * @param d Background drawable for the stacked row
+ */
+ public void setStackedBackgroundDrawable(Drawable d) { }
+
+ /**
+ * Set the ActionBar's split background. This will appear in
+ * the split action bar containing menu-provided action buttons
+ * on some devices and configurations.
+ * <p>You can enable split action bar with {@link android.R.attr#uiOptions}
+ *
+ * @param d Background drawable for the split bar
+ */
+ public void setSplitBackgroundDrawable(Drawable d) { }
+
+ /**
+ * @return The current custom view.
+ */
+ public abstract View getCustomView();
+
+ /**
+ * Returns the current ActionBar title in standard mode.
+ * Returns null if {@link #getNavigationMode()} would not return
+ * {@link #NAVIGATION_MODE_STANDARD}.
+ *
+ * @return The current ActionBar title or null.
+ */
+ public abstract CharSequence getTitle();
+
+ /**
+ * Returns the current ActionBar subtitle in standard mode.
+ * Returns null if {@link #getNavigationMode()} would not return
+ * {@link #NAVIGATION_MODE_STANDARD}.
+ *
+ * @return The current ActionBar subtitle or null.
+ */
+ public abstract CharSequence getSubtitle();
+
+ /**
+ * Returns the current navigation mode. The result will be one of:
+ * <ul>
+ * <li>{@link #NAVIGATION_MODE_STANDARD}</li>
+ * <li>{@link #NAVIGATION_MODE_LIST}</li>
+ * <li>{@link #NAVIGATION_MODE_TABS}</li>
+ * </ul>
+ *
+ * @return The current navigation mode.
+ */
+ public abstract int getNavigationMode();
+
+ /**
+ * Set the current navigation mode.
+ *
+ * @param mode The new mode to set.
+ * @see #NAVIGATION_MODE_STANDARD
+ * @see #NAVIGATION_MODE_LIST
+ * @see #NAVIGATION_MODE_TABS
+ */
+ public abstract void setNavigationMode(int mode);
+
+ /**
+ * @return The current set of display options.
+ */
+ public abstract int getDisplayOptions();
+
+ /**
+ * Create and return a new {@link Tab}.
+ * This tab will not be included in the action bar until it is added.
+ *
+ * <p>Very often tabs will be used to switch between {@link Fragment}
+ * objects. Here is a typical implementation of such tabs:</p>
+ *
+ * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java
+ * complete}
+ *
+ * @return A new Tab
+ *
+ * @see #addTab(Tab)
+ */
+ public abstract Tab newTab();
+
+ /**
+ * Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list.
+ * If this is the first tab to be added it will become the selected tab.
+ *
+ * @param tab Tab to add
+ */
+ public abstract void addTab(Tab tab);
+
+ /**
+ * Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list.
+ *
+ * @param tab Tab to add
+ * @param setSelected True if the added tab should become the selected tab.
+ */
+ public abstract void addTab(Tab tab, boolean setSelected);
+
+ /**
+ * Add a tab for use in tabbed navigation mode. The tab will be inserted at
+ * <code>position</code>. If this is the first tab to be added it will become
+ * the selected tab.
+ *
+ * @param tab The tab to add
+ * @param position The new position of the tab
+ */
+ public abstract void addTab(Tab tab, int position);
+
+ /**
+ * Add a tab for use in tabbed navigation mode. The tab will be insterted at
+ * <code>position</code>.
+ *
+ * @param tab The tab to add
+ * @param position The new position of the tab
+ * @param setSelected True if the added tab should become the selected tab.
+ */
+ public abstract void addTab(Tab tab, int position, boolean setSelected);
+
+ /**
+ * Remove a tab from the action bar. If the removed tab was selected it will be deselected
+ * and another tab will be selected if present.
+ *
+ * @param tab The tab to remove
+ */
+ public abstract void removeTab(Tab tab);
+
+ /**
+ * Remove a tab from the action bar. If the removed tab was selected it will be deselected
+ * and another tab will be selected if present.
+ *
+ * @param position Position of the tab to remove
+ */
+ public abstract void removeTabAt(int position);
+
+ /**
+ * Remove all tabs from the action bar and deselect the current tab.
+ */
+ public abstract void removeAllTabs();
+
+ /**
+ * Select the specified tab. If it is not a child of this action bar it will be added.
+ *
+ * <p>Note: If you want to select by index, use {@link #setSelectedNavigationItem(int)}.</p>
+ *
+ * @param tab Tab to select
+ */
+ public abstract void selectTab(Tab tab);
+
+ /**
+ * Returns the currently selected tab if in tabbed navigation mode and there is at least
+ * one tab present.
+ *
+ * @return The currently selected tab or null
+ */
+ public abstract Tab getSelectedTab();
+
+ /**
+ * Returns the tab at the specified index.
+ *
+ * @param index Index value in the range 0-get
+ * @return
+ */
+ public abstract Tab getTabAt(int index);
+
+ /**
+ * Returns the number of tabs currently registered with the action bar.
+ * @return Tab count
+ */
+ public abstract int getTabCount();
+
+ /**
+ * Retrieve the current height of the ActionBar.
+ *
+ * @return The ActionBar's height
+ */
+ public abstract int getHeight();
+
+ /**
+ * Show the ActionBar if it is not currently showing.
+ * If the window hosting the ActionBar does not have the feature
+ * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application
+ * content to fit the new space available.
+ */
+ public abstract void show();
+
+ /**
+ * Hide the ActionBar if it is currently showing.
+ * If the window hosting the ActionBar does not have the feature
+ * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application
+ * content to fit the new space available.
+ */
+ public abstract void hide();
+
+ /**
+ * @return <code>true</code> if the ActionBar is showing, <code>false</code> otherwise.
+ */
+ public abstract boolean isShowing();
+
+ /**
+ * Add a listener that will respond to menu visibility change events.
+ *
+ * @param listener The new listener to add
+ */
+ public abstract void addOnMenuVisibilityListener(OnMenuVisibilityListener listener);
+
+ /**
+ * Remove a menu visibility listener. This listener will no longer receive menu
+ * visibility change events.
+ *
+ * @param listener A listener to remove that was previously added
+ */
+ public abstract void removeOnMenuVisibilityListener(OnMenuVisibilityListener listener);
+
+ /**
+ * Enable or disable the "home" button in the corner of the action bar. (Note that this
+ * is the application home/up affordance on the action bar, not the systemwide home
+ * button.)
+ *
+ * <p>This defaults to true for packages targeting &lt; API 14. For packages targeting
+ * API 14 or greater, the application should call this method to enable interaction
+ * with the home/up affordance.
+ *
+ * <p>Setting the {@link #DISPLAY_HOME_AS_UP} display option will automatically enable
+ * the home button.
+ *
+ * @param enabled true to enable the home button, false to disable the home button.
+ */
+ public void setHomeButtonEnabled(boolean enabled) { }
+
+ /**
+ * Returns a {@link Context} with an appropriate theme for creating views that
+ * will appear in the action bar. If you are inflating or instantiating custom views
+ * that will appear in an action bar, you should use the Context returned by this method.
+ * (This includes adapters used for list navigation mode.)
+ * This will ensure that views contrast properly against the action bar.
+ *
+ * @return A themed Context for creating views
+ */
+ public Context getThemedContext() { return null; }
+
+ /**
+ * Listener interface for ActionBar navigation events.
+ */
+ public interface OnNavigationListener {
+ /**
+ * This method is called whenever a navigation item in your action bar
+ * is selected.
+ *
+ * @param itemPosition Position of the item clicked.
+ * @param itemId ID of the item clicked.
+ * @return True if the event was handled, false otherwise.
+ */
+ public boolean onNavigationItemSelected(int itemPosition, long itemId);
+ }
+
+ /**
+ * Listener for receiving events when action bar menus are shown or hidden.
+ */
+ public interface OnMenuVisibilityListener {
+ /**
+ * Called when an action bar menu is shown or hidden. Applications may want to use
+ * this to tune auto-hiding behavior for the action bar or pause/resume video playback,
+ * gameplay, or other activity within the main content area.
+ *
+ * @param isVisible True if an action bar menu is now visible, false if no action bar
+ * menus are visible.
+ */
+ public void onMenuVisibilityChanged(boolean isVisible);
+ }
+
+ /**
+ * A tab in the action bar.
+ *
+ * <p>Tabs manage the hiding and showing of {@link Fragment}s.
+ */
+ public static abstract class Tab {
+ /**
+ * An invalid position for a tab.
+ *
+ * @see #getPosition()
+ */
+ public static final int INVALID_POSITION = -1;
+
+ /**
+ * Return the current position of this tab in the action bar.
+ *
+ * @return Current position, or {@link #INVALID_POSITION} if this tab is not currently in
+ * the action bar.
+ */
+ public abstract int getPosition();
+
+ /**
+ * Return the icon associated with this tab.
+ *
+ * @return The tab's icon
+ */
+ public abstract Drawable getIcon();
+
+ /**
+ * Return the text of this tab.
+ *
+ * @return The tab's text
+ */
+ public abstract CharSequence getText();
+
+ /**
+ * Set the icon displayed on this tab.
+ *
+ * @param icon The drawable to use as an icon
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setIcon(Drawable icon);
+
+ /**
+ * Set the icon displayed on this tab.
+ *
+ * @param resId Resource ID referring to the drawable to use as an icon
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setIcon(int resId);
+
+ /**
+ * Set the text displayed on this tab. Text may be truncated if there is not
+ * room to display the entire string.
+ *
+ * @param text The text to display
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setText(CharSequence text);
+
+ /**
+ * Set the text displayed on this tab. Text may be truncated if there is not
+ * room to display the entire string.
+ *
+ * @param resId A resource ID referring to the text that should be displayed
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setText(int resId);
+
+ /**
+ * Set a custom view to be used for this tab. This overrides values set by
+ * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}.
+ *
+ * @param view Custom view to be used as a tab.
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setCustomView(View view);
+
+ /**
+ * Set a custom view to be used for this tab. This overrides values set by
+ * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}.
+ *
+ * @param layoutResId A layout resource to inflate and use as a custom tab view
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setCustomView(int layoutResId);
+
+ /**
+ * Retrieve a previously set custom view for this tab.
+ *
+ * @return The custom view set by {@link #setCustomView(View)}.
+ */
+ public abstract View getCustomView();
+
+ /**
+ * Give this Tab an arbitrary object to hold for later use.
+ *
+ * @param obj Object to store
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setTag(Object obj);
+
+ /**
+ * @return This Tab's tag object.
+ */
+ public abstract Object getTag();
+
+ /**
+ * Set the {@link TabListener} that will handle switching to and from this tab.
+ * All tabs must have a TabListener set before being added to the ActionBar.
+ *
+ * @param listener Listener to handle tab selection events
+ * @return The current instance for call chaining
+ */
+ public abstract Tab setTabListener(TabListener listener);
+
+ /**
+ * Select this tab. Only valid if the tab has been added to the action bar.
+ */
+ public abstract void select();
+
+ /**
+ * Set a description of this tab's content for use in accessibility support.
+ * If no content description is provided the title will be used.
+ *
+ * @param resId A resource ID referring to the description text
+ * @return The current instance for call chaining
+ * @see #setContentDescription(CharSequence)
+ * @see #getContentDescription()
+ */
+ public abstract Tab setContentDescription(int resId);
+
+ /**
+ * Set a description of this tab's content for use in accessibility support.
+ * If no content description is provided the title will be used.
+ *
+ * @param contentDesc Description of this tab's content
+ * @return The current instance for call chaining
+ * @see #setContentDescription(int)
+ * @see #getContentDescription()
+ */
+ public abstract Tab setContentDescription(CharSequence contentDesc);
+
+ /**
+ * Gets a brief description of this tab's content for use in accessibility support.
+ *
+ * @return Description of this tab's content
+ * @see #setContentDescription(CharSequence)
+ * @see #setContentDescription(int)
+ */
+ public abstract CharSequence getContentDescription();
+ }
+
+ /**
+ * Callback interface invoked when a tab is focused, unfocused, added, or removed.
+ */
+ public interface TabListener {
+ /**
+ * Called when a tab enters the selected state.
+ *
+ * @param tab The tab that was selected
+ * @param ft A {@link FragmentTransaction} for queuing fragment operations to execute
+ * during a tab switch. The previous tab's unselect and this tab's select will be
+ * executed in a single transaction. This FragmentTransaction does not support
+ * being added to the back stack.
+ */
+ public void onTabSelected(Tab tab, FragmentTransaction ft);
+
+ /**
+ * Called when a tab exits the selected state.
+ *
+ * @param tab The tab that was unselected
+ * @param ft A {@link FragmentTransaction} for queuing fragment operations to execute
+ * during a tab switch. This tab's unselect and the newly selected tab's select
+ * will be executed in a single transaction. This FragmentTransaction does not
+ * support being added to the back stack.
+ */
+ public void onTabUnselected(Tab tab, FragmentTransaction ft);
+
+ /**
+ * Called when a tab that is already selected is chosen again by the user.
+ * Some applications may use this action to return to the top level of a category.
+ *
+ * @param tab The tab that was reselected.
+ * @param ft A {@link FragmentTransaction} for queuing fragment operations to execute
+ * once this method returns. This FragmentTransaction does not support
+ * being added to the back stack.
+ */
+ public void onTabReselected(Tab tab, FragmentTransaction ft);
+ }
+
+ /**
+ * Per-child layout information associated with action bar custom views.
+ *
+ * @attr ref android.R.styleable#ActionBar_LayoutParams_layout_gravity
+ */
+ public static class LayoutParams extends MarginLayoutParams {
+ private static final int[] ATTRS = new int[] {
+ android.R.attr.layout_gravity
+ };
+
+ /**
+ * Gravity for the view associated with these LayoutParams.
+ *
+ * @see android.view.Gravity
+ */
+ @ViewDebug.ExportedProperty(mapping = {
+ @ViewDebug.IntToString(from = -1, to = "NONE"),
+ @ViewDebug.IntToString(from = Gravity.NO_GRAVITY, to = "NONE"),
+ @ViewDebug.IntToString(from = Gravity.TOP, to = "TOP"),
+ @ViewDebug.IntToString(from = Gravity.BOTTOM, to = "BOTTOM"),
+ @ViewDebug.IntToString(from = Gravity.LEFT, to = "LEFT"),
+ @ViewDebug.IntToString(from = Gravity.RIGHT, to = "RIGHT"),
+ @ViewDebug.IntToString(from = Gravity.CENTER_VERTICAL, to = "CENTER_VERTICAL"),
+ @ViewDebug.IntToString(from = Gravity.FILL_VERTICAL, to = "FILL_VERTICAL"),
+ @ViewDebug.IntToString(from = Gravity.CENTER_HORIZONTAL, to = "CENTER_HORIZONTAL"),
+ @ViewDebug.IntToString(from = Gravity.FILL_HORIZONTAL, to = "FILL_HORIZONTAL"),
+ @ViewDebug.IntToString(from = Gravity.CENTER, to = "CENTER"),
+ @ViewDebug.IntToString(from = Gravity.FILL, to = "FILL")
+ })
+ public int gravity = -1;
+
+ public LayoutParams(Context c, AttributeSet attrs) {
+ super(c, attrs);
+
+ TypedArray a = c.obtainStyledAttributes(attrs, ATTRS);
+ gravity = a.getInt(0, -1);
+ a.recycle();
+ }
+
+ public LayoutParams(int width, int height) {
+ super(width, height);
+ this.gravity = Gravity.CENTER_VERTICAL | Gravity.LEFT;
+ }
+
+ public LayoutParams(int width, int height, int gravity) {
+ super(width, height);
+ this.gravity = gravity;
+ }
+
+ public LayoutParams(int gravity) {
+ this(WRAP_CONTENT, FILL_PARENT, gravity);
+ }
+
+ public LayoutParams(LayoutParams source) {
+ super(source);
+
+ this.gravity = source.gravity;
+ }
+
+ public LayoutParams(ViewGroup.LayoutParams source) {
+ super(source);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockActivity.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockActivity.java
new file mode 100644
index 0000000000..6ae42fd81c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockActivity.java
@@ -0,0 +1,276 @@
+package com.actionbarsherlock.app;
+
+import android.app.Activity;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.Window;
+import android.view.ViewGroup.LayoutParams;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class SherlockActivity extends Activity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener, OnActionModeStartedListener, OnActionModeFinishedListener {
+ private ActionBarSherlock mSherlock;
+
+ protected final ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(this, ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Action bar and mode
+ ///////////////////////////////////////////////////////////////////////////
+
+ public ActionBar getSupportActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {}
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {}
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // General lifecycle/callback dispatching
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ protected void onPause() {
+ getSherlock().dispatchPause();
+ super.onPause();
+ }
+
+ @Override
+ protected void onStop() {
+ getSherlock().dispatchStop();
+ super.onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ if (getSherlock().dispatchMenuOpened(featureId, menu)) {
+ return true;
+ }
+ return super.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (getSherlock().dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ getSherlock().dispatchSaveInstanceState(outState);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ getSherlock().dispatchRestoreInstanceState(savedInstanceState);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Native menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public MenuInflater getSupportMenuInflater() {
+ return getSherlock().getMenuInflater();
+ }
+
+ public void invalidateOptionsMenu() {
+ getSherlock().dispatchInvalidateOptionsMenu();
+ }
+
+ public void supportInvalidateOptionsMenu() {
+ invalidateOptionsMenu();
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchPrepareOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return getSherlock().dispatchOptionsItemSelected(item);
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ if (!getSherlock().dispatchOpenOptionsMenu()) {
+ super.openOptionsMenu();
+ }
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ if (!getSherlock().dispatchCloseOptionsMenu()) {
+ super.closeOptionsMenu();
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onCreateOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onPrepareOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onOptionsItemSelected(item);
+ }
+ return false;
+ }
+
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Content
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ getSherlock().addContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ getSherlock().setContentView(layoutResId);
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getSherlock().setContentView(view);
+ }
+
+ public void requestWindowFeature(long featureId) {
+ getSherlock().requestFeature((int)featureId);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress Indication
+ ///////////////////////////////////////////////////////////////////////////
+
+ public void setSupportProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setSupportProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
new file mode 100644
index 0000000000..c139325cd6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
@@ -0,0 +1,68 @@
+package com.actionbarsherlock.app;
+
+import android.app.Activity;
+import android.support.v4.app.DialogFragment;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
+
+public class SherlockDialogFragment extends DialogFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
+ private SherlockFragmentActivity mActivity;
+
+ public SherlockFragmentActivity getSherlockActivity() {
+ return mActivity;
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ if (!(activity instanceof SherlockFragmentActivity)) {
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
+ }
+ mActivity = (SherlockFragmentActivity)activity;
+
+ super.onAttach(activity);
+ }
+
+ @Override
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
+ }
+
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final void onPrepareOptionsMenu(android.view.Menu menu) {
+ onPrepareOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return onOptionsItemSelected(new MenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ //Nothing to see here.
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
new file mode 100644
index 0000000000..455fb4a8a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
@@ -0,0 +1,265 @@
+package com.actionbarsherlock.app;
+
+import android.app.ExpandableListActivity;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class SherlockExpandableListActivity extends ExpandableListActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener, OnActionModeStartedListener, OnActionModeFinishedListener {
+ private ActionBarSherlock mSherlock;
+
+ protected final ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(this, ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Action bar and mode
+ ///////////////////////////////////////////////////////////////////////////
+
+ public ActionBar getSupportActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {}
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {}
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // General lifecycle/callback dispatching
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ protected void onPause() {
+ getSherlock().dispatchPause();
+ super.onPause();
+ }
+
+ @Override
+ protected void onStop() {
+ getSherlock().dispatchStop();
+ super.onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ if (getSherlock().dispatchMenuOpened(featureId, menu)) {
+ return true;
+ }
+ return super.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (getSherlock().dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Native menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public MenuInflater getSupportMenuInflater() {
+ return getSherlock().getMenuInflater();
+ }
+
+ public void invalidateOptionsMenu() {
+ getSherlock().dispatchInvalidateOptionsMenu();
+ }
+
+ public void supportInvalidateOptionsMenu() {
+ invalidateOptionsMenu();
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchPrepareOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return getSherlock().dispatchOptionsItemSelected(item);
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ if (!getSherlock().dispatchOpenOptionsMenu()) {
+ super.openOptionsMenu();
+ }
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ if (!getSherlock().dispatchCloseOptionsMenu()) {
+ super.closeOptionsMenu();
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onCreateOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onPrepareOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onOptionsItemSelected(item);
+ }
+ return false;
+ }
+
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Content
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ getSherlock().addContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ getSherlock().setContentView(layoutResId);
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getSherlock().setContentView(view);
+ }
+
+ public void requestWindowFeature(long featureId) {
+ getSherlock().requestFeature((int)featureId);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress Indication
+ ///////////////////////////////////////////////////////////////////////////
+
+ public void setSupportProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setSupportProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java
new file mode 100644
index 0000000000..0bdd068a65
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java
@@ -0,0 +1,68 @@
+package com.actionbarsherlock.app;
+
+import android.app.Activity;
+import android.support.v4.app.Fragment;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
+
+public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
+ private SherlockFragmentActivity mActivity;
+
+ public SherlockFragmentActivity getSherlockActivity() {
+ return mActivity;
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ if (!(activity instanceof SherlockFragmentActivity)) {
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
+ }
+ mActivity = (SherlockFragmentActivity)activity;
+
+ super.onAttach(activity);
+ }
+
+ @Override
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
+ }
+
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final void onPrepareOptionsMenu(android.view.Menu menu) {
+ onPrepareOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return onOptionsItemSelected(new MenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ //Nothing to see here.
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java
new file mode 100644
index 0000000000..b09f05e4df
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java
@@ -0,0 +1,309 @@
+package com.actionbarsherlock.app;
+
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.support.v4.app.Watson;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.BuildConfig;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+import static com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import static com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+
+/** @see {@link android.support.v4.app.Watson} */
+public class SherlockFragmentActivity extends Watson implements OnActionModeStartedListener, OnActionModeFinishedListener {
+ private static final String TAG = "SherlockFragmentActivity";
+
+ private ActionBarSherlock mSherlock;
+ private boolean mIgnoreNativeCreate = false;
+ private boolean mIgnoreNativePrepare = false;
+ private boolean mIgnoreNativeSelected = false;
+
+ protected final ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(this, ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Action bar and mode
+ ///////////////////////////////////////////////////////////////////////////
+
+ public ActionBar getSupportActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {}
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {}
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // General lifecycle/callback dispatching
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ protected void onPause() {
+ getSherlock().dispatchPause();
+ super.onPause();
+ }
+
+ @Override
+ protected void onStop() {
+ getSherlock().dispatchStop();
+ super.onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ if (getSherlock().dispatchMenuOpened(featureId, menu)) {
+ return true;
+ }
+ return super.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (getSherlock().dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ getSherlock().dispatchSaveInstanceState(outState);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ getSherlock().dispatchRestoreInstanceState(savedInstanceState);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Native menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public MenuInflater getSupportMenuInflater() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[getSupportMenuInflater]");
+
+ return getSherlock().getMenuInflater();
+ }
+
+ public void invalidateOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[invalidateOptionsMenu]");
+
+ getSherlock().dispatchInvalidateOptionsMenu();
+ }
+
+ public void supportInvalidateOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[supportInvalidateOptionsMenu]");
+
+ invalidateOptionsMenu();
+ }
+
+ @Override
+ public final boolean onCreatePanelMenu(int featureId, android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativeCreate) {
+ mIgnoreNativeCreate = true;
+ boolean result = getSherlock().dispatchCreateOptionsMenu(menu);
+ mIgnoreNativeCreate = false;
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result);
+ return result;
+ }
+ return super.onCreatePanelMenu(featureId, menu);
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return true;
+ }
+
+ @Override
+ public final boolean onPreparePanel(int featureId, View view, android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativePrepare) {
+ mIgnoreNativePrepare = true;
+ boolean result = getSherlock().dispatchPrepareOptionsMenu(menu);
+ mIgnoreNativePrepare = false;
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result);
+ return result;
+ }
+ return super.onPreparePanel(featureId, view, menu);
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return true;
+ }
+
+ @Override
+ public final boolean onMenuItemSelected(int featureId, android.view.MenuItem item) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativeSelected) {
+ mIgnoreNativeSelected = true;
+ boolean result = getSherlock().dispatchOptionsItemSelected(item);
+ mIgnoreNativeSelected = false;
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[onMenuItemSelected] returning " + result);
+ return result;
+ }
+ return super.onMenuItemSelected(featureId, item);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return false;
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ if (!getSherlock().dispatchOpenOptionsMenu()) {
+ super.openOptionsMenu();
+ }
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ if (!getSherlock().dispatchCloseOptionsMenu()) {
+ super.closeOptionsMenu();
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Content
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ getSherlock().addContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ getSherlock().setContentView(layoutResId);
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getSherlock().setContentView(view);
+ }
+
+ public void requestWindowFeature(long featureId) {
+ getSherlock().requestFeature((int)featureId);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress Indication
+ ///////////////////////////////////////////////////////////////////////////
+
+ public void setSupportProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setSupportProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListActivity.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
new file mode 100644
index 0000000000..ecee68fc4a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
@@ -0,0 +1,276 @@
+package com.actionbarsherlock.app;
+
+import android.app.ListActivity;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.Window;
+import android.view.ViewGroup.LayoutParams;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class SherlockListActivity extends ListActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener, OnActionModeStartedListener, OnActionModeFinishedListener {
+ private ActionBarSherlock mSherlock;
+
+ protected final ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(this, ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Action bar and mode
+ ///////////////////////////////////////////////////////////////////////////
+
+ public ActionBar getSupportActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {}
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {}
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // General lifecycle/callback dispatching
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ protected void onPause() {
+ getSherlock().dispatchPause();
+ super.onPause();
+ }
+
+ @Override
+ protected void onStop() {
+ getSherlock().dispatchStop();
+ super.onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ if (getSherlock().dispatchMenuOpened(featureId, menu)) {
+ return true;
+ }
+ return super.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (getSherlock().dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ getSherlock().dispatchSaveInstanceState(outState);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ getSherlock().dispatchRestoreInstanceState(savedInstanceState);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Native menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public MenuInflater getSupportMenuInflater() {
+ return getSherlock().getMenuInflater();
+ }
+
+ public void invalidateOptionsMenu() {
+ getSherlock().dispatchInvalidateOptionsMenu();
+ }
+
+ public void supportInvalidateOptionsMenu() {
+ invalidateOptionsMenu();
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchPrepareOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return getSherlock().dispatchOptionsItemSelected(item);
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ if (!getSherlock().dispatchOpenOptionsMenu()) {
+ super.openOptionsMenu();
+ }
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ if (!getSherlock().dispatchCloseOptionsMenu()) {
+ super.closeOptionsMenu();
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onCreateOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onPrepareOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onOptionsItemSelected(item);
+ }
+ return false;
+ }
+
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Content
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ getSherlock().addContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ getSherlock().setContentView(layoutResId);
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getSherlock().setContentView(view);
+ }
+
+ public void requestWindowFeature(long featureId) {
+ getSherlock().requestFeature((int)featureId);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress Indication
+ ///////////////////////////////////////////////////////////////////////////
+
+ public void setSupportProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setSupportProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListFragment.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
new file mode 100644
index 0000000000..7c4d09511a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
@@ -0,0 +1,68 @@
+package com.actionbarsherlock.app;
+
+import android.app.Activity;
+import android.support.v4.app.ListFragment;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
+
+public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
+ private SherlockFragmentActivity mActivity;
+
+ public SherlockFragmentActivity getSherlockActivity() {
+ return mActivity;
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ if (!(activity instanceof SherlockFragmentActivity)) {
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
+ }
+ mActivity = (SherlockFragmentActivity)activity;
+
+ super.onAttach(activity);
+ }
+
+ @Override
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
+ }
+
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final void onPrepareOptionsMenu(android.view.Menu menu) {
+ onPrepareOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ //Nothing to see here.
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return onOptionsItemSelected(new MenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ //Nothing to see here.
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
new file mode 100644
index 0000000000..9644b18258
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
@@ -0,0 +1,276 @@
+package com.actionbarsherlock.app;
+
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class SherlockPreferenceActivity extends PreferenceActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener, OnActionModeStartedListener, OnActionModeFinishedListener {
+ private ActionBarSherlock mSherlock;
+
+ protected final ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(this, ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Action bar and mode
+ ///////////////////////////////////////////////////////////////////////////
+
+ public ActionBar getSupportActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {}
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {}
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // General lifecycle/callback dispatching
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ protected void onPause() {
+ getSherlock().dispatchPause();
+ super.onPause();
+ }
+
+ @Override
+ protected void onStop() {
+ getSherlock().dispatchStop();
+ super.onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public final boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ if (getSherlock().dispatchMenuOpened(featureId, menu)) {
+ return true;
+ }
+ return super.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (getSherlock().dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ getSherlock().dispatchSaveInstanceState(outState);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ getSherlock().dispatchRestoreInstanceState(savedInstanceState);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Native menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ public MenuInflater getSupportMenuInflater() {
+ return getSherlock().getMenuInflater();
+ }
+
+ public void invalidateOptionsMenu() {
+ getSherlock().dispatchInvalidateOptionsMenu();
+ }
+
+ public void supportInvalidateOptionsMenu() {
+ invalidateOptionsMenu();
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return getSherlock().dispatchPrepareOptionsMenu(menu);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return getSherlock().dispatchOptionsItemSelected(item);
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ if (!getSherlock().dispatchOpenOptionsMenu()) {
+ super.openOptionsMenu();
+ }
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ if (!getSherlock().dispatchCloseOptionsMenu()) {
+ super.closeOptionsMenu();
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onCreateOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onPrepareOptionsMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ return onOptionsItemSelected(item);
+ }
+ return false;
+ }
+
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Content
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ getSherlock().addContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ getSherlock().setContentView(layoutResId);
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getSherlock().setContentView(view);
+ }
+
+ public void requestWindowFeature(long featureId) {
+ getSherlock().requestFeature((int)featureId);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress Indication
+ ///////////////////////////////////////////////////////////////////////////
+
+ public void setSupportProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setSupportProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
new file mode 100644
index 0000000000..421c94bd6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
@@ -0,0 +1,1177 @@
+package com.actionbarsherlock.internal;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.content.res.AssetManager;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.os.Bundle;
+import android.util.AndroidRuntimeException;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.ContextThemeWrapper;
+import android.view.KeyCharacterMap;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
+import android.view.Window;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.BuildConfig;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.app.ActionBarImpl;
+import com.actionbarsherlock.internal.view.StandaloneActionMode;
+import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.internal.view.menu.MenuItemImpl;
+import com.actionbarsherlock.internal.view.menu.MenuPresenter;
+import com.actionbarsherlock.internal.widget.ActionBarContainer;
+import com.actionbarsherlock.internal.widget.ActionBarContextView;
+import com.actionbarsherlock.internal.widget.ActionBarView;
+import com.actionbarsherlock.internal.widget.IcsProgressBar;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import org.xmlpull.v1.XmlPullParser;
+
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getBoolean;
+
+@ActionBarSherlock.Implementation(api = 7)
+public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBuilder.Callback, com.actionbarsherlock.view.Window.Callback, MenuPresenter.Callback, android.view.MenuItem.OnMenuItemClickListener {
+ /** Window features which are enabled by default. */
+ protected static final int DEFAULT_FEATURES = 0;
+
+ static private final String PANELS_TAG = "sherlock:Panels";
+
+ public ActionBarSherlockCompat(Activity activity, int flags) {
+ super(activity, flags);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Properties
+ ///////////////////////////////////////////////////////////////////////////
+
+ /** Whether or not the device has a dedicated menu key button. */
+ private boolean mReserveOverflow;
+ /** Lazy-load indicator for {@link #mReserveOverflow}. */
+ private boolean mReserveOverflowSet = false;
+
+ /** Current menu instance for managing action items. */
+ private MenuBuilder mMenu;
+ /** Map between native options items and sherlock items. */
+ protected HashMap<android.view.MenuItem, MenuItemImpl> mNativeItemMap;
+
+ /** Parent view of the window decoration (action bar, mode, etc.). */
+ private ViewGroup mDecor;
+ /** Parent view of the activity content. */
+ private ViewGroup mContentParent;
+
+ /** Whether or not the title is stable and can be displayed. */
+ private boolean mIsTitleReady = false;
+ /** Whether or not the parent activity has been destroyed. */
+ private boolean mIsDestroyed = false;
+
+ /* Emulate PanelFeatureState */
+ private boolean mClosingActionMenu;
+ private boolean mMenuIsPrepared;
+ private boolean mMenuRefreshContent;
+ private Bundle mMenuFrozenActionViewState;
+
+ /** Implementation which backs the action bar interface API. */
+ private ActionBarImpl aActionBar;
+ /** Main action bar view which displays the core content. */
+ private ActionBarView wActionBar;
+ /** Relevant window and action bar features flags. */
+ private int mFeatures = DEFAULT_FEATURES;
+ /** Relevant user interface option flags. */
+ private int mUiOptions = 0;
+
+ /** Decor indeterminate progress indicator. */
+ private IcsProgressBar mCircularProgressBar;
+ /** Decor progress indicator. */
+ private IcsProgressBar mHorizontalProgressBar;
+
+ /** Current displayed context action bar, if any. */
+ private ActionMode mActionMode;
+ /** Parent view in which the context action bar is displayed. */
+ private ActionBarContextView mActionModeView;
+
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Instance methods
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public ActionBar getActionBar() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[getActionBar]");
+
+ initActionBar();
+ return aActionBar;
+ }
+
+ private void initActionBar() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[initActionBar]");
+
+ // Initializing the window decor can change window feature flags.
+ // Make sure that we have the correct set before performing the test below.
+ if (mDecor == null) {
+ installDecor();
+ }
+
+ if ((aActionBar != null) || !hasFeature(Window.FEATURE_ACTION_BAR) || hasFeature(Window.FEATURE_NO_TITLE) || mActivity.isChild()) {
+ return;
+ }
+
+ aActionBar = new ActionBarImpl(mActivity, mFeatures);
+
+ if (!mIsDelegate) {
+ //We may never get another chance to set the title
+ wActionBar.setWindowTitle(mActivity.getTitle());
+ }
+ }
+
+ @Override
+ protected Context getThemedContext() {
+ return aActionBar.getThemedContext();
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setTitle] title: " + title);
+
+ dispatchTitleChanged(title, 0);
+ }
+
+ @Override
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[startActionMode] callback: " + callback);
+
+ if (mActionMode != null) {
+ mActionMode.finish();
+ }
+
+ final ActionMode.Callback wrappedCallback = new ActionModeCallbackWrapper(callback);
+ ActionMode mode = null;
+
+ //Emulate Activity's onWindowStartingActionMode:
+ initActionBar();
+ if (aActionBar != null) {
+ mode = aActionBar.startActionMode(wrappedCallback);
+ }
+
+ if (mode != null) {
+ mActionMode = mode;
+ } else {
+ if (mActionModeView == null) {
+ ViewStub stub = (ViewStub)mDecor.findViewById(R.id.abs__action_mode_bar_stub);
+ if (stub != null) {
+ mActionModeView = (ActionBarContextView)stub.inflate();
+ }
+ }
+ if (mActionModeView != null) {
+ mActionModeView.killMode();
+ mode = new StandaloneActionMode(mActivity, mActionModeView, wrappedCallback, true);
+ if (callback.onCreateActionMode(mode, mode.getMenu())) {
+ mode.invalidate();
+ mActionModeView.initForMode(mode);
+ mActionModeView.setVisibility(View.VISIBLE);
+ mActionMode = mode;
+ mActionModeView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+ } else {
+ mActionMode = null;
+ }
+ }
+ }
+ if (mActionMode != null && mActivity instanceof OnActionModeStartedListener) {
+ ((OnActionModeStartedListener)mActivity).onActionModeStarted(mActionMode);
+ }
+ return mActionMode;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Lifecycle and interaction callbacks for delegation
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void dispatchConfigurationChanged(Configuration newConfig) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchConfigurationChanged] newConfig: " + newConfig);
+
+ if (aActionBar != null) {
+ aActionBar.onConfigurationChanged(newConfig);
+ }
+ }
+
+ @Override
+ public void dispatchPostResume() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPostResume]");
+
+ if (aActionBar != null) {
+ aActionBar.setShowHideAnimationEnabled(true);
+ }
+ }
+
+ @Override
+ public void dispatchPause() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPause]");
+
+ if (wActionBar != null && wActionBar.isOverflowMenuShowing()) {
+ wActionBar.hideOverflowMenu();
+ }
+ }
+
+ @Override
+ public void dispatchStop() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchStop]");
+
+ if (aActionBar != null) {
+ aActionBar.setShowHideAnimationEnabled(false);
+ }
+ }
+
+ @Override
+ public void dispatchInvalidateOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchInvalidateOptionsMenu]");
+
+ Bundle savedActionViewStates = null;
+ if (mMenu != null) {
+ savedActionViewStates = new Bundle();
+ mMenu.saveActionViewStates(savedActionViewStates);
+ if (savedActionViewStates.size() > 0) {
+ mMenuFrozenActionViewState = savedActionViewStates;
+ }
+ // This will be started again when the panel is prepared.
+ mMenu.stopDispatchingItemsChanged();
+ mMenu.clear();
+ }
+ mMenuRefreshContent = true;
+
+ // Prepare the options panel if we have an action bar
+ if (wActionBar != null) {
+ mMenuIsPrepared = false;
+ preparePanel();
+ }
+ }
+
+ @Override
+ public boolean dispatchOpenOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchOpenOptionsMenu]");
+
+ if (!isReservingOverflow()) {
+ return false;
+ }
+
+ return wActionBar.showOverflowMenu();
+ }
+
+ @Override
+ public boolean dispatchCloseOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchCloseOptionsMenu]");
+
+ if (!isReservingOverflow()) {
+ return false;
+ }
+
+ if (wActionBar != null) {
+ return wActionBar.hideOverflowMenu();
+ }
+ return false;
+ }
+
+ @Override
+ public void dispatchPostCreate(Bundle savedInstanceState) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchOnPostCreate]");
+
+ if (mIsDelegate) {
+ mIsTitleReady = true;
+ }
+
+ if (mDecor == null) {
+ initActionBar();
+ }
+ }
+
+ @Override
+ public boolean dispatchCreateOptionsMenu(android.view.Menu menu) {
+ if (BuildConfig.DEBUG) {
+ Log.d(TAG, "[dispatchCreateOptionsMenu] android.view.Menu: " + menu);
+ Log.d(TAG, "[dispatchCreateOptionsMenu] returning true");
+ }
+ return true;
+ }
+
+ @Override
+ public boolean dispatchPrepareOptionsMenu(android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] android.view.Menu: " + menu);
+
+ if (mActionMode != null) {
+ return false;
+ }
+
+ mMenuIsPrepared = false;
+ if (!preparePanel()) {
+ return false;
+ }
+
+ if (isReservingOverflow()) {
+ return false;
+ }
+
+ if (mNativeItemMap == null) {
+ mNativeItemMap = new HashMap<android.view.MenuItem, MenuItemImpl>();
+ } else {
+ mNativeItemMap.clear();
+ }
+
+ if (mMenu == null) {
+ return false;
+ }
+
+ boolean result = mMenu.bindNativeOverflow(menu, this, mNativeItemMap);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean dispatchOptionsItemSelected(android.view.MenuItem item) {
+ throw new IllegalStateException("Native callback invoked. Create a test case and report!");
+ }
+
+ @Override
+ public boolean dispatchMenuOpened(int featureId, android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchMenuOpened] featureId: " + featureId + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_ACTION_BAR || featureId == Window.FEATURE_OPTIONS_PANEL) {
+ if (aActionBar != null) {
+ aActionBar.dispatchMenuVisibilityChanged(true);
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public void dispatchPanelClosed(int featureId, android.view.Menu menu){
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPanelClosed] featureId: " + featureId + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_ACTION_BAR || featureId == Window.FEATURE_OPTIONS_PANEL) {
+ if (aActionBar != null) {
+ aActionBar.dispatchMenuVisibilityChanged(false);
+ }
+ }
+ }
+
+ @Override
+ public void dispatchTitleChanged(CharSequence title, int color) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchTitleChanged] title: " + title + ", color: " + color);
+
+ if ((!mIsDelegate || mIsTitleReady) && (wActionBar != null)) {
+ wActionBar.setWindowTitle(title);
+ }
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchKeyEvent] event: " + event);
+
+ final int keyCode = event.getKeyCode();
+
+ // Not handled by the view hierarchy, does the action bar want it
+ // to cancel out of something special?
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ final int action = event.getAction();
+ // Back cancels action modes first.
+ if (mActionMode != null) {
+ if (action == KeyEvent.ACTION_UP) {
+ mActionMode.finish();
+ }
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning true");
+ return true;
+ }
+
+ // Next collapse any expanded action views.
+ if (wActionBar != null && wActionBar.hasExpandedActionView()) {
+ if (action == KeyEvent.ACTION_UP) {
+ wActionBar.collapseActionView();
+ }
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning true");
+ return true;
+ }
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning false");
+ return false;
+ }
+
+ @Override
+ public void dispatchDestroy() {
+ mIsDestroyed = true;
+ }
+
+ @Override
+ public void dispatchSaveInstanceState(Bundle outState) {
+ if (mMenu != null) {
+ mMenuFrozenActionViewState = new Bundle();
+ mMenu.saveActionViewStates(mMenuFrozenActionViewState);
+ }
+ outState.putParcelable(PANELS_TAG, mMenuFrozenActionViewState);
+ }
+
+ @Override
+ public void dispatchRestoreInstanceState(Bundle savedInstanceState) {
+ mMenuFrozenActionViewState = savedInstanceState.getParcelable(PANELS_TAG);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Menu callback lifecycle and creation
+ ///////////////////////////////////////////////////////////////////////////
+
+ private boolean preparePanel() {
+ // Already prepared (isPrepared will be reset to false later)
+ if (mMenuIsPrepared) {
+ return true;
+ }
+
+ // Init the panel state's menu--return false if init failed
+ if (mMenu == null || mMenuRefreshContent) {
+ if (mMenu == null) {
+ if (!initializePanelMenu() || (mMenu == null)) {
+ return false;
+ }
+ }
+
+ if (wActionBar != null) {
+ wActionBar.setMenu(mMenu, this);
+ }
+
+ // Call callback, and return if it doesn't want to display menu.
+
+ // Creating the panel menu will involve a lot of manipulation;
+ // don't dispatch change events to presenters until we're done.
+ mMenu.stopDispatchingItemsChanged();
+ if (!callbackCreateOptionsMenu(mMenu)) {
+ // Ditch the menu created above
+ mMenu = null;
+
+ if (wActionBar != null) {
+ // Don't show it in the action bar either
+ wActionBar.setMenu(null, this);
+ }
+
+ return false;
+ }
+
+ mMenuRefreshContent = false;
+ }
+
+ // Callback and return if the callback does not want to show the menu
+
+ // Preparing the panel menu can involve a lot of manipulation;
+ // don't dispatch change events to presenters until we're done.
+ mMenu.stopDispatchingItemsChanged();
+
+ // Restore action view state before we prepare. This gives apps
+ // an opportunity to override frozen/restored state in onPrepare.
+ if (mMenuFrozenActionViewState != null) {
+ mMenu.restoreActionViewStates(mMenuFrozenActionViewState);
+ mMenuFrozenActionViewState = null;
+ }
+
+ if (!callbackPrepareOptionsMenu(mMenu)) {
+ if (wActionBar != null) {
+ // The app didn't want to show the menu for now but it still exists.
+ // Clear it out of the action bar.
+ wActionBar.setMenu(null, this);
+ }
+ mMenu.startDispatchingItemsChanged();
+ return false;
+ }
+
+ // Set the proper keymap
+ KeyCharacterMap kmap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);
+ mMenu.setQwertyMode(kmap.getKeyboardType() != KeyCharacterMap.NUMERIC);
+ mMenu.startDispatchingItemsChanged();
+
+ // Set other state
+ mMenuIsPrepared = true;
+
+ return true;
+ }
+
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ return callbackOptionsItemSelected(item);
+ }
+
+ public void onMenuModeChange(MenuBuilder menu) {
+ reopenMenu(true);
+ }
+
+ private void reopenMenu(boolean toggleMenuMode) {
+ if (wActionBar != null && wActionBar.isOverflowReserved()) {
+ if (!wActionBar.isOverflowMenuShowing() || !toggleMenuMode) {
+ if (wActionBar.getVisibility() == View.VISIBLE) {
+ if (callbackPrepareOptionsMenu(mMenu)) {
+ wActionBar.showOverflowMenu();
+ }
+ }
+ } else {
+ wActionBar.hideOverflowMenu();
+ }
+ return;
+ }
+ }
+
+ private boolean initializePanelMenu() {
+ Context context = mActivity;//getContext();
+
+ // If we have an action bar, initialize the menu with a context themed for it.
+ if (wActionBar != null) {
+ TypedValue outValue = new TypedValue();
+ Resources.Theme currentTheme = context.getTheme();
+ currentTheme.resolveAttribute(R.attr.actionBarWidgetTheme,
+ outValue, true);
+ final int targetThemeRes = outValue.resourceId;
+
+ if (targetThemeRes != 0 /*&& context.getThemeResId() != targetThemeRes*/) {
+ context = new ContextThemeWrapper(context, targetThemeRes);
+ }
+ }
+
+ mMenu = new MenuBuilder(context);
+ mMenu.setCallback(this);
+
+ return true;
+ }
+
+ void checkCloseActionMenu(Menu menu) {
+ if (mClosingActionMenu) {
+ return;
+ }
+
+ mClosingActionMenu = true;
+ wActionBar.dismissPopupMenus();
+ //Callback cb = getCallback();
+ //if (cb != null && !isDestroyed()) {
+ // cb.onPanelClosed(FEATURE_ACTION_BAR, menu);
+ //}
+ mClosingActionMenu = false;
+ }
+
+ @Override
+ public boolean onOpenSubMenu(MenuBuilder subMenu) {
+ return true;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ checkCloseActionMenu(menu);
+ }
+
+ @Override
+ public boolean onMenuItemClick(android.view.MenuItem item) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[mNativeItemListener.onMenuItemClick] item: " + item);
+
+ final MenuItemImpl sherlockItem = mNativeItemMap.get(item);
+ if (sherlockItem != null) {
+ sherlockItem.invoke();
+ } else {
+ Log.e(TAG, "Options item \"" + item + "\" not found in mapping");
+ }
+
+ return true; //Do not allow continuation of native handling
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ return callbackOptionsItemSelected(item);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Progress bar interaction and internal handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void setProgressBarVisibility(boolean visible) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarVisibility] visible: " + visible);
+
+ setFeatureInt(Window.FEATURE_PROGRESS, visible ? Window.PROGRESS_VISIBILITY_ON :
+ Window.PROGRESS_VISIBILITY_OFF);
+ }
+
+ @Override
+ public void setProgressBarIndeterminateVisibility(boolean visible) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarIndeterminateVisibility] visible: " + visible);
+
+ setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS,
+ visible ? Window.PROGRESS_VISIBILITY_ON : Window.PROGRESS_VISIBILITY_OFF);
+ }
+
+ @Override
+ public void setProgressBarIndeterminate(boolean indeterminate) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarIndeterminate] indeterminate: " + indeterminate);
+
+ setFeatureInt(Window.FEATURE_PROGRESS,
+ indeterminate ? Window.PROGRESS_INDETERMINATE_ON : Window.PROGRESS_INDETERMINATE_OFF);
+ }
+
+ @Override
+ public void setProgress(int progress) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgress] progress: " + progress);
+
+ setFeatureInt(Window.FEATURE_PROGRESS, progress + Window.PROGRESS_START);
+ }
+
+ @Override
+ public void setSecondaryProgress(int secondaryProgress) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setSecondaryProgress] secondaryProgress: " + secondaryProgress);
+
+ setFeatureInt(Window.FEATURE_PROGRESS,
+ secondaryProgress + Window.PROGRESS_SECONDARY_START);
+ }
+
+ private void setFeatureInt(int featureId, int value) {
+ updateInt(featureId, value, false);
+ }
+
+ private void updateInt(int featureId, int value, boolean fromResume) {
+ // Do nothing if the decor is not yet installed... an update will
+ // need to be forced when we eventually become active.
+ if (mContentParent == null) {
+ return;
+ }
+
+ final int featureMask = 1 << featureId;
+
+ if ((getFeatures() & featureMask) == 0 && !fromResume) {
+ return;
+ }
+
+ onIntChanged(featureId, value);
+ }
+
+ private void onIntChanged(int featureId, int value) {
+ if (featureId == Window.FEATURE_PROGRESS || featureId == Window.FEATURE_INDETERMINATE_PROGRESS) {
+ updateProgressBars(value);
+ }
+ }
+
+ private void updateProgressBars(int value) {
+ IcsProgressBar circularProgressBar = getCircularProgressBar(true);
+ IcsProgressBar horizontalProgressBar = getHorizontalProgressBar(true);
+
+ final int features = mFeatures;//getLocalFeatures();
+ if (value == Window.PROGRESS_VISIBILITY_ON) {
+ if ((features & (1 << Window.FEATURE_PROGRESS)) != 0) {
+ int level = horizontalProgressBar.getProgress();
+ int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ?
+ View.VISIBLE : View.INVISIBLE;
+ horizontalProgressBar.setVisibility(visibility);
+ }
+ if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0) {
+ circularProgressBar.setVisibility(View.VISIBLE);
+ }
+ } else if (value == Window.PROGRESS_VISIBILITY_OFF) {
+ if ((features & (1 << Window.FEATURE_PROGRESS)) != 0) {
+ horizontalProgressBar.setVisibility(View.GONE);
+ }
+ if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0) {
+ circularProgressBar.setVisibility(View.GONE);
+ }
+ } else if (value == Window.PROGRESS_INDETERMINATE_ON) {
+ horizontalProgressBar.setIndeterminate(true);
+ } else if (value == Window.PROGRESS_INDETERMINATE_OFF) {
+ horizontalProgressBar.setIndeterminate(false);
+ } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) {
+ // We want to set the progress value before testing for visibility
+ // so that when the progress bar becomes visible again, it has the
+ // correct level.
+ horizontalProgressBar.setProgress(value - Window.PROGRESS_START);
+
+ if (value < Window.PROGRESS_END) {
+ showProgressBars(horizontalProgressBar, circularProgressBar);
+ } else {
+ hideProgressBars(horizontalProgressBar, circularProgressBar);
+ }
+ } else if (Window.PROGRESS_SECONDARY_START <= value && value <= Window.PROGRESS_SECONDARY_END) {
+ horizontalProgressBar.setSecondaryProgress(value - Window.PROGRESS_SECONDARY_START);
+
+ showProgressBars(horizontalProgressBar, circularProgressBar);
+ }
+ }
+
+ private void showProgressBars(IcsProgressBar horizontalProgressBar, IcsProgressBar spinnyProgressBar) {
+ final int features = mFeatures;//getLocalFeatures();
+ if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 &&
+ spinnyProgressBar.getVisibility() == View.INVISIBLE) {
+ spinnyProgressBar.setVisibility(View.VISIBLE);
+ }
+ // Only show the progress bars if the primary progress is not complete
+ if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 &&
+ horizontalProgressBar.getProgress() < 10000) {
+ horizontalProgressBar.setVisibility(View.VISIBLE);
+ }
+ }
+
+ private void hideProgressBars(IcsProgressBar horizontalProgressBar, IcsProgressBar spinnyProgressBar) {
+ final int features = mFeatures;//getLocalFeatures();
+ Animation anim = AnimationUtils.loadAnimation(mActivity, android.R.anim.fade_out);
+ anim.setDuration(1000);
+ if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 &&
+ spinnyProgressBar.getVisibility() == View.VISIBLE) {
+ spinnyProgressBar.startAnimation(anim);
+ spinnyProgressBar.setVisibility(View.INVISIBLE);
+ }
+ if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 &&
+ horizontalProgressBar.getVisibility() == View.VISIBLE) {
+ horizontalProgressBar.startAnimation(anim);
+ horizontalProgressBar.setVisibility(View.INVISIBLE);
+ }
+ }
+
+ private IcsProgressBar getCircularProgressBar(boolean shouldInstallDecor) {
+ if (mCircularProgressBar != null) {
+ return mCircularProgressBar;
+ }
+ if (mContentParent == null && shouldInstallDecor) {
+ installDecor();
+ }
+ mCircularProgressBar = (IcsProgressBar)mDecor.findViewById(R.id.abs__progress_circular);
+ if (mCircularProgressBar != null) {
+ mCircularProgressBar.setVisibility(View.INVISIBLE);
+ }
+ return mCircularProgressBar;
+ }
+
+ private IcsProgressBar getHorizontalProgressBar(boolean shouldInstallDecor) {
+ if (mHorizontalProgressBar != null) {
+ return mHorizontalProgressBar;
+ }
+ if (mContentParent == null && shouldInstallDecor) {
+ installDecor();
+ }
+ mHorizontalProgressBar = (IcsProgressBar)mDecor.findViewById(R.id.abs__progress_horizontal);
+ if (mHorizontalProgressBar != null) {
+ mHorizontalProgressBar.setVisibility(View.INVISIBLE);
+ }
+ return mHorizontalProgressBar;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Feature management and content interaction and creation
+ ///////////////////////////////////////////////////////////////////////////
+
+ private int getFeatures() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[getFeatures] returning " + mFeatures);
+
+ return mFeatures;
+ }
+
+ @Override
+ public boolean hasFeature(int featureId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[hasFeature] featureId: " + featureId);
+
+ boolean result = (mFeatures & (1 << featureId)) != 0;
+ if (BuildConfig.DEBUG) Log.d(TAG, "[hasFeature] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean requestFeature(int featureId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[requestFeature] featureId: " + featureId);
+
+ if (mContentParent != null) {
+ throw new AndroidRuntimeException("requestFeature() must be called before adding content");
+ }
+
+ switch (featureId) {
+ case Window.FEATURE_ACTION_BAR:
+ case Window.FEATURE_ACTION_BAR_OVERLAY:
+ case Window.FEATURE_ACTION_MODE_OVERLAY:
+ case Window.FEATURE_INDETERMINATE_PROGRESS:
+ case Window.FEATURE_NO_TITLE:
+ case Window.FEATURE_PROGRESS:
+ mFeatures |= (1 << featureId);
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ @Override
+ public void setUiOptions(int uiOptions) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setUiOptions] uiOptions: " + uiOptions);
+
+ mUiOptions = uiOptions;
+ }
+
+ @Override
+ public void setUiOptions(int uiOptions, int mask) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setUiOptions] uiOptions: " + uiOptions + ", mask: " + mask);
+
+ mUiOptions = (mUiOptions & ~mask) | (uiOptions & mask);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setContentView] layoutResId: " + layoutResId);
+
+ if (mContentParent == null) {
+ installDecor();
+ } else {
+ mContentParent.removeAllViews();
+ }
+ mActivity.getLayoutInflater().inflate(layoutResId, mContentParent);
+
+ android.view.Window.Callback callback = mActivity.getWindow().getCallback();
+ if (callback != null) {
+ callback.onContentChanged();
+ }
+
+ initActionBar();
+ }
+
+ @Override
+ public void setContentView(View view, ViewGroup.LayoutParams params) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setContentView] view: " + view + ", params: " + params);
+
+ if (mContentParent == null) {
+ installDecor();
+ } else {
+ mContentParent.removeAllViews();
+ }
+ mContentParent.addView(view, params);
+
+ android.view.Window.Callback callback = mActivity.getWindow().getCallback();
+ if (callback != null) {
+ callback.onContentChanged();
+ }
+
+ initActionBar();
+ }
+
+ @Override
+ public void addContentView(View view, ViewGroup.LayoutParams params) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[addContentView] view: " + view + ", params: " + params);
+
+ if (mContentParent == null) {
+ installDecor();
+ }
+ mContentParent.addView(view, params);
+
+ initActionBar();
+ }
+
+ private void installDecor() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[installDecor]");
+
+ if (mDecor == null) {
+ mDecor = (ViewGroup)mActivity.getWindow().getDecorView().findViewById(android.R.id.content);
+ }
+ if (mContentParent == null) {
+ //Since we are not operating at the window level we need to take
+ //into account the fact that the true decor may have already been
+ //initialized and had content attached to it. If that is the case,
+ //copy over its children to our new content container.
+ List<View> views = null;
+ if (mDecor.getChildCount() > 0) {
+ views = new ArrayList<View>(1); //Usually there's only one child
+ for (int i = 0, children = mDecor.getChildCount(); i < children; i++) {
+ View child = mDecor.getChildAt(0);
+ mDecor.removeView(child);
+ views.add(child);
+ }
+ }
+
+ mContentParent = generateLayout();
+
+ //Copy over the old children. See above for explanation.
+ if (views != null) {
+ for (View child : views) {
+ mContentParent.addView(child);
+ }
+ }
+
+ wActionBar = (ActionBarView)mDecor.findViewById(R.id.abs__action_bar);
+ if (wActionBar != null) {
+ wActionBar.setWindowCallback(this);
+ if (wActionBar.getTitle() == null) {
+ wActionBar.setWindowTitle(mActivity.getTitle());
+ }
+ if (hasFeature(Window.FEATURE_PROGRESS)) {
+ wActionBar.initProgress();
+ }
+ if (hasFeature(Window.FEATURE_INDETERMINATE_PROGRESS)) {
+ wActionBar.initIndeterminateProgress();
+ }
+
+ //Since we don't require onCreate dispatching, parse for uiOptions here
+ int uiOptions = loadUiOptionsFromManifest(mActivity);
+ if (uiOptions != 0) {
+ mUiOptions = uiOptions;
+ }
+
+ boolean splitActionBar = false;
+ final boolean splitWhenNarrow = (mUiOptions & ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW) != 0;
+ if (splitWhenNarrow) {
+ splitActionBar = getResources_getBoolean(mActivity, R.bool.abs__split_action_bar_is_narrow);
+ } else {
+ splitActionBar = mActivity.getTheme()
+ .obtainStyledAttributes(R.styleable.SherlockTheme)
+ .getBoolean(R.styleable.SherlockTheme_windowSplitActionBar, false);
+ }
+ final ActionBarContainer splitView = (ActionBarContainer)mDecor.findViewById(R.id.abs__split_action_bar);
+ if (splitView != null) {
+ wActionBar.setSplitView(splitView);
+ wActionBar.setSplitActionBar(splitActionBar);
+ wActionBar.setSplitWhenNarrow(splitWhenNarrow);
+
+ mActionModeView = (ActionBarContextView)mDecor.findViewById(R.id.abs__action_context_bar);
+ mActionModeView.setSplitView(splitView);
+ mActionModeView.setSplitActionBar(splitActionBar);
+ mActionModeView.setSplitWhenNarrow(splitWhenNarrow);
+ } else if (splitActionBar) {
+ Log.e(TAG, "Requested split action bar with incompatible window decor! Ignoring request.");
+ }
+
+ // Post the panel invalidate for later; avoid application onCreateOptionsMenu
+ // being called in the middle of onCreate or similar.
+ mDecor.post(new Runnable() {
+ @Override
+ public void run() {
+ //Invalidate if the panel menu hasn't been created before this.
+ if (!mIsDestroyed && !mActivity.isFinishing() && mMenu == null) {
+ dispatchInvalidateOptionsMenu();
+ }
+ }
+ });
+ }
+ }
+ }
+
+ private ViewGroup generateLayout() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[generateLayout]");
+
+ // Apply data from current theme.
+
+ TypedArray a = mActivity.getTheme().obtainStyledAttributes(R.styleable.SherlockTheme);
+
+ if (!a.hasValue(R.styleable.SherlockTheme_windowActionBar)) {
+ throw new IllegalStateException("You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.");
+ }
+
+ if (a.getBoolean(R.styleable.SherlockTheme_windowNoTitle, false)) {
+ requestFeature(Window.FEATURE_NO_TITLE);
+ } else if (a.getBoolean(R.styleable.SherlockTheme_windowActionBar, false)) {
+ // Don't allow an action bar if there is no title.
+ requestFeature(Window.FEATURE_ACTION_BAR);
+ }
+
+ if (a.getBoolean(R.styleable.SherlockTheme_windowActionBarOverlay, false)) {
+ requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+ }
+
+ if (a.getBoolean(R.styleable.SherlockTheme_windowActionModeOverlay, false)) {
+ requestFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
+ }
+
+ a.recycle();
+
+ int layoutResource;
+ if (!hasFeature(Window.FEATURE_NO_TITLE)) {
+ if (hasFeature(Window.FEATURE_ACTION_BAR_OVERLAY)) {
+ layoutResource = R.layout.abs__screen_action_bar_overlay;
+ } else {
+ layoutResource = R.layout.abs__screen_action_bar;
+ }
+ } else if (hasFeature(Window.FEATURE_ACTION_MODE_OVERLAY) && !hasFeature(Window.FEATURE_NO_TITLE)) {
+ layoutResource = R.layout.abs__screen_simple_overlay_action_mode;
+ } else {
+ layoutResource = R.layout.abs__screen_simple;
+ }
+
+ if (BuildConfig.DEBUG) Log.d(TAG, "[generateLayout] using screen XML " + mActivity.getResources().getString(layoutResource));
+ View in = mActivity.getLayoutInflater().inflate(layoutResource, null);
+ mDecor.addView(in, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+
+ ViewGroup contentParent = (ViewGroup)mDecor.findViewById(R.id.abs__content);
+ if (contentParent == null) {
+ throw new RuntimeException("Couldn't find content container view");
+ }
+
+ //Make our new child the true content view (for fragments). VERY VOLATILE!
+ mDecor.setId(View.NO_ID);
+ contentParent.setId(android.R.id.content);
+
+ if (hasFeature(Window.FEATURE_INDETERMINATE_PROGRESS)) {
+ IcsProgressBar progress = getCircularProgressBar(false);
+ if (progress != null) {
+ progress.setIndeterminate(true);
+ }
+ }
+
+ return contentParent;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Miscellaneous
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Determine whether or not the device has a dedicated menu key.
+ *
+ * @return {@code true} if native menu key is present.
+ */
+ private boolean isReservingOverflow() {
+ if (!mReserveOverflowSet) {
+ mReserveOverflow = ActionMenuPresenter.reserveOverflow(mActivity);
+ mReserveOverflowSet = true;
+ }
+ return mReserveOverflow;
+ }
+
+ private static int loadUiOptionsFromManifest(Activity activity) {
+ int uiOptions = 0;
+ try {
+ final String thisPackage = activity.getClass().getName();
+ if (BuildConfig.DEBUG) Log.i(TAG, "Parsing AndroidManifest.xml for " + thisPackage);
+
+ final String packageName = activity.getApplicationInfo().packageName;
+ final AssetManager am = activity.createPackageContext(packageName, 0).getAssets();
+ final XmlResourceParser xml = am.openXmlResourceParser("AndroidManifest.xml");
+
+ int eventType = xml.getEventType();
+ while (eventType != XmlPullParser.END_DOCUMENT) {
+ if (eventType == XmlPullParser.START_TAG) {
+ String name = xml.getName();
+
+ if ("application".equals(name)) {
+ //Check if the <application> has the attribute
+ if (BuildConfig.DEBUG) Log.d(TAG, "Got <application>");
+
+ for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
+ if (BuildConfig.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));
+
+ if ("uiOptions".equals(xml.getAttributeName(i))) {
+ uiOptions = xml.getAttributeIntValue(i, 0);
+ break; //out of for loop
+ }
+ }
+ } else if ("activity".equals(name)) {
+ //Check if the <activity> is us and has the attribute
+ if (BuildConfig.DEBUG) Log.d(TAG, "Got <activity>");
+ Integer activityUiOptions = null;
+ String activityPackage = null;
+ boolean isOurActivity = false;
+
+ for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
+ if (BuildConfig.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));
+
+ //We need both uiOptions and name attributes
+ String attrName = xml.getAttributeName(i);
+ if ("uiOptions".equals(attrName)) {
+ activityUiOptions = xml.getAttributeIntValue(i, 0);
+ } else if ("name".equals(attrName)) {
+ activityPackage = cleanActivityName(packageName, xml.getAttributeValue(i));
+ if (!thisPackage.equals(activityPackage)) {
+ break; //out of for loop
+ }
+ isOurActivity = true;
+ }
+
+ //Make sure we have both attributes before processing
+ if ((activityUiOptions != null) && (activityPackage != null)) {
+ //Our activity, uiOptions specified, override with our value
+ uiOptions = activityUiOptions.intValue();
+ }
+ }
+ if (isOurActivity) {
+ //If we matched our activity but it had no logo don't
+ //do any more processing of the manifest
+ break;
+ }
+ }
+ }
+ eventType = xml.nextToken();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ if (BuildConfig.DEBUG) Log.i(TAG, "Returning " + Integer.toHexString(uiOptions));
+ return uiOptions;
+ }
+
+ public static String cleanActivityName(String manifestPackage, String activityName) {
+ if (activityName.charAt(0) == '.') {
+ //Relative activity name (e.g., android:name=".ui.SomeClass")
+ return manifestPackage + activityName;
+ }
+ if (activityName.indexOf('.', 1) == -1) {
+ //Unqualified activity name (e.g., android:name="SomeClass")
+ return manifestPackage + "." + activityName;
+ }
+ //Fully-qualified activity name (e.g., "com.my.package.SomeClass")
+ return activityName;
+ }
+
+ /**
+ * Clears out internal reference when the action mode is destroyed.
+ */
+ private class ActionModeCallbackWrapper implements ActionMode.Callback {
+ private final ActionMode.Callback mWrapped;
+
+ public ActionModeCallbackWrapper(ActionMode.Callback wrapped) {
+ mWrapped = wrapped;
+ }
+
+ public boolean onCreateActionMode(ActionMode mode, Menu menu) {
+ return mWrapped.onCreateActionMode(mode, menu);
+ }
+
+ public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
+ return mWrapped.onPrepareActionMode(mode, menu);
+ }
+
+ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
+ return mWrapped.onActionItemClicked(mode, item);
+ }
+
+ public void onDestroyActionMode(ActionMode mode) {
+ mWrapped.onDestroyActionMode(mode);
+ if (mActionModeView != null) {
+ mActionModeView.setVisibility(View.GONE);
+ mActionModeView.removeAllViews();
+ }
+ if (mActivity instanceof OnActionModeFinishedListener) {
+ ((OnActionModeFinishedListener)mActivity).onActionModeFinished(mActionMode);
+ }
+ mActionMode = null;
+ }
+ }
+
+ @Override
+ public void ensureActionBar() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[ensureActionBar]");
+
+ if (mDecor == null) {
+ initActionBar();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java
new file mode 100644
index 0000000000..4f67b9faa7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java
@@ -0,0 +1,352 @@
+package com.actionbarsherlock.internal;
+
+import android.app.Activity;
+import android.content.Context;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.ContextThemeWrapper;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.BuildConfig;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.app.ActionBarWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+@ActionBarSherlock.Implementation(api = 14)
+public class ActionBarSherlockNative extends ActionBarSherlock {
+ private ActionBarWrapper mActionBar;
+ private ActionModeWrapper mActionMode;
+ private MenuWrapper mMenu;
+
+ public ActionBarSherlockNative(Activity activity, int flags) {
+ super(activity, flags);
+ }
+
+
+ @Override
+ public ActionBar getActionBar() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[getActionBar]");
+
+ initActionBar();
+ return mActionBar;
+ }
+
+ private void initActionBar() {
+ if (mActionBar != null || mActivity.getActionBar() == null) {
+ return;
+ }
+
+ mActionBar = new ActionBarWrapper(mActivity);
+ }
+
+ @Override
+ public void dispatchInvalidateOptionsMenu() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchInvalidateOptionsMenu]");
+
+ mActivity.getWindow().invalidatePanelMenu(Window.FEATURE_OPTIONS_PANEL);
+
+ if (mMenu != null) mMenu.invalidate();
+ }
+
+ @Override
+ public boolean dispatchCreateOptionsMenu(android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchCreateOptionsMenu] menu: " + menu);
+
+ if (mMenu == null || menu != mMenu.unwrap()) {
+ mMenu = new MenuWrapper(menu);
+ }
+
+ final boolean result = callbackCreateOptionsMenu(mMenu);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchCreateOptionsMenu] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean dispatchPrepareOptionsMenu(android.view.Menu menu) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] menu: " + menu);
+
+ final boolean result = callbackPrepareOptionsMenu(mMenu);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean dispatchOptionsItemSelected(android.view.MenuItem item) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchOptionsItemSelected] item: " + item.getTitleCondensed());
+
+ MenuItem wrapped;
+ if (mMenu == null) {
+ if (item.getItemId() != android.R.id.home) {
+ throw new IllegalStateException("Non-home action item clicked before onCreateOptionsMenu with ID " + item.getItemId());
+ }
+ // Create a throw-away wrapper for now.
+ wrapped = new MenuItemWrapper(item);
+ } else {
+ wrapped = mMenu.findItem(item);
+ }
+ final boolean result = callbackOptionsItemSelected(wrapped);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[dispatchOptionsItemSelected] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean hasFeature(int feature) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[hasFeature] feature: " + feature);
+
+ final boolean result = mActivity.getWindow().hasFeature(feature);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[hasFeature] returning " + result);
+ return result;
+ }
+
+ @Override
+ public boolean requestFeature(int featureId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[requestFeature] featureId: " + featureId);
+
+ final boolean result = mActivity.getWindow().requestFeature(featureId);
+ if (BuildConfig.DEBUG) Log.d(TAG, "[requestFeature] returning " + result);
+ return result;
+ }
+
+ @Override
+ public void setUiOptions(int uiOptions) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setUiOptions] uiOptions: " + uiOptions);
+
+ mActivity.getWindow().setUiOptions(uiOptions);
+ }
+
+ @Override
+ public void setUiOptions(int uiOptions, int mask) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setUiOptions] uiOptions: " + uiOptions + ", mask: " + mask);
+
+ mActivity.getWindow().setUiOptions(uiOptions, mask);
+ }
+
+ @Override
+ public void setContentView(int layoutResId) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setContentView] layoutResId: " + layoutResId);
+
+ mActivity.getWindow().setContentView(layoutResId);
+ initActionBar();
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setContentView] view: " + view + ", params: " + params);
+
+ mActivity.getWindow().setContentView(view, params);
+ initActionBar();
+ }
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[addContentView] view: " + view + ", params: " + params);
+
+ mActivity.getWindow().addContentView(view, params);
+ initActionBar();
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setTitle] title: " + title);
+
+ mActivity.getWindow().setTitle(title);
+ }
+
+ @Override
+ public void setProgressBarVisibility(boolean visible) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarVisibility] visible: " + visible);
+
+ mActivity.setProgressBarVisibility(visible);
+ }
+
+ @Override
+ public void setProgressBarIndeterminateVisibility(boolean visible) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarIndeterminateVisibility] visible: " + visible);
+
+ mActivity.setProgressBarIndeterminateVisibility(visible);
+ }
+
+ @Override
+ public void setProgressBarIndeterminate(boolean indeterminate) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgressBarIndeterminate] indeterminate: " + indeterminate);
+
+ mActivity.setProgressBarIndeterminate(indeterminate);
+ }
+
+ @Override
+ public void setProgress(int progress) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setProgress] progress: " + progress);
+
+ mActivity.setProgress(progress);
+ }
+
+ @Override
+ public void setSecondaryProgress(int secondaryProgress) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[setSecondaryProgress] secondaryProgress: " + secondaryProgress);
+
+ mActivity.setSecondaryProgress(secondaryProgress);
+ }
+
+ @Override
+ protected Context getThemedContext() {
+ Context context = mActivity;
+ TypedValue outValue = new TypedValue();
+ mActivity.getTheme().resolveAttribute(android.R.attr.actionBarWidgetTheme, outValue, true);
+ if (outValue.resourceId != 0) {
+ //We are unable to test if this is the same as our current theme
+ //so we just wrap it and hope that if the attribute was specified
+ //then the user is intentionally specifying an alternate theme.
+ context = new ContextThemeWrapper(context, outValue.resourceId);
+ }
+ return context;
+ }
+
+ @Override
+ public ActionMode startActionMode(com.actionbarsherlock.view.ActionMode.Callback callback) {
+ if (BuildConfig.DEBUG) Log.d(TAG, "[startActionMode] callback: " + callback);
+
+ if (mActionMode != null) {
+ mActionMode.finish();
+ }
+ ActionModeCallbackWrapper wrapped = null;
+ if (callback != null) {
+ wrapped = new ActionModeCallbackWrapper(callback);
+ }
+
+ //Calling this will trigger the callback wrapper's onCreate which
+ //is where we will set the new instance to mActionMode since we need
+ //to pass it through to the sherlock callbacks and the call below
+ //will not have returned yet to store its value.
+ if (mActivity.startActionMode(wrapped) == null) {
+ mActionMode = null;
+ }
+ if (mActivity instanceof OnActionModeStartedListener && mActionMode != null) {
+ ((OnActionModeStartedListener)mActivity).onActionModeStarted(mActionMode);
+ }
+
+ return mActionMode;
+ }
+
+ private class ActionModeCallbackWrapper implements android.view.ActionMode.Callback {
+ private final ActionMode.Callback mCallback;
+
+ public ActionModeCallbackWrapper(ActionMode.Callback callback) {
+ mCallback = callback;
+ }
+
+ @Override
+ public boolean onCreateActionMode(android.view.ActionMode mode, android.view.Menu menu) {
+ //See ActionBarSherlockNative#startActionMode
+ mActionMode = new ActionModeWrapper(mode);
+
+ return mCallback.onCreateActionMode(mActionMode, mActionMode.getMenu());
+ }
+
+ @Override
+ public boolean onPrepareActionMode(android.view.ActionMode mode, android.view.Menu menu) {
+ return mCallback.onPrepareActionMode(mActionMode, mActionMode.getMenu());
+ }
+
+ @Override
+ public boolean onActionItemClicked(android.view.ActionMode mode, android.view.MenuItem item) {
+ return mCallback.onActionItemClicked(mActionMode, mActionMode.getMenu().findItem(item));
+ }
+
+ @Override
+ public void onDestroyActionMode(android.view.ActionMode mode) {
+ mCallback.onDestroyActionMode(mActionMode);
+ if (mActivity instanceof OnActionModeFinishedListener) {
+ ((OnActionModeFinishedListener)mActivity).onActionModeFinished(mActionMode);
+ }
+ }
+ }
+
+ private class ActionModeWrapper extends ActionMode {
+ private final android.view.ActionMode mActionMode;
+ private MenuWrapper mMenu = null;
+
+ ActionModeWrapper(android.view.ActionMode actionMode) {
+ mActionMode = actionMode;
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ mActionMode.setTitle(title);
+ }
+
+ @Override
+ public void setTitle(int resId) {
+ mActionMode.setTitle(resId);
+ }
+
+ @Override
+ public void setSubtitle(CharSequence subtitle) {
+ mActionMode.setSubtitle(subtitle);
+ }
+
+ @Override
+ public void setSubtitle(int resId) {
+ mActionMode.setSubtitle(resId);
+ }
+
+ @Override
+ public void setCustomView(View view) {
+ mActionMode.setCustomView(view);
+ }
+
+ @Override
+ public void invalidate() {
+ mActionMode.invalidate();
+ if (mMenu != null) mMenu.invalidate();
+ }
+
+ @Override
+ public void finish() {
+ mActionMode.finish();
+ }
+
+ @Override
+ public MenuWrapper getMenu() {
+ if (mMenu == null) {
+ mMenu = new MenuWrapper(mActionMode.getMenu());
+ }
+ return mMenu;
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return mActionMode.getTitle();
+ }
+
+ @Override
+ public CharSequence getSubtitle() {
+ return mActionMode.getSubtitle();
+ }
+
+ @Override
+ public View getCustomView() {
+ return mActionMode.getCustomView();
+ }
+
+ @Override
+ public MenuInflater getMenuInflater() {
+ return ActionBarSherlockNative.this.getMenuInflater();
+ }
+
+ @Override
+ public void setTag(Object tag) {
+ mActionMode.setTag(tag);
+ }
+
+ @Override
+ public Object getTag() {
+ return mActionMode.getTag();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java
new file mode 100644
index 0000000000..55a86a8788
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/ResourcesCompat.java
@@ -0,0 +1,182 @@
+package com.actionbarsherlock.internal;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.res.AssetManager;
+import android.content.res.XmlResourceParser;
+import android.os.Build;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import com.actionbarsherlock.BuildConfig;
+import com.actionbarsherlock.R;
+import org.xmlpull.v1.XmlPullParser;
+
+public final class ResourcesCompat {
+ private static final String TAG = "ResourcesCompat";
+
+ //No instances
+ private ResourcesCompat() {}
+
+
+ /**
+ * Support implementation of {@code getResources().getBoolean()} that we
+ * can use to simulate filtering based on width and smallest width
+ * qualifiers on pre-3.2.
+ *
+ * @param context Context to load booleans from on 3.2+ and to fetch the
+ * display metrics.
+ * @param id Id of boolean to load.
+ * @return Associated boolean value as reflected by the current display
+ * metrics.
+ */
+ public static boolean getResources_getBoolean(Context context, int id) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+ return context.getResources().getBoolean(id);
+ }
+
+ DisplayMetrics metrics = context.getResources().getDisplayMetrics();
+ float widthDp = metrics.widthPixels / metrics.density;
+ float heightDp = metrics.heightPixels / metrics.density;
+ float smallestWidthDp = (widthDp < heightDp) ? widthDp : heightDp;
+
+ if (id == R.bool.abs__action_bar_embed_tabs) {
+ if (widthDp >= 480) {
+ return true; //values-w480dp
+ }
+ return false; //values
+ }
+ if (id == R.bool.abs__split_action_bar_is_narrow) {
+ if (widthDp >= 480) {
+ return false; //values-w480dp
+ }
+ return true; //values
+ }
+ if (id == R.bool.abs__action_bar_expanded_action_views_exclusive) {
+ if (smallestWidthDp >= 600) {
+ return false; //values-sw600dp
+ }
+ return true; //values
+ }
+ if (id == R.bool.abs__config_allowActionMenuItemTextWithIcon) {
+ if (widthDp >= 480) {
+ return true; //values-w480dp
+ }
+ return false; //values
+ }
+
+ throw new IllegalArgumentException("Unknown boolean resource ID " + id);
+ }
+
+ /**
+ * Support implementation of {@code getResources().getInteger()} that we
+ * can use to simulate filtering based on width qualifiers on pre-3.2.
+ *
+ * @param context Context to load integers from on 3.2+ and to fetch the
+ * display metrics.
+ * @param id Id of integer to load.
+ * @return Associated integer value as reflected by the current display
+ * metrics.
+ */
+ public static int getResources_getInteger(Context context, int id) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+ return context.getResources().getInteger(id);
+ }
+
+ DisplayMetrics metrics = context.getResources().getDisplayMetrics();
+ float widthDp = metrics.widthPixels / metrics.density;
+
+ if (id == R.integer.abs__max_action_buttons) {
+ if (widthDp >= 600) {
+ return 5; //values-w600dp
+ }
+ if (widthDp >= 500) {
+ return 4; //values-w500dp
+ }
+ if (widthDp >= 360) {
+ return 3; //values-w360dp
+ }
+ return 2; //values
+ }
+
+ throw new IllegalArgumentException("Unknown integer resource ID " + id);
+ }
+
+ /**
+ * Attempt to programmatically load the logo from the manifest file of an
+ * activity by using an XML pull parser. This should allow us to read the
+ * logo attribute regardless of the platform it is being run on.
+ *
+ * @param activity Activity instance.
+ * @return Logo resource ID.
+ */
+ public static int loadLogoFromManifest(Activity activity) {
+ int logo = 0;
+ try {
+ final String thisPackage = activity.getClass().getName();
+ if (BuildConfig.DEBUG) Log.i(TAG, "Parsing AndroidManifest.xml for " + thisPackage);
+
+ final String packageName = activity.getApplicationInfo().packageName;
+ final AssetManager am = activity.createPackageContext(packageName, 0).getAssets();
+ final XmlResourceParser xml = am.openXmlResourceParser("AndroidManifest.xml");
+
+ int eventType = xml.getEventType();
+ while (eventType != XmlPullParser.END_DOCUMENT) {
+ if (eventType == XmlPullParser.START_TAG) {
+ String name = xml.getName();
+
+ if ("application".equals(name)) {
+ //Check if the <application> has the attribute
+ if (BuildConfig.DEBUG) Log.d(TAG, "Got <application>");
+
+ for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
+ if (BuildConfig.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));
+
+ if ("logo".equals(xml.getAttributeName(i))) {
+ logo = xml.getAttributeResourceValue(i, 0);
+ break; //out of for loop
+ }
+ }
+ } else if ("activity".equals(name)) {
+ //Check if the <activity> is us and has the attribute
+ if (BuildConfig.DEBUG) Log.d(TAG, "Got <activity>");
+ Integer activityLogo = null;
+ String activityPackage = null;
+ boolean isOurActivity = false;
+
+ for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
+ if (BuildConfig.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));
+
+ //We need both uiOptions and name attributes
+ String attrName = xml.getAttributeName(i);
+ if ("logo".equals(attrName)) {
+ activityLogo = xml.getAttributeResourceValue(i, 0);
+ } else if ("name".equals(attrName)) {
+ activityPackage = ActionBarSherlockCompat.cleanActivityName(packageName, xml.getAttributeValue(i));
+ if (!thisPackage.equals(activityPackage)) {
+ break; //on to the next
+ }
+ isOurActivity = true;
+ }
+
+ //Make sure we have both attributes before processing
+ if ((activityLogo != null) && (activityPackage != null)) {
+ //Our activity, logo specified, override with our value
+ logo = activityLogo.intValue();
+ }
+ }
+ if (isOurActivity) {
+ //If we matched our activity but it had no logo don't
+ //do any more processing of the manifest
+ break;
+ }
+ }
+ }
+ eventType = xml.nextToken();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ if (BuildConfig.DEBUG) Log.i(TAG, "Returning " + Integer.toHexString(logo));
+ return logo;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarImpl.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarImpl.java
new file mode 100644
index 0000000000..81f7d80018
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarImpl.java
@@ -0,0 +1,1031 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.app;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.os.Handler;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentTransaction;
+import android.util.TypedValue;
+import android.view.ContextThemeWrapper;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.SpinnerAdapter;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator;
+import com.actionbarsherlock.internal.nineoldandroids.animation.AnimatorListenerAdapter;
+import com.actionbarsherlock.internal.nineoldandroids.animation.AnimatorSet;
+import com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator.AnimatorListener;
+import com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout;
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.internal.view.menu.MenuPopupHelper;
+import com.actionbarsherlock.internal.view.menu.SubMenuBuilder;
+import com.actionbarsherlock.internal.widget.ActionBarContainer;
+import com.actionbarsherlock.internal.widget.ActionBarContextView;
+import com.actionbarsherlock.internal.widget.ActionBarView;
+import com.actionbarsherlock.internal.widget.ScrollingTabContainerView;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getBoolean;
+
+/**
+ * ActionBarImpl is the ActionBar implementation used
+ * by devices of all screen sizes. If it detects a compatible decor,
+ * it will split contextual modes across both the ActionBarView at
+ * the top of the screen and a horizontal LinearLayout at the bottom
+ * which is normally hidden.
+ */
+public class ActionBarImpl extends ActionBar {
+ //UNUSED private static final String TAG = "ActionBarImpl";
+
+ private Context mContext;
+ private Context mThemedContext;
+ private Activity mActivity;
+ //UNUSED private Dialog mDialog;
+
+ private ActionBarContainer mContainerView;
+ private ActionBarView mActionView;
+ private ActionBarContextView mContextView;
+ private ActionBarContainer mSplitView;
+ private NineFrameLayout mContentView;
+ private ScrollingTabContainerView mTabScrollView;
+
+ private ArrayList<TabImpl> mTabs = new ArrayList<TabImpl>();
+
+ private TabImpl mSelectedTab;
+ private int mSavedTabPosition = INVALID_POSITION;
+
+ ActionModeImpl mActionMode;
+ ActionMode mDeferredDestroyActionMode;
+ ActionMode.Callback mDeferredModeDestroyCallback;
+
+ private boolean mLastMenuVisibility;
+ private ArrayList<OnMenuVisibilityListener> mMenuVisibilityListeners =
+ new ArrayList<OnMenuVisibilityListener>();
+
+ private static final int CONTEXT_DISPLAY_NORMAL = 0;
+ private static final int CONTEXT_DISPLAY_SPLIT = 1;
+
+ private static final int INVALID_POSITION = -1;
+
+ private int mContextDisplayMode;
+ private boolean mHasEmbeddedTabs;
+
+ final Handler mHandler = new Handler();
+ Runnable mTabSelector;
+
+ private Animator mCurrentShowAnim;
+ private Animator mCurrentModeAnim;
+ private boolean mShowHideAnimationEnabled;
+ boolean mWasHiddenBeforeMode;
+
+ final AnimatorListener mHideListener = new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mContentView != null) {
+ mContentView.setTranslationY(0);
+ mContainerView.setTranslationY(0);
+ }
+ if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
+ mSplitView.setVisibility(View.GONE);
+ }
+ mContainerView.setVisibility(View.GONE);
+ mContainerView.setTransitioning(false);
+ mCurrentShowAnim = null;
+ completeDeferredDestroyActionMode();
+ }
+ };
+
+ final AnimatorListener mShowListener = new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mCurrentShowAnim = null;
+ mContainerView.requestLayout();
+ }
+ };
+
+ public ActionBarImpl(Activity activity, int features) {
+ mActivity = activity;
+ Window window = activity.getWindow();
+ View decor = window.getDecorView();
+ init(decor);
+
+ //window.hasFeature() workaround for pre-3.0
+ if ((features & (1 << Window.FEATURE_ACTION_BAR_OVERLAY)) == 0) {
+ mContentView = (NineFrameLayout)decor.findViewById(android.R.id.content);
+ }
+ }
+
+ public ActionBarImpl(Dialog dialog) {
+ //UNUSED mDialog = dialog;
+ init(dialog.getWindow().getDecorView());
+ }
+
+ private void init(View decor) {
+ mContext = decor.getContext();
+ mActionView = (ActionBarView) decor.findViewById(R.id.abs__action_bar);
+ mContextView = (ActionBarContextView) decor.findViewById(
+ R.id.abs__action_context_bar);
+ mContainerView = (ActionBarContainer) decor.findViewById(
+ R.id.abs__action_bar_container);
+ mSplitView = (ActionBarContainer) decor.findViewById(
+ R.id.abs__split_action_bar);
+
+ if (mActionView == null || mContextView == null || mContainerView == null) {
+ throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
+ "with a compatible window decor layout");
+ }
+
+ mActionView.setContextView(mContextView);
+ mContextDisplayMode = mActionView.isSplitActionBar() ?
+ CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
+
+ // Older apps get the home button interaction enabled by default.
+ // Newer apps need to enable it explicitly.
+ boolean homeButtonEnabled = mContext.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH;
+
+ // If the homeAsUp display option is set, always enable the home button.
+ homeButtonEnabled |= (mActionView.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0;
+
+ setHomeButtonEnabled(homeButtonEnabled);
+
+ setHasEmbeddedTabs(getResources_getBoolean(mContext,
+ R.bool.abs__action_bar_embed_tabs));
+ }
+
+ public void onConfigurationChanged(Configuration newConfig) {
+ setHasEmbeddedTabs(getResources_getBoolean(mContext,
+ R.bool.abs__action_bar_embed_tabs));
+
+ //Manually dispatch a configuration change to the action bar view on pre-2.2
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {
+ mActionView.onConfigurationChanged(newConfig);
+ if (mContextView != null) {
+ mContextView.onConfigurationChanged(newConfig);
+ }
+ }
+ }
+
+ private void setHasEmbeddedTabs(boolean hasEmbeddedTabs) {
+ mHasEmbeddedTabs = hasEmbeddedTabs;
+ // Switch tab layout configuration if needed
+ if (!mHasEmbeddedTabs) {
+ mActionView.setEmbeddedTabView(null);
+ mContainerView.setTabContainer(mTabScrollView);
+ } else {
+ mContainerView.setTabContainer(null);
+ mActionView.setEmbeddedTabView(mTabScrollView);
+ }
+ final boolean isInTabMode = getNavigationMode() == NAVIGATION_MODE_TABS;
+ if (mTabScrollView != null) {
+ mTabScrollView.setVisibility(isInTabMode ? View.VISIBLE : View.GONE);
+ }
+ mActionView.setCollapsable(!mHasEmbeddedTabs && isInTabMode);
+ }
+
+ private void ensureTabsExist() {
+ if (mTabScrollView != null) {
+ return;
+ }
+
+ ScrollingTabContainerView tabScroller = new ScrollingTabContainerView(mContext);
+
+ if (mHasEmbeddedTabs) {
+ tabScroller.setVisibility(View.VISIBLE);
+ mActionView.setEmbeddedTabView(tabScroller);
+ } else {
+ tabScroller.setVisibility(getNavigationMode() == NAVIGATION_MODE_TABS ?
+ View.VISIBLE : View.GONE);
+ mContainerView.setTabContainer(tabScroller);
+ }
+ mTabScrollView = tabScroller;
+ }
+
+ void completeDeferredDestroyActionMode() {
+ if (mDeferredModeDestroyCallback != null) {
+ mDeferredModeDestroyCallback.onDestroyActionMode(mDeferredDestroyActionMode);
+ mDeferredDestroyActionMode = null;
+ mDeferredModeDestroyCallback = null;
+ }
+ }
+
+ /**
+ * Enables or disables animation between show/hide states.
+ * If animation is disabled using this method, animations in progress
+ * will be finished.
+ *
+ * @param enabled true to animate, false to not animate.
+ */
+ public void setShowHideAnimationEnabled(boolean enabled) {
+ mShowHideAnimationEnabled = enabled;
+ if (!enabled && mCurrentShowAnim != null) {
+ mCurrentShowAnim.end();
+ }
+ }
+
+ public void addOnMenuVisibilityListener(OnMenuVisibilityListener listener) {
+ mMenuVisibilityListeners.add(listener);
+ }
+
+ public void removeOnMenuVisibilityListener(OnMenuVisibilityListener listener) {
+ mMenuVisibilityListeners.remove(listener);
+ }
+
+ public void dispatchMenuVisibilityChanged(boolean isVisible) {
+ if (isVisible == mLastMenuVisibility) {
+ return;
+ }
+ mLastMenuVisibility = isVisible;
+
+ final int count = mMenuVisibilityListeners.size();
+ for (int i = 0; i < count; i++) {
+ mMenuVisibilityListeners.get(i).onMenuVisibilityChanged(isVisible);
+ }
+ }
+
+ @Override
+ public void setCustomView(int resId) {
+ setCustomView(LayoutInflater.from(getThemedContext()).inflate(resId, mActionView, false));
+ }
+
+ @Override
+ public void setDisplayUseLogoEnabled(boolean useLogo) {
+ setDisplayOptions(useLogo ? DISPLAY_USE_LOGO : 0, DISPLAY_USE_LOGO);
+ }
+
+ @Override
+ public void setDisplayShowHomeEnabled(boolean showHome) {
+ setDisplayOptions(showHome ? DISPLAY_SHOW_HOME : 0, DISPLAY_SHOW_HOME);
+ }
+
+ @Override
+ public void setDisplayHomeAsUpEnabled(boolean showHomeAsUp) {
+ setDisplayOptions(showHomeAsUp ? DISPLAY_HOME_AS_UP : 0, DISPLAY_HOME_AS_UP);
+ }
+
+ @Override
+ public void setDisplayShowTitleEnabled(boolean showTitle) {
+ setDisplayOptions(showTitle ? DISPLAY_SHOW_TITLE : 0, DISPLAY_SHOW_TITLE);
+ }
+
+ @Override
+ public void setDisplayShowCustomEnabled(boolean showCustom) {
+ setDisplayOptions(showCustom ? DISPLAY_SHOW_CUSTOM : 0, DISPLAY_SHOW_CUSTOM);
+ }
+
+ @Override
+ public void setHomeButtonEnabled(boolean enable) {
+ mActionView.setHomeButtonEnabled(enable);
+ }
+
+ @Override
+ public void setTitle(int resId) {
+ setTitle(mContext.getString(resId));
+ }
+
+ @Override
+ public void setSubtitle(int resId) {
+ setSubtitle(mContext.getString(resId));
+ }
+
+ public void setSelectedNavigationItem(int position) {
+ switch (mActionView.getNavigationMode()) {
+ case NAVIGATION_MODE_TABS:
+ selectTab(mTabs.get(position));
+ break;
+ case NAVIGATION_MODE_LIST:
+ mActionView.setDropdownSelectedPosition(position);
+ break;
+ default:
+ throw new IllegalStateException(
+ "setSelectedNavigationIndex not valid for current navigation mode");
+ }
+ }
+
+ public void removeAllTabs() {
+ cleanupTabs();
+ }
+
+ private void cleanupTabs() {
+ if (mSelectedTab != null) {
+ selectTab(null);
+ }
+ mTabs.clear();
+ if (mTabScrollView != null) {
+ mTabScrollView.removeAllTabs();
+ }
+ mSavedTabPosition = INVALID_POSITION;
+ }
+
+ public void setTitle(CharSequence title) {
+ mActionView.setTitle(title);
+ }
+
+ public void setSubtitle(CharSequence subtitle) {
+ mActionView.setSubtitle(subtitle);
+ }
+
+ public void setDisplayOptions(int options) {
+ mActionView.setDisplayOptions(options);
+ }
+
+ public void setDisplayOptions(int options, int mask) {
+ final int current = mActionView.getDisplayOptions();
+ mActionView.setDisplayOptions((options & mask) | (current & ~mask));
+ }
+
+ public void setBackgroundDrawable(Drawable d) {
+ mContainerView.setPrimaryBackground(d);
+ }
+
+ public void setStackedBackgroundDrawable(Drawable d) {
+ mContainerView.setStackedBackground(d);
+ }
+
+ public void setSplitBackgroundDrawable(Drawable d) {
+ if (mSplitView != null) {
+ mSplitView.setSplitBackground(d);
+ }
+ }
+
+ public View getCustomView() {
+ return mActionView.getCustomNavigationView();
+ }
+
+ public CharSequence getTitle() {
+ return mActionView.getTitle();
+ }
+
+ public CharSequence getSubtitle() {
+ return mActionView.getSubtitle();
+ }
+
+ public int getNavigationMode() {
+ return mActionView.getNavigationMode();
+ }
+
+ public int getDisplayOptions() {
+ return mActionView.getDisplayOptions();
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ boolean wasHidden = false;
+ if (mActionMode != null) {
+ wasHidden = mWasHiddenBeforeMode;
+ mActionMode.finish();
+ }
+
+ mContextView.killMode();
+ ActionModeImpl mode = new ActionModeImpl(callback);
+ if (mode.dispatchOnCreate()) {
+ mWasHiddenBeforeMode = !isShowing() || wasHidden;
+ mode.invalidate();
+ mContextView.initForMode(mode);
+ animateToMode(true);
+ if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
+ // TODO animate this
+ mSplitView.setVisibility(View.VISIBLE);
+ }
+ mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+ mActionMode = mode;
+ return mode;
+ }
+ return null;
+ }
+
+ private void configureTab(Tab tab, int position) {
+ final TabImpl tabi = (TabImpl) tab;
+ final ActionBar.TabListener callback = tabi.getCallback();
+
+ if (callback == null) {
+ throw new IllegalStateException("Action Bar Tab must have a Callback");
+ }
+
+ tabi.setPosition(position);
+ mTabs.add(position, tabi);
+
+ final int count = mTabs.size();
+ for (int i = position + 1; i < count; i++) {
+ mTabs.get(i).setPosition(i);
+ }
+ }
+
+ @Override
+ public void addTab(Tab tab) {
+ addTab(tab, mTabs.isEmpty());
+ }
+
+ @Override
+ public void addTab(Tab tab, int position) {
+ addTab(tab, position, mTabs.isEmpty());
+ }
+
+ @Override
+ public void addTab(Tab tab, boolean setSelected) {
+ ensureTabsExist();
+ mTabScrollView.addTab(tab, setSelected);
+ configureTab(tab, mTabs.size());
+ if (setSelected) {
+ selectTab(tab);
+ }
+ }
+
+ @Override
+ public void addTab(Tab tab, int position, boolean setSelected) {
+ ensureTabsExist();
+ mTabScrollView.addTab(tab, position, setSelected);
+ configureTab(tab, position);
+ if (setSelected) {
+ selectTab(tab);
+ }
+ }
+
+ @Override
+ public Tab newTab() {
+ return new TabImpl();
+ }
+
+ @Override
+ public void removeTab(Tab tab) {
+ removeTabAt(tab.getPosition());
+ }
+
+ @Override
+ public void removeTabAt(int position) {
+ if (mTabScrollView == null) {
+ // No tabs around to remove
+ return;
+ }
+
+ int selectedTabPosition = mSelectedTab != null
+ ? mSelectedTab.getPosition() : mSavedTabPosition;
+ mTabScrollView.removeTabAt(position);
+ TabImpl removedTab = mTabs.remove(position);
+ if (removedTab != null) {
+ removedTab.setPosition(-1);
+ }
+
+ final int newTabCount = mTabs.size();
+ for (int i = position; i < newTabCount; i++) {
+ mTabs.get(i).setPosition(i);
+ }
+
+ if (selectedTabPosition == position) {
+ selectTab(mTabs.isEmpty() ? null : mTabs.get(Math.max(0, position - 1)));
+ }
+ }
+
+ @Override
+ public void selectTab(Tab tab) {
+ if (getNavigationMode() != NAVIGATION_MODE_TABS) {
+ mSavedTabPosition = tab != null ? tab.getPosition() : INVALID_POSITION;
+ return;
+ }
+
+ FragmentTransaction trans = null;
+ if (mActivity instanceof FragmentActivity) {
+ trans = ((FragmentActivity)mActivity).getSupportFragmentManager().beginTransaction()
+ .disallowAddToBackStack();
+ }
+
+ if (mSelectedTab == tab) {
+ if (mSelectedTab != null) {
+ mSelectedTab.getCallback().onTabReselected(mSelectedTab, trans);
+ mTabScrollView.animateToTab(tab.getPosition());
+ }
+ } else {
+ mTabScrollView.setTabSelected(tab != null ? tab.getPosition() : Tab.INVALID_POSITION);
+ if (mSelectedTab != null) {
+ mSelectedTab.getCallback().onTabUnselected(mSelectedTab, trans);
+ }
+ mSelectedTab = (TabImpl) tab;
+ if (mSelectedTab != null) {
+ mSelectedTab.getCallback().onTabSelected(mSelectedTab, trans);
+ }
+ }
+
+ if (trans != null && !trans.isEmpty()) {
+ trans.commit();
+ }
+ }
+
+ @Override
+ public Tab getSelectedTab() {
+ return mSelectedTab;
+ }
+
+ @Override
+ public int getHeight() {
+ return mContainerView.getHeight();
+ }
+
+ @Override
+ public void show() {
+ show(true);
+ }
+
+ void show(boolean markHiddenBeforeMode) {
+ if (mCurrentShowAnim != null) {
+ mCurrentShowAnim.end();
+ }
+ if (mContainerView.getVisibility() == View.VISIBLE) {
+ if (markHiddenBeforeMode) mWasHiddenBeforeMode = false;
+ return;
+ }
+ mContainerView.setVisibility(View.VISIBLE);
+
+ if (mShowHideAnimationEnabled) {
+ mContainerView.setAlpha(0);
+ AnimatorSet anim = new AnimatorSet();
+ AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mContainerView, "alpha", 1));
+ if (mContentView != null) {
+ b.with(ObjectAnimator.ofFloat(mContentView, "translationY",
+ -mContainerView.getHeight(), 0));
+ mContainerView.setTranslationY(-mContainerView.getHeight());
+ b.with(ObjectAnimator.ofFloat(mContainerView, "translationY", 0));
+ }
+ if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
+ mSplitView.setAlpha(0);
+ mSplitView.setVisibility(View.VISIBLE);
+ b.with(ObjectAnimator.ofFloat(mSplitView, "alpha", 1));
+ }
+ anim.addListener(mShowListener);
+ mCurrentShowAnim = anim;
+ anim.start();
+ } else {
+ mContainerView.setAlpha(1);
+ mContainerView.setTranslationY(0);
+ mShowListener.onAnimationEnd(null);
+ }
+ }
+
+ @Override
+ public void hide() {
+ if (mCurrentShowAnim != null) {
+ mCurrentShowAnim.end();
+ }
+ if (mContainerView.getVisibility() == View.GONE) {
+ return;
+ }
+
+ if (mShowHideAnimationEnabled) {
+ mContainerView.setAlpha(1);
+ mContainerView.setTransitioning(true);
+ AnimatorSet anim = new AnimatorSet();
+ AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mContainerView, "alpha", 0));
+ if (mContentView != null) {
+ b.with(ObjectAnimator.ofFloat(mContentView, "translationY",
+ 0, -mContainerView.getHeight()));
+ b.with(ObjectAnimator.ofFloat(mContainerView, "translationY",
+ -mContainerView.getHeight()));
+ }
+ if (mSplitView != null && mSplitView.getVisibility() == View.VISIBLE) {
+ mSplitView.setAlpha(1);
+ b.with(ObjectAnimator.ofFloat(mSplitView, "alpha", 0));
+ }
+ anim.addListener(mHideListener);
+ mCurrentShowAnim = anim;
+ anim.start();
+ } else {
+ mHideListener.onAnimationEnd(null);
+ }
+ }
+
+ public boolean isShowing() {
+ return mContainerView.getVisibility() == View.VISIBLE;
+ }
+
+ void animateToMode(boolean toActionMode) {
+ if (toActionMode) {
+ show(false);
+ }
+ if (mCurrentModeAnim != null) {
+ mCurrentModeAnim.end();
+ }
+
+ mActionView.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
+ mContextView.animateToVisibility(toActionMode ? View.VISIBLE : View.GONE);
+ if (mTabScrollView != null && !mActionView.hasEmbeddedTabs() && mActionView.isCollapsed()) {
+ mTabScrollView.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
+ }
+ }
+
+ public Context getThemedContext() {
+ if (mThemedContext == null) {
+ TypedValue outValue = new TypedValue();
+ Resources.Theme currentTheme = mContext.getTheme();
+ currentTheme.resolveAttribute(R.attr.actionBarWidgetTheme,
+ outValue, true);
+ final int targetThemeRes = outValue.resourceId;
+
+ if (targetThemeRes != 0) { //XXX && mContext.getThemeResId() != targetThemeRes) {
+ mThemedContext = new ContextThemeWrapper(mContext, targetThemeRes);
+ } else {
+ mThemedContext = mContext;
+ }
+ }
+ return mThemedContext;
+ }
+
+ /**
+ * @hide
+ */
+ public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback {
+ private ActionMode.Callback mCallback;
+ private MenuBuilder mMenu;
+ private WeakReference<View> mCustomView;
+
+ public ActionModeImpl(ActionMode.Callback callback) {
+ mCallback = callback;
+ mMenu = new MenuBuilder(getThemedContext())
+ .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ mMenu.setCallback(this);
+ }
+
+ @Override
+ public MenuInflater getMenuInflater() {
+ return new MenuInflater(getThemedContext());
+ }
+
+ @Override
+ public Menu getMenu() {
+ return mMenu;
+ }
+
+ @Override
+ public void finish() {
+ if (mActionMode != this) {
+ // Not the active action mode - no-op
+ return;
+ }
+
+ // If we were hidden before the mode was shown, defer the onDestroy
+ // callback until the animation is finished and associated relayout
+ // is about to happen. This lets apps better anticipate visibility
+ // and layout behavior.
+ if (mWasHiddenBeforeMode) {
+ mDeferredDestroyActionMode = this;
+ mDeferredModeDestroyCallback = mCallback;
+ } else {
+ mCallback.onDestroyActionMode(this);
+ }
+ mCallback = null;
+ animateToMode(false);
+
+ // Clear out the context mode views after the animation finishes
+ mContextView.closeMode();
+ mActionView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+
+ mActionMode = null;
+
+ if (mWasHiddenBeforeMode) {
+ hide();
+ }
+ }
+
+ @Override
+ public void invalidate() {
+ mMenu.stopDispatchingItemsChanged();
+ try {
+ mCallback.onPrepareActionMode(this, mMenu);
+ } finally {
+ mMenu.startDispatchingItemsChanged();
+ }
+ }
+
+ public boolean dispatchOnCreate() {
+ mMenu.stopDispatchingItemsChanged();
+ try {
+ return mCallback.onCreateActionMode(this, mMenu);
+ } finally {
+ mMenu.startDispatchingItemsChanged();
+ }
+ }
+
+ @Override
+ public void setCustomView(View view) {
+ mContextView.setCustomView(view);
+ mCustomView = new WeakReference<View>(view);
+ }
+
+ @Override
+ public void setSubtitle(CharSequence subtitle) {
+ mContextView.setSubtitle(subtitle);
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ mContextView.setTitle(title);
+ }
+
+ @Override
+ public void setTitle(int resId) {
+ setTitle(mContext.getResources().getString(resId));
+ }
+
+ @Override
+ public void setSubtitle(int resId) {
+ setSubtitle(mContext.getResources().getString(resId));
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return mContextView.getTitle();
+ }
+
+ @Override
+ public CharSequence getSubtitle() {
+ return mContextView.getSubtitle();
+ }
+
+ @Override
+ public View getCustomView() {
+ return mCustomView != null ? mCustomView.get() : null;
+ }
+
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ if (mCallback != null) {
+ return mCallback.onActionItemClicked(this, item);
+ } else {
+ return false;
+ }
+ }
+
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ }
+
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (mCallback == null) {
+ return false;
+ }
+
+ if (!subMenu.hasVisibleItems()) {
+ return true;
+ }
+
+ new MenuPopupHelper(getThemedContext(), subMenu).show();
+ return true;
+ }
+
+ public void onCloseSubMenu(SubMenuBuilder menu) {
+ }
+
+ public void onMenuModeChange(MenuBuilder menu) {
+ if (mCallback == null) {
+ return;
+ }
+ invalidate();
+ mContextView.showOverflowMenu();
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public class TabImpl extends ActionBar.Tab {
+ private ActionBar.TabListener mCallback;
+ private Object mTag;
+ private Drawable mIcon;
+ private CharSequence mText;
+ private CharSequence mContentDesc;
+ private int mPosition = -1;
+ private View mCustomView;
+
+ @Override
+ public Object getTag() {
+ return mTag;
+ }
+
+ @Override
+ public Tab setTag(Object tag) {
+ mTag = tag;
+ return this;
+ }
+
+ public ActionBar.TabListener getCallback() {
+ return mCallback;
+ }
+
+ @Override
+ public Tab setTabListener(ActionBar.TabListener callback) {
+ mCallback = callback;
+ return this;
+ }
+
+ @Override
+ public View getCustomView() {
+ return mCustomView;
+ }
+
+ @Override
+ public Tab setCustomView(View view) {
+ mCustomView = view;
+ if (mPosition >= 0) {
+ mTabScrollView.updateTab(mPosition);
+ }
+ return this;
+ }
+
+ @Override
+ public Tab setCustomView(int layoutResId) {
+ return setCustomView(LayoutInflater.from(getThemedContext())
+ .inflate(layoutResId, null));
+ }
+
+ @Override
+ public Drawable getIcon() {
+ return mIcon;
+ }
+
+ @Override
+ public int getPosition() {
+ return mPosition;
+ }
+
+ public void setPosition(int position) {
+ mPosition = position;
+ }
+
+ @Override
+ public CharSequence getText() {
+ return mText;
+ }
+
+ @Override
+ public Tab setIcon(Drawable icon) {
+ mIcon = icon;
+ if (mPosition >= 0) {
+ mTabScrollView.updateTab(mPosition);
+ }
+ return this;
+ }
+
+ @Override
+ public Tab setIcon(int resId) {
+ return setIcon(mContext.getResources().getDrawable(resId));
+ }
+
+ @Override
+ public Tab setText(CharSequence text) {
+ mText = text;
+ if (mPosition >= 0) {
+ mTabScrollView.updateTab(mPosition);
+ }
+ return this;
+ }
+
+ @Override
+ public Tab setText(int resId) {
+ return setText(mContext.getResources().getText(resId));
+ }
+
+ @Override
+ public void select() {
+ selectTab(this);
+ }
+
+ @Override
+ public Tab setContentDescription(int resId) {
+ return setContentDescription(mContext.getResources().getText(resId));
+ }
+
+ @Override
+ public Tab setContentDescription(CharSequence contentDesc) {
+ mContentDesc = contentDesc;
+ if (mPosition >= 0) {
+ mTabScrollView.updateTab(mPosition);
+ }
+ return this;
+ }
+
+ @Override
+ public CharSequence getContentDescription() {
+ return mContentDesc;
+ }
+ }
+
+ @Override
+ public void setCustomView(View view) {
+ mActionView.setCustomNavigationView(view);
+ }
+
+ @Override
+ public void setCustomView(View view, LayoutParams layoutParams) {
+ view.setLayoutParams(layoutParams);
+ mActionView.setCustomNavigationView(view);
+ }
+
+ @Override
+ public void setListNavigationCallbacks(SpinnerAdapter adapter, OnNavigationListener callback) {
+ mActionView.setDropdownAdapter(adapter);
+ mActionView.setCallback(callback);
+ }
+
+ @Override
+ public int getSelectedNavigationIndex() {
+ switch (mActionView.getNavigationMode()) {
+ case NAVIGATION_MODE_TABS:
+ return mSelectedTab != null ? mSelectedTab.getPosition() : -1;
+ case NAVIGATION_MODE_LIST:
+ return mActionView.getDropdownSelectedPosition();
+ default:
+ return -1;
+ }
+ }
+
+ @Override
+ public int getNavigationItemCount() {
+ switch (mActionView.getNavigationMode()) {
+ case NAVIGATION_MODE_TABS:
+ return mTabs.size();
+ case NAVIGATION_MODE_LIST:
+ SpinnerAdapter adapter = mActionView.getDropdownAdapter();
+ return adapter != null ? adapter.getCount() : 0;
+ default:
+ return 0;
+ }
+ }
+
+ @Override
+ public int getTabCount() {
+ return mTabs.size();
+ }
+
+ @Override
+ public void setNavigationMode(int mode) {
+ final int oldMode = mActionView.getNavigationMode();
+ switch (oldMode) {
+ case NAVIGATION_MODE_TABS:
+ mSavedTabPosition = getSelectedNavigationIndex();
+ selectTab(null);
+ mTabScrollView.setVisibility(View.GONE);
+ break;
+ }
+ mActionView.setNavigationMode(mode);
+ switch (mode) {
+ case NAVIGATION_MODE_TABS:
+ ensureTabsExist();
+ mTabScrollView.setVisibility(View.VISIBLE);
+ if (mSavedTabPosition != INVALID_POSITION) {
+ setSelectedNavigationItem(mSavedTabPosition);
+ mSavedTabPosition = INVALID_POSITION;
+ }
+ break;
+ }
+ mActionView.setCollapsable(mode == NAVIGATION_MODE_TABS && !mHasEmbeddedTabs);
+ }
+
+ @Override
+ public Tab getTabAt(int index) {
+ return mTabs.get(index);
+ }
+
+
+ @Override
+ public void setIcon(int resId) {
+ mActionView.setIcon(resId);
+ }
+
+ @Override
+ public void setIcon(Drawable icon) {
+ mActionView.setIcon(icon);
+ }
+
+ @Override
+ public void setLogo(int resId) {
+ mActionView.setLogo(resId);
+ }
+
+ @Override
+ public void setLogo(Drawable logo) {
+ mActionView.setLogo(logo);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
new file mode 100644
index 0000000000..fe479d0b86
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
@@ -0,0 +1,480 @@
+package com.actionbarsherlock.internal.app;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentTransaction;
+import android.view.View;
+import android.widget.SpinnerAdapter;
+
+import com.actionbarsherlock.app.ActionBar;
+
+public class ActionBarWrapper extends ActionBar implements android.app.ActionBar.OnNavigationListener, android.app.ActionBar.OnMenuVisibilityListener {
+ private final Activity mActivity;
+ private final android.app.ActionBar mActionBar;
+ private ActionBar.OnNavigationListener mNavigationListener;
+ private Set<OnMenuVisibilityListener> mMenuVisibilityListeners = new HashSet<OnMenuVisibilityListener>(1);
+ private FragmentTransaction mFragmentTransaction;
+
+
+ public ActionBarWrapper(Activity activity) {
+ mActivity = activity;
+ mActionBar = activity.getActionBar();
+ if (mActionBar != null) {
+ mActionBar.addOnMenuVisibilityListener(this);
+
+ // Fixes issue #746
+ int displayOptions = mActionBar.getDisplayOptions();
+ mActionBar.setHomeButtonEnabled((displayOptions & DISPLAY_HOME_AS_UP) != 0);
+ }
+ }
+
+
+ @Override
+ public void setHomeButtonEnabled(boolean enabled) {
+ mActionBar.setHomeButtonEnabled(enabled);
+ }
+
+ @Override
+ public Context getThemedContext() {
+ return mActionBar.getThemedContext();
+ }
+
+ @Override
+ public void setCustomView(View view) {
+ mActionBar.setCustomView(view);
+ }
+
+ @Override
+ public void setCustomView(View view, LayoutParams layoutParams) {
+ android.app.ActionBar.LayoutParams lp = new android.app.ActionBar.LayoutParams(layoutParams);
+ lp.gravity = layoutParams.gravity;
+ lp.bottomMargin = layoutParams.bottomMargin;
+ lp.topMargin = layoutParams.topMargin;
+ lp.leftMargin = layoutParams.leftMargin;
+ lp.rightMargin = layoutParams.rightMargin;
+ mActionBar.setCustomView(view, lp);
+ }
+
+ @Override
+ public void setCustomView(int resId) {
+ mActionBar.setCustomView(resId);
+ }
+
+ @Override
+ public void setIcon(int resId) {
+ mActionBar.setIcon(resId);
+ }
+
+ @Override
+ public void setIcon(Drawable icon) {
+ mActionBar.setIcon(icon);
+ }
+
+ @Override
+ public void setLogo(int resId) {
+ mActionBar.setLogo(resId);
+ }
+
+ @Override
+ public void setLogo(Drawable logo) {
+ mActionBar.setLogo(logo);
+ }
+
+ @Override
+ public void setListNavigationCallbacks(SpinnerAdapter adapter, OnNavigationListener callback) {
+ mNavigationListener = callback;
+ mActionBar.setListNavigationCallbacks(adapter, (callback != null) ? this : null);
+ }
+
+ @Override
+ public boolean onNavigationItemSelected(int itemPosition, long itemId) {
+ //This should never be a NullPointerException since we only set
+ //ourselves as the listener when the callback is not null.
+ return mNavigationListener.onNavigationItemSelected(itemPosition, itemId);
+ }
+
+ @Override
+ public void setSelectedNavigationItem(int position) {
+ mActionBar.setSelectedNavigationItem(position);
+ }
+
+ @Override
+ public int getSelectedNavigationIndex() {
+ return mActionBar.getSelectedNavigationIndex();
+ }
+
+ @Override
+ public int getNavigationItemCount() {
+ return mActionBar.getNavigationItemCount();
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ mActionBar.setTitle(title);
+ }
+
+ @Override
+ public void setTitle(int resId) {
+ mActionBar.setTitle(resId);
+ }
+
+ @Override
+ public void setSubtitle(CharSequence subtitle) {
+ mActionBar.setSubtitle(subtitle);
+ }
+
+ @Override
+ public void setSubtitle(int resId) {
+ mActionBar.setSubtitle(resId);
+ }
+
+ @Override
+ public void setDisplayOptions(int options) {
+ mActionBar.setDisplayOptions(options);
+
+ // Fixes issue #746
+ mActionBar.setHomeButtonEnabled((options & DISPLAY_HOME_AS_UP) != 0);
+ }
+
+ @Override
+ public void setDisplayOptions(int options, int mask) {
+ mActionBar.setDisplayOptions(options, mask);
+
+ // Fixes issue #746
+ if ((mask & DISPLAY_HOME_AS_UP) != 0) {
+ mActionBar.setHomeButtonEnabled((options & DISPLAY_HOME_AS_UP) != 0);
+ }
+ }
+
+ @Override
+ public void setDisplayUseLogoEnabled(boolean useLogo) {
+ mActionBar.setDisplayUseLogoEnabled(useLogo);
+ }
+
+ @Override
+ public void setDisplayShowHomeEnabled(boolean showHome) {
+ mActionBar.setDisplayShowHomeEnabled(showHome);
+ }
+
+ @Override
+ public void setDisplayHomeAsUpEnabled(boolean showHomeAsUp) {
+ mActionBar.setDisplayHomeAsUpEnabled(showHomeAsUp);
+ }
+
+ @Override
+ public void setDisplayShowTitleEnabled(boolean showTitle) {
+ mActionBar.setDisplayShowTitleEnabled(showTitle);
+ }
+
+ @Override
+ public void setDisplayShowCustomEnabled(boolean showCustom) {
+ mActionBar.setDisplayShowCustomEnabled(showCustom);
+ }
+
+ @Override
+ public void setBackgroundDrawable(Drawable d) {
+ mActionBar.setBackgroundDrawable(d);
+ }
+
+ @Override
+ public void setStackedBackgroundDrawable(Drawable d) {
+ mActionBar.setStackedBackgroundDrawable(d);
+ }
+
+ @Override
+ public void setSplitBackgroundDrawable(Drawable d) {
+ mActionBar.setSplitBackgroundDrawable(d);
+ }
+
+ @Override
+ public View getCustomView() {
+ return mActionBar.getCustomView();
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return mActionBar.getTitle();
+ }
+
+ @Override
+ public CharSequence getSubtitle() {
+ return mActionBar.getSubtitle();
+ }
+
+ @Override
+ public int getNavigationMode() {
+ return mActionBar.getNavigationMode();
+ }
+
+ @Override
+ public void setNavigationMode(int mode) {
+ mActionBar.setNavigationMode(mode);
+ }
+
+ @Override
+ public int getDisplayOptions() {
+ return mActionBar.getDisplayOptions();
+ }
+
+ public class TabWrapper extends ActionBar.Tab implements android.app.ActionBar.TabListener {
+ final android.app.ActionBar.Tab mNativeTab;
+ private Object mTag;
+ private TabListener mListener;
+
+ public TabWrapper(android.app.ActionBar.Tab nativeTab) {
+ mNativeTab = nativeTab;
+ mNativeTab.setTag(this);
+ }
+
+ @Override
+ public int getPosition() {
+ return mNativeTab.getPosition();
+ }
+
+ @Override
+ public Drawable getIcon() {
+ return mNativeTab.getIcon();
+ }
+
+ @Override
+ public CharSequence getText() {
+ return mNativeTab.getText();
+ }
+
+ @Override
+ public Tab setIcon(Drawable icon) {
+ mNativeTab.setIcon(icon);
+ return this;
+ }
+
+ @Override
+ public Tab setIcon(int resId) {
+ mNativeTab.setIcon(resId);
+ return this;
+ }
+
+ @Override
+ public Tab setText(CharSequence text) {
+ mNativeTab.setText(text);
+ return this;
+ }
+
+ @Override
+ public Tab setText(int resId) {
+ mNativeTab.setText(resId);
+ return this;
+ }
+
+ @Override
+ public Tab setCustomView(View view) {
+ mNativeTab.setCustomView(view);
+ return this;
+ }
+
+ @Override
+ public Tab setCustomView(int layoutResId) {
+ mNativeTab.setCustomView(layoutResId);
+ return this;
+ }
+
+ @Override
+ public View getCustomView() {
+ return mNativeTab.getCustomView();
+ }
+
+ @Override
+ public Tab setTag(Object obj) {
+ mTag = obj;
+ return this;
+ }
+
+ @Override
+ public Object getTag() {
+ return mTag;
+ }
+
+ @Override
+ public Tab setTabListener(TabListener listener) {
+ mNativeTab.setTabListener(listener != null ? this : null);
+ mListener = listener;
+ return this;
+ }
+
+ @Override
+ public void select() {
+ mNativeTab.select();
+ }
+
+ @Override
+ public Tab setContentDescription(int resId) {
+ mNativeTab.setContentDescription(resId);
+ return this;
+ }
+
+ @Override
+ public Tab setContentDescription(CharSequence contentDesc) {
+ mNativeTab.setContentDescription(contentDesc);
+ return this;
+ }
+
+ @Override
+ public CharSequence getContentDescription() {
+ return mNativeTab.getContentDescription();
+ }
+
+ @Override
+ public void onTabReselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft) {
+ if (mListener != null) {
+ FragmentTransaction trans = null;
+ if (mActivity instanceof FragmentActivity) {
+ trans = ((FragmentActivity)mActivity).getSupportFragmentManager().beginTransaction()
+ .disallowAddToBackStack();
+ }
+
+ mListener.onTabReselected(this, trans);
+
+ if (trans != null && !trans.isEmpty()) {
+ trans.commit();
+ }
+ }
+ }
+
+ @Override
+ public void onTabSelected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft) {
+ if (mListener != null) {
+
+ if (mFragmentTransaction == null && mActivity instanceof FragmentActivity) {
+ mFragmentTransaction = ((FragmentActivity)mActivity).getSupportFragmentManager().beginTransaction()
+ .disallowAddToBackStack();
+ }
+
+ mListener.onTabSelected(this, mFragmentTransaction);
+
+ if (mFragmentTransaction != null) {
+ if (!mFragmentTransaction.isEmpty()) {
+ mFragmentTransaction.commit();
+ }
+ mFragmentTransaction = null;
+ }
+ }
+ }
+
+ @Override
+ public void onTabUnselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft) {
+ if (mListener != null) {
+ FragmentTransaction trans = null;
+ if (mActivity instanceof FragmentActivity) {
+ trans = ((FragmentActivity)mActivity).getSupportFragmentManager().beginTransaction()
+ .disallowAddToBackStack();
+ mFragmentTransaction = trans;
+ }
+
+ mListener.onTabUnselected(this, trans);
+ }
+ }
+ }
+
+ @Override
+ public Tab newTab() {
+ return new TabWrapper(mActionBar.newTab());
+ }
+
+ @Override
+ public void addTab(Tab tab) {
+ mActionBar.addTab(((TabWrapper)tab).mNativeTab);
+ }
+
+ @Override
+ public void addTab(Tab tab, boolean setSelected) {
+ mActionBar.addTab(((TabWrapper)tab).mNativeTab, setSelected);
+ }
+
+ @Override
+ public void addTab(Tab tab, int position) {
+ mActionBar.addTab(((TabWrapper)tab).mNativeTab, position);
+ }
+
+ @Override
+ public void addTab(Tab tab, int position, boolean setSelected) {
+ mActionBar.addTab(((TabWrapper)tab).mNativeTab, position, setSelected);
+ }
+
+ @Override
+ public void removeTab(Tab tab) {
+ mActionBar.removeTab(((TabWrapper)tab).mNativeTab);
+ }
+
+ @Override
+ public void removeTabAt(int position) {
+ mActionBar.removeTabAt(position);
+ }
+
+ @Override
+ public void removeAllTabs() {
+ mActionBar.removeAllTabs();
+ }
+
+ @Override
+ public void selectTab(Tab tab) {
+ mActionBar.selectTab(((TabWrapper)tab).mNativeTab);
+ }
+
+ @Override
+ public Tab getSelectedTab() {
+ android.app.ActionBar.Tab selected = mActionBar.getSelectedTab();
+ return (selected != null) ? (Tab)selected.getTag() : null;
+ }
+
+ @Override
+ public Tab getTabAt(int index) {
+ android.app.ActionBar.Tab selected = mActionBar.getTabAt(index);
+ return (selected != null) ? (Tab)selected.getTag() : null;
+ }
+
+ @Override
+ public int getTabCount() {
+ return mActionBar.getTabCount();
+ }
+
+ @Override
+ public int getHeight() {
+ return mActionBar.getHeight();
+ }
+
+ @Override
+ public void show() {
+ mActionBar.show();
+ }
+
+ @Override
+ public void hide() {
+ mActionBar.hide();
+ }
+
+ @Override
+ public boolean isShowing() {
+ return mActionBar.isShowing();
+ }
+
+ @Override
+ public void addOnMenuVisibilityListener(OnMenuVisibilityListener listener) {
+ mMenuVisibilityListeners.add(listener);
+ }
+
+ @Override
+ public void removeOnMenuVisibilityListener(OnMenuVisibilityListener listener) {
+ mMenuVisibilityListeners.remove(listener);
+ }
+
+ @Override
+ public void onMenuVisibilityChanged(boolean isVisible) {
+ for (OnMenuVisibilityListener listener : mMenuVisibilityListeners) {
+ listener.onMenuVisibilityChanged(isVisible);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Animator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Animator.java
new file mode 100644
index 0000000000..2caf5b4a96
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Animator.java
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import java.util.ArrayList;
+
+import android.view.animation.Interpolator;
+
+/**
+ * This is the superclass for classes which provide basic support for animations which can be
+ * started, ended, and have <code>AnimatorListeners</code> added to them.
+ */
+public abstract class Animator implements Cloneable {
+
+
+ /**
+ * The set of listeners to be sent events through the life of an animation.
+ */
+ ArrayList<AnimatorListener> mListeners = null;
+
+ /**
+ * Starts this animation. If the animation has a nonzero startDelay, the animation will start
+ * running after that delay elapses. A non-delayed animation will have its initial
+ * value(s) set immediately, followed by calls to
+ * {@link AnimatorListener#onAnimationStart(Animator)} for any listeners of this animator.
+ *
+ * <p>The animation started by calling this method will be run on the thread that called
+ * this method. This thread should have a Looper on it (a runtime exception will be thrown if
+ * this is not the case). Also, if the animation will animate
+ * properties of objects in the view hierarchy, then the calling thread should be the UI
+ * thread for that view hierarchy.</p>
+ *
+ */
+ public void start() {
+ }
+
+ /**
+ * Cancels the animation. Unlike {@link #end()}, <code>cancel()</code> causes the animation to
+ * stop in its tracks, sending an
+ * {@link android.animation.Animator.AnimatorListener#onAnimationCancel(Animator)} to
+ * its listeners, followed by an
+ * {@link android.animation.Animator.AnimatorListener#onAnimationEnd(Animator)} message.
+ *
+ * <p>This method must be called on the thread that is running the animation.</p>
+ */
+ public void cancel() {
+ }
+
+ /**
+ * Ends the animation. This causes the animation to assign the end value of the property being
+ * animated, then calling the
+ * {@link android.animation.Animator.AnimatorListener#onAnimationEnd(Animator)} method on
+ * its listeners.
+ *
+ * <p>This method must be called on the thread that is running the animation.</p>
+ */
+ public void end() {
+ }
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+ *
+ * @return the number of milliseconds to delay running the animation
+ */
+ public abstract long getStartDelay();
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+
+ * @param startDelay The amount of the delay, in milliseconds
+ */
+ public abstract void setStartDelay(long startDelay);
+
+
+ /**
+ * Sets the length of the animation.
+ *
+ * @param duration The length of the animation, in milliseconds.
+ */
+ public abstract Animator setDuration(long duration);
+
+ /**
+ * Gets the length of the animation.
+ *
+ * @return The length of the animation, in milliseconds.
+ */
+ public abstract long getDuration();
+
+ /**
+ * The time interpolator used in calculating the elapsed fraction of this animation. The
+ * interpolator determines whether the animation runs with linear or non-linear motion,
+ * such as acceleration and deceleration. The default value is
+ * {@link android.view.animation.AccelerateDecelerateInterpolator}
+ *
+ * @param value the interpolator to be used by this animation
+ */
+ public abstract void setInterpolator(/*Time*/Interpolator value);
+
+ /**
+ * Returns whether this Animator is currently running (having been started and gone past any
+ * initial startDelay period and not yet ended).
+ *
+ * @return Whether the Animator is running.
+ */
+ public abstract boolean isRunning();
+
+ /**
+ * Returns whether this Animator has been started and not yet ended. This state is a superset
+ * of the state of {@link #isRunning()}, because an Animator with a nonzero
+ * {@link #getStartDelay() startDelay} will return true for {@link #isStarted()} during the
+ * delay phase, whereas {@link #isRunning()} will return true only after the delay phase
+ * is complete.
+ *
+ * @return Whether the Animator has been started and not yet ended.
+ */
+ public boolean isStarted() {
+ // Default method returns value for isRunning(). Subclasses should override to return a
+ // real value.
+ return isRunning();
+ }
+
+ /**
+ * Adds a listener to the set of listeners that are sent events through the life of an
+ * animation, such as start, repeat, and end.
+ *
+ * @param listener the listener to be added to the current set of listeners for this animation.
+ */
+ public void addListener(AnimatorListener listener) {
+ if (mListeners == null) {
+ mListeners = new ArrayList<AnimatorListener>();
+ }
+ mListeners.add(listener);
+ }
+
+ /**
+ * Removes a listener from the set listening to this animation.
+ *
+ * @param listener the listener to be removed from the current set of listeners for this
+ * animation.
+ */
+ public void removeListener(AnimatorListener listener) {
+ if (mListeners == null) {
+ return;
+ }
+ mListeners.remove(listener);
+ if (mListeners.size() == 0) {
+ mListeners = null;
+ }
+ }
+
+ /**
+ * Gets the set of {@link android.animation.Animator.AnimatorListener} objects that are currently
+ * listening for events on this <code>Animator</code> object.
+ *
+ * @return ArrayList<AnimatorListener> The set of listeners.
+ */
+ public ArrayList<AnimatorListener> getListeners() {
+ return mListeners;
+ }
+
+ /**
+ * Removes all listeners from this object. This is equivalent to calling
+ * <code>getListeners()</code> followed by calling <code>clear()</code> on the
+ * returned list of listeners.
+ */
+ public void removeAllListeners() {
+ if (mListeners != null) {
+ mListeners.clear();
+ mListeners = null;
+ }
+ }
+
+ @Override
+ public Animator clone() {
+ try {
+ final Animator anim = (Animator) super.clone();
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> oldListeners = mListeners;
+ anim.mListeners = new ArrayList<AnimatorListener>();
+ int numListeners = oldListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ anim.mListeners.add(oldListeners.get(i));
+ }
+ }
+ return anim;
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError();
+ }
+ }
+
+ /**
+ * This method tells the object to use appropriate information to extract
+ * starting values for the animation. For example, a AnimatorSet object will pass
+ * this call to its child objects to tell them to set up the values. A
+ * ObjectAnimator object will use the information it has about its target object
+ * and PropertyValuesHolder objects to get the start values for its properties.
+ * An ValueAnimator object will ignore the request since it does not have enough
+ * information (such as a target object) to gather these values.
+ */
+ public void setupStartValues() {
+ }
+
+ /**
+ * This method tells the object to use appropriate information to extract
+ * ending values for the animation. For example, a AnimatorSet object will pass
+ * this call to its child objects to tell them to set up the values. A
+ * ObjectAnimator object will use the information it has about its target object
+ * and PropertyValuesHolder objects to get the start values for its properties.
+ * An ValueAnimator object will ignore the request since it does not have enough
+ * information (such as a target object) to gather these values.
+ */
+ public void setupEndValues() {
+ }
+
+ /**
+ * Sets the target object whose property will be animated by this animation. Not all subclasses
+ * operate on target objects (for example, {@link ValueAnimator}, but this method
+ * is on the superclass for the convenience of dealing generically with those subclasses
+ * that do handle targets.
+ *
+ * @param target The object being animated
+ */
+ public void setTarget(Object target) {
+ }
+
+ /**
+ * <p>An animation listener receives notifications from an animation.
+ * Notifications indicate animation related events, such as the end or the
+ * repetition of the animation.</p>
+ */
+ public static interface AnimatorListener {
+ /**
+ * <p>Notifies the start of the animation.</p>
+ *
+ * @param animation The started animation.
+ */
+ void onAnimationStart(Animator animation);
+
+ /**
+ * <p>Notifies the end of the animation. This callback is not invoked
+ * for animations with repeat count set to INFINITE.</p>
+ *
+ * @param animation The animation which reached its end.
+ */
+ void onAnimationEnd(Animator animation);
+
+ /**
+ * <p>Notifies the cancellation of the animation. This callback is not invoked
+ * for animations with repeat count set to INFINITE.</p>
+ *
+ * @param animation The animation which was canceled.
+ */
+ void onAnimationCancel(Animator animation);
+
+ /**
+ * <p>Notifies the repetition of the animation.</p>
+ *
+ * @param animation The animation which was repeated.
+ */
+ void onAnimationRepeat(Animator animation);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorListenerAdapter.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorListenerAdapter.java
new file mode 100644
index 0000000000..02ddff48d2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorListenerAdapter.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+/**
+ * This adapter class provides empty implementations of the methods from {@link android.animation.Animator.AnimatorListener}.
+ * Any custom listener that cares only about a subset of the methods of this listener can
+ * simply subclass this adapter class instead of implementing the interface directly.
+ */
+public abstract class AnimatorListenerAdapter implements Animator.AnimatorListener {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationStart(Animator animation) {
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorSet.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorSet.java
new file mode 100644
index 0000000000..3231080c44
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/AnimatorSet.java
@@ -0,0 +1,1111 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+
+import android.view.animation.Interpolator;
+
+/**
+ * This class plays a set of {@link Animator} objects in the specified order. Animations
+ * can be set up to play together, in sequence, or after a specified delay.
+ *
+ * <p>There are two different approaches to adding animations to a <code>AnimatorSet</code>:
+ * either the {@link AnimatorSet#playTogether(Animator[]) playTogether()} or
+ * {@link AnimatorSet#playSequentially(Animator[]) playSequentially()} methods can be called to add
+ * a set of animations all at once, or the {@link AnimatorSet#play(Animator)} can be
+ * used in conjunction with methods in the {@link AnimatorSet.Builder Builder}
+ * class to add animations
+ * one by one.</p>
+ *
+ * <p>It is possible to set up a <code>AnimatorSet</code> with circular dependencies between
+ * its animations. For example, an animation a1 could be set up to start before animation a2, a2
+ * before a3, and a3 before a1. The results of this configuration are undefined, but will typically
+ * result in none of the affected animations being played. Because of this (and because
+ * circular dependencies do not make logical sense anyway), circular dependencies
+ * should be avoided, and the dependency flow of animations should only be in one direction.
+ */
+@SuppressWarnings("unchecked")
+public final class AnimatorSet extends Animator {
+
+ /**
+ * Internal variables
+ * NOTE: This object implements the clone() method, making a deep copy of any referenced
+ * objects. As other non-trivial fields are added to this class, make sure to add logic
+ * to clone() to make deep copies of them.
+ */
+
+ /**
+ * Tracks animations currently being played, so that we know what to
+ * cancel or end when cancel() or end() is called on this AnimatorSet
+ */
+ private ArrayList<Animator> mPlayingSet = new ArrayList<Animator>();
+
+ /**
+ * Contains all nodes, mapped to their respective Animators. When new
+ * dependency information is added for an Animator, we want to add it
+ * to a single node representing that Animator, not create a new Node
+ * if one already exists.
+ */
+ private HashMap<Animator, Node> mNodeMap = new HashMap<Animator, Node>();
+
+ /**
+ * Set of all nodes created for this AnimatorSet. This list is used upon
+ * starting the set, and the nodes are placed in sorted order into the
+ * sortedNodes collection.
+ */
+ private ArrayList<Node> mNodes = new ArrayList<Node>();
+
+ /**
+ * The sorted list of nodes. This is the order in which the animations will
+ * be played. The details about when exactly they will be played depend
+ * on the dependency relationships of the nodes.
+ */
+ private ArrayList<Node> mSortedNodes = new ArrayList<Node>();
+
+ /**
+ * Flag indicating whether the nodes should be sorted prior to playing. This
+ * flag allows us to cache the previous sorted nodes so that if the sequence
+ * is replayed with no changes, it does not have to re-sort the nodes again.
+ */
+ private boolean mNeedsSort = true;
+
+ private AnimatorSetListener mSetListener = null;
+
+ /**
+ * Flag indicating that the AnimatorSet has been manually
+ * terminated (by calling cancel() or end()).
+ * This flag is used to avoid starting other animations when currently-playing
+ * child animations of this AnimatorSet end. It also determines whether cancel/end
+ * notifications are sent out via the normal AnimatorSetListener mechanism.
+ */
+ boolean mTerminated = false;
+
+ /**
+ * Indicates whether an AnimatorSet has been start()'d, whether or
+ * not there is a nonzero startDelay.
+ */
+ private boolean mStarted = false;
+
+ // The amount of time in ms to delay starting the animation after start() is called
+ private long mStartDelay = 0;
+
+ // Animator used for a nonzero startDelay
+ private ValueAnimator mDelayAnim = null;
+
+
+ // How long the child animations should last in ms. The default value is negative, which
+ // simply means that there is no duration set on the AnimatorSet. When a real duration is
+ // set, it is passed along to the child animations.
+ private long mDuration = -1;
+
+
+ /**
+ * Sets up this AnimatorSet to play all of the supplied animations at the same time.
+ *
+ * @param items The animations that will be started simultaneously.
+ */
+ public void playTogether(Animator... items) {
+ if (items != null) {
+ mNeedsSort = true;
+ Builder builder = play(items[0]);
+ for (int i = 1; i < items.length; ++i) {
+ builder.with(items[i]);
+ }
+ }
+ }
+
+ /**
+ * Sets up this AnimatorSet to play all of the supplied animations at the same time.
+ *
+ * @param items The animations that will be started simultaneously.
+ */
+ public void playTogether(Collection<Animator> items) {
+ if (items != null && items.size() > 0) {
+ mNeedsSort = true;
+ Builder builder = null;
+ for (Animator anim : items) {
+ if (builder == null) {
+ builder = play(anim);
+ } else {
+ builder.with(anim);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets up this AnimatorSet to play each of the supplied animations when the
+ * previous animation ends.
+ *
+ * @param items The animations that will be started one after another.
+ */
+ public void playSequentially(Animator... items) {
+ if (items != null) {
+ mNeedsSort = true;
+ if (items.length == 1) {
+ play(items[0]);
+ } else {
+ for (int i = 0; i < items.length - 1; ++i) {
+ play(items[i]).before(items[i+1]);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets up this AnimatorSet to play each of the supplied animations when the
+ * previous animation ends.
+ *
+ * @param items The animations that will be started one after another.
+ */
+ public void playSequentially(List<Animator> items) {
+ if (items != null && items.size() > 0) {
+ mNeedsSort = true;
+ if (items.size() == 1) {
+ play(items.get(0));
+ } else {
+ for (int i = 0; i < items.size() - 1; ++i) {
+ play(items.get(i)).before(items.get(i+1));
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the current list of child Animator objects controlled by this
+ * AnimatorSet. This is a copy of the internal list; modifications to the returned list
+ * will not affect the AnimatorSet, although changes to the underlying Animator objects
+ * will affect those objects being managed by the AnimatorSet.
+ *
+ * @return ArrayList<Animator> The list of child animations of this AnimatorSet.
+ */
+ public ArrayList<Animator> getChildAnimations() {
+ ArrayList<Animator> childList = new ArrayList<Animator>();
+ for (Node node : mNodes) {
+ childList.add(node.animation);
+ }
+ return childList;
+ }
+
+ /**
+ * Sets the target object for all current {@link #getChildAnimations() child animations}
+ * of this AnimatorSet that take targets ({@link ObjectAnimator} and
+ * AnimatorSet).
+ *
+ * @param target The object being animated
+ */
+ @Override
+ public void setTarget(Object target) {
+ for (Node node : mNodes) {
+ Animator animation = node.animation;
+ if (animation instanceof AnimatorSet) {
+ ((AnimatorSet)animation).setTarget(target);
+ } else if (animation instanceof ObjectAnimator) {
+ ((ObjectAnimator)animation).setTarget(target);
+ }
+ }
+ }
+
+ /**
+ * Sets the TimeInterpolator for all current {@link #getChildAnimations() child animations}
+ * of this AnimatorSet.
+ *
+ * @param interpolator the interpolator to be used by each child animation of this AnimatorSet
+ */
+ @Override
+ public void setInterpolator(/*Time*/Interpolator interpolator) {
+ for (Node node : mNodes) {
+ node.animation.setInterpolator(interpolator);
+ }
+ }
+
+ /**
+ * This method creates a <code>Builder</code> object, which is used to
+ * set up playing constraints. This initial <code>play()</code> method
+ * tells the <code>Builder</code> the animation that is the dependency for
+ * the succeeding commands to the <code>Builder</code>. For example,
+ * calling <code>play(a1).with(a2)</code> sets up the AnimatorSet to play
+ * <code>a1</code> and <code>a2</code> at the same time,
+ * <code>play(a1).before(a2)</code> sets up the AnimatorSet to play
+ * <code>a1</code> first, followed by <code>a2</code>, and
+ * <code>play(a1).after(a2)</code> sets up the AnimatorSet to play
+ * <code>a2</code> first, followed by <code>a1</code>.
+ *
+ * <p>Note that <code>play()</code> is the only way to tell the
+ * <code>Builder</code> the animation upon which the dependency is created,
+ * so successive calls to the various functions in <code>Builder</code>
+ * will all refer to the initial parameter supplied in <code>play()</code>
+ * as the dependency of the other animations. For example, calling
+ * <code>play(a1).before(a2).before(a3)</code> will play both <code>a2</code>
+ * and <code>a3</code> when a1 ends; it does not set up a dependency between
+ * <code>a2</code> and <code>a3</code>.</p>
+ *
+ * @param anim The animation that is the dependency used in later calls to the
+ * methods in the returned <code>Builder</code> object. A null parameter will result
+ * in a null <code>Builder</code> return value.
+ * @return Builder The object that constructs the AnimatorSet based on the dependencies
+ * outlined in the calls to <code>play</code> and the other methods in the
+ * <code>Builder</code object.
+ */
+ public Builder play(Animator anim) {
+ if (anim != null) {
+ mNeedsSort = true;
+ return new Builder(anim);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Note that canceling a <code>AnimatorSet</code> also cancels all of the animations that it
+ * is responsible for.</p>
+ */
+ @Override
+ public void cancel() {
+ mTerminated = true;
+ if (isStarted()) {
+ ArrayList<AnimatorListener> tmpListeners = null;
+ if (mListeners != null) {
+ tmpListeners = (ArrayList<AnimatorListener>) mListeners.clone();
+ for (AnimatorListener listener : tmpListeners) {
+ listener.onAnimationCancel(this);
+ }
+ }
+ if (mDelayAnim != null && mDelayAnim.isRunning()) {
+ // If we're currently in the startDelay period, just cancel that animator and
+ // send out the end event to all listeners
+ mDelayAnim.cancel();
+ } else if (mSortedNodes.size() > 0) {
+ for (Node node : mSortedNodes) {
+ node.animation.cancel();
+ }
+ }
+ if (tmpListeners != null) {
+ for (AnimatorListener listener : tmpListeners) {
+ listener.onAnimationEnd(this);
+ }
+ }
+ mStarted = false;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Note that ending a <code>AnimatorSet</code> also ends all of the animations that it is
+ * responsible for.</p>
+ */
+ @Override
+ public void end() {
+ mTerminated = true;
+ if (isStarted()) {
+ if (mSortedNodes.size() != mNodes.size()) {
+ // hasn't been started yet - sort the nodes now, then end them
+ sortNodes();
+ for (Node node : mSortedNodes) {
+ if (mSetListener == null) {
+ mSetListener = new AnimatorSetListener(this);
+ }
+ node.animation.addListener(mSetListener);
+ }
+ }
+ if (mDelayAnim != null) {
+ mDelayAnim.cancel();
+ }
+ if (mSortedNodes.size() > 0) {
+ for (Node node : mSortedNodes) {
+ node.animation.end();
+ }
+ }
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ for (AnimatorListener listener : tmpListeners) {
+ listener.onAnimationEnd(this);
+ }
+ }
+ mStarted = false;
+ }
+ }
+
+ /**
+ * Returns true if any of the child animations of this AnimatorSet have been started and have
+ * not yet ended.
+ * @return Whether this AnimatorSet has been started and has not yet ended.
+ */
+ @Override
+ public boolean isRunning() {
+ for (Node node : mNodes) {
+ if (node.animation.isRunning()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isStarted() {
+ return mStarted;
+ }
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+ *
+ * @return the number of milliseconds to delay running the animation
+ */
+ @Override
+ public long getStartDelay() {
+ return mStartDelay;
+ }
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+
+ * @param startDelay The amount of the delay, in milliseconds
+ */
+ @Override
+ public void setStartDelay(long startDelay) {
+ mStartDelay = startDelay;
+ }
+
+ /**
+ * Gets the length of each of the child animations of this AnimatorSet. This value may
+ * be less than 0, which indicates that no duration has been set on this AnimatorSet
+ * and each of the child animations will use their own duration.
+ *
+ * @return The length of the animation, in milliseconds, of each of the child
+ * animations of this AnimatorSet.
+ */
+ @Override
+ public long getDuration() {
+ return mDuration;
+ }
+
+ /**
+ * Sets the length of each of the current child animations of this AnimatorSet. By default,
+ * each child animation will use its own duration. If the duration is set on the AnimatorSet,
+ * then each child animation inherits this duration.
+ *
+ * @param duration The length of the animation, in milliseconds, of each of the child
+ * animations of this AnimatorSet.
+ */
+ @Override
+ public AnimatorSet setDuration(long duration) {
+ if (duration < 0) {
+ throw new IllegalArgumentException("duration must be a value of zero or greater");
+ }
+ for (Node node : mNodes) {
+ // TODO: don't set the duration of the timing-only nodes created by AnimatorSet to
+ // insert "play-after" delays
+ node.animation.setDuration(duration);
+ }
+ mDuration = duration;
+ return this;
+ }
+
+ @Override
+ public void setupStartValues() {
+ for (Node node : mNodes) {
+ node.animation.setupStartValues();
+ }
+ }
+
+ @Override
+ public void setupEndValues() {
+ for (Node node : mNodes) {
+ node.animation.setupEndValues();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Starting this <code>AnimatorSet</code> will, in turn, start the animations for which
+ * it is responsible. The details of when exactly those animations are started depends on
+ * the dependency relationships that have been set up between the animations.
+ */
+ @Override
+ public void start() {
+ mTerminated = false;
+ mStarted = true;
+
+ // First, sort the nodes (if necessary). This will ensure that sortedNodes
+ // contains the animation nodes in the correct order.
+ sortNodes();
+
+ int numSortedNodes = mSortedNodes.size();
+ for (int i = 0; i < numSortedNodes; ++i) {
+ Node node = mSortedNodes.get(i);
+ // First, clear out the old listeners
+ ArrayList<AnimatorListener> oldListeners = node.animation.getListeners();
+ if (oldListeners != null && oldListeners.size() > 0) {
+ final ArrayList<AnimatorListener> clonedListeners = new
+ ArrayList<AnimatorListener>(oldListeners);
+
+ for (AnimatorListener listener : clonedListeners) {
+ if (listener instanceof DependencyListener ||
+ listener instanceof AnimatorSetListener) {
+ node.animation.removeListener(listener);
+ }
+ }
+ }
+ }
+
+ // nodesToStart holds the list of nodes to be started immediately. We don't want to
+ // start the animations in the loop directly because we first need to set up
+ // dependencies on all of the nodes. For example, we don't want to start an animation
+ // when some other animation also wants to start when the first animation begins.
+ final ArrayList<Node> nodesToStart = new ArrayList<Node>();
+ for (int i = 0; i < numSortedNodes; ++i) {
+ Node node = mSortedNodes.get(i);
+ if (mSetListener == null) {
+ mSetListener = new AnimatorSetListener(this);
+ }
+ if (node.dependencies == null || node.dependencies.size() == 0) {
+ nodesToStart.add(node);
+ } else {
+ int numDependencies = node.dependencies.size();
+ for (int j = 0; j < numDependencies; ++j) {
+ Dependency dependency = node.dependencies.get(j);
+ dependency.node.animation.addListener(
+ new DependencyListener(this, node, dependency.rule));
+ }
+ node.tmpDependencies = (ArrayList<Dependency>) node.dependencies.clone();
+ }
+ node.animation.addListener(mSetListener);
+ }
+ // Now that all dependencies are set up, start the animations that should be started.
+ if (mStartDelay <= 0) {
+ for (Node node : nodesToStart) {
+ node.animation.start();
+ mPlayingSet.add(node.animation);
+ }
+ } else {
+ mDelayAnim = ValueAnimator.ofFloat(0f, 1f);
+ mDelayAnim.setDuration(mStartDelay);
+ mDelayAnim.addListener(new AnimatorListenerAdapter() {
+ boolean canceled = false;
+ public void onAnimationCancel(Animator anim) {
+ canceled = true;
+ }
+ public void onAnimationEnd(Animator anim) {
+ if (!canceled) {
+ int numNodes = nodesToStart.size();
+ for (int i = 0; i < numNodes; ++i) {
+ Node node = nodesToStart.get(i);
+ node.animation.start();
+ mPlayingSet.add(node.animation);
+ }
+ }
+ }
+ });
+ mDelayAnim.start();
+ }
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationStart(this);
+ }
+ }
+ if (mNodes.size() == 0 && mStartDelay == 0) {
+ // Handle unusual case where empty AnimatorSet is started - should send out
+ // end event immediately since the event will not be sent out at all otherwise
+ mStarted = false;
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationEnd(this);
+ }
+ }
+ }
+ }
+
+ @Override
+ public AnimatorSet clone() {
+ final AnimatorSet anim = (AnimatorSet) super.clone();
+ /*
+ * The basic clone() operation copies all items. This doesn't work very well for
+ * AnimatorSet, because it will copy references that need to be recreated and state
+ * that may not apply. What we need to do now is put the clone in an uninitialized
+ * state, with fresh, empty data structures. Then we will build up the nodes list
+ * manually, as we clone each Node (and its animation). The clone will then be sorted,
+ * and will populate any appropriate lists, when it is started.
+ */
+ anim.mNeedsSort = true;
+ anim.mTerminated = false;
+ anim.mStarted = false;
+ anim.mPlayingSet = new ArrayList<Animator>();
+ anim.mNodeMap = new HashMap<Animator, Node>();
+ anim.mNodes = new ArrayList<Node>();
+ anim.mSortedNodes = new ArrayList<Node>();
+
+ // Walk through the old nodes list, cloning each node and adding it to the new nodemap.
+ // One problem is that the old node dependencies point to nodes in the old AnimatorSet.
+ // We need to track the old/new nodes in order to reconstruct the dependencies in the clone.
+ HashMap<Node, Node> nodeCloneMap = new HashMap<Node, Node>(); // <old, new>
+ for (Node node : mNodes) {
+ Node nodeClone = node.clone();
+ nodeCloneMap.put(node, nodeClone);
+ anim.mNodes.add(nodeClone);
+ anim.mNodeMap.put(nodeClone.animation, nodeClone);
+ // Clear out the dependencies in the clone; we'll set these up manually later
+ nodeClone.dependencies = null;
+ nodeClone.tmpDependencies = null;
+ nodeClone.nodeDependents = null;
+ nodeClone.nodeDependencies = null;
+ // clear out any listeners that were set up by the AnimatorSet; these will
+ // be set up when the clone's nodes are sorted
+ ArrayList<AnimatorListener> cloneListeners = nodeClone.animation.getListeners();
+ if (cloneListeners != null) {
+ ArrayList<AnimatorListener> listenersToRemove = null;
+ for (AnimatorListener listener : cloneListeners) {
+ if (listener instanceof AnimatorSetListener) {
+ if (listenersToRemove == null) {
+ listenersToRemove = new ArrayList<AnimatorListener>();
+ }
+ listenersToRemove.add(listener);
+ }
+ }
+ if (listenersToRemove != null) {
+ for (AnimatorListener listener : listenersToRemove) {
+ cloneListeners.remove(listener);
+ }
+ }
+ }
+ }
+ // Now that we've cloned all of the nodes, we're ready to walk through their
+ // dependencies, mapping the old dependencies to the new nodes
+ for (Node node : mNodes) {
+ Node nodeClone = nodeCloneMap.get(node);
+ if (node.dependencies != null) {
+ for (Dependency dependency : node.dependencies) {
+ Node clonedDependencyNode = nodeCloneMap.get(dependency.node);
+ Dependency cloneDependency = new Dependency(clonedDependencyNode,
+ dependency.rule);
+ nodeClone.addDependency(cloneDependency);
+ }
+ }
+ }
+
+ return anim;
+ }
+
+ /**
+ * This class is the mechanism by which animations are started based on events in other
+ * animations. If an animation has multiple dependencies on other animations, then
+ * all dependencies must be satisfied before the animation is started.
+ */
+ private static class DependencyListener implements AnimatorListener {
+
+ private AnimatorSet mAnimatorSet;
+
+ // The node upon which the dependency is based.
+ private Node mNode;
+
+ // The Dependency rule (WITH or AFTER) that the listener should wait for on
+ // the node
+ private int mRule;
+
+ public DependencyListener(AnimatorSet animatorSet, Node node, int rule) {
+ this.mAnimatorSet = animatorSet;
+ this.mNode = node;
+ this.mRule = rule;
+ }
+
+ /**
+ * Ignore cancel events for now. We may want to handle this eventually,
+ * to prevent follow-on animations from running when some dependency
+ * animation is canceled.
+ */
+ public void onAnimationCancel(Animator animation) {
+ }
+
+ /**
+ * An end event is received - see if this is an event we are listening for
+ */
+ public void onAnimationEnd(Animator animation) {
+ if (mRule == Dependency.AFTER) {
+ startIfReady(animation);
+ }
+ }
+
+ /**
+ * Ignore repeat events for now
+ */
+ public void onAnimationRepeat(Animator animation) {
+ }
+
+ /**
+ * A start event is received - see if this is an event we are listening for
+ */
+ public void onAnimationStart(Animator animation) {
+ if (mRule == Dependency.WITH) {
+ startIfReady(animation);
+ }
+ }
+
+ /**
+ * Check whether the event received is one that the node was waiting for.
+ * If so, mark it as complete and see whether it's time to start
+ * the animation.
+ * @param dependencyAnimation the animation that sent the event.
+ */
+ private void startIfReady(Animator dependencyAnimation) {
+ if (mAnimatorSet.mTerminated) {
+ // if the parent AnimatorSet was canceled, then don't start any dependent anims
+ return;
+ }
+ Dependency dependencyToRemove = null;
+ int numDependencies = mNode.tmpDependencies.size();
+ for (int i = 0; i < numDependencies; ++i) {
+ Dependency dependency = mNode.tmpDependencies.get(i);
+ if (dependency.rule == mRule &&
+ dependency.node.animation == dependencyAnimation) {
+ // rule fired - remove the dependency and listener and check to
+ // see whether it's time to start the animation
+ dependencyToRemove = dependency;
+ dependencyAnimation.removeListener(this);
+ break;
+ }
+ }
+ mNode.tmpDependencies.remove(dependencyToRemove);
+ if (mNode.tmpDependencies.size() == 0) {
+ // all dependencies satisfied: start the animation
+ mNode.animation.start();
+ mAnimatorSet.mPlayingSet.add(mNode.animation);
+ }
+ }
+
+ }
+
+ private class AnimatorSetListener implements AnimatorListener {
+
+ private AnimatorSet mAnimatorSet;
+
+ AnimatorSetListener(AnimatorSet animatorSet) {
+ mAnimatorSet = animatorSet;
+ }
+
+ public void onAnimationCancel(Animator animation) {
+ if (!mTerminated) {
+ // Listeners are already notified of the AnimatorSet canceling in cancel().
+ // The logic below only kicks in when animations end normally
+ if (mPlayingSet.size() == 0) {
+ if (mListeners != null) {
+ int numListeners = mListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ mListeners.get(i).onAnimationCancel(mAnimatorSet);
+ }
+ }
+ }
+ }
+ }
+
+ public void onAnimationEnd(Animator animation) {
+ animation.removeListener(this);
+ mPlayingSet.remove(animation);
+ Node animNode = mAnimatorSet.mNodeMap.get(animation);
+ animNode.done = true;
+ if (!mTerminated) {
+ // Listeners are already notified of the AnimatorSet ending in cancel() or
+ // end(); the logic below only kicks in when animations end normally
+ ArrayList<Node> sortedNodes = mAnimatorSet.mSortedNodes;
+ boolean allDone = true;
+ int numSortedNodes = sortedNodes.size();
+ for (int i = 0; i < numSortedNodes; ++i) {
+ if (!sortedNodes.get(i).done) {
+ allDone = false;
+ break;
+ }
+ }
+ if (allDone) {
+ // If this was the last child animation to end, then notify listeners that this
+ // AnimatorSet has ended
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationEnd(mAnimatorSet);
+ }
+ }
+ mAnimatorSet.mStarted = false;
+ }
+ }
+ }
+
+ // Nothing to do
+ public void onAnimationRepeat(Animator animation) {
+ }
+
+ // Nothing to do
+ public void onAnimationStart(Animator animation) {
+ }
+
+ }
+
+ /**
+ * This method sorts the current set of nodes, if needed. The sort is a simple
+ * DependencyGraph sort, which goes like this:
+ * - All nodes without dependencies become 'roots'
+ * - while roots list is not null
+ * - for each root r
+ * - add r to sorted list
+ * - remove r as a dependency from any other node
+ * - any nodes with no dependencies are added to the roots list
+ */
+ private void sortNodes() {
+ if (mNeedsSort) {
+ mSortedNodes.clear();
+ ArrayList<Node> roots = new ArrayList<Node>();
+ int numNodes = mNodes.size();
+ for (int i = 0; i < numNodes; ++i) {
+ Node node = mNodes.get(i);
+ if (node.dependencies == null || node.dependencies.size() == 0) {
+ roots.add(node);
+ }
+ }
+ ArrayList<Node> tmpRoots = new ArrayList<Node>();
+ while (roots.size() > 0) {
+ int numRoots = roots.size();
+ for (int i = 0; i < numRoots; ++i) {
+ Node root = roots.get(i);
+ mSortedNodes.add(root);
+ if (root.nodeDependents != null) {
+ int numDependents = root.nodeDependents.size();
+ for (int j = 0; j < numDependents; ++j) {
+ Node node = root.nodeDependents.get(j);
+ node.nodeDependencies.remove(root);
+ if (node.nodeDependencies.size() == 0) {
+ tmpRoots.add(node);
+ }
+ }
+ }
+ }
+ roots.clear();
+ roots.addAll(tmpRoots);
+ tmpRoots.clear();
+ }
+ mNeedsSort = false;
+ if (mSortedNodes.size() != mNodes.size()) {
+ throw new IllegalStateException("Circular dependencies cannot exist"
+ + " in AnimatorSet");
+ }
+ } else {
+ // Doesn't need sorting, but still need to add in the nodeDependencies list
+ // because these get removed as the event listeners fire and the dependencies
+ // are satisfied
+ int numNodes = mNodes.size();
+ for (int i = 0; i < numNodes; ++i) {
+ Node node = mNodes.get(i);
+ if (node.dependencies != null && node.dependencies.size() > 0) {
+ int numDependencies = node.dependencies.size();
+ for (int j = 0; j < numDependencies; ++j) {
+ Dependency dependency = node.dependencies.get(j);
+ if (node.nodeDependencies == null) {
+ node.nodeDependencies = new ArrayList<Node>();
+ }
+ if (!node.nodeDependencies.contains(dependency.node)) {
+ node.nodeDependencies.add(dependency.node);
+ }
+ }
+ }
+ // nodes are 'done' by default; they become un-done when started, and done
+ // again when ended
+ node.done = false;
+ }
+ }
+ }
+
+ /**
+ * Dependency holds information about the node that some other node is
+ * dependent upon and the nature of that dependency.
+ *
+ */
+ private static class Dependency {
+ static final int WITH = 0; // dependent node must start with this dependency node
+ static final int AFTER = 1; // dependent node must start when this dependency node finishes
+
+ // The node that the other node with this Dependency is dependent upon
+ public Node node;
+
+ // The nature of the dependency (WITH or AFTER)
+ public int rule;
+
+ public Dependency(Node node, int rule) {
+ this.node = node;
+ this.rule = rule;
+ }
+ }
+
+ /**
+ * A Node is an embodiment of both the Animator that it wraps as well as
+ * any dependencies that are associated with that Animation. This includes
+ * both dependencies upon other nodes (in the dependencies list) as
+ * well as dependencies of other nodes upon this (in the nodeDependents list).
+ */
+ private static class Node implements Cloneable {
+ public Animator animation;
+
+ /**
+ * These are the dependencies that this node's animation has on other
+ * nodes. For example, if this node's animation should begin with some
+ * other animation ends, then there will be an item in this node's
+ * dependencies list for that other animation's node.
+ */
+ public ArrayList<Dependency> dependencies = null;
+
+ /**
+ * tmpDependencies is a runtime detail. We use the dependencies list for sorting.
+ * But we also use the list to keep track of when multiple dependencies are satisfied,
+ * but removing each dependency as it is satisfied. We do not want to remove
+ * the dependency itself from the list, because we need to retain that information
+ * if the AnimatorSet is launched in the future. So we create a copy of the dependency
+ * list when the AnimatorSet starts and use this tmpDependencies list to track the
+ * list of satisfied dependencies.
+ */
+ public ArrayList<Dependency> tmpDependencies = null;
+
+ /**
+ * nodeDependencies is just a list of the nodes that this Node is dependent upon.
+ * This information is used in sortNodes(), to determine when a node is a root.
+ */
+ public ArrayList<Node> nodeDependencies = null;
+
+ /**
+ * nodeDepdendents is the list of nodes that have this node as a dependency. This
+ * is a utility field used in sortNodes to facilitate removing this node as a
+ * dependency when it is a root node.
+ */
+ public ArrayList<Node> nodeDependents = null;
+
+ /**
+ * Flag indicating whether the animation in this node is finished. This flag
+ * is used by AnimatorSet to check, as each animation ends, whether all child animations
+ * are done and it's time to send out an end event for the entire AnimatorSet.
+ */
+ public boolean done = false;
+
+ /**
+ * Constructs the Node with the animation that it encapsulates. A Node has no
+ * dependencies by default; dependencies are added via the addDependency()
+ * method.
+ *
+ * @param animation The animation that the Node encapsulates.
+ */
+ public Node(Animator animation) {
+ this.animation = animation;
+ }
+
+ /**
+ * Add a dependency to this Node. The dependency includes information about the
+ * node that this node is dependency upon and the nature of the dependency.
+ * @param dependency
+ */
+ public void addDependency(Dependency dependency) {
+ if (dependencies == null) {
+ dependencies = new ArrayList<Dependency>();
+ nodeDependencies = new ArrayList<Node>();
+ }
+ dependencies.add(dependency);
+ if (!nodeDependencies.contains(dependency.node)) {
+ nodeDependencies.add(dependency.node);
+ }
+ Node dependencyNode = dependency.node;
+ if (dependencyNode.nodeDependents == null) {
+ dependencyNode.nodeDependents = new ArrayList<Node>();
+ }
+ dependencyNode.nodeDependents.add(this);
+ }
+
+ @Override
+ public Node clone() {
+ try {
+ Node node = (Node) super.clone();
+ node.animation = animation.clone();
+ return node;
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError();
+ }
+ }
+ }
+
+ /**
+ * The <code>Builder</code> object is a utility class to facilitate adding animations to a
+ * <code>AnimatorSet</code> along with the relationships between the various animations. The
+ * intention of the <code>Builder</code> methods, along with the {@link
+ * AnimatorSet#play(Animator) play()} method of <code>AnimatorSet</code> is to make it possible
+ * to express the dependency relationships of animations in a natural way. Developers can also
+ * use the {@link AnimatorSet#playTogether(Animator[]) playTogether()} and {@link
+ * AnimatorSet#playSequentially(Animator[]) playSequentially()} methods if these suit the need,
+ * but it might be easier in some situations to express the AnimatorSet of animations in pairs.
+ * <p/>
+ * <p>The <code>Builder</code> object cannot be constructed directly, but is rather constructed
+ * internally via a call to {@link AnimatorSet#play(Animator)}.</p>
+ * <p/>
+ * <p>For example, this sets up a AnimatorSet to play anim1 and anim2 at the same time, anim3 to
+ * play when anim2 finishes, and anim4 to play when anim3 finishes:</p>
+ * <pre>
+ * AnimatorSet s = new AnimatorSet();
+ * s.play(anim1).with(anim2);
+ * s.play(anim2).before(anim3);
+ * s.play(anim4).after(anim3);
+ * </pre>
+ * <p/>
+ * <p>Note in the example that both {@link Builder#before(Animator)} and {@link
+ * Builder#after(Animator)} are used. These are just different ways of expressing the same
+ * relationship and are provided to make it easier to say things in a way that is more natural,
+ * depending on the situation.</p>
+ * <p/>
+ * <p>It is possible to make several calls into the same <code>Builder</code> object to express
+ * multiple relationships. However, note that it is only the animation passed into the initial
+ * {@link AnimatorSet#play(Animator)} method that is the dependency in any of the successive
+ * calls to the <code>Builder</code> object. For example, the following code starts both anim2
+ * and anim3 when anim1 ends; there is no direct dependency relationship between anim2 and
+ * anim3:
+ * <pre>
+ * AnimatorSet s = new AnimatorSet();
+ * s.play(anim1).before(anim2).before(anim3);
+ * </pre>
+ * If the desired result is to play anim1 then anim2 then anim3, this code expresses the
+ * relationship correctly:</p>
+ * <pre>
+ * AnimatorSet s = new AnimatorSet();
+ * s.play(anim1).before(anim2);
+ * s.play(anim2).before(anim3);
+ * </pre>
+ * <p/>
+ * <p>Note that it is possible to express relationships that cannot be resolved and will not
+ * result in sensible results. For example, <code>play(anim1).after(anim1)</code> makes no
+ * sense. In general, circular dependencies like this one (or more indirect ones where a depends
+ * on b, which depends on c, which depends on a) should be avoided. Only create AnimatorSets
+ * that can boil down to a simple, one-way relationship of animations starting with, before, and
+ * after other, different, animations.</p>
+ */
+ public class Builder {
+
+ /**
+ * This tracks the current node being processed. It is supplied to the play() method
+ * of AnimatorSet and passed into the constructor of Builder.
+ */
+ private Node mCurrentNode;
+
+ /**
+ * package-private constructor. Builders are only constructed by AnimatorSet, when the
+ * play() method is called.
+ *
+ * @param anim The animation that is the dependency for the other animations passed into
+ * the other methods of this Builder object.
+ */
+ Builder(Animator anim) {
+ mCurrentNode = mNodeMap.get(anim);
+ if (mCurrentNode == null) {
+ mCurrentNode = new Node(anim);
+ mNodeMap.put(anim, mCurrentNode);
+ mNodes.add(mCurrentNode);
+ }
+ }
+
+ /**
+ * Sets up the given animation to play at the same time as the animation supplied in the
+ * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object.
+ *
+ * @param anim The animation that will play when the animation supplied to the
+ * {@link AnimatorSet#play(Animator)} method starts.
+ */
+ public Builder with(Animator anim) {
+ Node node = mNodeMap.get(anim);
+ if (node == null) {
+ node = new Node(anim);
+ mNodeMap.put(anim, node);
+ mNodes.add(node);
+ }
+ Dependency dependency = new Dependency(mCurrentNode, Dependency.WITH);
+ node.addDependency(dependency);
+ return this;
+ }
+
+ /**
+ * Sets up the given animation to play when the animation supplied in the
+ * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object
+ * ends.
+ *
+ * @param anim The animation that will play when the animation supplied to the
+ * {@link AnimatorSet#play(Animator)} method ends.
+ */
+ public Builder before(Animator anim) {
+ Node node = mNodeMap.get(anim);
+ if (node == null) {
+ node = new Node(anim);
+ mNodeMap.put(anim, node);
+ mNodes.add(node);
+ }
+ Dependency dependency = new Dependency(mCurrentNode, Dependency.AFTER);
+ node.addDependency(dependency);
+ return this;
+ }
+
+ /**
+ * Sets up the given animation to play when the animation supplied in the
+ * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object
+ * to start when the animation supplied in this method call ends.
+ *
+ * @param anim The animation whose end will cause the animation supplied to the
+ * {@link AnimatorSet#play(Animator)} method to play.
+ */
+ public Builder after(Animator anim) {
+ Node node = mNodeMap.get(anim);
+ if (node == null) {
+ node = new Node(anim);
+ mNodeMap.put(anim, node);
+ mNodes.add(node);
+ }
+ Dependency dependency = new Dependency(node, Dependency.AFTER);
+ mCurrentNode.addDependency(dependency);
+ return this;
+ }
+
+ /**
+ * Sets up the animation supplied in the
+ * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object
+ * to play when the given amount of time elapses.
+ *
+ * @param delay The number of milliseconds that should elapse before the
+ * animation starts.
+ */
+ public Builder after(long delay) {
+ // setup dummy ValueAnimator just to run the clock
+ ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
+ anim.setDuration(delay);
+ after(anim);
+ return this;
+ }
+
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatEvaluator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatEvaluator.java
new file mode 100644
index 0000000000..e41019364d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatEvaluator.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+/**
+ * This evaluator can be used to perform type interpolation between <code>float</code> values.
+ */
+public class FloatEvaluator implements TypeEvaluator<Number> {
+
+ /**
+ * This function returns the result of linearly interpolating the start and end values, with
+ * <code>fraction</code> representing the proportion between the start and end values. The
+ * calculation is a simple parametric calculation: <code>result = x0 + t * (v1 - v0)</code>,
+ * where <code>x0</code> is <code>startValue</code>, <code>x1</code> is <code>endValue</code>,
+ * and <code>t</code> is <code>fraction</code>.
+ *
+ * @param fraction The fraction from the starting to the ending values
+ * @param startValue The start value; should be of type <code>float</code> or
+ * <code>Float</code>
+ * @param endValue The end value; should be of type <code>float</code> or <code>Float</code>
+ * @return A linear interpolation between the start and end values, given the
+ * <code>fraction</code> parameter.
+ */
+ public Float evaluate(float fraction, Number startValue, Number endValue) {
+ float startFloat = startValue.floatValue();
+ return startFloat + fraction * (endValue.floatValue() - startFloat);
+ }
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatKeyframeSet.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatKeyframeSet.java
new file mode 100644
index 0000000000..1d1c52045e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/FloatKeyframeSet.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import java.util.ArrayList;
+import android.view.animation.Interpolator;
+
+import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.FloatKeyframe;
+
+/**
+ * This class holds a collection of FloatKeyframe objects and is called by ValueAnimator to calculate
+ * values between those keyframes for a given animation. The class internal to the animation
+ * package because it is an implementation detail of how Keyframes are stored and used.
+ *
+ * <p>This type-specific subclass of KeyframeSet, along with the other type-specific subclass for
+ * int, exists to speed up the getValue() method when there is no custom
+ * TypeEvaluator set for the animation, so that values can be calculated without autoboxing to the
+ * Object equivalents of these primitive types.</p>
+ */
+@SuppressWarnings("unchecked")
+class FloatKeyframeSet extends KeyframeSet {
+ private float firstValue;
+ private float lastValue;
+ private float deltaValue;
+ private boolean firstTime = true;
+
+ public FloatKeyframeSet(FloatKeyframe... keyframes) {
+ super(keyframes);
+ }
+
+ @Override
+ public Object getValue(float fraction) {
+ return getFloatValue(fraction);
+ }
+
+ @Override
+ public FloatKeyframeSet clone() {
+ ArrayList<Keyframe> keyframes = mKeyframes;
+ int numKeyframes = mKeyframes.size();
+ FloatKeyframe[] newKeyframes = new FloatKeyframe[numKeyframes];
+ for (int i = 0; i < numKeyframes; ++i) {
+ newKeyframes[i] = (FloatKeyframe) keyframes.get(i).clone();
+ }
+ FloatKeyframeSet newSet = new FloatKeyframeSet(newKeyframes);
+ return newSet;
+ }
+
+ public float getFloatValue(float fraction) {
+ if (mNumKeyframes == 2) {
+ if (firstTime) {
+ firstTime = false;
+ firstValue = ((FloatKeyframe) mKeyframes.get(0)).getFloatValue();
+ lastValue = ((FloatKeyframe) mKeyframes.get(1)).getFloatValue();
+ deltaValue = lastValue - firstValue;
+ }
+ if (mInterpolator != null) {
+ fraction = mInterpolator.getInterpolation(fraction);
+ }
+ if (mEvaluator == null) {
+ return firstValue + fraction * deltaValue;
+ } else {
+ return ((Number)mEvaluator.evaluate(fraction, firstValue, lastValue)).floatValue();
+ }
+ }
+ if (fraction <= 0f) {
+ final FloatKeyframe prevKeyframe = (FloatKeyframe) mKeyframes.get(0);
+ final FloatKeyframe nextKeyframe = (FloatKeyframe) mKeyframes.get(1);
+ float prevValue = prevKeyframe.getFloatValue();
+ float nextValue = nextKeyframe.getFloatValue();
+ float prevFraction = prevKeyframe.getFraction();
+ float nextFraction = nextKeyframe.getFraction();
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
+ return mEvaluator == null ?
+ prevValue + intervalFraction * (nextValue - prevValue) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).
+ floatValue();
+ } else if (fraction >= 1f) {
+ final FloatKeyframe prevKeyframe = (FloatKeyframe) mKeyframes.get(mNumKeyframes - 2);
+ final FloatKeyframe nextKeyframe = (FloatKeyframe) mKeyframes.get(mNumKeyframes - 1);
+ float prevValue = prevKeyframe.getFloatValue();
+ float nextValue = nextKeyframe.getFloatValue();
+ float prevFraction = prevKeyframe.getFraction();
+ float nextFraction = nextKeyframe.getFraction();
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
+ return mEvaluator == null ?
+ prevValue + intervalFraction * (nextValue - prevValue) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).
+ floatValue();
+ }
+ FloatKeyframe prevKeyframe = (FloatKeyframe) mKeyframes.get(0);
+ for (int i = 1; i < mNumKeyframes; ++i) {
+ FloatKeyframe nextKeyframe = (FloatKeyframe) mKeyframes.get(i);
+ if (fraction < nextKeyframe.getFraction()) {
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevKeyframe.getFraction()) /
+ (nextKeyframe.getFraction() - prevKeyframe.getFraction());
+ float prevValue = prevKeyframe.getFloatValue();
+ float nextValue = nextKeyframe.getFloatValue();
+ return mEvaluator == null ?
+ prevValue + intervalFraction * (nextValue - prevValue) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).
+ floatValue();
+ }
+ prevKeyframe = nextKeyframe;
+ }
+ // shouldn't get here
+ return ((Number)mKeyframes.get(mNumKeyframes - 1).getValue()).floatValue();
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntEvaluator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntEvaluator.java
new file mode 100644
index 0000000000..ed5e79ec64
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntEvaluator.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+/**
+ * This evaluator can be used to perform type interpolation between <code>int</code> values.
+ */
+public class IntEvaluator implements TypeEvaluator<Integer> {
+
+ /**
+ * This function returns the result of linearly interpolating the start and end values, with
+ * <code>fraction</code> representing the proportion between the start and end values. The
+ * calculation is a simple parametric calculation: <code>result = x0 + t * (v1 - v0)</code>,
+ * where <code>x0</code> is <code>startValue</code>, <code>x1</code> is <code>endValue</code>,
+ * and <code>t</code> is <code>fraction</code>.
+ *
+ * @param fraction The fraction from the starting to the ending values
+ * @param startValue The start value; should be of type <code>int</code> or
+ * <code>Integer</code>
+ * @param endValue The end value; should be of type <code>int</code> or <code>Integer</code>
+ * @return A linear interpolation between the start and end values, given the
+ * <code>fraction</code> parameter.
+ */
+ public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
+ int startInt = startValue;
+ return (int)(startInt + fraction * (endValue - startInt));
+ }
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntKeyframeSet.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntKeyframeSet.java
new file mode 100644
index 0000000000..5c211a3ad1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/IntKeyframeSet.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import java.util.ArrayList;
+import android.view.animation.Interpolator;
+
+import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.IntKeyframe;
+
+/**
+ * This class holds a collection of IntKeyframe objects and is called by ValueAnimator to calculate
+ * values between those keyframes for a given animation. The class internal to the animation
+ * package because it is an implementation detail of how Keyframes are stored and used.
+ *
+ * <p>This type-specific subclass of KeyframeSet, along with the other type-specific subclass for
+ * float, exists to speed up the getValue() method when there is no custom
+ * TypeEvaluator set for the animation, so that values can be calculated without autoboxing to the
+ * Object equivalents of these primitive types.</p>
+ */
+@SuppressWarnings("unchecked")
+class IntKeyframeSet extends KeyframeSet {
+ private int firstValue;
+ private int lastValue;
+ private int deltaValue;
+ private boolean firstTime = true;
+
+ public IntKeyframeSet(IntKeyframe... keyframes) {
+ super(keyframes);
+ }
+
+ @Override
+ public Object getValue(float fraction) {
+ return getIntValue(fraction);
+ }
+
+ @Override
+ public IntKeyframeSet clone() {
+ ArrayList<Keyframe> keyframes = mKeyframes;
+ int numKeyframes = mKeyframes.size();
+ IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
+ for (int i = 0; i < numKeyframes; ++i) {
+ newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
+ }
+ IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
+ return newSet;
+ }
+
+ public int getIntValue(float fraction) {
+ if (mNumKeyframes == 2) {
+ if (firstTime) {
+ firstTime = false;
+ firstValue = ((IntKeyframe) mKeyframes.get(0)).getIntValue();
+ lastValue = ((IntKeyframe) mKeyframes.get(1)).getIntValue();
+ deltaValue = lastValue - firstValue;
+ }
+ if (mInterpolator != null) {
+ fraction = mInterpolator.getInterpolation(fraction);
+ }
+ if (mEvaluator == null) {
+ return firstValue + (int)(fraction * deltaValue);
+ } else {
+ return ((Number)mEvaluator.evaluate(fraction, firstValue, lastValue)).intValue();
+ }
+ }
+ if (fraction <= 0f) {
+ final IntKeyframe prevKeyframe = (IntKeyframe) mKeyframes.get(0);
+ final IntKeyframe nextKeyframe = (IntKeyframe) mKeyframes.get(1);
+ int prevValue = prevKeyframe.getIntValue();
+ int nextValue = nextKeyframe.getIntValue();
+ float prevFraction = prevKeyframe.getFraction();
+ float nextFraction = nextKeyframe.getFraction();
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
+ return mEvaluator == null ?
+ prevValue + (int)(intervalFraction * (nextValue - prevValue)) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).
+ intValue();
+ } else if (fraction >= 1f) {
+ final IntKeyframe prevKeyframe = (IntKeyframe) mKeyframes.get(mNumKeyframes - 2);
+ final IntKeyframe nextKeyframe = (IntKeyframe) mKeyframes.get(mNumKeyframes - 1);
+ int prevValue = prevKeyframe.getIntValue();
+ int nextValue = nextKeyframe.getIntValue();
+ float prevFraction = prevKeyframe.getFraction();
+ float nextFraction = nextKeyframe.getFraction();
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction);
+ return mEvaluator == null ?
+ prevValue + (int)(intervalFraction * (nextValue - prevValue)) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).intValue();
+ }
+ IntKeyframe prevKeyframe = (IntKeyframe) mKeyframes.get(0);
+ for (int i = 1; i < mNumKeyframes; ++i) {
+ IntKeyframe nextKeyframe = (IntKeyframe) mKeyframes.get(i);
+ if (fraction < nextKeyframe.getFraction()) {
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ float intervalFraction = (fraction - prevKeyframe.getFraction()) /
+ (nextKeyframe.getFraction() - prevKeyframe.getFraction());
+ int prevValue = prevKeyframe.getIntValue();
+ int nextValue = nextKeyframe.getIntValue();
+ return mEvaluator == null ?
+ prevValue + (int)(intervalFraction * (nextValue - prevValue)) :
+ ((Number)mEvaluator.evaluate(intervalFraction, prevValue, nextValue)).
+ intValue();
+ }
+ prevKeyframe = nextKeyframe;
+ }
+ // shouldn't get here
+ return ((Number)mKeyframes.get(mNumKeyframes - 1).getValue()).intValue();
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Keyframe.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Keyframe.java
new file mode 100644
index 0000000000..ab76fa7f68
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/Keyframe.java
@@ -0,0 +1,361 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import android.view.animation.Interpolator;
+
+/**
+ * This class holds a time/value pair for an animation. The Keyframe class is used
+ * by {@link ValueAnimator} to define the values that the animation target will have over the course
+ * of the animation. As the time proceeds from one keyframe to the other, the value of the
+ * target object will animate between the value at the previous keyframe and the value at the
+ * next keyframe. Each keyframe also holds an optional {@link TimeInterpolator}
+ * object, which defines the time interpolation over the intervalue preceding the keyframe.
+ *
+ * <p>The Keyframe class itself is abstract. The type-specific factory methods will return
+ * a subclass of Keyframe specific to the type of value being stored. This is done to improve
+ * performance when dealing with the most common cases (e.g., <code>float</code> and
+ * <code>int</code> values). Other types will fall into a more general Keyframe class that
+ * treats its values as Objects. Unless your animation requires dealing with a custom type
+ * or a data structure that needs to be animated directly (and evaluated using an implementation
+ * of {@link TypeEvaluator}), you should stick to using float and int as animations using those
+ * types have lower runtime overhead than other types.</p>
+ */
+@SuppressWarnings("rawtypes")
+public abstract class Keyframe implements Cloneable {
+ /**
+ * The time at which mValue will hold true.
+ */
+ float mFraction;
+
+ /**
+ * The type of the value in this Keyframe. This type is determined at construction time,
+ * based on the type of the <code>value</code> object passed into the constructor.
+ */
+ Class mValueType;
+
+ /**
+ * The optional time interpolator for the interval preceding this keyframe. A null interpolator
+ * (the default) results in linear interpolation over the interval.
+ */
+ private /*Time*/Interpolator mInterpolator = null;
+
+ /**
+ * Flag to indicate whether this keyframe has a valid value. This flag is used when an
+ * animation first starts, to populate placeholder keyframes with real values derived
+ * from the target object.
+ */
+ boolean mHasValue = false;
+
+ /**
+ * Constructs a Keyframe object with the given time and value. The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ * @param value The value that the object will animate to as the animation time approaches
+ * the time in this keyframe, and the the value animated from as the time passes the time in
+ * this keyframe.
+ */
+ public static Keyframe ofInt(float fraction, int value) {
+ return new IntKeyframe(fraction, value);
+ }
+
+ /**
+ * Constructs a Keyframe object with the given time. The value at this time will be derived
+ * from the target object when the animation first starts (note that this implies that keyframes
+ * with no initial value must be used as part of an {@link ObjectAnimator}).
+ * The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ */
+ public static Keyframe ofInt(float fraction) {
+ return new IntKeyframe(fraction);
+ }
+
+ /**
+ * Constructs a Keyframe object with the given time and value. The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ * @param value The value that the object will animate to as the animation time approaches
+ * the time in this keyframe, and the the value animated from as the time passes the time in
+ * this keyframe.
+ */
+ public static Keyframe ofFloat(float fraction, float value) {
+ return new FloatKeyframe(fraction, value);
+ }
+
+ /**
+ * Constructs a Keyframe object with the given time. The value at this time will be derived
+ * from the target object when the animation first starts (note that this implies that keyframes
+ * with no initial value must be used as part of an {@link ObjectAnimator}).
+ * The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ */
+ public static Keyframe ofFloat(float fraction) {
+ return new FloatKeyframe(fraction);
+ }
+
+ /**
+ * Constructs a Keyframe object with the given time and value. The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ * @param value The value that the object will animate to as the animation time approaches
+ * the time in this keyframe, and the the value animated from as the time passes the time in
+ * this keyframe.
+ */
+ public static Keyframe ofObject(float fraction, Object value) {
+ return new ObjectKeyframe(fraction, value);
+ }
+
+ /**
+ * Constructs a Keyframe object with the given time. The value at this time will be derived
+ * from the target object when the animation first starts (note that this implies that keyframes
+ * with no initial value must be used as part of an {@link ObjectAnimator}).
+ * The time defines the
+ * time, as a proportion of an overall animation's duration, at which the value will hold true
+ * for the animation. The value for the animation between keyframes will be calculated as
+ * an interpolation between the values at those keyframes.
+ *
+ * @param fraction The time, expressed as a value between 0 and 1, representing the fraction
+ * of time elapsed of the overall animation duration.
+ */
+ public static Keyframe ofObject(float fraction) {
+ return new ObjectKeyframe(fraction, null);
+ }
+
+ /**
+ * Indicates whether this keyframe has a valid value. This method is called internally when
+ * an {@link ObjectAnimator} first starts; keyframes without values are assigned values at
+ * that time by deriving the value for the property from the target object.
+ *
+ * @return boolean Whether this object has a value assigned.
+ */
+ public boolean hasValue() {
+ return mHasValue;
+ }
+
+ /**
+ * Gets the value for this Keyframe.
+ *
+ * @return The value for this Keyframe.
+ */
+ public abstract Object getValue();
+
+ /**
+ * Sets the value for this Keyframe.
+ *
+ * @param value value for this Keyframe.
+ */
+ public abstract void setValue(Object value);
+
+ /**
+ * Gets the time for this keyframe, as a fraction of the overall animation duration.
+ *
+ * @return The time associated with this keyframe, as a fraction of the overall animation
+ * duration. This should be a value between 0 and 1.
+ */
+ public float getFraction() {
+ return mFraction;
+ }
+
+ /**
+ * Sets the time for this keyframe, as a fraction of the overall animation duration.
+ *
+ * @param fraction time associated with this keyframe, as a fraction of the overall animation
+ * duration. This should be a value between 0 and 1.
+ */
+ public void setFraction(float fraction) {
+ mFraction = fraction;
+ }
+
+ /**
+ * Gets the optional interpolator for this Keyframe. A value of <code>null</code> indicates
+ * that there is no interpolation, which is the same as linear interpolation.
+ *
+ * @return The optional interpolator for this Keyframe.
+ */
+ public /*Time*/Interpolator getInterpolator() {
+ return mInterpolator;
+ }
+
+ /**
+ * Sets the optional interpolator for this Keyframe. A value of <code>null</code> indicates
+ * that there is no interpolation, which is the same as linear interpolation.
+ *
+ * @return The optional interpolator for this Keyframe.
+ */
+ public void setInterpolator(/*Time*/Interpolator interpolator) {
+ mInterpolator = interpolator;
+ }
+
+ /**
+ * Gets the type of keyframe. This information is used by ValueAnimator to determine the type of
+ * {@link TypeEvaluator} to use when calculating values between keyframes. The type is based
+ * on the type of Keyframe created.
+ *
+ * @return The type of the value stored in the Keyframe.
+ */
+ public Class getType() {
+ return mValueType;
+ }
+
+ @Override
+ public abstract Keyframe clone();
+
+ /**
+ * This internal subclass is used for all types which are not int or float.
+ */
+ static class ObjectKeyframe extends Keyframe {
+
+ /**
+ * The value of the animation at the time mFraction.
+ */
+ Object mValue;
+
+ ObjectKeyframe(float fraction, Object value) {
+ mFraction = fraction;
+ mValue = value;
+ mHasValue = (value != null);
+ mValueType = mHasValue ? value.getClass() : Object.class;
+ }
+
+ public Object getValue() {
+ return mValue;
+ }
+
+ public void setValue(Object value) {
+ mValue = value;
+ mHasValue = (value != null);
+ }
+
+ @Override
+ public ObjectKeyframe clone() {
+ ObjectKeyframe kfClone = new ObjectKeyframe(getFraction(), mValue);
+ kfClone.setInterpolator(getInterpolator());
+ return kfClone;
+ }
+ }
+
+ /**
+ * Internal subclass used when the keyframe value is of type int.
+ */
+ static class IntKeyframe extends Keyframe {
+
+ /**
+ * The value of the animation at the time mFraction.
+ */
+ int mValue;
+
+ IntKeyframe(float fraction, int value) {
+ mFraction = fraction;
+ mValue = value;
+ mValueType = int.class;
+ mHasValue = true;
+ }
+
+ IntKeyframe(float fraction) {
+ mFraction = fraction;
+ mValueType = int.class;
+ }
+
+ public int getIntValue() {
+ return mValue;
+ }
+
+ public Object getValue() {
+ return mValue;
+ }
+
+ public void setValue(Object value) {
+ if (value != null && value.getClass() == Integer.class) {
+ mValue = ((Integer)value).intValue();
+ mHasValue = true;
+ }
+ }
+
+ @Override
+ public IntKeyframe clone() {
+ IntKeyframe kfClone = new IntKeyframe(getFraction(), mValue);
+ kfClone.setInterpolator(getInterpolator());
+ return kfClone;
+ }
+ }
+
+ /**
+ * Internal subclass used when the keyframe value is of type float.
+ */
+ static class FloatKeyframe extends Keyframe {
+ /**
+ * The value of the animation at the time mFraction.
+ */
+ float mValue;
+
+ FloatKeyframe(float fraction, float value) {
+ mFraction = fraction;
+ mValue = value;
+ mValueType = float.class;
+ mHasValue = true;
+ }
+
+ FloatKeyframe(float fraction) {
+ mFraction = fraction;
+ mValueType = float.class;
+ }
+
+ public float getFloatValue() {
+ return mValue;
+ }
+
+ public Object getValue() {
+ return mValue;
+ }
+
+ public void setValue(Object value) {
+ if (value != null && value.getClass() == Float.class) {
+ mValue = ((Float)value).floatValue();
+ mHasValue = true;
+ }
+ }
+
+ @Override
+ public FloatKeyframe clone() {
+ FloatKeyframe kfClone = new FloatKeyframe(getFraction(), mValue);
+ kfClone.setInterpolator(getInterpolator());
+ return kfClone;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/KeyframeSet.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/KeyframeSet.java
new file mode 100644
index 0000000000..a71e1ad3cf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/KeyframeSet.java
@@ -0,0 +1,227 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import android.view.animation.Interpolator;
+
+import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.FloatKeyframe;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.IntKeyframe;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.ObjectKeyframe;
+
+/**
+ * This class holds a collection of Keyframe objects and is called by ValueAnimator to calculate
+ * values between those keyframes for a given animation. The class internal to the animation
+ * package because it is an implementation detail of how Keyframes are stored and used.
+ */
+@SuppressWarnings({"rawtypes", "unchecked"})
+class KeyframeSet {
+
+ int mNumKeyframes;
+
+ Keyframe mFirstKeyframe;
+ Keyframe mLastKeyframe;
+ /*Time*/Interpolator mInterpolator; // only used in the 2-keyframe case
+ ArrayList<Keyframe> mKeyframes; // only used when there are not 2 keyframes
+ TypeEvaluator mEvaluator;
+
+
+ public KeyframeSet(Keyframe... keyframes) {
+ mNumKeyframes = keyframes.length;
+ mKeyframes = new ArrayList<Keyframe>();
+ mKeyframes.addAll(Arrays.asList(keyframes));
+ mFirstKeyframe = mKeyframes.get(0);
+ mLastKeyframe = mKeyframes.get(mNumKeyframes - 1);
+ mInterpolator = mLastKeyframe.getInterpolator();
+ }
+
+ public static KeyframeSet ofInt(int... values) {
+ int numKeyframes = values.length;
+ IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
+ if (numKeyframes == 1) {
+ keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
+ keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
+ } else {
+ keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
+ for (int i = 1; i < numKeyframes; ++i) {
+ keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
+ }
+ }
+ return new IntKeyframeSet(keyframes);
+ }
+
+ public static KeyframeSet ofFloat(float... values) {
+ int numKeyframes = values.length;
+ FloatKeyframe keyframes[] = new FloatKeyframe[Math.max(numKeyframes,2)];
+ if (numKeyframes == 1) {
+ keyframes[0] = (FloatKeyframe) Keyframe.ofFloat(0f);
+ keyframes[1] = (FloatKeyframe) Keyframe.ofFloat(1f, values[0]);
+ } else {
+ keyframes[0] = (FloatKeyframe) Keyframe.ofFloat(0f, values[0]);
+ for (int i = 1; i < numKeyframes; ++i) {
+ keyframes[i] = (FloatKeyframe) Keyframe.ofFloat((float) i / (numKeyframes - 1), values[i]);
+ }
+ }
+ return new FloatKeyframeSet(keyframes);
+ }
+
+ public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
+ // if all keyframes of same primitive type, create the appropriate KeyframeSet
+ int numKeyframes = keyframes.length;
+ boolean hasFloat = false;
+ boolean hasInt = false;
+ boolean hasOther = false;
+ for (int i = 0; i < numKeyframes; ++i) {
+ if (keyframes[i] instanceof FloatKeyframe) {
+ hasFloat = true;
+ } else if (keyframes[i] instanceof IntKeyframe) {
+ hasInt = true;
+ } else {
+ hasOther = true;
+ }
+ }
+ if (hasFloat && !hasInt && !hasOther) {
+ FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
+ for (int i = 0; i < numKeyframes; ++i) {
+ floatKeyframes[i] = (FloatKeyframe) keyframes[i];
+ }
+ return new FloatKeyframeSet(floatKeyframes);
+ } else if (hasInt && !hasFloat && !hasOther) {
+ IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
+ for (int i = 0; i < numKeyframes; ++i) {
+ intKeyframes[i] = (IntKeyframe) keyframes[i];
+ }
+ return new IntKeyframeSet(intKeyframes);
+ } else {
+ return new KeyframeSet(keyframes);
+ }
+ }
+
+ public static KeyframeSet ofObject(Object... values) {
+ int numKeyframes = values.length;
+ ObjectKeyframe keyframes[] = new ObjectKeyframe[Math.max(numKeyframes,2)];
+ if (numKeyframes == 1) {
+ keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f);
+ keyframes[1] = (ObjectKeyframe) Keyframe.ofObject(1f, values[0]);
+ } else {
+ keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f, values[0]);
+ for (int i = 1; i < numKeyframes; ++i) {
+ keyframes[i] = (ObjectKeyframe) Keyframe.ofObject((float) i / (numKeyframes - 1), values[i]);
+ }
+ }
+ return new KeyframeSet(keyframes);
+ }
+
+ /**
+ * Sets the TypeEvaluator to be used when calculating animated values. This object
+ * is required only for KeyframeSets that are not either IntKeyframeSet or FloatKeyframeSet,
+ * both of which assume their own evaluator to speed up calculations with those primitive
+ * types.
+ *
+ * @param evaluator The TypeEvaluator to be used to calculate animated values.
+ */
+ public void setEvaluator(TypeEvaluator evaluator) {
+ mEvaluator = evaluator;
+ }
+
+ @Override
+ public KeyframeSet clone() {
+ ArrayList<Keyframe> keyframes = mKeyframes;
+ int numKeyframes = mKeyframes.size();
+ Keyframe[] newKeyframes = new Keyframe[numKeyframes];
+ for (int i = 0; i < numKeyframes; ++i) {
+ newKeyframes[i] = keyframes.get(i).clone();
+ }
+ KeyframeSet newSet = new KeyframeSet(newKeyframes);
+ return newSet;
+ }
+
+ /**
+ * Gets the animated value, given the elapsed fraction of the animation (interpolated by the
+ * animation's interpolator) and the evaluator used to calculate in-between values. This
+ * function maps the input fraction to the appropriate keyframe interval and a fraction
+ * between them and returns the interpolated value. Note that the input fraction may fall
+ * outside the [0-1] bounds, if the animation's interpolator made that happen (e.g., a
+ * spring interpolation that might send the fraction past 1.0). We handle this situation by
+ * just using the two keyframes at the appropriate end when the value is outside those bounds.
+ *
+ * @param fraction The elapsed fraction of the animation
+ * @return The animated value.
+ */
+ public Object getValue(float fraction) {
+
+ // Special-case optimization for the common case of only two keyframes
+ if (mNumKeyframes == 2) {
+ if (mInterpolator != null) {
+ fraction = mInterpolator.getInterpolation(fraction);
+ }
+ return mEvaluator.evaluate(fraction, mFirstKeyframe.getValue(),
+ mLastKeyframe.getValue());
+ }
+ if (fraction <= 0f) {
+ final Keyframe nextKeyframe = mKeyframes.get(1);
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ final float prevFraction = mFirstKeyframe.getFraction();
+ float intervalFraction = (fraction - prevFraction) /
+ (nextKeyframe.getFraction() - prevFraction);
+ return mEvaluator.evaluate(intervalFraction, mFirstKeyframe.getValue(),
+ nextKeyframe.getValue());
+ } else if (fraction >= 1f) {
+ final Keyframe prevKeyframe = mKeyframes.get(mNumKeyframes - 2);
+ final /*Time*/Interpolator interpolator = mLastKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ final float prevFraction = prevKeyframe.getFraction();
+ float intervalFraction = (fraction - prevFraction) /
+ (mLastKeyframe.getFraction() - prevFraction);
+ return mEvaluator.evaluate(intervalFraction, prevKeyframe.getValue(),
+ mLastKeyframe.getValue());
+ }
+ Keyframe prevKeyframe = mFirstKeyframe;
+ for (int i = 1; i < mNumKeyframes; ++i) {
+ Keyframe nextKeyframe = mKeyframes.get(i);
+ if (fraction < nextKeyframe.getFraction()) {
+ final /*Time*/Interpolator interpolator = nextKeyframe.getInterpolator();
+ if (interpolator != null) {
+ fraction = interpolator.getInterpolation(fraction);
+ }
+ final float prevFraction = prevKeyframe.getFraction();
+ float intervalFraction = (fraction - prevFraction) /
+ (nextKeyframe.getFraction() - prevFraction);
+ return mEvaluator.evaluate(intervalFraction, prevKeyframe.getValue(),
+ nextKeyframe.getValue());
+ }
+ prevKeyframe = nextKeyframe;
+ }
+ // shouldn't reach here
+ return mLastKeyframe.getValue();
+ }
+
+ @Override
+ public String toString() {
+ String returnVal = " ";
+ for (int i = 0; i < mNumKeyframes; ++i) {
+ returnVal += mKeyframes.get(i).getValue() + " ";
+ }
+ return returnVal;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ObjectAnimator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ObjectAnimator.java
new file mode 100644
index 0000000000..21d15c02ac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ObjectAnimator.java
@@ -0,0 +1,491 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import android.util.Log;
+//import android.util.Property;
+
+//import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+/**
+ * This subclass of {@link ValueAnimator} provides support for animating properties on target objects.
+ * The constructors of this class take parameters to define the target object that will be animated
+ * as well as the name of the property that will be animated. Appropriate set/get functions
+ * are then determined internally and the animation will call these functions as necessary to
+ * animate the property.
+ *
+ * @see #setPropertyName(String)
+ *
+ */
+@SuppressWarnings("rawtypes")
+public final class ObjectAnimator extends ValueAnimator {
+ private static final boolean DBG = false;
+
+ // The target object on which the property exists, set in the constructor
+ private Object mTarget;
+
+ private String mPropertyName;
+
+ //private Property mProperty;
+
+ /**
+ * Sets the name of the property that will be animated. This name is used to derive
+ * a setter function that will be called to set animated values.
+ * For example, a property name of <code>foo</code> will result
+ * in a call to the function <code>setFoo()</code> on the target object. If either
+ * <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
+ * also be derived and called.
+ *
+ * <p>For best performance of the mechanism that calls the setter function determined by the
+ * name of the property being animated, use <code>float</code> or <code>int</code> typed values,
+ * and make the setter function for those properties have a <code>void</code> return value. This
+ * will cause the code to take an optimized path for these constrained circumstances. Other
+ * property types and return types will work, but will have more overhead in processing
+ * the requests due to normal reflection mechanisms.</p>
+ *
+ * <p>Note that the setter function derived from this property name
+ * must take the same parameter type as the
+ * <code>valueFrom</code> and <code>valueTo</code> properties, otherwise the call to
+ * the setter function will fail.</p>
+ *
+ * <p>If this ObjectAnimator has been set up to animate several properties together,
+ * using more than one PropertyValuesHolder objects, then setting the propertyName simply
+ * sets the propertyName in the first of those PropertyValuesHolder objects.</p>
+ *
+ * @param propertyName The name of the property being animated. Should not be null.
+ */
+ public void setPropertyName(String propertyName) {
+ // mValues could be null if this is being constructed piecemeal. Just record the
+ // propertyName to be used later when setValues() is called if so.
+ if (mValues != null) {
+ PropertyValuesHolder valuesHolder = mValues[0];
+ String oldName = valuesHolder.getPropertyName();
+ valuesHolder.setPropertyName(propertyName);
+ mValuesMap.remove(oldName);
+ mValuesMap.put(propertyName, valuesHolder);
+ }
+ mPropertyName = propertyName;
+ // New property/values/target should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+
+ /**
+ * Sets the property that will be animated. Property objects will take precedence over
+ * properties specified by the {@link #setPropertyName(String)} method. Animations should
+ * be set up to use one or the other, not both.
+ *
+ * @param property The property being animated. Should not be null.
+ */
+ //public void setProperty(Property property) {
+ // // mValues could be null if this is being constructed piecemeal. Just record the
+ // // propertyName to be used later when setValues() is called if so.
+ // if (mValues != null) {
+ // PropertyValuesHolder valuesHolder = mValues[0];
+ // String oldName = valuesHolder.getPropertyName();
+ // valuesHolder.setProperty(property);
+ // mValuesMap.remove(oldName);
+ // mValuesMap.put(mPropertyName, valuesHolder);
+ // }
+ // if (mProperty != null) {
+ // mPropertyName = property.getName();
+ // }
+ // mProperty = property;
+ // // New property/values/target should cause re-initialization prior to starting
+ // mInitialized = false;
+ //}
+
+ /**
+ * Gets the name of the property that will be animated. This name will be used to derive
+ * a setter function that will be called to set animated values.
+ * For example, a property name of <code>foo</code> will result
+ * in a call to the function <code>setFoo()</code> on the target object. If either
+ * <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
+ * also be derived and called.
+ */
+ public String getPropertyName() {
+ return mPropertyName;
+ }
+
+ /**
+ * Creates a new ObjectAnimator object. This default constructor is primarily for
+ * use internally; the other constructors which take parameters are more generally
+ * useful.
+ */
+ public ObjectAnimator() {
+ }
+
+ /**
+ * Private utility constructor that initializes the target object and name of the
+ * property being animated.
+ *
+ * @param target The object whose property is to be animated. This object should
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter.
+ * @param propertyName The name of the property being animated.
+ */
+ private ObjectAnimator(Object target, String propertyName) {
+ mTarget = target;
+ setPropertyName(propertyName);
+ }
+
+ /**
+ * Private utility constructor that initializes the target object and property being animated.
+ *
+ * @param target The object whose property is to be animated.
+ * @param property The property being animated.
+ */
+ //private <T> ObjectAnimator(T target, Property<T, ?> property) {
+ // mTarget = target;
+ // setProperty(property);
+ //}
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between int values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated. This object should
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter.
+ * @param propertyName The name of the property being animated.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ public static ObjectAnimator ofInt(Object target, String propertyName, int... values) {
+ ObjectAnimator anim = new ObjectAnimator(target, propertyName);
+ anim.setIntValues(values);
+ return anim;
+ }
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between int values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated.
+ * @param property The property being animated.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ //public static <T> ObjectAnimator ofInt(T target, Property<T, Integer> property, int... values) {
+ // ObjectAnimator anim = new ObjectAnimator(target, property);
+ // anim.setIntValues(values);
+ // return anim;
+ //}
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between float values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated. This object should
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter.
+ * @param propertyName The name of the property being animated.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ public static ObjectAnimator ofFloat(Object target, String propertyName, float... values) {
+ ObjectAnimator anim = new ObjectAnimator(target, propertyName);
+ anim.setFloatValues(values);
+ return anim;
+ }
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between float values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated.
+ * @param property The property being animated.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ //public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> property,
+ // float... values) {
+ // ObjectAnimator anim = new ObjectAnimator(target, property);
+ // anim.setFloatValues(values);
+ // return anim;
+ //}
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between Object values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated. This object should
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter.
+ * @param propertyName The name of the property being animated.
+ * @param evaluator A TypeEvaluator that will be called on each animation frame to
+ * provide the necessary interpolation between the Object values to derive the animated
+ * value.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ public static ObjectAnimator ofObject(Object target, String propertyName,
+ TypeEvaluator evaluator, Object... values) {
+ ObjectAnimator anim = new ObjectAnimator(target, propertyName);
+ anim.setObjectValues(values);
+ anim.setEvaluator(evaluator);
+ return anim;
+ }
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between Object values. A single
+ * value implies that that value is the one being animated to. Two values imply a starting
+ * and ending values. More than two values imply a starting value, values to animate through
+ * along the way, and an ending value (these values will be distributed evenly across
+ * the duration of the animation).
+ *
+ * @param target The object whose property is to be animated.
+ * @param property The property being animated.
+ * @param evaluator A TypeEvaluator that will be called on each animation frame to
+ * provide the necessary interpolation between the Object values to derive the animated
+ * value.
+ * @param values A set of values that the animation will animate between over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ //public static <T, V> ObjectAnimator ofObject(T target, Property<T, V> property,
+ // TypeEvaluator<V> evaluator, V... values) {
+ // ObjectAnimator anim = new ObjectAnimator(target, property);
+ // anim.setObjectValues(values);
+ // anim.setEvaluator(evaluator);
+ // return anim;
+ //}
+
+ /**
+ * Constructs and returns an ObjectAnimator that animates between the sets of values specified
+ * in <code>PropertyValueHolder</code> objects. This variant should be used when animating
+ * several properties at once with the same ObjectAnimator, since PropertyValuesHolder allows
+ * you to associate a set of animation values with a property name.
+ *
+ * @param target The object whose property is to be animated. Depending on how the
+ * PropertyValuesObjects were constructed, the target object should either have the {@link
+ * android.util.Property} objects used to construct the PropertyValuesHolder objects or (if the
+ * PropertyValuesHOlder objects were created with property names) the target object should have
+ * public methods on it called <code>setName()</code>, where <code>name</code> is the name of
+ * the property passed in as the <code>propertyName</code> parameter for each of the
+ * PropertyValuesHolder objects.
+ * @param values A set of PropertyValuesHolder objects whose values will be animated between
+ * over time.
+ * @return An ObjectAnimator object that is set up to animate between the given values.
+ */
+ public static ObjectAnimator ofPropertyValuesHolder(Object target,
+ PropertyValuesHolder... values) {
+ ObjectAnimator anim = new ObjectAnimator();
+ anim.mTarget = target;
+ anim.setValues(values);
+ return anim;
+ }
+
+ @Override
+ public void setIntValues(int... values) {
+ if (mValues == null || mValues.length == 0) {
+ // No values yet - this animator is being constructed piecemeal. Init the values with
+ // whatever the current propertyName is
+ //if (mProperty != null) {
+ // setValues(PropertyValuesHolder.ofInt(mProperty, values));
+ //} else {
+ setValues(PropertyValuesHolder.ofInt(mPropertyName, values));
+ //}
+ } else {
+ super.setIntValues(values);
+ }
+ }
+
+ @Override
+ public void setFloatValues(float... values) {
+ if (mValues == null || mValues.length == 0) {
+ // No values yet - this animator is being constructed piecemeal. Init the values with
+ // whatever the current propertyName is
+ //if (mProperty != null) {
+ // setValues(PropertyValuesHolder.ofFloat(mProperty, values));
+ //} else {
+ setValues(PropertyValuesHolder.ofFloat(mPropertyName, values));
+ //}
+ } else {
+ super.setFloatValues(values);
+ }
+ }
+
+ @Override
+ public void setObjectValues(Object... values) {
+ if (mValues == null || mValues.length == 0) {
+ // No values yet - this animator is being constructed piecemeal. Init the values with
+ // whatever the current propertyName is
+ //if (mProperty != null) {
+ // setValues(PropertyValuesHolder.ofObject(mProperty, (TypeEvaluator)null, values));
+ //} else {
+ setValues(PropertyValuesHolder.ofObject(mPropertyName, (TypeEvaluator)null, values));
+ //}
+ } else {
+ super.setObjectValues(values);
+ }
+ }
+
+ @Override
+ public void start() {
+ if (DBG) {
+ Log.d("ObjectAnimator", "Anim target, duration: " + mTarget + ", " + getDuration());
+ for (int i = 0; i < mValues.length; ++i) {
+ PropertyValuesHolder pvh = mValues[i];
+ ArrayList<Keyframe> keyframes = pvh.mKeyframeSet.mKeyframes;
+ Log.d("ObjectAnimator", " Values[" + i + "]: " +
+ pvh.getPropertyName() + ", " + keyframes.get(0).getValue() + ", " +
+ keyframes.get(pvh.mKeyframeSet.mNumKeyframes - 1).getValue());
+ }
+ }
+ super.start();
+ }
+
+ /**
+ * This function is called immediately before processing the first animation
+ * frame of an animation. If there is a nonzero <code>startDelay</code>, the
+ * function is called after that delay ends.
+ * It takes care of the final initialization steps for the
+ * animation. This includes setting mEvaluator, if the user has not yet
+ * set it up, and the setter/getter methods, if the user did not supply
+ * them.
+ *
+ * <p>Overriders of this method should call the superclass method to cause
+ * internal mechanisms to be set up correctly.</p>
+ */
+ @Override
+ void initAnimation() {
+ if (!mInitialized) {
+ // mValueType may change due to setter/getter setup; do this before calling super.init(),
+ // which uses mValueType to set up the default type evaluator.
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].setupSetterAndGetter(mTarget);
+ }
+ super.initAnimation();
+ }
+ }
+
+ /**
+ * Sets the length of the animation. The default duration is 300 milliseconds.
+ *
+ * @param duration The length of the animation, in milliseconds.
+ * @return ObjectAnimator The object called with setDuration(). This return
+ * value makes it easier to compose statements together that construct and then set the
+ * duration, as in
+ * <code>ObjectAnimator.ofInt(target, propertyName, 0, 10).setDuration(500).start()</code>.
+ */
+ @Override
+ public ObjectAnimator setDuration(long duration) {
+ super.setDuration(duration);
+ return this;
+ }
+
+
+ /**
+ * The target object whose property will be animated by this animation
+ *
+ * @return The object being animated
+ */
+ public Object getTarget() {
+ return mTarget;
+ }
+
+ /**
+ * Sets the target object whose property will be animated by this animation
+ *
+ * @param target The object being animated
+ */
+ @Override
+ public void setTarget(Object target) {
+ if (mTarget != target) {
+ final Object oldTarget = mTarget;
+ mTarget = target;
+ if (oldTarget != null && target != null && oldTarget.getClass() == target.getClass()) {
+ return;
+ }
+ // New target type should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+ }
+
+ @Override
+ public void setupStartValues() {
+ initAnimation();
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].setupStartValue(mTarget);
+ }
+ }
+
+ @Override
+ public void setupEndValues() {
+ initAnimation();
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].setupEndValue(mTarget);
+ }
+ }
+
+ /**
+ * This method is called with the elapsed fraction of the animation during every
+ * animation frame. This function turns the elapsed fraction into an interpolated fraction
+ * and then into an animated value (from the evaluator. The function is called mostly during
+ * animation updates, but it is also called when the <code>end()</code>
+ * function is called, to set the final value on the property.
+ *
+ * <p>Overrides of this method must call the superclass to perform the calculation
+ * of the animated value.</p>
+ *
+ * @param fraction The elapsed fraction of the animation.
+ */
+ @Override
+ void animateValue(float fraction) {
+ super.animateValue(fraction);
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].setAnimatedValue(mTarget);
+ }
+ }
+
+ @Override
+ public ObjectAnimator clone() {
+ final ObjectAnimator anim = (ObjectAnimator) super.clone();
+ return anim;
+ }
+
+ @Override
+ public String toString() {
+ String returnVal = "ObjectAnimator@" + Integer.toHexString(hashCode()) + ", target " +
+ mTarget;
+ if (mValues != null) {
+ for (int i = 0; i < mValues.length; ++i) {
+ returnVal += "\n " + mValues[i].toString();
+ }
+ }
+ return returnVal;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/PropertyValuesHolder.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/PropertyValuesHolder.java
new file mode 100644
index 0000000000..84f7504abc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/PropertyValuesHolder.java
@@ -0,0 +1,1012 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+//import android.util.FloatProperty;
+//import android.util.IntProperty;
+import android.util.Log;
+//import android.util.Property;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+/**
+ * This class holds information about a property and the values that that property
+ * should take on during an animation. PropertyValuesHolder objects can be used to create
+ * animations with ValueAnimator or ObjectAnimator that operate on several different properties
+ * in parallel.
+ */
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class PropertyValuesHolder implements Cloneable {
+
+ /**
+ * The name of the property associated with the values. This need not be a real property,
+ * unless this object is being used with ObjectAnimator. But this is the name by which
+ * aniamted values are looked up with getAnimatedValue(String) in ValueAnimator.
+ */
+ String mPropertyName;
+
+ /**
+ * @hide
+ */
+ //protected Property mProperty;
+
+ /**
+ * The setter function, if needed. ObjectAnimator hands off this functionality to
+ * PropertyValuesHolder, since it holds all of the per-property information. This
+ * property is automatically
+ * derived when the animation starts in setupSetterAndGetter() if using ObjectAnimator.
+ */
+ Method mSetter = null;
+
+ /**
+ * The getter function, if needed. ObjectAnimator hands off this functionality to
+ * PropertyValuesHolder, since it holds all of the per-property information. This
+ * property is automatically
+ * derived when the animation starts in setupSetterAndGetter() if using ObjectAnimator.
+ * The getter is only derived and used if one of the values is null.
+ */
+ private Method mGetter = null;
+
+ /**
+ * The type of values supplied. This information is used both in deriving the setter/getter
+ * functions and in deriving the type of TypeEvaluator.
+ */
+ Class mValueType;
+
+ /**
+ * The set of keyframes (time/value pairs) that define this animation.
+ */
+ KeyframeSet mKeyframeSet = null;
+
+
+ // type evaluators for the primitive types handled by this implementation
+ private static final TypeEvaluator sIntEvaluator = new IntEvaluator();
+ private static final TypeEvaluator sFloatEvaluator = new FloatEvaluator();
+
+ // We try several different types when searching for appropriate setter/getter functions.
+ // The caller may have supplied values in a type that does not match the setter/getter
+ // functions (such as the integers 0 and 1 to represent floating point values for alpha).
+ // Also, the use of generics in constructors means that we end up with the Object versions
+ // of primitive types (Float vs. float). But most likely, the setter/getter functions
+ // will take primitive types instead.
+ // So we supply an ordered array of other types to try before giving up.
+ private static Class[] FLOAT_VARIANTS = {float.class, Float.class, double.class, int.class,
+ Double.class, Integer.class};
+ private static Class[] INTEGER_VARIANTS = {int.class, Integer.class, float.class, double.class,
+ Float.class, Double.class};
+ private static Class[] DOUBLE_VARIANTS = {double.class, Double.class, float.class, int.class,
+ Float.class, Integer.class};
+
+ // These maps hold all property entries for a particular class. This map
+ // is used to speed up property/setter/getter lookups for a given class/property
+ // combination. No need to use reflection on the combination more than once.
+ private static final HashMap<Class, HashMap<String, Method>> sSetterPropertyMap =
+ new HashMap<Class, HashMap<String, Method>>();
+ private static final HashMap<Class, HashMap<String, Method>> sGetterPropertyMap =
+ new HashMap<Class, HashMap<String, Method>>();
+
+ // This lock is used to ensure that only one thread is accessing the property maps
+ // at a time.
+ final ReentrantReadWriteLock mPropertyMapLock = new ReentrantReadWriteLock();
+
+ // Used to pass single value to varargs parameter in setter invocation
+ final Object[] mTmpValueArray = new Object[1];
+
+ /**
+ * The type evaluator used to calculate the animated values. This evaluator is determined
+ * automatically based on the type of the start/end objects passed into the constructor,
+ * but the system only knows about the primitive types int and float. Any other
+ * type will need to set the evaluator to a custom evaluator for that type.
+ */
+ private TypeEvaluator mEvaluator;
+
+ /**
+ * The value most recently calculated by calculateValue(). This is set during
+ * that function and might be retrieved later either by ValueAnimator.animatedValue() or
+ * by the property-setting logic in ObjectAnimator.animatedValue().
+ */
+ private Object mAnimatedValue;
+
+ /**
+ * Internal utility constructor, used by the factory methods to set the property name.
+ * @param propertyName The name of the property for this holder.
+ */
+ private PropertyValuesHolder(String propertyName) {
+ mPropertyName = propertyName;
+ }
+
+ /**
+ * Internal utility constructor, used by the factory methods to set the property.
+ * @param property The property for this holder.
+ */
+ //private PropertyValuesHolder(Property property) {
+ // mProperty = property;
+ // if (property != null) {
+ // mPropertyName = property.getName();
+ // }
+ //}
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property name and
+ * set of int values.
+ * @param propertyName The name of the property being animated.
+ * @param values The values that the named property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ public static PropertyValuesHolder ofInt(String propertyName, int... values) {
+ return new IntPropertyValuesHolder(propertyName, values);
+ }
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property and
+ * set of int values.
+ * @param property The property being animated. Should not be null.
+ * @param values The values that the property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ //public static PropertyValuesHolder ofInt(Property<?, Integer> property, int... values) {
+ // return new IntPropertyValuesHolder(property, values);
+ //}
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property name and
+ * set of float values.
+ * @param propertyName The name of the property being animated.
+ * @param values The values that the named property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ public static PropertyValuesHolder ofFloat(String propertyName, float... values) {
+ return new FloatPropertyValuesHolder(propertyName, values);
+ }
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property and
+ * set of float values.
+ * @param property The property being animated. Should not be null.
+ * @param values The values that the property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ //public static PropertyValuesHolder ofFloat(Property<?, Float> property, float... values) {
+ // return new FloatPropertyValuesHolder(property, values);
+ //}
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property name and
+ * set of Object values. This variant also takes a TypeEvaluator because the system
+ * cannot automatically interpolate between objects of unknown type.
+ *
+ * @param propertyName The name of the property being animated.
+ * @param evaluator A TypeEvaluator that will be called on each animation frame to
+ * provide the necessary interpolation between the Object values to derive the animated
+ * value.
+ * @param values The values that the named property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ public static PropertyValuesHolder ofObject(String propertyName, TypeEvaluator evaluator,
+ Object... values) {
+ PropertyValuesHolder pvh = new PropertyValuesHolder(propertyName);
+ pvh.setObjectValues(values);
+ pvh.setEvaluator(evaluator);
+ return pvh;
+ }
+
+ /**
+ * Constructs and returns a PropertyValuesHolder with a given property and
+ * set of Object values. This variant also takes a TypeEvaluator because the system
+ * cannot automatically interpolate between objects of unknown type.
+ *
+ * @param property The property being animated. Should not be null.
+ * @param evaluator A TypeEvaluator that will be called on each animation frame to
+ * provide the necessary interpolation between the Object values to derive the animated
+ * value.
+ * @param values The values that the property will animate between.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ //public static <V> PropertyValuesHolder ofObject(Property property,
+ // TypeEvaluator<V> evaluator, V... values) {
+ // PropertyValuesHolder pvh = new PropertyValuesHolder(property);
+ // pvh.setObjectValues(values);
+ // pvh.setEvaluator(evaluator);
+ // return pvh;
+ //}
+
+ /**
+ * Constructs and returns a PropertyValuesHolder object with the specified property name and set
+ * of values. These values can be of any type, but the type should be consistent so that
+ * an appropriate {@link android.animation.TypeEvaluator} can be found that matches
+ * the common type.
+ * <p>If there is only one value, it is assumed to be the end value of an animation,
+ * and an initial value will be derived, if possible, by calling a getter function
+ * on the object. Also, if any value is null, the value will be filled in when the animation
+ * starts in the same way. This mechanism of automatically getting null values only works
+ * if the PropertyValuesHolder object is used in conjunction
+ * {@link ObjectAnimator}, and with a getter function
+ * derived automatically from <code>propertyName</code>, since otherwise PropertyValuesHolder has
+ * no way of determining what the value should be.
+ * @param propertyName The name of the property associated with this set of values. This
+ * can be the actual property name to be used when using a ObjectAnimator object, or
+ * just a name used to get animated values, such as if this object is used with an
+ * ValueAnimator object.
+ * @param values The set of values to animate between.
+ */
+ public static PropertyValuesHolder ofKeyframe(String propertyName, Keyframe... values) {
+ KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(values);
+ if (keyframeSet instanceof IntKeyframeSet) {
+ return new IntPropertyValuesHolder(propertyName, (IntKeyframeSet) keyframeSet);
+ } else if (keyframeSet instanceof FloatKeyframeSet) {
+ return new FloatPropertyValuesHolder(propertyName, (FloatKeyframeSet) keyframeSet);
+ }
+ else {
+ PropertyValuesHolder pvh = new PropertyValuesHolder(propertyName);
+ pvh.mKeyframeSet = keyframeSet;
+ pvh.mValueType = values[0].getType();
+ return pvh;
+ }
+ }
+
+ /**
+ * Constructs and returns a PropertyValuesHolder object with the specified property and set
+ * of values. These values can be of any type, but the type should be consistent so that
+ * an appropriate {@link android.animation.TypeEvaluator} can be found that matches
+ * the common type.
+ * <p>If there is only one value, it is assumed to be the end value of an animation,
+ * and an initial value will be derived, if possible, by calling the property's
+ * {@link android.util.Property#get(Object)} function.
+ * Also, if any value is null, the value will be filled in when the animation
+ * starts in the same way. This mechanism of automatically getting null values only works
+ * if the PropertyValuesHolder object is used in conjunction with
+ * {@link ObjectAnimator}, since otherwise PropertyValuesHolder has
+ * no way of determining what the value should be.
+ * @param property The property associated with this set of values. Should not be null.
+ * @param values The set of values to animate between.
+ */
+ //public static PropertyValuesHolder ofKeyframe(Property property, Keyframe... values) {
+ // KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(values);
+ // if (keyframeSet instanceof IntKeyframeSet) {
+ // return new IntPropertyValuesHolder(property, (IntKeyframeSet) keyframeSet);
+ // } else if (keyframeSet instanceof FloatKeyframeSet) {
+ // return new FloatPropertyValuesHolder(property, (FloatKeyframeSet) keyframeSet);
+ // }
+ // else {
+ // PropertyValuesHolder pvh = new PropertyValuesHolder(property);
+ // pvh.mKeyframeSet = keyframeSet;
+ // pvh.mValueType = ((Keyframe)values[0]).getType();
+ // return pvh;
+ // }
+ //}
+
+ /**
+ * Set the animated values for this object to this set of ints.
+ * If there is only one value, it is assumed to be the end value of an animation,
+ * and an initial value will be derived, if possible, by calling a getter function
+ * on the object. Also, if any value is null, the value will be filled in when the animation
+ * starts in the same way. This mechanism of automatically getting null values only works
+ * if the PropertyValuesHolder object is used in conjunction
+ * {@link ObjectAnimator}, and with a getter function
+ * derived automatically from <code>propertyName</code>, since otherwise PropertyValuesHolder has
+ * no way of determining what the value should be.
+ *
+ * @param values One or more values that the animation will animate between.
+ */
+ public void setIntValues(int... values) {
+ mValueType = int.class;
+ mKeyframeSet = KeyframeSet.ofInt(values);
+ }
+
+ /**
+ * Set the animated values for this object to this set of floats.
+ * If there is only one value, it is assumed to be the end value of an animation,
+ * and an initial value will be derived, if possible, by calling a getter function
+ * on the object. Also, if any value is null, the value will be filled in when the animation
+ * starts in the same way. This mechanism of automatically getting null values only works
+ * if the PropertyValuesHolder object is used in conjunction
+ * {@link ObjectAnimator}, and with a getter function
+ * derived automatically from <code>propertyName</code>, since otherwise PropertyValuesHolder has
+ * no way of determining what the value should be.
+ *
+ * @param values One or more values that the animation will animate between.
+ */
+ public void setFloatValues(float... values) {
+ mValueType = float.class;
+ mKeyframeSet = KeyframeSet.ofFloat(values);
+ }
+
+ /**
+ * Set the animated values for this object to this set of Keyframes.
+ *
+ * @param values One or more values that the animation will animate between.
+ */
+ public void setKeyframes(Keyframe... values) {
+ int numKeyframes = values.length;
+ Keyframe keyframes[] = new Keyframe[Math.max(numKeyframes,2)];
+ mValueType = values[0].getType();
+ for (int i = 0; i < numKeyframes; ++i) {
+ keyframes[i] = values[i];
+ }
+ mKeyframeSet = new KeyframeSet(keyframes);
+ }
+
+ /**
+ * Set the animated values for this object to this set of Objects.
+ * If there is only one value, it is assumed to be the end value of an animation,
+ * and an initial value will be derived, if possible, by calling a getter function
+ * on the object. Also, if any value is null, the value will be filled in when the animation
+ * starts in the same way. This mechanism of automatically getting null values only works
+ * if the PropertyValuesHolder object is used in conjunction
+ * {@link ObjectAnimator}, and with a getter function
+ * derived automatically from <code>propertyName</code>, since otherwise PropertyValuesHolder has
+ * no way of determining what the value should be.
+ *
+ * @param values One or more values that the animation will animate between.
+ */
+ public void setObjectValues(Object... values) {
+ mValueType = values[0].getClass();
+ mKeyframeSet = KeyframeSet.ofObject(values);
+ }
+
+ /**
+ * Determine the setter or getter function using the JavaBeans convention of setFoo or
+ * getFoo for a property named 'foo'. This function figures out what the name of the
+ * function should be and uses reflection to find the Method with that name on the
+ * target object.
+ *
+ * @param targetClass The class to search for the method
+ * @param prefix "set" or "get", depending on whether we need a setter or getter.
+ * @param valueType The type of the parameter (in the case of a setter). This type
+ * is derived from the values set on this PropertyValuesHolder. This type is used as
+ * a first guess at the parameter type, but we check for methods with several different
+ * types to avoid problems with slight mis-matches between supplied values and actual
+ * value types used on the setter.
+ * @return Method the method associated with mPropertyName.
+ */
+ private Method getPropertyFunction(Class targetClass, String prefix, Class valueType) {
+ // TODO: faster implementation...
+ Method returnVal = null;
+ String methodName = getMethodName(prefix, mPropertyName);
+ Class args[] = null;
+ if (valueType == null) {
+ try {
+ returnVal = targetClass.getMethod(methodName, args);
+ } catch (NoSuchMethodException e) {
+ Log.e("PropertyValuesHolder", targetClass.getSimpleName() + " - " +
+ "Couldn't find no-arg method for property " + mPropertyName + ": " + e);
+ }
+ } else {
+ args = new Class[1];
+ Class typeVariants[];
+ if (mValueType.equals(Float.class)) {
+ typeVariants = FLOAT_VARIANTS;
+ } else if (mValueType.equals(Integer.class)) {
+ typeVariants = INTEGER_VARIANTS;
+ } else if (mValueType.equals(Double.class)) {
+ typeVariants = DOUBLE_VARIANTS;
+ } else {
+ typeVariants = new Class[1];
+ typeVariants[0] = mValueType;
+ }
+ for (Class typeVariant : typeVariants) {
+ args[0] = typeVariant;
+ try {
+ returnVal = targetClass.getMethod(methodName, args);
+ // change the value type to suit
+ mValueType = typeVariant;
+ return returnVal;
+ } catch (NoSuchMethodException e) {
+ // Swallow the error and keep trying other variants
+ }
+ }
+ // If we got here, then no appropriate function was found
+ Log.e("PropertyValuesHolder",
+ "Couldn't find " + prefix + "ter property " + mPropertyName +
+ " for " + targetClass.getSimpleName() +
+ " with value type "+ mValueType);
+ }
+
+ return returnVal;
+ }
+
+
+ /**
+ * Returns the setter or getter requested. This utility function checks whether the
+ * requested method exists in the propertyMapMap cache. If not, it calls another
+ * utility function to request the Method from the targetClass directly.
+ * @param targetClass The Class on which the requested method should exist.
+ * @param propertyMapMap The cache of setters/getters derived so far.
+ * @param prefix "set" or "get", for the setter or getter.
+ * @param valueType The type of parameter passed into the method (null for getter).
+ * @return Method the method associated with mPropertyName.
+ */
+ private Method setupSetterOrGetter(Class targetClass,
+ HashMap<Class, HashMap<String, Method>> propertyMapMap,
+ String prefix, Class valueType) {
+ Method setterOrGetter = null;
+ try {
+ // Have to lock property map prior to reading it, to guard against
+ // another thread putting something in there after we've checked it
+ // but before we've added an entry to it
+ mPropertyMapLock.writeLock().lock();
+ HashMap<String, Method> propertyMap = propertyMapMap.get(targetClass);
+ if (propertyMap != null) {
+ setterOrGetter = propertyMap.get(mPropertyName);
+ }
+ if (setterOrGetter == null) {
+ setterOrGetter = getPropertyFunction(targetClass, prefix, valueType);
+ if (propertyMap == null) {
+ propertyMap = new HashMap<String, Method>();
+ propertyMapMap.put(targetClass, propertyMap);
+ }
+ propertyMap.put(mPropertyName, setterOrGetter);
+ }
+ } finally {
+ mPropertyMapLock.writeLock().unlock();
+ }
+ return setterOrGetter;
+ }
+
+ /**
+ * Utility function to get the setter from targetClass
+ * @param targetClass The Class on which the requested method should exist.
+ */
+ void setupSetter(Class targetClass) {
+ mSetter = setupSetterOrGetter(targetClass, sSetterPropertyMap, "set", mValueType);
+ }
+
+ /**
+ * Utility function to get the getter from targetClass
+ */
+ private void setupGetter(Class targetClass) {
+ mGetter = setupSetterOrGetter(targetClass, sGetterPropertyMap, "get", null);
+ }
+
+ /**
+ * Internal function (called from ObjectAnimator) to set up the setter and getter
+ * prior to running the animation. If the setter has not been manually set for this
+ * object, it will be derived automatically given the property name, target object, and
+ * types of values supplied. If no getter has been set, it will be supplied iff any of the
+ * supplied values was null. If there is a null value, then the getter (supplied or derived)
+ * will be called to set those null values to the current value of the property
+ * on the target object.
+ * @param target The object on which the setter (and possibly getter) exist.
+ */
+ void setupSetterAndGetter(Object target) {
+ //if (mProperty != null) {
+ // // check to make sure that mProperty is on the class of target
+ // try {
+ // Object testValue = mProperty.get(target);
+ // for (Keyframe kf : mKeyframeSet.mKeyframes) {
+ // if (!kf.hasValue()) {
+ // kf.setValue(mProperty.get(target));
+ // }
+ // }
+ // return;
+ // } catch (ClassCastException e) {
+ // Log.e("PropertyValuesHolder","No such property (" + mProperty.getName() +
+ // ") on target object " + target + ". Trying reflection instead");
+ // mProperty = null;
+ // }
+ //}
+ Class targetClass = target.getClass();
+ if (mSetter == null) {
+ setupSetter(targetClass);
+ }
+ for (Keyframe kf : mKeyframeSet.mKeyframes) {
+ if (!kf.hasValue()) {
+ if (mGetter == null) {
+ setupGetter(targetClass);
+ }
+ try {
+ kf.setValue(mGetter.invoke(target));
+ } catch (InvocationTargetException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ } catch (IllegalAccessException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ }
+ }
+ }
+ }
+
+ /**
+ * Utility function to set the value stored in a particular Keyframe. The value used is
+ * whatever the value is for the property name specified in the keyframe on the target object.
+ *
+ * @param target The target object from which the current value should be extracted.
+ * @param kf The keyframe which holds the property name and value.
+ */
+ private void setupValue(Object target, Keyframe kf) {
+ //if (mProperty != null) {
+ // kf.setValue(mProperty.get(target));
+ //}
+ try {
+ if (mGetter == null) {
+ Class targetClass = target.getClass();
+ setupGetter(targetClass);
+ }
+ kf.setValue(mGetter.invoke(target));
+ } catch (InvocationTargetException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ } catch (IllegalAccessException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ }
+ }
+
+ /**
+ * This function is called by ObjectAnimator when setting the start values for an animation.
+ * The start values are set according to the current values in the target object. The
+ * property whose value is extracted is whatever is specified by the propertyName of this
+ * PropertyValuesHolder object.
+ *
+ * @param target The object which holds the start values that should be set.
+ */
+ void setupStartValue(Object target) {
+ setupValue(target, mKeyframeSet.mKeyframes.get(0));
+ }
+
+ /**
+ * This function is called by ObjectAnimator when setting the end values for an animation.
+ * The end values are set according to the current values in the target object. The
+ * property whose value is extracted is whatever is specified by the propertyName of this
+ * PropertyValuesHolder object.
+ *
+ * @param target The object which holds the start values that should be set.
+ */
+ void setupEndValue(Object target) {
+ setupValue(target, mKeyframeSet.mKeyframes.get(mKeyframeSet.mKeyframes.size() - 1));
+ }
+
+ @Override
+ public PropertyValuesHolder clone() {
+ try {
+ PropertyValuesHolder newPVH = (PropertyValuesHolder) super.clone();
+ newPVH.mPropertyName = mPropertyName;
+ //newPVH.mProperty = mProperty;
+ newPVH.mKeyframeSet = mKeyframeSet.clone();
+ newPVH.mEvaluator = mEvaluator;
+ return newPVH;
+ } catch (CloneNotSupportedException e) {
+ // won't reach here
+ return null;
+ }
+ }
+
+ /**
+ * Internal function to set the value on the target object, using the setter set up
+ * earlier on this PropertyValuesHolder object. This function is called by ObjectAnimator
+ * to handle turning the value calculated by ValueAnimator into a value set on the object
+ * according to the name of the property.
+ * @param target The target object on which the value is set
+ */
+ void setAnimatedValue(Object target) {
+ //if (mProperty != null) {
+ // mProperty.set(target, getAnimatedValue());
+ //}
+ if (mSetter != null) {
+ try {
+ mTmpValueArray[0] = getAnimatedValue();
+ mSetter.invoke(target, mTmpValueArray);
+ } catch (InvocationTargetException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ } catch (IllegalAccessException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ }
+ }
+ }
+
+ /**
+ * Internal function, called by ValueAnimator, to set up the TypeEvaluator that will be used
+ * to calculate animated values.
+ */
+ void init() {
+ if (mEvaluator == null) {
+ // We already handle int and float automatically, but not their Object
+ // equivalents
+ mEvaluator = (mValueType == Integer.class) ? sIntEvaluator :
+ (mValueType == Float.class) ? sFloatEvaluator :
+ null;
+ }
+ if (mEvaluator != null) {
+ // KeyframeSet knows how to evaluate the common types - only give it a custom
+ // evaluator if one has been set on this class
+ mKeyframeSet.setEvaluator(mEvaluator);
+ }
+ }
+
+ /**
+ * The TypeEvaluator will the automatically determined based on the type of values
+ * supplied to PropertyValuesHolder. The evaluator can be manually set, however, if so
+ * desired. This may be important in cases where either the type of the values supplied
+ * do not match the way that they should be interpolated between, or if the values
+ * are of a custom type or one not currently understood by the animation system. Currently,
+ * only values of type float and int (and their Object equivalents: Float
+ * and Integer) are correctly interpolated; all other types require setting a TypeEvaluator.
+ * @param evaluator
+ */
+ public void setEvaluator(TypeEvaluator evaluator) {
+ mEvaluator = evaluator;
+ mKeyframeSet.setEvaluator(evaluator);
+ }
+
+ /**
+ * Function used to calculate the value according to the evaluator set up for
+ * this PropertyValuesHolder object. This function is called by ValueAnimator.animateValue().
+ *
+ * @param fraction The elapsed, interpolated fraction of the animation.
+ */
+ void calculateValue(float fraction) {
+ mAnimatedValue = mKeyframeSet.getValue(fraction);
+ }
+
+ /**
+ * Sets the name of the property that will be animated. This name is used to derive
+ * a setter function that will be called to set animated values.
+ * For example, a property name of <code>foo</code> will result
+ * in a call to the function <code>setFoo()</code> on the target object. If either
+ * <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
+ * also be derived and called.
+ *
+ * <p>Note that the setter function derived from this property name
+ * must take the same parameter type as the
+ * <code>valueFrom</code> and <code>valueTo</code> properties, otherwise the call to
+ * the setter function will fail.</p>
+ *
+ * @param propertyName The name of the property being animated.
+ */
+ public void setPropertyName(String propertyName) {
+ mPropertyName = propertyName;
+ }
+
+ /**
+ * Sets the property that will be animated.
+ *
+ * <p>Note that if this PropertyValuesHolder object is used with ObjectAnimator, the property
+ * must exist on the target object specified in that ObjectAnimator.</p>
+ *
+ * @param property The property being animated.
+ */
+ //public void setProperty(Property property) {
+ // mProperty = property;
+ //}
+
+ /**
+ * Gets the name of the property that will be animated. This name will be used to derive
+ * a setter function that will be called to set animated values.
+ * For example, a property name of <code>foo</code> will result
+ * in a call to the function <code>setFoo()</code> on the target object. If either
+ * <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
+ * also be derived and called.
+ */
+ public String getPropertyName() {
+ return mPropertyName;
+ }
+
+ /**
+ * Internal function, called by ValueAnimator and ObjectAnimator, to retrieve the value
+ * most recently calculated in calculateValue().
+ * @return
+ */
+ Object getAnimatedValue() {
+ return mAnimatedValue;
+ }
+
+ @Override
+ public String toString() {
+ return mPropertyName + ": " + mKeyframeSet.toString();
+ }
+
+ /**
+ * Utility method to derive a setter/getter method name from a property name, where the
+ * prefix is typically "set" or "get" and the first letter of the property name is
+ * capitalized.
+ *
+ * @param prefix The precursor to the method name, before the property name begins, typically
+ * "set" or "get".
+ * @param propertyName The name of the property that represents the bulk of the method name
+ * after the prefix. The first letter of this word will be capitalized in the resulting
+ * method name.
+ * @return String the property name converted to a method name according to the conventions
+ * specified above.
+ */
+ static String getMethodName(String prefix, String propertyName) {
+ if (propertyName == null || propertyName.length() == 0) {
+ // shouldn't get here
+ return prefix;
+ }
+ char firstLetter = Character.toUpperCase(propertyName.charAt(0));
+ String theRest = propertyName.substring(1);
+ return prefix + firstLetter + theRest;
+ }
+
+ static class IntPropertyValuesHolder extends PropertyValuesHolder {
+
+ // Cache JNI functions to avoid looking them up twice
+ //private static final HashMap<Class, HashMap<String, Integer>> sJNISetterPropertyMap =
+ // new HashMap<Class, HashMap<String, Integer>>();
+ //int mJniSetter;
+ //private IntProperty mIntProperty;
+
+ IntKeyframeSet mIntKeyframeSet;
+ int mIntAnimatedValue;
+
+ public IntPropertyValuesHolder(String propertyName, IntKeyframeSet keyframeSet) {
+ super(propertyName);
+ mValueType = int.class;
+ mKeyframeSet = keyframeSet;
+ mIntKeyframeSet = (IntKeyframeSet) mKeyframeSet;
+ }
+
+ //public IntPropertyValuesHolder(Property property, IntKeyframeSet keyframeSet) {
+ // super(property);
+ // mValueType = int.class;
+ // mKeyframeSet = keyframeSet;
+ // mIntKeyframeSet = (IntKeyframeSet) mKeyframeSet;
+ // if (property instanceof IntProperty) {
+ // mIntProperty = (IntProperty) mProperty;
+ // }
+ //}
+
+ public IntPropertyValuesHolder(String propertyName, int... values) {
+ super(propertyName);
+ setIntValues(values);
+ }
+
+ //public IntPropertyValuesHolder(Property property, int... values) {
+ // super(property);
+ // setIntValues(values);
+ // if (property instanceof IntProperty) {
+ // mIntProperty = (IntProperty) mProperty;
+ // }
+ //}
+
+ @Override
+ public void setIntValues(int... values) {
+ super.setIntValues(values);
+ mIntKeyframeSet = (IntKeyframeSet) mKeyframeSet;
+ }
+
+ @Override
+ void calculateValue(float fraction) {
+ mIntAnimatedValue = mIntKeyframeSet.getIntValue(fraction);
+ }
+
+ @Override
+ Object getAnimatedValue() {
+ return mIntAnimatedValue;
+ }
+
+ @Override
+ public IntPropertyValuesHolder clone() {
+ IntPropertyValuesHolder newPVH = (IntPropertyValuesHolder) super.clone();
+ newPVH.mIntKeyframeSet = (IntKeyframeSet) newPVH.mKeyframeSet;
+ return newPVH;
+ }
+
+ /**
+ * Internal function to set the value on the target object, using the setter set up
+ * earlier on this PropertyValuesHolder object. This function is called by ObjectAnimator
+ * to handle turning the value calculated by ValueAnimator into a value set on the object
+ * according to the name of the property.
+ * @param target The target object on which the value is set
+ */
+ @Override
+ void setAnimatedValue(Object target) {
+ //if (mIntProperty != null) {
+ // mIntProperty.setValue(target, mIntAnimatedValue);
+ // return;
+ //}
+ //if (mProperty != null) {
+ // mProperty.set(target, mIntAnimatedValue);
+ // return;
+ //}
+ //if (mJniSetter != 0) {
+ // nCallIntMethod(target, mJniSetter, mIntAnimatedValue);
+ // return;
+ //}
+ if (mSetter != null) {
+ try {
+ mTmpValueArray[0] = mIntAnimatedValue;
+ mSetter.invoke(target, mTmpValueArray);
+ } catch (InvocationTargetException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ } catch (IllegalAccessException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ }
+ }
+ }
+
+ @Override
+ void setupSetter(Class targetClass) {
+ //if (mProperty != null) {
+ // return;
+ //}
+ // Check new static hashmap<propName, int> for setter method
+ //try {
+ // mPropertyMapLock.writeLock().lock();
+ // HashMap<String, Integer> propertyMap = sJNISetterPropertyMap.get(targetClass);
+ // if (propertyMap != null) {
+ // Integer mJniSetterInteger = propertyMap.get(mPropertyName);
+ // if (mJniSetterInteger != null) {
+ // mJniSetter = mJniSetterInteger;
+ // }
+ // }
+ // if (mJniSetter == 0) {
+ // String methodName = getMethodName("set", mPropertyName);
+ // mJniSetter = nGetIntMethod(targetClass, methodName);
+ // if (mJniSetter != 0) {
+ // if (propertyMap == null) {
+ // propertyMap = new HashMap<String, Integer>();
+ // sJNISetterPropertyMap.put(targetClass, propertyMap);
+ // }
+ // propertyMap.put(mPropertyName, mJniSetter);
+ // }
+ // }
+ //} catch (NoSuchMethodError e) {
+ // Log.d("PropertyValuesHolder",
+ // "Can't find native method using JNI, use reflection" + e);
+ //} finally {
+ // mPropertyMapLock.writeLock().unlock();
+ //}
+ //if (mJniSetter == 0) {
+ // Couldn't find method through fast JNI approach - just use reflection
+ super.setupSetter(targetClass);
+ //}
+ }
+ }
+
+ static class FloatPropertyValuesHolder extends PropertyValuesHolder {
+
+ // Cache JNI functions to avoid looking them up twice
+ //private static final HashMap<Class, HashMap<String, Integer>> sJNISetterPropertyMap =
+ // new HashMap<Class, HashMap<String, Integer>>();
+ //int mJniSetter;
+ //private FloatProperty mFloatProperty;
+
+ FloatKeyframeSet mFloatKeyframeSet;
+ float mFloatAnimatedValue;
+
+ public FloatPropertyValuesHolder(String propertyName, FloatKeyframeSet keyframeSet) {
+ super(propertyName);
+ mValueType = float.class;
+ mKeyframeSet = keyframeSet;
+ mFloatKeyframeSet = (FloatKeyframeSet) mKeyframeSet;
+ }
+
+ //public FloatPropertyValuesHolder(Property property, FloatKeyframeSet keyframeSet) {
+ // super(property);
+ // mValueType = float.class;
+ // mKeyframeSet = keyframeSet;
+ // mFloatKeyframeSet = (FloatKeyframeSet) mKeyframeSet;
+ // if (property instanceof FloatProperty) {
+ // mFloatProperty = (FloatProperty) mProperty;
+ // }
+ //}
+
+ public FloatPropertyValuesHolder(String propertyName, float... values) {
+ super(propertyName);
+ setFloatValues(values);
+ }
+
+ //public FloatPropertyValuesHolder(Property property, float... values) {
+ // super(property);
+ // setFloatValues(values);
+ // if (property instanceof FloatProperty) {
+ // mFloatProperty = (FloatProperty) mProperty;
+ // }
+ //}
+
+ @Override
+ public void setFloatValues(float... values) {
+ super.setFloatValues(values);
+ mFloatKeyframeSet = (FloatKeyframeSet) mKeyframeSet;
+ }
+
+ @Override
+ void calculateValue(float fraction) {
+ mFloatAnimatedValue = mFloatKeyframeSet.getFloatValue(fraction);
+ }
+
+ @Override
+ Object getAnimatedValue() {
+ return mFloatAnimatedValue;
+ }
+
+ @Override
+ public FloatPropertyValuesHolder clone() {
+ FloatPropertyValuesHolder newPVH = (FloatPropertyValuesHolder) super.clone();
+ newPVH.mFloatKeyframeSet = (FloatKeyframeSet) newPVH.mKeyframeSet;
+ return newPVH;
+ }
+
+ /**
+ * Internal function to set the value on the target object, using the setter set up
+ * earlier on this PropertyValuesHolder object. This function is called by ObjectAnimator
+ * to handle turning the value calculated by ValueAnimator into a value set on the object
+ * according to the name of the property.
+ * @param target The target object on which the value is set
+ */
+ @Override
+ void setAnimatedValue(Object target) {
+ //if (mFloatProperty != null) {
+ // mFloatProperty.setValue(target, mFloatAnimatedValue);
+ // return;
+ //}
+ //if (mProperty != null) {
+ // mProperty.set(target, mFloatAnimatedValue);
+ // return;
+ //}
+ //if (mJniSetter != 0) {
+ // nCallFloatMethod(target, mJniSetter, mFloatAnimatedValue);
+ // return;
+ //}
+ if (mSetter != null) {
+ try {
+ mTmpValueArray[0] = mFloatAnimatedValue;
+ mSetter.invoke(target, mTmpValueArray);
+ } catch (InvocationTargetException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ } catch (IllegalAccessException e) {
+ Log.e("PropertyValuesHolder", e.toString());
+ }
+ }
+ }
+
+ @Override
+ void setupSetter(Class targetClass) {
+ //if (mProperty != null) {
+ // return;
+ //}
+ // Check new static hashmap<propName, int> for setter method
+ //try {
+ // mPropertyMapLock.writeLock().lock();
+ // HashMap<String, Integer> propertyMap = sJNISetterPropertyMap.get(targetClass);
+ // if (propertyMap != null) {
+ // Integer mJniSetterInteger = propertyMap.get(mPropertyName);
+ // if (mJniSetterInteger != null) {
+ // mJniSetter = mJniSetterInteger;
+ // }
+ // }
+ // if (mJniSetter == 0) {
+ // String methodName = getMethodName("set", mPropertyName);
+ // mJniSetter = nGetFloatMethod(targetClass, methodName);
+ // if (mJniSetter != 0) {
+ // if (propertyMap == null) {
+ // propertyMap = new HashMap<String, Integer>();
+ // sJNISetterPropertyMap.put(targetClass, propertyMap);
+ // }
+ // propertyMap.put(mPropertyName, mJniSetter);
+ // }
+ // }
+ //} catch (NoSuchMethodError e) {
+ // Log.d("PropertyValuesHolder",
+ // "Can't find native method using JNI, use reflection" + e);
+ //} finally {
+ // mPropertyMapLock.writeLock().unlock();
+ //}
+ //if (mJniSetter == 0) {
+ // Couldn't find method through fast JNI approach - just use reflection
+ super.setupSetter(targetClass);
+ //}
+ }
+
+ }
+
+ //native static private int nGetIntMethod(Class targetClass, String methodName);
+ //native static private int nGetFloatMethod(Class targetClass, String methodName);
+ //native static private void nCallIntMethod(Object target, int methodID, int arg);
+ //native static private void nCallFloatMethod(Object target, int methodID, float arg);
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/TypeEvaluator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/TypeEvaluator.java
new file mode 100644
index 0000000000..0ea3192446
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/TypeEvaluator.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+/**
+ * Interface for use with the {@link ValueAnimator#setEvaluator(TypeEvaluator)} function. Evaluators
+ * allow developers to create animations on arbitrary property types, by allowing them to supply
+ * custom evaulators for types that are not automatically understood and used by the animation
+ * system.
+ *
+ * @see ValueAnimator#setEvaluator(TypeEvaluator)
+ */
+public interface TypeEvaluator<T> {
+
+ /**
+ * This function returns the result of linearly interpolating the start and end values, with
+ * <code>fraction</code> representing the proportion between the start and end values. The
+ * calculation is a simple parametric calculation: <code>result = x0 + t * (v1 - v0)</code>,
+ * where <code>x0</code> is <code>startValue</code>, <code>x1</code> is <code>endValue</code>,
+ * and <code>t</code> is <code>fraction</code>.
+ *
+ * @param fraction The fraction from the starting to the ending values
+ * @param startValue The start value.
+ * @param endValue The end value.
+ * @return A linear interpolation between the start and end values, given the
+ * <code>fraction</code> parameter.
+ */
+ public T evaluate(float fraction, T startValue, T endValue);
+
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ValueAnimator.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ValueAnimator.java
new file mode 100644
index 0000000000..7f0f93efd7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/ValueAnimator.java
@@ -0,0 +1,1266 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.nineoldandroids.animation;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.util.AndroidRuntimeException;
+import android.view.animation.AccelerateDecelerateInterpolator;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * This class provides a simple timing engine for running animations
+ * which calculate animated values and set them on target objects.
+ *
+ * <p>There is a single timing pulse that all animations use. It runs in a
+ * custom handler to ensure that property changes happen on the UI thread.</p>
+ *
+ * <p>By default, ValueAnimator uses non-linear time interpolation, via the
+ * {@link AccelerateDecelerateInterpolator} class, which accelerates into and decelerates
+ * out of an animation. This behavior can be changed by calling
+ * {@link ValueAnimator#setInterpolator(TimeInterpolator)}.</p>
+ */
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class ValueAnimator extends Animator {
+
+ /**
+ * Internal constants
+ */
+
+ /*
+ * The default amount of time in ms between animation frames
+ */
+ private static final long DEFAULT_FRAME_DELAY = 10;
+
+ /**
+ * Messages sent to timing handler: START is sent when an animation first begins, FRAME is sent
+ * by the handler to itself to process the next animation frame
+ */
+ static final int ANIMATION_START = 0;
+ static final int ANIMATION_FRAME = 1;
+
+ /**
+ * Values used with internal variable mPlayingState to indicate the current state of an
+ * animation.
+ */
+ static final int STOPPED = 0; // Not yet playing
+ static final int RUNNING = 1; // Playing normally
+ static final int SEEKED = 2; // Seeked to some time value
+
+ /**
+ * Internal variables
+ * NOTE: This object implements the clone() method, making a deep copy of any referenced
+ * objects. As other non-trivial fields are added to this class, make sure to add logic
+ * to clone() to make deep copies of them.
+ */
+
+ // The first time that the animation's animateFrame() method is called. This time is used to
+ // determine elapsed time (and therefore the elapsed fraction) in subsequent calls
+ // to animateFrame()
+ long mStartTime;
+
+ /**
+ * Set when setCurrentPlayTime() is called. If negative, animation is not currently seeked
+ * to a value.
+ */
+ long mSeekTime = -1;
+
+ // TODO: We access the following ThreadLocal variables often, some of them on every update.
+ // If ThreadLocal access is significantly expensive, we may want to put all of these
+ // fields into a structure sot hat we just access ThreadLocal once to get the reference
+ // to that structure, then access the structure directly for each field.
+
+ // The static sAnimationHandler processes the internal timing loop on which all animations
+ // are based
+ private static ThreadLocal<AnimationHandler> sAnimationHandler =
+ new ThreadLocal<AnimationHandler>();
+
+ // The per-thread list of all active animations
+ private static final ThreadLocal<ArrayList<ValueAnimator>> sAnimations =
+ new ThreadLocal<ArrayList<ValueAnimator>>() {
+ @Override
+ protected ArrayList<ValueAnimator> initialValue() {
+ return new ArrayList<ValueAnimator>();
+ }
+ };
+
+ // The per-thread set of animations to be started on the next animation frame
+ private static final ThreadLocal<ArrayList<ValueAnimator>> sPendingAnimations =
+ new ThreadLocal<ArrayList<ValueAnimator>>() {
+ @Override
+ protected ArrayList<ValueAnimator> initialValue() {
+ return new ArrayList<ValueAnimator>();
+ }
+ };
+
+ /**
+ * Internal per-thread collections used to avoid set collisions as animations start and end
+ * while being processed.
+ */
+ private static final ThreadLocal<ArrayList<ValueAnimator>> sDelayedAnims =
+ new ThreadLocal<ArrayList<ValueAnimator>>() {
+ @Override
+ protected ArrayList<ValueAnimator> initialValue() {
+ return new ArrayList<ValueAnimator>();
+ }
+ };
+
+ private static final ThreadLocal<ArrayList<ValueAnimator>> sEndingAnims =
+ new ThreadLocal<ArrayList<ValueAnimator>>() {
+ @Override
+ protected ArrayList<ValueAnimator> initialValue() {
+ return new ArrayList<ValueAnimator>();
+ }
+ };
+
+ private static final ThreadLocal<ArrayList<ValueAnimator>> sReadyAnims =
+ new ThreadLocal<ArrayList<ValueAnimator>>() {
+ @Override
+ protected ArrayList<ValueAnimator> initialValue() {
+ return new ArrayList<ValueAnimator>();
+ }
+ };
+
+ // The time interpolator to be used if none is set on the animation
+ private static final /*Time*/Interpolator sDefaultInterpolator =
+ new AccelerateDecelerateInterpolator();
+
+ // type evaluators for the primitive types handled by this implementation
+ //private static final TypeEvaluator sIntEvaluator = new IntEvaluator();
+ //private static final TypeEvaluator sFloatEvaluator = new FloatEvaluator();
+
+ /**
+ * Used to indicate whether the animation is currently playing in reverse. This causes the
+ * elapsed fraction to be inverted to calculate the appropriate values.
+ */
+ private boolean mPlayingBackwards = false;
+
+ /**
+ * This variable tracks the current iteration that is playing. When mCurrentIteration exceeds the
+ * repeatCount (if repeatCount!=INFINITE), the animation ends
+ */
+ private int mCurrentIteration = 0;
+
+ /**
+ * Tracks current elapsed/eased fraction, for querying in getAnimatedFraction().
+ */
+ private float mCurrentFraction = 0f;
+
+ /**
+ * Tracks whether a startDelay'd animation has begun playing through the startDelay.
+ */
+ private boolean mStartedDelay = false;
+
+ /**
+ * Tracks the time at which the animation began playing through its startDelay. This is
+ * different from the mStartTime variable, which is used to track when the animation became
+ * active (which is when the startDelay expired and the animation was added to the active
+ * animations list).
+ */
+ private long mDelayStartTime;
+
+ /**
+ * Flag that represents the current state of the animation. Used to figure out when to start
+ * an animation (if state == STOPPED). Also used to end an animation that
+ * has been cancel()'d or end()'d since the last animation frame. Possible values are
+ * STOPPED, RUNNING, SEEKED.
+ */
+ int mPlayingState = STOPPED;
+
+ /**
+ * Additional playing state to indicate whether an animator has been start()'d. There is
+ * some lag between a call to start() and the first animation frame. We should still note
+ * that the animation has been started, even if it's first animation frame has not yet
+ * happened, and reflect that state in isRunning().
+ * Note that delayed animations are different: they are not started until their first
+ * animation frame, which occurs after their delay elapses.
+ */
+ private boolean mRunning = false;
+
+ /**
+ * Additional playing state to indicate whether an animator has been start()'d, whether or
+ * not there is a nonzero startDelay.
+ */
+ private boolean mStarted = false;
+
+ /**
+ * Flag that denotes whether the animation is set up and ready to go. Used to
+ * set up animation that has not yet been started.
+ */
+ boolean mInitialized = false;
+
+ //
+ // Backing variables
+ //
+
+ // How long the animation should last in ms
+ private long mDuration = 300;
+
+ // The amount of time in ms to delay starting the animation after start() is called
+ private long mStartDelay = 0;
+
+ // The number of milliseconds between animation frames
+ private static long sFrameDelay = DEFAULT_FRAME_DELAY;
+
+ // The number of times the animation will repeat. The default is 0, which means the animation
+ // will play only once
+ private int mRepeatCount = 0;
+
+ /**
+ * The type of repetition that will occur when repeatMode is nonzero. RESTART means the
+ * animation will start from the beginning on every new cycle. REVERSE means the animation
+ * will reverse directions on each iteration.
+ */
+ private int mRepeatMode = RESTART;
+
+ /**
+ * The time interpolator to be used. The elapsed fraction of the animation will be passed
+ * through this interpolator to calculate the interpolated fraction, which is then used to
+ * calculate the animated values.
+ */
+ private /*Time*/Interpolator mInterpolator = sDefaultInterpolator;
+
+ /**
+ * The set of listeners to be sent events through the life of an animation.
+ */
+ private ArrayList<AnimatorUpdateListener> mUpdateListeners = null;
+
+ /**
+ * The property/value sets being animated.
+ */
+ PropertyValuesHolder[] mValues;
+
+ /**
+ * A hashmap of the PropertyValuesHolder objects. This map is used to lookup animated values
+ * by property name during calls to getAnimatedValue(String).
+ */
+ HashMap<String, PropertyValuesHolder> mValuesMap;
+
+ /**
+ * Public constants
+ */
+
+ /**
+ * When the animation reaches the end and <code>repeatCount</code> is INFINITE
+ * or a positive value, the animation restarts from the beginning.
+ */
+ public static final int RESTART = 1;
+ /**
+ * When the animation reaches the end and <code>repeatCount</code> is INFINITE
+ * or a positive value, the animation reverses direction on every iteration.
+ */
+ public static final int REVERSE = 2;
+ /**
+ * This value used used with the {@link #setRepeatCount(int)} property to repeat
+ * the animation indefinitely.
+ */
+ public static final int INFINITE = -1;
+
+ /**
+ * Creates a new ValueAnimator object. This default constructor is primarily for
+ * use internally; the factory methods which take parameters are more generally
+ * useful.
+ */
+ public ValueAnimator() {
+ }
+
+ /**
+ * Constructs and returns a ValueAnimator that animates between int values. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * @param values A set of values that the animation will animate between over time.
+ * @return A ValueAnimator object that is set up to animate between the given values.
+ */
+ public static ValueAnimator ofInt(int... values) {
+ ValueAnimator anim = new ValueAnimator();
+ anim.setIntValues(values);
+ return anim;
+ }
+
+ /**
+ * Constructs and returns a ValueAnimator that animates between float values. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * @param values A set of values that the animation will animate between over time.
+ * @return A ValueAnimator object that is set up to animate between the given values.
+ */
+ public static ValueAnimator ofFloat(float... values) {
+ ValueAnimator anim = new ValueAnimator();
+ anim.setFloatValues(values);
+ return anim;
+ }
+
+ /**
+ * Constructs and returns a ValueAnimator that animates between the values
+ * specified in the PropertyValuesHolder objects.
+ *
+ * @param values A set of PropertyValuesHolder objects whose values will be animated
+ * between over time.
+ * @return A ValueAnimator object that is set up to animate between the given values.
+ */
+ public static ValueAnimator ofPropertyValuesHolder(PropertyValuesHolder... values) {
+ ValueAnimator anim = new ValueAnimator();
+ anim.setValues(values);
+ return anim;
+ }
+ /**
+ * Constructs and returns a ValueAnimator that animates between Object values. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * <p>Since ValueAnimator does not know how to animate between arbitrary Objects, this
+ * factory method also takes a TypeEvaluator object that the ValueAnimator will use
+ * to perform that interpolation.
+ *
+ * @param evaluator A TypeEvaluator that will be called on each animation frame to
+ * provide the ncessry interpolation between the Object values to derive the animated
+ * value.
+ * @param values A set of values that the animation will animate between over time.
+ * @return A ValueAnimator object that is set up to animate between the given values.
+ */
+ public static ValueAnimator ofObject(TypeEvaluator evaluator, Object... values) {
+ ValueAnimator anim = new ValueAnimator();
+ anim.setObjectValues(values);
+ anim.setEvaluator(evaluator);
+ return anim;
+ }
+
+ /**
+ * Sets int values that will be animated between. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * <p>If there are already multiple sets of values defined for this ValueAnimator via more
+ * than one PropertyValuesHolder object, this method will set the values for the first
+ * of those objects.</p>
+ *
+ * @param values A set of values that the animation will animate between over time.
+ */
+ public void setIntValues(int... values) {
+ if (values == null || values.length == 0) {
+ return;
+ }
+ if (mValues == null || mValues.length == 0) {
+ setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofInt("", values)});
+ } else {
+ PropertyValuesHolder valuesHolder = mValues[0];
+ valuesHolder.setIntValues(values);
+ }
+ // New property/values/target should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+
+ /**
+ * Sets float values that will be animated between. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * <p>If there are already multiple sets of values defined for this ValueAnimator via more
+ * than one PropertyValuesHolder object, this method will set the values for the first
+ * of those objects.</p>
+ *
+ * @param values A set of values that the animation will animate between over time.
+ */
+ public void setFloatValues(float... values) {
+ if (values == null || values.length == 0) {
+ return;
+ }
+ if (mValues == null || mValues.length == 0) {
+ setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofFloat("", values)});
+ } else {
+ PropertyValuesHolder valuesHolder = mValues[0];
+ valuesHolder.setFloatValues(values);
+ }
+ // New property/values/target should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+
+ /**
+ * Sets the values to animate between for this animation. A single
+ * value implies that that value is the one being animated to. However, this is not typically
+ * useful in a ValueAnimator object because there is no way for the object to determine the
+ * starting value for the animation (unlike ObjectAnimator, which can derive that value
+ * from the target object and property being animated). Therefore, there should typically
+ * be two or more values.
+ *
+ * <p>If there are already multiple sets of values defined for this ValueAnimator via more
+ * than one PropertyValuesHolder object, this method will set the values for the first
+ * of those objects.</p>
+ *
+ * <p>There should be a TypeEvaluator set on the ValueAnimator that knows how to interpolate
+ * between these value objects. ValueAnimator only knows how to interpolate between the
+ * primitive types specified in the other setValues() methods.</p>
+ *
+ * @param values The set of values to animate between.
+ */
+ public void setObjectValues(Object... values) {
+ if (values == null || values.length == 0) {
+ return;
+ }
+ if (mValues == null || mValues.length == 0) {
+ setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofObject("",
+ (TypeEvaluator)null, values)});
+ } else {
+ PropertyValuesHolder valuesHolder = mValues[0];
+ valuesHolder.setObjectValues(values);
+ }
+ // New property/values/target should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+
+ /**
+ * Sets the values, per property, being animated between. This function is called internally
+ * by the constructors of ValueAnimator that take a list of values. But an ValueAnimator can
+ * be constructed without values and this method can be called to set the values manually
+ * instead.
+ *
+ * @param values The set of values, per property, being animated between.
+ */
+ public void setValues(PropertyValuesHolder... values) {
+ int numValues = values.length;
+ mValues = values;
+ mValuesMap = new HashMap<String, PropertyValuesHolder>(numValues);
+ for (int i = 0; i < numValues; ++i) {
+ PropertyValuesHolder valuesHolder = values[i];
+ mValuesMap.put(valuesHolder.getPropertyName(), valuesHolder);
+ }
+ // New property/values/target should cause re-initialization prior to starting
+ mInitialized = false;
+ }
+
+ /**
+ * Returns the values that this ValueAnimator animates between. These values are stored in
+ * PropertyValuesHolder objects, even if the ValueAnimator was created with a simple list
+ * of value objects instead.
+ *
+ * @return PropertyValuesHolder[] An array of PropertyValuesHolder objects which hold the
+ * values, per property, that define the animation.
+ */
+ public PropertyValuesHolder[] getValues() {
+ return mValues;
+ }
+
+ /**
+ * This function is called immediately before processing the first animation
+ * frame of an animation. If there is a nonzero <code>startDelay</code>, the
+ * function is called after that delay ends.
+ * It takes care of the final initialization steps for the
+ * animation.
+ *
+ * <p>Overrides of this method should call the superclass method to ensure
+ * that internal mechanisms for the animation are set up correctly.</p>
+ */
+ void initAnimation() {
+ if (!mInitialized) {
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].init();
+ }
+ mInitialized = true;
+ }
+ }
+
+
+ /**
+ * Sets the length of the animation. The default duration is 300 milliseconds.
+ *
+ * @param duration The length of the animation, in milliseconds. This value cannot
+ * be negative.
+ * @return ValueAnimator The object called with setDuration(). This return
+ * value makes it easier to compose statements together that construct and then set the
+ * duration, as in <code>ValueAnimator.ofInt(0, 10).setDuration(500).start()</code>.
+ */
+ public ValueAnimator setDuration(long duration) {
+ if (duration < 0) {
+ throw new IllegalArgumentException("Animators cannot have negative duration: " +
+ duration);
+ }
+ mDuration = duration;
+ return this;
+ }
+
+ /**
+ * Gets the length of the animation. The default duration is 300 milliseconds.
+ *
+ * @return The length of the animation, in milliseconds.
+ */
+ public long getDuration() {
+ return mDuration;
+ }
+
+ /**
+ * Sets the position of the animation to the specified point in time. This time should
+ * be between 0 and the total duration of the animation, including any repetition. If
+ * the animation has not yet been started, then it will not advance forward after it is
+ * set to this time; it will simply set the time to this value and perform any appropriate
+ * actions based on that time. If the animation is already running, then setCurrentPlayTime()
+ * will set the current playing time to this value and continue playing from that point.
+ *
+ * @param playTime The time, in milliseconds, to which the animation is advanced or rewound.
+ */
+ public void setCurrentPlayTime(long playTime) {
+ initAnimation();
+ long currentTime = AnimationUtils.currentAnimationTimeMillis();
+ if (mPlayingState != RUNNING) {
+ mSeekTime = playTime;
+ mPlayingState = SEEKED;
+ }
+ mStartTime = currentTime - playTime;
+ animationFrame(currentTime);
+ }
+
+ /**
+ * Gets the current position of the animation in time, which is equal to the current
+ * time minus the time that the animation started. An animation that is not yet started will
+ * return a value of zero.
+ *
+ * @return The current position in time of the animation.
+ */
+ public long getCurrentPlayTime() {
+ if (!mInitialized || mPlayingState == STOPPED) {
+ return 0;
+ }
+ return AnimationUtils.currentAnimationTimeMillis() - mStartTime;
+ }
+
+ /**
+ * This custom, static handler handles the timing pulse that is shared by
+ * all active animations. This approach ensures that the setting of animation
+ * values will happen on the UI thread and that all animations will share
+ * the same times for calculating their values, which makes synchronizing
+ * animations possible.
+ *
+ */
+ private static class AnimationHandler extends Handler {
+ /**
+ * There are only two messages that we care about: ANIMATION_START and
+ * ANIMATION_FRAME. The START message is sent when an animation's start()
+ * method is called. It cannot start synchronously when start() is called
+ * because the call may be on the wrong thread, and it would also not be
+ * synchronized with other animations because it would not start on a common
+ * timing pulse. So each animation sends a START message to the handler, which
+ * causes the handler to place the animation on the active animations queue and
+ * start processing frames for that animation.
+ * The FRAME message is the one that is sent over and over while there are any
+ * active animations to process.
+ */
+ @Override
+ @SuppressWarnings("fallthrough")
+ public void handleMessage(Message msg) {
+ boolean callAgain = true;
+ ArrayList<ValueAnimator> animations = sAnimations.get();
+ ArrayList<ValueAnimator> delayedAnims = sDelayedAnims.get();
+ switch (msg.what) {
+ // TODO: should we avoid sending frame message when starting if we
+ // were already running?
+ case ANIMATION_START:
+ ArrayList<ValueAnimator> pendingAnimations = sPendingAnimations.get();
+ if (animations.size() > 0 || delayedAnims.size() > 0) {
+ callAgain = false;
+ }
+ // pendingAnims holds any animations that have requested to be started
+ // We're going to clear sPendingAnimations, but starting animation may
+ // cause more to be added to the pending list (for example, if one animation
+ // starting triggers another starting). So we loop until sPendingAnimations
+ // is empty.
+ while (pendingAnimations.size() > 0) {
+ ArrayList<ValueAnimator> pendingCopy =
+ (ArrayList<ValueAnimator>) pendingAnimations.clone();
+ pendingAnimations.clear();
+ int count = pendingCopy.size();
+ for (int i = 0; i < count; ++i) {
+ ValueAnimator anim = pendingCopy.get(i);
+ // If the animation has a startDelay, place it on the delayed list
+ if (anim.mStartDelay == 0) {
+ anim.startAnimation();
+ } else {
+ delayedAnims.add(anim);
+ }
+ }
+ }
+ // fall through to process first frame of new animations
+ case ANIMATION_FRAME:
+ // currentTime holds the common time for all animations processed
+ // during this frame
+ long currentTime = AnimationUtils.currentAnimationTimeMillis();
+ ArrayList<ValueAnimator> readyAnims = sReadyAnims.get();
+ ArrayList<ValueAnimator> endingAnims = sEndingAnims.get();
+
+ // First, process animations currently sitting on the delayed queue, adding
+ // them to the active animations if they are ready
+ int numDelayedAnims = delayedAnims.size();
+ for (int i = 0; i < numDelayedAnims; ++i) {
+ ValueAnimator anim = delayedAnims.get(i);
+ if (anim.delayedAnimationFrame(currentTime)) {
+ readyAnims.add(anim);
+ }
+ }
+ int numReadyAnims = readyAnims.size();
+ if (numReadyAnims > 0) {
+ for (int i = 0; i < numReadyAnims; ++i) {
+ ValueAnimator anim = readyAnims.get(i);
+ anim.startAnimation();
+ anim.mRunning = true;
+ delayedAnims.remove(anim);
+ }
+ readyAnims.clear();
+ }
+
+ // Now process all active animations. The return value from animationFrame()
+ // tells the handler whether it should now be ended
+ int numAnims = animations.size();
+ int i = 0;
+ while (i < numAnims) {
+ ValueAnimator anim = animations.get(i);
+ if (anim.animationFrame(currentTime)) {
+ endingAnims.add(anim);
+ }
+ if (animations.size() == numAnims) {
+ ++i;
+ } else {
+ // An animation might be canceled or ended by client code
+ // during the animation frame. Check to see if this happened by
+ // seeing whether the current index is the same as it was before
+ // calling animationFrame(). Another approach would be to copy
+ // animations to a temporary list and process that list instead,
+ // but that entails garbage and processing overhead that would
+ // be nice to avoid.
+ --numAnims;
+ endingAnims.remove(anim);
+ }
+ }
+ if (endingAnims.size() > 0) {
+ for (i = 0; i < endingAnims.size(); ++i) {
+ endingAnims.get(i).endAnimation();
+ }
+ endingAnims.clear();
+ }
+
+ // If there are still active or delayed animations, call the handler again
+ // after the frameDelay
+ if (callAgain && (!animations.isEmpty() || !delayedAnims.isEmpty())) {
+ sendEmptyMessageDelayed(ANIMATION_FRAME, Math.max(0, sFrameDelay -
+ (AnimationUtils.currentAnimationTimeMillis() - currentTime)));
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+ *
+ * @return the number of milliseconds to delay running the animation
+ */
+ public long getStartDelay() {
+ return mStartDelay;
+ }
+
+ /**
+ * The amount of time, in milliseconds, to delay starting the animation after
+ * {@link #start()} is called.
+
+ * @param startDelay The amount of the delay, in milliseconds
+ */
+ public void setStartDelay(long startDelay) {
+ this.mStartDelay = startDelay;
+ }
+
+ /**
+ * The amount of time, in milliseconds, between each frame of the animation. This is a
+ * requested time that the animation will attempt to honor, but the actual delay between
+ * frames may be different, depending on system load and capabilities. This is a static
+ * function because the same delay will be applied to all animations, since they are all
+ * run off of a single timing loop.
+ *
+ * @return the requested time between frames, in milliseconds
+ */
+ public static long getFrameDelay() {
+ return sFrameDelay;
+ }
+
+ /**
+ * The amount of time, in milliseconds, between each frame of the animation. This is a
+ * requested time that the animation will attempt to honor, but the actual delay between
+ * frames may be different, depending on system load and capabilities. This is a static
+ * function because the same delay will be applied to all animations, since they are all
+ * run off of a single timing loop.
+ *
+ * @param frameDelay the requested time between frames, in milliseconds
+ */
+ public static void setFrameDelay(long frameDelay) {
+ sFrameDelay = frameDelay;
+ }
+
+ /**
+ * The most recent value calculated by this <code>ValueAnimator</code> when there is just one
+ * property being animated. This value is only sensible while the animation is running. The main
+ * purpose for this read-only property is to retrieve the value from the <code>ValueAnimator</code>
+ * during a call to {@link AnimatorUpdateListener#onAnimationUpdate(ValueAnimator)}, which
+ * is called during each animation frame, immediately after the value is calculated.
+ *
+ * @return animatedValue The value most recently calculated by this <code>ValueAnimator</code> for
+ * the single property being animated. If there are several properties being animated
+ * (specified by several PropertyValuesHolder objects in the constructor), this function
+ * returns the animated value for the first of those objects.
+ */
+ public Object getAnimatedValue() {
+ if (mValues != null && mValues.length > 0) {
+ return mValues[0].getAnimatedValue();
+ }
+ // Shouldn't get here; should always have values unless ValueAnimator was set up wrong
+ return null;
+ }
+
+ /**
+ * The most recent value calculated by this <code>ValueAnimator</code> for <code>propertyName</code>.
+ * The main purpose for this read-only property is to retrieve the value from the
+ * <code>ValueAnimator</code> during a call to
+ * {@link AnimatorUpdateListener#onAnimationUpdate(ValueAnimator)}, which
+ * is called during each animation frame, immediately after the value is calculated.
+ *
+ * @return animatedValue The value most recently calculated for the named property
+ * by this <code>ValueAnimator</code>.
+ */
+ public Object getAnimatedValue(String propertyName) {
+ PropertyValuesHolder valuesHolder = mValuesMap.get(propertyName);
+ if (valuesHolder != null) {
+ return valuesHolder.getAnimatedValue();
+ } else {
+ // At least avoid crashing if called with bogus propertyName
+ return null;
+ }
+ }
+
+ /**
+ * Sets how many times the animation should be repeated. If the repeat
+ * count is 0, the animation is never repeated. If the repeat count is
+ * greater than 0 or {@link #INFINITE}, the repeat mode will be taken
+ * into account. The repeat count is 0 by default.
+ *
+ * @param value the number of times the animation should be repeated
+ */
+ public void setRepeatCount(int value) {
+ mRepeatCount = value;
+ }
+ /**
+ * Defines how many times the animation should repeat. The default value
+ * is 0.
+ *
+ * @return the number of times the animation should repeat, or {@link #INFINITE}
+ */
+ public int getRepeatCount() {
+ return mRepeatCount;
+ }
+
+ /**
+ * Defines what this animation should do when it reaches the end. This
+ * setting is applied only when the repeat count is either greater than
+ * 0 or {@link #INFINITE}. Defaults to {@link #RESTART}.
+ *
+ * @param value {@link #RESTART} or {@link #REVERSE}
+ */
+ public void setRepeatMode(int value) {
+ mRepeatMode = value;
+ }
+
+ /**
+ * Defines what this animation should do when it reaches the end.
+ *
+ * @return either one of {@link #REVERSE} or {@link #RESTART}
+ */
+ public int getRepeatMode() {
+ return mRepeatMode;
+ }
+
+ /**
+ * Adds a listener to the set of listeners that are sent update events through the life of
+ * an animation. This method is called on all listeners for every frame of the animation,
+ * after the values for the animation have been calculated.
+ *
+ * @param listener the listener to be added to the current set of listeners for this animation.
+ */
+ public void addUpdateListener(AnimatorUpdateListener listener) {
+ if (mUpdateListeners == null) {
+ mUpdateListeners = new ArrayList<AnimatorUpdateListener>();
+ }
+ mUpdateListeners.add(listener);
+ }
+
+ /**
+ * Removes all listeners from the set listening to frame updates for this animation.
+ */
+ public void removeAllUpdateListeners() {
+ if (mUpdateListeners == null) {
+ return;
+ }
+ mUpdateListeners.clear();
+ mUpdateListeners = null;
+ }
+
+ /**
+ * Removes a listener from the set listening to frame updates for this animation.
+ *
+ * @param listener the listener to be removed from the current set of update listeners
+ * for this animation.
+ */
+ public void removeUpdateListener(AnimatorUpdateListener listener) {
+ if (mUpdateListeners == null) {
+ return;
+ }
+ mUpdateListeners.remove(listener);
+ if (mUpdateListeners.size() == 0) {
+ mUpdateListeners = null;
+ }
+ }
+
+
+ /**
+ * The time interpolator used in calculating the elapsed fraction of this animation. The
+ * interpolator determines whether the animation runs with linear or non-linear motion,
+ * such as acceleration and deceleration. The default value is
+ * {@link android.view.animation.AccelerateDecelerateInterpolator}
+ *
+ * @param value the interpolator to be used by this animation. A value of <code>null</code>
+ * will result in linear interpolation.
+ */
+ @Override
+ public void setInterpolator(/*Time*/Interpolator value) {
+ if (value != null) {
+ mInterpolator = value;
+ } else {
+ mInterpolator = new LinearInterpolator();
+ }
+ }
+
+ /**
+ * Returns the timing interpolator that this ValueAnimator uses.
+ *
+ * @return The timing interpolator for this ValueAnimator.
+ */
+ public /*Time*/Interpolator getInterpolator() {
+ return mInterpolator;
+ }
+
+ /**
+ * The type evaluator to be used when calculating the animated values of this animation.
+ * The system will automatically assign a float or int evaluator based on the type
+ * of <code>startValue</code> and <code>endValue</code> in the constructor. But if these values
+ * are not one of these primitive types, or if different evaluation is desired (such as is
+ * necessary with int values that represent colors), a custom evaluator needs to be assigned.
+ * For example, when running an animation on color values, the {@link ArgbEvaluator}
+ * should be used to get correct RGB color interpolation.
+ *
+ * <p>If this ValueAnimator has only one set of values being animated between, this evaluator
+ * will be used for that set. If there are several sets of values being animated, which is
+ * the case if PropertyValuesHOlder objects were set on the ValueAnimator, then the evaluator
+ * is assigned just to the first PropertyValuesHolder object.</p>
+ *
+ * @param value the evaluator to be used this animation
+ */
+ public void setEvaluator(TypeEvaluator value) {
+ if (value != null && mValues != null && mValues.length > 0) {
+ mValues[0].setEvaluator(value);
+ }
+ }
+
+ /**
+ * Start the animation playing. This version of start() takes a boolean flag that indicates
+ * whether the animation should play in reverse. The flag is usually false, but may be set
+ * to true if called from the reverse() method.
+ *
+ * <p>The animation started by calling this method will be run on the thread that called
+ * this method. This thread should have a Looper on it (a runtime exception will be thrown if
+ * this is not the case). Also, if the animation will animate
+ * properties of objects in the view hierarchy, then the calling thread should be the UI
+ * thread for that view hierarchy.</p>
+ *
+ * @param playBackwards Whether the ValueAnimator should start playing in reverse.
+ */
+ private void start(boolean playBackwards) {
+ if (Looper.myLooper() == null) {
+ throw new AndroidRuntimeException("Animators may only be run on Looper threads");
+ }
+ mPlayingBackwards = playBackwards;
+ mCurrentIteration = 0;
+ mPlayingState = STOPPED;
+ mStarted = true;
+ mStartedDelay = false;
+ sPendingAnimations.get().add(this);
+ if (mStartDelay == 0) {
+ // This sets the initial value of the animation, prior to actually starting it running
+ setCurrentPlayTime(getCurrentPlayTime());
+ mPlayingState = STOPPED;
+ mRunning = true;
+
+ if (mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationStart(this);
+ }
+ }
+ }
+ AnimationHandler animationHandler = sAnimationHandler.get();
+ if (animationHandler == null) {
+ animationHandler = new AnimationHandler();
+ sAnimationHandler.set(animationHandler);
+ }
+ animationHandler.sendEmptyMessage(ANIMATION_START);
+ }
+
+ @Override
+ public void start() {
+ start(false);
+ }
+
+ @Override
+ public void cancel() {
+ // Only cancel if the animation is actually running or has been started and is about
+ // to run
+ if (mPlayingState != STOPPED || sPendingAnimations.get().contains(this) ||
+ sDelayedAnims.get().contains(this)) {
+ // Only notify listeners if the animator has actually started
+ if (mRunning && mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ for (AnimatorListener listener : tmpListeners) {
+ listener.onAnimationCancel(this);
+ }
+ }
+ endAnimation();
+ }
+ }
+
+ @Override
+ public void end() {
+ if (!sAnimations.get().contains(this) && !sPendingAnimations.get().contains(this)) {
+ // Special case if the animation has not yet started; get it ready for ending
+ mStartedDelay = false;
+ startAnimation();
+ } else if (!mInitialized) {
+ initAnimation();
+ }
+ // The final value set on the target varies, depending on whether the animation
+ // was supposed to repeat an odd number of times
+ if (mRepeatCount > 0 && (mRepeatCount & 0x01) == 1) {
+ animateValue(0f);
+ } else {
+ animateValue(1f);
+ }
+ endAnimation();
+ }
+
+ @Override
+ public boolean isRunning() {
+ return (mPlayingState == RUNNING || mRunning);
+ }
+
+ @Override
+ public boolean isStarted() {
+ return mStarted;
+ }
+
+ /**
+ * Plays the ValueAnimator in reverse. If the animation is already running,
+ * it will stop itself and play backwards from the point reached when reverse was called.
+ * If the animation is not currently running, then it will start from the end and
+ * play backwards. This behavior is only set for the current animation; future playing
+ * of the animation will use the default behavior of playing forward.
+ */
+ public void reverse() {
+ mPlayingBackwards = !mPlayingBackwards;
+ if (mPlayingState == RUNNING) {
+ long currentTime = AnimationUtils.currentAnimationTimeMillis();
+ long currentPlayTime = currentTime - mStartTime;
+ long timeLeft = mDuration - currentPlayTime;
+ mStartTime = currentTime - timeLeft;
+ } else {
+ start(true);
+ }
+ }
+
+ /**
+ * Called internally to end an animation by removing it from the animations list. Must be
+ * called on the UI thread.
+ */
+ private void endAnimation() {
+ sAnimations.get().remove(this);
+ sPendingAnimations.get().remove(this);
+ sDelayedAnims.get().remove(this);
+ mPlayingState = STOPPED;
+ if (mRunning && mListeners != null) {
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationEnd(this);
+ }
+ }
+ mRunning = false;
+ mStarted = false;
+ }
+
+ /**
+ * Called internally to start an animation by adding it to the active animations list. Must be
+ * called on the UI thread.
+ */
+ private void startAnimation() {
+ initAnimation();
+ sAnimations.get().add(this);
+ if (mStartDelay > 0 && mListeners != null) {
+ // Listeners were already notified in start() if startDelay is 0; this is
+ // just for delayed animations
+ ArrayList<AnimatorListener> tmpListeners =
+ (ArrayList<AnimatorListener>) mListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationStart(this);
+ }
+ }
+ }
+
+ /**
+ * Internal function called to process an animation frame on an animation that is currently
+ * sleeping through its <code>startDelay</code> phase. The return value indicates whether it
+ * should be woken up and put on the active animations queue.
+ *
+ * @param currentTime The current animation time, used to calculate whether the animation
+ * has exceeded its <code>startDelay</code> and should be started.
+ * @return True if the animation's <code>startDelay</code> has been exceeded and the animation
+ * should be added to the set of active animations.
+ */
+ private boolean delayedAnimationFrame(long currentTime) {
+ if (!mStartedDelay) {
+ mStartedDelay = true;
+ mDelayStartTime = currentTime;
+ } else {
+ long deltaTime = currentTime - mDelayStartTime;
+ if (deltaTime > mStartDelay) {
+ // startDelay ended - start the anim and record the
+ // mStartTime appropriately
+ mStartTime = currentTime - (deltaTime - mStartDelay);
+ mPlayingState = RUNNING;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * This internal function processes a single animation frame for a given animation. The
+ * currentTime parameter is the timing pulse sent by the handler, used to calculate the
+ * elapsed duration, and therefore
+ * the elapsed fraction, of the animation. The return value indicates whether the animation
+ * should be ended (which happens when the elapsed time of the animation exceeds the
+ * animation's duration, including the repeatCount).
+ *
+ * @param currentTime The current time, as tracked by the static timing handler
+ * @return true if the animation's duration, including any repetitions due to
+ * <code>repeatCount</code> has been exceeded and the animation should be ended.
+ */
+ boolean animationFrame(long currentTime) {
+ boolean done = false;
+
+ if (mPlayingState == STOPPED) {
+ mPlayingState = RUNNING;
+ if (mSeekTime < 0) {
+ mStartTime = currentTime;
+ } else {
+ mStartTime = currentTime - mSeekTime;
+ // Now that we're playing, reset the seek time
+ mSeekTime = -1;
+ }
+ }
+ switch (mPlayingState) {
+ case RUNNING:
+ case SEEKED:
+ float fraction = mDuration > 0 ? (float)(currentTime - mStartTime) / mDuration : 1f;
+ if (fraction >= 1f) {
+ if (mCurrentIteration < mRepeatCount || mRepeatCount == INFINITE) {
+ // Time to repeat
+ if (mListeners != null) {
+ int numListeners = mListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ mListeners.get(i).onAnimationRepeat(this);
+ }
+ }
+ if (mRepeatMode == REVERSE) {
+ mPlayingBackwards = mPlayingBackwards ? false : true;
+ }
+ mCurrentIteration += (int)fraction;
+ fraction = fraction % 1f;
+ mStartTime += mDuration;
+ } else {
+ done = true;
+ fraction = Math.min(fraction, 1.0f);
+ }
+ }
+ if (mPlayingBackwards) {
+ fraction = 1f - fraction;
+ }
+ animateValue(fraction);
+ break;
+ }
+
+ return done;
+ }
+
+ /**
+ * Returns the current animation fraction, which is the elapsed/interpolated fraction used in
+ * the most recent frame update on the animation.
+ *
+ * @return Elapsed/interpolated fraction of the animation.
+ */
+ public float getAnimatedFraction() {
+ return mCurrentFraction;
+ }
+
+ /**
+ * This method is called with the elapsed fraction of the animation during every
+ * animation frame. This function turns the elapsed fraction into an interpolated fraction
+ * and then into an animated value (from the evaluator. The function is called mostly during
+ * animation updates, but it is also called when the <code>end()</code>
+ * function is called, to set the final value on the property.
+ *
+ * <p>Overrides of this method must call the superclass to perform the calculation
+ * of the animated value.</p>
+ *
+ * @param fraction The elapsed fraction of the animation.
+ */
+ void animateValue(float fraction) {
+ fraction = mInterpolator.getInterpolation(fraction);
+ mCurrentFraction = fraction;
+ int numValues = mValues.length;
+ for (int i = 0; i < numValues; ++i) {
+ mValues[i].calculateValue(fraction);
+ }
+ if (mUpdateListeners != null) {
+ int numListeners = mUpdateListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ mUpdateListeners.get(i).onAnimationUpdate(this);
+ }
+ }
+ }
+
+ @Override
+ public ValueAnimator clone() {
+ final ValueAnimator anim = (ValueAnimator) super.clone();
+ if (mUpdateListeners != null) {
+ ArrayList<AnimatorUpdateListener> oldListeners = mUpdateListeners;
+ anim.mUpdateListeners = new ArrayList<AnimatorUpdateListener>();
+ int numListeners = oldListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ anim.mUpdateListeners.add(oldListeners.get(i));
+ }
+ }
+ anim.mSeekTime = -1;
+ anim.mPlayingBackwards = false;
+ anim.mCurrentIteration = 0;
+ anim.mInitialized = false;
+ anim.mPlayingState = STOPPED;
+ anim.mStartedDelay = false;
+ PropertyValuesHolder[] oldValues = mValues;
+ if (oldValues != null) {
+ int numValues = oldValues.length;
+ anim.mValues = new PropertyValuesHolder[numValues];
+ anim.mValuesMap = new HashMap<String, PropertyValuesHolder>(numValues);
+ for (int i = 0; i < numValues; ++i) {
+ PropertyValuesHolder newValuesHolder = oldValues[i].clone();
+ anim.mValues[i] = newValuesHolder;
+ anim.mValuesMap.put(newValuesHolder.getPropertyName(), newValuesHolder);
+ }
+ }
+ return anim;
+ }
+
+ /**
+ * Implementors of this interface can add themselves as update listeners
+ * to an <code>ValueAnimator</code> instance to receive callbacks on every animation
+ * frame, after the current frame's values have been calculated for that
+ * <code>ValueAnimator</code>.
+ */
+ public static interface AnimatorUpdateListener {
+ /**
+ * <p>Notifies the occurrence of another frame of the animation.</p>
+ *
+ * @param animation The animation which was repeated.
+ */
+ void onAnimationUpdate(ValueAnimator animation);
+
+ }
+
+ /**
+ * Return the number of animations currently running.
+ *
+ * Used by StrictMode internally to annotate violations. Only
+ * called on the main thread.
+ *
+ * @hide
+ */
+ public static int getCurrentAnimationsCount() {
+ return sAnimations.get().size();
+ }
+
+ /**
+ * Clear all animations on this thread, without canceling or ending them.
+ * This should be used with caution.
+ *
+ * @hide
+ */
+ public static void clearAllAnimations() {
+ sAnimations.get().clear();
+ sPendingAnimations.get().clear();
+ sDelayedAnims.get().clear();
+ }
+
+ @Override
+ public String toString() {
+ String returnVal = "ValueAnimator@" + Integer.toHexString(hashCode());
+ if (mValues != null) {
+ for (int i = 0; i < mValues.length; ++i) {
+ returnVal += "\n " + mValues[i].toString();
+ }
+ }
+ return returnVal;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/NineViewGroup.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/NineViewGroup.java
new file mode 100644
index 0000000000..7b830b9c05
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/NineViewGroup.java
@@ -0,0 +1,79 @@
+package com.actionbarsherlock.internal.nineoldandroids.view;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.ViewGroup;
+
+import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy;
+
+public abstract class NineViewGroup extends ViewGroup {
+ private final AnimatorProxy mProxy;
+
+ public NineViewGroup(Context context) {
+ super(context);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+ public NineViewGroup(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+ public NineViewGroup(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+
+ @Override
+ public void setVisibility(int visibility) {
+ if (mProxy != null) {
+ if (visibility == GONE) {
+ clearAnimation();
+ } else if (visibility == VISIBLE) {
+ setAnimation(mProxy);
+ }
+ }
+ super.setVisibility(visibility);
+ }
+
+ public float getAlpha() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getAlpha();
+ } else {
+ return super.getAlpha();
+ }
+ }
+ public void setAlpha(float alpha) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setAlpha(alpha);
+ } else {
+ super.setAlpha(alpha);
+ }
+ }
+ public float getTranslationX() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getTranslationX();
+ } else {
+ return super.getTranslationX();
+ }
+ }
+ public void setTranslationX(float translationX) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setTranslationX(translationX);
+ } else {
+ super.setTranslationX(translationX);
+ }
+ }
+ public float getTranslationY() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getTranslationY();
+ } else {
+ return super.getTranslationY();
+ }
+ }
+ public void setTranslationY(float translationY) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setTranslationY(translationY);
+ } else {
+ super.setTranslationY(translationY);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java
new file mode 100644
index 0000000000..067d0494ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java
@@ -0,0 +1,212 @@
+package com.actionbarsherlock.internal.nineoldandroids.view.animation;
+
+import java.lang.ref.WeakReference;
+import java.util.WeakHashMap;
+import android.graphics.Matrix;
+import android.graphics.RectF;
+import android.os.Build;
+import android.util.FloatMath;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.Transformation;
+
+public final class AnimatorProxy extends Animation {
+ public static final boolean NEEDS_PROXY = Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB;
+
+ private static final WeakHashMap<View, AnimatorProxy> PROXIES =
+ new WeakHashMap<View, AnimatorProxy>();
+
+ public static AnimatorProxy wrap(View view) {
+ AnimatorProxy proxy = PROXIES.get(view);
+ if (proxy == null) {
+ proxy = new AnimatorProxy(view);
+ PROXIES.put(view, proxy);
+ }
+ return proxy;
+ }
+
+ private final WeakReference<View> mView;
+
+ private float mAlpha = 1;
+ private float mScaleX = 1;
+ private float mScaleY = 1;
+ private float mTranslationX;
+ private float mTranslationY;
+
+ private final RectF mBefore = new RectF();
+ private final RectF mAfter = new RectF();
+ private final Matrix mTempMatrix = new Matrix();
+
+ private AnimatorProxy(View view) {
+ setDuration(0); //perform transformation immediately
+ setFillAfter(true); //persist transformation beyond duration
+ view.setAnimation(this);
+ mView = new WeakReference<View>(view);
+ }
+
+ public float getAlpha() {
+ return mAlpha;
+ }
+ public void setAlpha(float alpha) {
+ if (mAlpha != alpha) {
+ mAlpha = alpha;
+ View view = mView.get();
+ if (view != null) {
+ view.invalidate();
+ }
+ }
+ }
+ public float getScaleX() {
+ return mScaleX;
+ }
+ public void setScaleX(float scaleX) {
+ if (mScaleX != scaleX) {
+ prepareForUpdate();
+ mScaleX = scaleX;
+ invalidateAfterUpdate();
+ }
+ }
+ public float getScaleY() {
+ return mScaleY;
+ }
+ public void setScaleY(float scaleY) {
+ if (mScaleY != scaleY) {
+ prepareForUpdate();
+ mScaleY = scaleY;
+ invalidateAfterUpdate();
+ }
+ }
+ public int getScrollX() {
+ View view = mView.get();
+ if (view == null) {
+ return 0;
+ }
+ return view.getScrollX();
+ }
+ public void setScrollX(int value) {
+ View view = mView.get();
+ if (view != null) {
+ view.scrollTo(value, view.getScrollY());
+ }
+ }
+ public int getScrollY() {
+ View view = mView.get();
+ if (view == null) {
+ return 0;
+ }
+ return view.getScrollY();
+ }
+ public void setScrollY(int value) {
+ View view = mView.get();
+ if (view != null) {
+ view.scrollTo(view.getScrollY(), value);
+ }
+ }
+
+ public float getTranslationX() {
+ return mTranslationX;
+ }
+ public void setTranslationX(float translationX) {
+ if (mTranslationX != translationX) {
+ prepareForUpdate();
+ mTranslationX = translationX;
+ invalidateAfterUpdate();
+ }
+ }
+ public float getTranslationY() {
+ return mTranslationY;
+ }
+ public void setTranslationY(float translationY) {
+ if (mTranslationY != translationY) {
+ prepareForUpdate();
+ mTranslationY = translationY;
+ invalidateAfterUpdate();
+ }
+ }
+
+ private void prepareForUpdate() {
+ View view = mView.get();
+ if (view != null) {
+ computeRect(mBefore, view);
+ }
+ }
+ private void invalidateAfterUpdate() {
+ View view = mView.get();
+ if (view == null) {
+ return;
+ }
+ View parent = (View)view.getParent();
+ if (parent == null) {
+ return;
+ }
+
+ view.setAnimation(this);
+
+ final RectF after = mAfter;
+ computeRect(after, view);
+ after.union(mBefore);
+
+ parent.invalidate(
+ (int) FloatMath.floor(after.left),
+ (int) FloatMath.floor(after.top),
+ (int) FloatMath.ceil(after.right),
+ (int) FloatMath.ceil(after.bottom));
+ }
+
+ private void computeRect(final RectF r, View view) {
+ // compute current rectangle according to matrix transformation
+ final float w = view.getWidth();
+ final float h = view.getHeight();
+
+ // use a rectangle at 0,0 to make sure we don't run into issues with scaling
+ r.set(0, 0, w, h);
+
+ final Matrix m = mTempMatrix;
+ m.reset();
+ transformMatrix(m, view);
+ mTempMatrix.mapRect(r);
+
+ r.offset(view.getLeft(), view.getTop());
+
+ // Straighten coords if rotations flipped them
+ if (r.right < r.left) {
+ final float f = r.right;
+ r.right = r.left;
+ r.left = f;
+ }
+ if (r.bottom < r.top) {
+ final float f = r.top;
+ r.top = r.bottom;
+ r.bottom = f;
+ }
+ }
+
+ private void transformMatrix(Matrix m, View view) {
+ final float w = view.getWidth();
+ final float h = view.getHeight();
+
+ final float sX = mScaleX;
+ final float sY = mScaleY;
+ if ((sX != 1.0f) || (sY != 1.0f)) {
+ final float deltaSX = ((sX * w) - w) / 2f;
+ final float deltaSY = ((sY * h) - h) / 2f;
+ m.postScale(sX, sY);
+ m.postTranslate(-deltaSX, -deltaSY);
+ }
+ m.postTranslate(mTranslationX, mTranslationY);
+ }
+
+ @Override
+ protected void applyTransformation(float interpolatedTime, Transformation t) {
+ View view = mView.get();
+ if (view != null) {
+ t.setAlpha(mAlpha);
+ transformMatrix(t.getMatrix(), view);
+ }
+ }
+
+ @Override
+ public void reset() {
+ /* Do nothing. */
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineFrameLayout.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineFrameLayout.java
new file mode 100644
index 0000000000..953e3e8444
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineFrameLayout.java
@@ -0,0 +1,57 @@
+package com.actionbarsherlock.internal.nineoldandroids.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy;
+
+public class NineFrameLayout extends FrameLayout {
+ private final AnimatorProxy mProxy;
+
+ public NineFrameLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+
+ @Override
+ public void setVisibility(int visibility) {
+ if (mProxy != null) {
+ if (visibility == GONE) {
+ clearAnimation();
+ } else if (visibility == VISIBLE) {
+ setAnimation(mProxy);
+ }
+ }
+ super.setVisibility(visibility);
+ }
+
+ public float getAlpha() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getAlpha();
+ } else {
+ return super.getAlpha();
+ }
+ }
+ public void setAlpha(float alpha) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setAlpha(alpha);
+ } else {
+ super.setAlpha(alpha);
+ }
+ }
+ public float getTranslationY() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getTranslationY();
+ } else {
+ return super.getTranslationY();
+ }
+ }
+ public void setTranslationY(float translationY) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setTranslationY(translationY);
+ } else {
+ super.setTranslationY(translationY);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineHorizontalScrollView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineHorizontalScrollView.java
new file mode 100644
index 0000000000..129b5aaaa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineHorizontalScrollView.java
@@ -0,0 +1,41 @@
+package com.actionbarsherlock.internal.nineoldandroids.widget;
+
+import android.content.Context;
+import android.widget.HorizontalScrollView;
+import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy;
+
+public class NineHorizontalScrollView extends HorizontalScrollView {
+ private final AnimatorProxy mProxy;
+
+ public NineHorizontalScrollView(Context context) {
+ super(context);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+
+ @Override
+ public void setVisibility(int visibility) {
+ if (mProxy != null) {
+ if (visibility == GONE) {
+ clearAnimation();
+ } else if (visibility == VISIBLE) {
+ setAnimation(mProxy);
+ }
+ }
+ super.setVisibility(visibility);
+ }
+
+ public float getAlpha() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getAlpha();
+ } else {
+ return super.getAlpha();
+ }
+ }
+ public void setAlpha(float alpha) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setAlpha(alpha);
+ } else {
+ super.setAlpha(alpha);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineLinearLayout.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineLinearLayout.java
new file mode 100644
index 0000000000..1f381013a7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/widget/NineLinearLayout.java
@@ -0,0 +1,57 @@
+package com.actionbarsherlock.internal.nineoldandroids.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.LinearLayout;
+
+import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy;
+
+public class NineLinearLayout extends LinearLayout {
+ private final AnimatorProxy mProxy;
+
+ public NineLinearLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mProxy = AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(this) : null;
+ }
+
+ @Override
+ public void setVisibility(int visibility) {
+ if (mProxy != null) {
+ if (visibility == GONE) {
+ clearAnimation();
+ } else if (visibility == VISIBLE) {
+ setAnimation(mProxy);
+ }
+ }
+ super.setVisibility(visibility);
+ }
+
+ public float getAlpha() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getAlpha();
+ } else {
+ return super.getAlpha();
+ }
+ }
+ public void setAlpha(float alpha) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setAlpha(alpha);
+ } else {
+ super.setAlpha(alpha);
+ }
+ }
+ public float getTranslationX() {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ return mProxy.getTranslationX();
+ } else {
+ return super.getTranslationX();
+ }
+ }
+ public void setTranslationX(float translationX) {
+ if (AnimatorProxy.NEEDS_PROXY) {
+ mProxy.setTranslationX(translationX);
+ } else {
+ super.setTranslationX(translationX);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/ActionProviderWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/ActionProviderWrapper.java
new file mode 100644
index 0000000000..b136d50f07
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/ActionProviderWrapper.java
@@ -0,0 +1,40 @@
+package com.actionbarsherlock.internal.view;
+
+import com.actionbarsherlock.internal.view.menu.SubMenuWrapper;
+import com.actionbarsherlock.view.ActionProvider;
+import android.view.View;
+
+public class ActionProviderWrapper extends android.view.ActionProvider {
+ private final ActionProvider mProvider;
+
+
+ public ActionProviderWrapper(ActionProvider provider) {
+ super(null/*TODO*/); //XXX this *should* be unused
+ mProvider = provider;
+ }
+
+
+ public ActionProvider unwrap() {
+ return mProvider;
+ }
+
+ @Override
+ public View onCreateActionView() {
+ return mProvider.onCreateActionView();
+ }
+
+ @Override
+ public boolean hasSubMenu() {
+ return mProvider.hasSubMenu();
+ }
+
+ @Override
+ public boolean onPerformDefaultAction() {
+ return mProvider.onPerformDefaultAction();
+ }
+
+ @Override
+ public void onPrepareSubMenu(android.view.SubMenu subMenu) {
+ mProvider.onPrepareSubMenu(new SubMenuWrapper(subMenu));
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/StandaloneActionMode.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/StandaloneActionMode.java
new file mode 100644
index 0000000000..0a87bd3f79
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/StandaloneActionMode.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package com.actionbarsherlock.internal.view;
+
+import android.content.Context;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+
+import java.lang.ref.WeakReference;
+
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.internal.view.menu.MenuPopupHelper;
+import com.actionbarsherlock.internal.view.menu.SubMenuBuilder;
+import com.actionbarsherlock.internal.widget.ActionBarContextView;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public class StandaloneActionMode extends ActionMode implements MenuBuilder.Callback {
+ private Context mContext;
+ private ActionBarContextView mContextView;
+ private ActionMode.Callback mCallback;
+ private WeakReference<View> mCustomView;
+ private boolean mFinished;
+ private boolean mFocusable;
+
+ private MenuBuilder mMenu;
+
+ public StandaloneActionMode(Context context, ActionBarContextView view,
+ ActionMode.Callback callback, boolean isFocusable) {
+ mContext = context;
+ mContextView = view;
+ mCallback = callback;
+
+ mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ mMenu.setCallback(this);
+ mFocusable = isFocusable;
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ mContextView.setTitle(title);
+ }
+
+ @Override
+ public void setSubtitle(CharSequence subtitle) {
+ mContextView.setSubtitle(subtitle);
+ }
+
+ @Override
+ public void setTitle(int resId) {
+ setTitle(mContext.getString(resId));
+ }
+
+ @Override
+ public void setSubtitle(int resId) {
+ setSubtitle(mContext.getString(resId));
+ }
+
+ @Override
+ public void setCustomView(View view) {
+ mContextView.setCustomView(view);
+ mCustomView = view != null ? new WeakReference<View>(view) : null;
+ }
+
+ @Override
+ public void invalidate() {
+ mCallback.onPrepareActionMode(this, mMenu);
+ }
+
+ @Override
+ public void finish() {
+ if (mFinished) {
+ return;
+ }
+ mFinished = true;
+
+ mContextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+ mCallback.onDestroyActionMode(this);
+ }
+
+ @Override
+ public Menu getMenu() {
+ return mMenu;
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return mContextView.getTitle();
+ }
+
+ @Override
+ public CharSequence getSubtitle() {
+ return mContextView.getSubtitle();
+ }
+
+ @Override
+ public View getCustomView() {
+ return mCustomView != null ? mCustomView.get() : null;
+ }
+
+ @Override
+ public MenuInflater getMenuInflater() {
+ return new MenuInflater(mContext);
+ }
+
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ return mCallback.onActionItemClicked(this, item);
+ }
+
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ }
+
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (!subMenu.hasVisibleItems()) {
+ return true;
+ }
+
+ new MenuPopupHelper(mContext, subMenu).show();
+ return true;
+ }
+
+ public void onCloseSubMenu(SubMenuBuilder menu) {
+ }
+
+ public void onMenuModeChange(MenuBuilder menu) {
+ invalidate();
+ mContextView.showOverflowMenu();
+ }
+
+ public boolean isUiFocusable() {
+ return mFocusable;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_HasStateListenerSupport.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_HasStateListenerSupport.java
new file mode 100644
index 0000000000..7d45e81be7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_HasStateListenerSupport.java
@@ -0,0 +1,6 @@
+package com.actionbarsherlock.internal.view;
+
+public interface View_HasStateListenerSupport {
+ void addOnAttachStateChangeListener(View_OnAttachStateChangeListener listener);
+ void removeOnAttachStateChangeListener(View_OnAttachStateChangeListener listener);
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_OnAttachStateChangeListener.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_OnAttachStateChangeListener.java
new file mode 100644
index 0000000000..3869d32907
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/View_OnAttachStateChangeListener.java
@@ -0,0 +1,8 @@
+package com.actionbarsherlock.internal.view;
+
+import android.view.View;
+
+public interface View_OnAttachStateChangeListener {
+ void onViewAttachedToWindow(View v);
+ void onViewDetachedFromWindow(View v);
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenu.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenu.java
new file mode 100644
index 0000000000..0354ad1ad1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenu.java
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.view.KeyEvent;
+
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+/**
+ * @hide
+ */
+public class ActionMenu implements Menu {
+ private Context mContext;
+
+ private boolean mIsQwerty;
+
+ private ArrayList<ActionMenuItem> mItems;
+
+ public ActionMenu(Context context) {
+ mContext = context;
+ mItems = new ArrayList<ActionMenuItem>();
+ }
+
+ public Context getContext() {
+ return mContext;
+ }
+
+ public MenuItem add(CharSequence title) {
+ return add(0, 0, 0, title);
+ }
+
+ public MenuItem add(int titleRes) {
+ return add(0, 0, 0, titleRes);
+ }
+
+ public MenuItem add(int groupId, int itemId, int order, int titleRes) {
+ return add(groupId, itemId, order, mContext.getResources().getString(titleRes));
+ }
+
+ public MenuItem add(int groupId, int itemId, int order, CharSequence title) {
+ ActionMenuItem item = new ActionMenuItem(getContext(),
+ groupId, itemId, 0, order, title);
+ mItems.add(order, item);
+ return item;
+ }
+
+ public int addIntentOptions(int groupId, int itemId, int order,
+ ComponentName caller, Intent[] specifics, Intent intent, int flags,
+ MenuItem[] outSpecificItems) {
+ PackageManager pm = mContext.getPackageManager();
+ final List<ResolveInfo> lri =
+ pm.queryIntentActivityOptions(caller, specifics, intent, 0);
+ final int N = lri != null ? lri.size() : 0;
+
+ if ((flags & FLAG_APPEND_TO_GROUP) == 0) {
+ removeGroup(groupId);
+ }
+
+ for (int i=0; i<N; i++) {
+ final ResolveInfo ri = lri.get(i);
+ Intent rintent = new Intent(
+ ri.specificIndex < 0 ? intent : specifics[ri.specificIndex]);
+ rintent.setComponent(new ComponentName(
+ ri.activityInfo.applicationInfo.packageName,
+ ri.activityInfo.name));
+ final MenuItem item = add(groupId, itemId, order, ri.loadLabel(pm))
+ .setIcon(ri.loadIcon(pm))
+ .setIntent(rintent);
+ if (outSpecificItems != null && ri.specificIndex >= 0) {
+ outSpecificItems[ri.specificIndex] = item;
+ }
+ }
+
+ return N;
+ }
+
+ public SubMenu addSubMenu(CharSequence title) {
+ // TODO Implement submenus
+ return null;
+ }
+
+ public SubMenu addSubMenu(int titleRes) {
+ // TODO Implement submenus
+ return null;
+ }
+
+ public SubMenu addSubMenu(int groupId, int itemId, int order,
+ CharSequence title) {
+ // TODO Implement submenus
+ return null;
+ }
+
+ public SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes) {
+ // TODO Implement submenus
+ return null;
+ }
+
+ public void clear() {
+ mItems.clear();
+ }
+
+ public void close() {
+ }
+
+ private int findItemIndex(int id) {
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+ for (int i = 0; i < itemCount; i++) {
+ if (items.get(i).getItemId() == id) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ public MenuItem findItem(int id) {
+ return mItems.get(findItemIndex(id));
+ }
+
+ public MenuItem getItem(int index) {
+ return mItems.get(index);
+ }
+
+ public boolean hasVisibleItems() {
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+
+ for (int i = 0; i < itemCount; i++) {
+ if (items.get(i).isVisible()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private ActionMenuItem findItemWithShortcut(int keyCode, KeyEvent event) {
+ // TODO Make this smarter.
+ final boolean qwerty = mIsQwerty;
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+
+ for (int i = 0; i < itemCount; i++) {
+ ActionMenuItem item = items.get(i);
+ final char shortcut = qwerty ? item.getAlphabeticShortcut() :
+ item.getNumericShortcut();
+ if (keyCode == shortcut) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ public boolean isShortcutKey(int keyCode, KeyEvent event) {
+ return findItemWithShortcut(keyCode, event) != null;
+ }
+
+ public boolean performIdentifierAction(int id, int flags) {
+ final int index = findItemIndex(id);
+ if (index < 0) {
+ return false;
+ }
+
+ return mItems.get(index).invoke();
+ }
+
+ public boolean performShortcut(int keyCode, KeyEvent event, int flags) {
+ ActionMenuItem item = findItemWithShortcut(keyCode, event);
+ if (item == null) {
+ return false;
+ }
+
+ return item.invoke();
+ }
+
+ public void removeGroup(int groupId) {
+ final ArrayList<ActionMenuItem> items = mItems;
+ int itemCount = items.size();
+ int i = 0;
+ while (i < itemCount) {
+ if (items.get(i).getGroupId() == groupId) {
+ items.remove(i);
+ itemCount--;
+ } else {
+ i++;
+ }
+ }
+ }
+
+ public void removeItem(int id) {
+ mItems.remove(findItemIndex(id));
+ }
+
+ public void setGroupCheckable(int group, boolean checkable,
+ boolean exclusive) {
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+
+ for (int i = 0; i < itemCount; i++) {
+ ActionMenuItem item = items.get(i);
+ if (item.getGroupId() == group) {
+ item.setCheckable(checkable);
+ item.setExclusiveCheckable(exclusive);
+ }
+ }
+ }
+
+ public void setGroupEnabled(int group, boolean enabled) {
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+
+ for (int i = 0; i < itemCount; i++) {
+ ActionMenuItem item = items.get(i);
+ if (item.getGroupId() == group) {
+ item.setEnabled(enabled);
+ }
+ }
+ }
+
+ public void setGroupVisible(int group, boolean visible) {
+ final ArrayList<ActionMenuItem> items = mItems;
+ final int itemCount = items.size();
+
+ for (int i = 0; i < itemCount; i++) {
+ ActionMenuItem item = items.get(i);
+ if (item.getGroupId() == group) {
+ item.setVisible(visible);
+ }
+ }
+ }
+
+ public void setQwertyMode(boolean isQwerty) {
+ mIsQwerty = isQwerty;
+ }
+
+ public int size() {
+ return mItems.size();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItem.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItem.java
new file mode 100644
index 0000000000..510b974886
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItem.java
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+/**
+ * @hide
+ */
+public class ActionMenuItem implements MenuItem {
+ private final int mId;
+ private final int mGroup;
+ //UNUSED private final int mCategoryOrder;
+ private final int mOrdering;
+
+ private CharSequence mTitle;
+ private CharSequence mTitleCondensed;
+ private Intent mIntent;
+ private char mShortcutNumericChar;
+ private char mShortcutAlphabeticChar;
+
+ private Drawable mIconDrawable;
+ //UNUSED private int mIconResId = NO_ICON;
+
+ private Context mContext;
+
+ private MenuItem.OnMenuItemClickListener mClickListener;
+
+ //UNUSED private static final int NO_ICON = 0;
+
+ private int mFlags = ENABLED;
+ private static final int CHECKABLE = 0x00000001;
+ private static final int CHECKED = 0x00000002;
+ private static final int EXCLUSIVE = 0x00000004;
+ private static final int HIDDEN = 0x00000008;
+ private static final int ENABLED = 0x00000010;
+
+ public ActionMenuItem(Context context, int group, int id, int categoryOrder, int ordering,
+ CharSequence title) {
+ mContext = context;
+ mId = id;
+ mGroup = group;
+ //UNUSED mCategoryOrder = categoryOrder;
+ mOrdering = ordering;
+ mTitle = title;
+ }
+
+ public char getAlphabeticShortcut() {
+ return mShortcutAlphabeticChar;
+ }
+
+ public int getGroupId() {
+ return mGroup;
+ }
+
+ public Drawable getIcon() {
+ return mIconDrawable;
+ }
+
+ public Intent getIntent() {
+ return mIntent;
+ }
+
+ public int getItemId() {
+ return mId;
+ }
+
+ public ContextMenuInfo getMenuInfo() {
+ return null;
+ }
+
+ public char getNumericShortcut() {
+ return mShortcutNumericChar;
+ }
+
+ public int getOrder() {
+ return mOrdering;
+ }
+
+ public SubMenu getSubMenu() {
+ return null;
+ }
+
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ public CharSequence getTitleCondensed() {
+ return mTitleCondensed;
+ }
+
+ public boolean hasSubMenu() {
+ return false;
+ }
+
+ public boolean isCheckable() {
+ return (mFlags & CHECKABLE) != 0;
+ }
+
+ public boolean isChecked() {
+ return (mFlags & CHECKED) != 0;
+ }
+
+ public boolean isEnabled() {
+ return (mFlags & ENABLED) != 0;
+ }
+
+ public boolean isVisible() {
+ return (mFlags & HIDDEN) == 0;
+ }
+
+ public MenuItem setAlphabeticShortcut(char alphaChar) {
+ mShortcutAlphabeticChar = alphaChar;
+ return this;
+ }
+
+ public MenuItem setCheckable(boolean checkable) {
+ mFlags = (mFlags & ~CHECKABLE) | (checkable ? CHECKABLE : 0);
+ return this;
+ }
+
+ public ActionMenuItem setExclusiveCheckable(boolean exclusive) {
+ mFlags = (mFlags & ~EXCLUSIVE) | (exclusive ? EXCLUSIVE : 0);
+ return this;
+ }
+
+ public MenuItem setChecked(boolean checked) {
+ mFlags = (mFlags & ~CHECKED) | (checked ? CHECKED : 0);
+ return this;
+ }
+
+ public MenuItem setEnabled(boolean enabled) {
+ mFlags = (mFlags & ~ENABLED) | (enabled ? ENABLED : 0);
+ return this;
+ }
+
+ public MenuItem setIcon(Drawable icon) {
+ mIconDrawable = icon;
+ //UNUSED mIconResId = NO_ICON;
+ return this;
+ }
+
+ public MenuItem setIcon(int iconRes) {
+ //UNUSED mIconResId = iconRes;
+ mIconDrawable = mContext.getResources().getDrawable(iconRes);
+ return this;
+ }
+
+ public MenuItem setIntent(Intent intent) {
+ mIntent = intent;
+ return this;
+ }
+
+ public MenuItem setNumericShortcut(char numericChar) {
+ mShortcutNumericChar = numericChar;
+ return this;
+ }
+
+ public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener menuItemClickListener) {
+ mClickListener = menuItemClickListener;
+ return this;
+ }
+
+ public MenuItem setShortcut(char numericChar, char alphaChar) {
+ mShortcutNumericChar = numericChar;
+ mShortcutAlphabeticChar = alphaChar;
+ return this;
+ }
+
+ public MenuItem setTitle(CharSequence title) {
+ mTitle = title;
+ return this;
+ }
+
+ public MenuItem setTitle(int title) {
+ mTitle = mContext.getResources().getString(title);
+ return this;
+ }
+
+ public MenuItem setTitleCondensed(CharSequence title) {
+ mTitleCondensed = title;
+ return this;
+ }
+
+ public MenuItem setVisible(boolean visible) {
+ mFlags = (mFlags & HIDDEN) | (visible ? 0 : HIDDEN);
+ return this;
+ }
+
+ public boolean invoke() {
+ if (mClickListener != null && mClickListener.onMenuItemClick(this)) {
+ return true;
+ }
+
+ if (mIntent != null) {
+ mContext.startActivity(mIntent);
+ return true;
+ }
+
+ return false;
+ }
+
+ public void setShowAsAction(int show) {
+ // Do nothing. ActionMenuItems always show as action buttons.
+ }
+
+ public MenuItem setActionView(View actionView) {
+ throw new UnsupportedOperationException();
+ }
+
+ public View getActionView() {
+ return null;
+ }
+
+ @Override
+ public MenuItem setActionView(int resId) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ActionProvider getActionProvider() {
+ return null;
+ }
+
+ @Override
+ public MenuItem setActionProvider(ActionProvider actionProvider) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public MenuItem setShowAsActionFlags(int actionEnum) {
+ setShowAsAction(actionEnum);
+ return this;
+ }
+
+ @Override
+ public boolean expandActionView() {
+ return false;
+ }
+
+ @Override
+ public boolean collapseActionView() {
+ return false;
+ }
+
+ @Override
+ public boolean isActionViewExpanded() {
+ return false;
+ }
+
+ @Override
+ public MenuItem setOnActionExpandListener(OnActionExpandListener listener) {
+ // No need to save the listener; ActionMenuItem does not support collapsing items.
+ return this;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItemView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItemView.java
new file mode 100644
index 0000000000..7d36c3b22c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuItemView.java
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.HashSet;
+import java.util.Set;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
+import android.widget.Toast;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.view.View_HasStateListenerSupport;
+import com.actionbarsherlock.internal.view.View_OnAttachStateChangeListener;
+import com.actionbarsherlock.internal.widget.CapitalizingButton;
+import com.actionbarsherlock.internal.widget.IcsToast;
+
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getBoolean;
+
+/**
+ * @hide
+ */
+public class ActionMenuItemView extends LinearLayout
+ implements MenuView.ItemView, View.OnClickListener, View.OnLongClickListener,
+ ActionMenuView.ActionMenuChildView, View_HasStateListenerSupport {
+ //UNUSED private static final String TAG = "ActionMenuItemView";
+
+ private MenuItemImpl mItemData;
+ private CharSequence mTitle;
+ private MenuBuilder.ItemInvoker mItemInvoker;
+
+ private ImageButton mImageButton;
+ private CapitalizingButton mTextButton;
+ private boolean mAllowTextWithIcon;
+ private boolean mExpandedFormat;
+ private int mMinWidth;
+
+ private final Set<View_OnAttachStateChangeListener> mListeners = new HashSet<View_OnAttachStateChangeListener>();
+
+ public ActionMenuItemView(Context context) {
+ this(context, null);
+ }
+
+ public ActionMenuItemView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public ActionMenuItemView(Context context, AttributeSet attrs, int defStyle) {
+ //TODO super(context, attrs, defStyle);
+ super(context, attrs);
+ mAllowTextWithIcon = getResources_getBoolean(context,
+ R.bool.abs__config_allowActionMenuItemTextWithIcon);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.SherlockActionMenuItemView, 0, 0);
+ mMinWidth = a.getDimensionPixelSize(
+ R.styleable.SherlockActionMenuItemView_android_minWidth, 0);
+ a.recycle();
+ }
+
+ @Override
+ public void addOnAttachStateChangeListener(View_OnAttachStateChangeListener listener) {
+ mListeners.add(listener);
+ }
+
+ @Override
+ public void removeOnAttachStateChangeListener(View_OnAttachStateChangeListener listener) {
+ mListeners.remove(listener);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ for (View_OnAttachStateChangeListener listener : mListeners) {
+ listener.onViewAttachedToWindow(this);
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ for (View_OnAttachStateChangeListener listener : mListeners) {
+ listener.onViewDetachedFromWindow(this);
+ }
+ }
+
+ @Override
+ public void onFinishInflate() {
+
+ mImageButton = (ImageButton) findViewById(R.id.abs__imageButton);
+ mTextButton = (CapitalizingButton) findViewById(R.id.abs__textButton);
+ mImageButton.setOnClickListener(this);
+ mTextButton.setOnClickListener(this);
+ mImageButton.setOnLongClickListener(this);
+ setOnClickListener(this);
+ setOnLongClickListener(this);
+ }
+
+ public MenuItemImpl getItemData() {
+ return mItemData;
+ }
+
+ public void initialize(MenuItemImpl itemData, int menuType) {
+ mItemData = itemData;
+
+ setIcon(itemData.getIcon());
+ setTitle(itemData.getTitleForItemView(this)); // Title only takes effect if there is no icon
+ setId(itemData.getItemId());
+
+ setVisibility(itemData.isVisible() ? View.VISIBLE : View.GONE);
+ setEnabled(itemData.isEnabled());
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ mImageButton.setEnabled(enabled);
+ mTextButton.setEnabled(enabled);
+ }
+
+ public void onClick(View v) {
+ if (mItemInvoker != null) {
+ mItemInvoker.invokeItem(mItemData);
+ }
+ }
+
+ public void setItemInvoker(MenuBuilder.ItemInvoker invoker) {
+ mItemInvoker = invoker;
+ }
+
+ public boolean prefersCondensedTitle() {
+ return true;
+ }
+
+ public void setCheckable(boolean checkable) {
+ // TODO Support checkable action items
+ }
+
+ public void setChecked(boolean checked) {
+ // TODO Support checkable action items
+ }
+
+ public void setExpandedFormat(boolean expandedFormat) {
+ if (mExpandedFormat != expandedFormat) {
+ mExpandedFormat = expandedFormat;
+ if (mItemData != null) {
+ mItemData.actionFormatChanged();
+ }
+ }
+ }
+
+ private void updateTextButtonVisibility() {
+ boolean visible = !TextUtils.isEmpty(mTextButton.getText());
+ visible &= mImageButton.getDrawable() == null ||
+ (mItemData.showsTextAsAction() && (mAllowTextWithIcon || mExpandedFormat));
+
+ mTextButton.setVisibility(visible ? VISIBLE : GONE);
+ }
+
+ public void setIcon(Drawable icon) {
+ mImageButton.setImageDrawable(icon);
+ if (icon != null) {
+ mImageButton.setVisibility(VISIBLE);
+ } else {
+ mImageButton.setVisibility(GONE);
+ }
+
+ updateTextButtonVisibility();
+ }
+
+ public boolean hasText() {
+ return mTextButton.getVisibility() != GONE;
+ }
+
+ public void setShortcut(boolean showShortcut, char shortcutKey) {
+ // Action buttons don't show text for shortcut keys.
+ }
+
+ public void setTitle(CharSequence title) {
+ mTitle = title;
+
+ mTextButton.setTextCompat(mTitle);
+
+ setContentDescription(mTitle);
+ updateTextButtonVisibility();
+ }
+
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ onPopulateAccessibilityEvent(event);
+ return true;
+ }
+
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ super.onPopulateAccessibilityEvent(event);
+ }
+ final CharSequence cdesc = getContentDescription();
+ if (!TextUtils.isEmpty(cdesc)) {
+ event.getText().add(cdesc);
+ }
+ }
+
+ @Override
+ public boolean dispatchHoverEvent(MotionEvent event) {
+ // Don't allow children to hover; we want this to be treated as a single component.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ return onHoverEvent(event);
+ }
+ return false;
+ }
+
+ public boolean showsIcon() {
+ return true;
+ }
+
+ public boolean needsDividerBefore() {
+ return hasText() && mItemData.getIcon() == null;
+ }
+
+ public boolean needsDividerAfter() {
+ return hasText();
+ }
+
+ @Override
+ public boolean onLongClick(View v) {
+ if (hasText()) {
+ // Don't show the cheat sheet for items that already show text.
+ return false;
+ }
+
+ final int[] screenPos = new int[2];
+ final Rect displayFrame = new Rect();
+ getLocationOnScreen(screenPos);
+ getWindowVisibleDisplayFrame(displayFrame);
+
+ final Context context = getContext();
+ final int width = getWidth();
+ final int height = getHeight();
+ final int midy = screenPos[1] + height / 2;
+ final int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
+
+ Toast cheatSheet = IcsToast.makeText(context, mItemData.getTitle(), IcsToast.LENGTH_SHORT);
+ if (midy < displayFrame.height()) {
+ // Show along the top; follow action buttons
+ cheatSheet.setGravity(Gravity.TOP | Gravity.RIGHT,
+ screenWidth - screenPos[0] - width / 2, height);
+ } else {
+ // Show along the bottom center
+ cheatSheet.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, height);
+ }
+ cheatSheet.show();
+ return true;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int specSize = MeasureSpec.getSize(widthMeasureSpec);
+ final int oldMeasuredWidth = getMeasuredWidth();
+ final int targetWidth = widthMode == MeasureSpec.AT_MOST ? Math.min(specSize, mMinWidth)
+ : mMinWidth;
+
+ if (widthMode != MeasureSpec.EXACTLY && mMinWidth > 0 && oldMeasuredWidth < targetWidth) {
+ // Remeasure at exactly the minimum width.
+ super.onMeasure(MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.EXACTLY),
+ heightMeasureSpec);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java
new file mode 100644
index 0000000000..876a22c589
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java
@@ -0,0 +1,714 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getInteger;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.os.Build;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.SparseBooleanArray;
+import android.view.SoundEffectConstants;
+import android.view.View;
+import android.view.View.MeasureSpec;
+import android.view.ViewConfiguration;
+import android.view.ViewGroup;
+import android.widget.ImageButton;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.view.View_HasStateListenerSupport;
+import com.actionbarsherlock.internal.view.View_OnAttachStateChangeListener;
+import com.actionbarsherlock.internal.view.menu.ActionMenuView.ActionMenuChildView;
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.MenuItem;
+
+/**
+ * MenuPresenter for building action menus as seen in the action bar and action modes.
+ */
+public class ActionMenuPresenter extends BaseMenuPresenter
+ implements ActionProvider.SubUiVisibilityListener {
+ //UNUSED private static final String TAG = "ActionMenuPresenter";
+
+ private View mOverflowButton;
+ private boolean mReserveOverflow;
+ private boolean mReserveOverflowSet;
+ private int mWidthLimit;
+ private int mActionItemWidthLimit;
+ private int mMaxItems;
+ private boolean mMaxItemsSet;
+ private boolean mStrictWidthLimit;
+ private boolean mWidthLimitSet;
+ private boolean mExpandedActionViewsExclusive;
+
+ private int mMinCellSize;
+
+ // Group IDs that have been added as actions - used temporarily, allocated here for reuse.
+ private final SparseBooleanArray mActionButtonGroups = new SparseBooleanArray();
+
+ private View mScrapActionButtonView;
+
+ private OverflowPopup mOverflowPopup;
+ private ActionButtonSubmenu mActionButtonPopup;
+
+ private OpenOverflowRunnable mPostedOpenRunnable;
+
+ final PopupPresenterCallback mPopupPresenterCallback = new PopupPresenterCallback();
+ int mOpenSubMenuId;
+
+ public ActionMenuPresenter(Context context) {
+ super(context, R.layout.abs__action_menu_layout,
+ R.layout.abs__action_menu_item_layout);
+ }
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ super.initForMenu(context, menu);
+
+ final Resources res = context.getResources();
+
+ if (!mReserveOverflowSet) {
+ mReserveOverflow = reserveOverflow(mContext);
+ }
+
+ if (!mWidthLimitSet) {
+ mWidthLimit = res.getDisplayMetrics().widthPixels / 2;
+ }
+
+ // Measure for initial configuration
+ if (!mMaxItemsSet) {
+ mMaxItems = getResources_getInteger(context, R.integer.abs__max_action_buttons);
+ }
+
+ int width = mWidthLimit;
+ if (mReserveOverflow) {
+ if (mOverflowButton == null) {
+ mOverflowButton = new OverflowMenuButton(mSystemContext);
+ final int spec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ mOverflowButton.measure(spec, spec);
+ }
+ width -= mOverflowButton.getMeasuredWidth();
+ } else {
+ mOverflowButton = null;
+ }
+
+ mActionItemWidthLimit = width;
+
+ mMinCellSize = (int) (ActionMenuView.MIN_CELL_SIZE * res.getDisplayMetrics().density);
+
+ // Drop a scrap view as it may no longer reflect the proper context/config.
+ mScrapActionButtonView = null;
+ }
+
+ public static boolean reserveOverflow(Context context) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB);
+ } else {
+ return !HasPermanentMenuKey.get(context);
+ }
+ }
+
+ private static class HasPermanentMenuKey {
+ public static boolean get(Context context) {
+ return ViewConfiguration.get(context).hasPermanentMenuKey();
+ }
+ }
+
+ public void onConfigurationChanged(Configuration newConfig) {
+ if (!mMaxItemsSet) {
+ mMaxItems = getResources_getInteger(mContext,
+ R.integer.abs__max_action_buttons);
+ if (mMenu != null) {
+ mMenu.onItemsChanged(true);
+ }
+ }
+ }
+
+ public void setWidthLimit(int width, boolean strict) {
+ mWidthLimit = width;
+ mStrictWidthLimit = strict;
+ mWidthLimitSet = true;
+ }
+
+ public void setReserveOverflow(boolean reserveOverflow) {
+ mReserveOverflow = reserveOverflow;
+ mReserveOverflowSet = true;
+ }
+
+ public void setItemLimit(int itemCount) {
+ mMaxItems = itemCount;
+ mMaxItemsSet = true;
+ }
+
+ public void setExpandedActionViewsExclusive(boolean isExclusive) {
+ mExpandedActionViewsExclusive = isExclusive;
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ MenuView result = super.getMenuView(root);
+ ((ActionMenuView) result).setPresenter(this);
+ return result;
+ }
+
+ @Override
+ public View getItemView(MenuItemImpl item, View convertView, ViewGroup parent) {
+ View actionView = item.getActionView();
+ if (actionView == null || item.hasCollapsibleActionView()) {
+ if (!(convertView instanceof ActionMenuItemView)) {
+ convertView = null;
+ }
+ actionView = super.getItemView(item, convertView, parent);
+ }
+ actionView.setVisibility(item.isActionViewExpanded() ? View.GONE : View.VISIBLE);
+
+ final ActionMenuView menuParent = (ActionMenuView) parent;
+ final ViewGroup.LayoutParams lp = actionView.getLayoutParams();
+ if (!menuParent.checkLayoutParams(lp)) {
+ actionView.setLayoutParams(menuParent.generateLayoutParams(lp));
+ }
+ return actionView;
+ }
+
+ @Override
+ public void bindItemView(MenuItemImpl item, MenuView.ItemView itemView) {
+ itemView.initialize(item, 0);
+
+ final ActionMenuView menuView = (ActionMenuView) mMenuView;
+ ActionMenuItemView actionItemView = (ActionMenuItemView) itemView;
+ actionItemView.setItemInvoker(menuView);
+ }
+
+ @Override
+ public boolean shouldIncludeItem(int childIndex, MenuItemImpl item) {
+ return item.isActionButton();
+ }
+
+ @Override
+ public void updateMenuView(boolean cleared) {
+ super.updateMenuView(cleared);
+
+ if (mMenu != null) {
+ final ArrayList<MenuItemImpl> actionItems = mMenu.getActionItems();
+ final int count = actionItems.size();
+ for (int i = 0; i < count; i++) {
+ final ActionProvider provider = actionItems.get(i).getActionProvider();
+ if (provider != null) {
+ provider.setSubUiVisibilityListener(this);
+ }
+ }
+ }
+
+ final ArrayList<MenuItemImpl> nonActionItems = mMenu != null ?
+ mMenu.getNonActionItems() : null;
+
+ boolean hasOverflow = false;
+ if (mReserveOverflow && nonActionItems != null) {
+ final int count = nonActionItems.size();
+ if (count == 1) {
+ hasOverflow = !nonActionItems.get(0).isActionViewExpanded();
+ } else {
+ hasOverflow = count > 0;
+ }
+ }
+
+ if (hasOverflow) {
+ if (mOverflowButton == null) {
+ mOverflowButton = new OverflowMenuButton(mSystemContext);
+ }
+ ViewGroup parent = (ViewGroup) mOverflowButton.getParent();
+ if (parent != mMenuView) {
+ if (parent != null) {
+ parent.removeView(mOverflowButton);
+ }
+ ActionMenuView menuView = (ActionMenuView) mMenuView;
+ menuView.addView(mOverflowButton, menuView.generateOverflowButtonLayoutParams());
+ }
+ } else if (mOverflowButton != null && mOverflowButton.getParent() == mMenuView) {
+ ((ViewGroup) mMenuView).removeView(mOverflowButton);
+ }
+
+ ((ActionMenuView) mMenuView).setOverflowReserved(mReserveOverflow);
+ }
+
+ @Override
+ public boolean filterLeftoverView(ViewGroup parent, int childIndex) {
+ if (parent.getChildAt(childIndex) == mOverflowButton) return false;
+ return super.filterLeftoverView(parent, childIndex);
+ }
+
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (!subMenu.hasVisibleItems()) return false;
+
+ SubMenuBuilder topSubMenu = subMenu;
+ while (topSubMenu.getParentMenu() != mMenu) {
+ topSubMenu = (SubMenuBuilder) topSubMenu.getParentMenu();
+ }
+ View anchor = findViewForItem(topSubMenu.getItem());
+ if (anchor == null) {
+ if (mOverflowButton == null) return false;
+ anchor = mOverflowButton;
+ }
+
+ mOpenSubMenuId = subMenu.getItem().getItemId();
+ mActionButtonPopup = new ActionButtonSubmenu(mContext, subMenu);
+ mActionButtonPopup.setAnchorView(anchor);
+ mActionButtonPopup.show();
+ super.onSubMenuSelected(subMenu);
+ return true;
+ }
+
+ private View findViewForItem(MenuItem item) {
+ final ViewGroup parent = (ViewGroup) mMenuView;
+ if (parent == null) return null;
+
+ final int count = parent.getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = parent.getChildAt(i);
+ if (child instanceof MenuView.ItemView &&
+ ((MenuView.ItemView) child).getItemData() == item) {
+ return child;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Display the overflow menu if one is present.
+ * @return true if the overflow menu was shown, false otherwise.
+ */
+ public boolean showOverflowMenu() {
+ if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null &&
+ mPostedOpenRunnable == null && !mMenu.getNonActionItems().isEmpty()) {
+ OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true);
+ mPostedOpenRunnable = new OpenOverflowRunnable(popup);
+ // Post this for later; we might still need a layout for the anchor to be right.
+ ((View) mMenuView).post(mPostedOpenRunnable);
+
+ // ActionMenuPresenter uses null as a callback argument here
+ // to indicate overflow is opening.
+ super.onSubMenuSelected(null);
+
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Hide the overflow menu if it is currently showing.
+ *
+ * @return true if the overflow menu was hidden, false otherwise.
+ */
+ public boolean hideOverflowMenu() {
+ if (mPostedOpenRunnable != null && mMenuView != null) {
+ ((View) mMenuView).removeCallbacks(mPostedOpenRunnable);
+ mPostedOpenRunnable = null;
+ return true;
+ }
+
+ MenuPopupHelper popup = mOverflowPopup;
+ if (popup != null) {
+ popup.dismiss();
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Dismiss all popup menus - overflow and submenus.
+ * @return true if popups were dismissed, false otherwise. (This can be because none were open.)
+ */
+ public boolean dismissPopupMenus() {
+ boolean result = hideOverflowMenu();
+ result |= hideSubMenus();
+ return result;
+ }
+
+ /**
+ * Dismiss all submenu popups.
+ *
+ * @return true if popups were dismissed, false otherwise. (This can be because none were open.)
+ */
+ public boolean hideSubMenus() {
+ if (mActionButtonPopup != null) {
+ mActionButtonPopup.dismiss();
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @return true if the overflow menu is currently showing
+ */
+ public boolean isOverflowMenuShowing() {
+ return mOverflowPopup != null && mOverflowPopup.isShowing();
+ }
+
+ /**
+ * @return true if space has been reserved in the action menu for an overflow item.
+ */
+ public boolean isOverflowReserved() {
+ return mReserveOverflow;
+ }
+
+ public boolean flagActionItems() {
+ final ArrayList<MenuItemImpl> visibleItems = mMenu.getVisibleItems();
+ final int itemsSize = visibleItems.size();
+ int maxActions = mMaxItems;
+ int widthLimit = mActionItemWidthLimit;
+ final int querySpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final ViewGroup parent = (ViewGroup) mMenuView;
+
+ int requiredItems = 0;
+ int requestedItems = 0;
+ int firstActionWidth = 0;
+ boolean hasOverflow = false;
+ for (int i = 0; i < itemsSize; i++) {
+ MenuItemImpl item = visibleItems.get(i);
+ if (item.requiresActionButton()) {
+ requiredItems++;
+ } else if (item.requestsActionButton()) {
+ requestedItems++;
+ } else {
+ hasOverflow = true;
+ }
+ if (mExpandedActionViewsExclusive && item.isActionViewExpanded()) {
+ // Overflow everything if we have an expanded action view and we're
+ // space constrained.
+ maxActions = 0;
+ }
+ }
+
+ // Reserve a spot for the overflow item if needed.
+ if (mReserveOverflow &&
+ (hasOverflow || requiredItems + requestedItems > maxActions)) {
+ maxActions--;
+ }
+ maxActions -= requiredItems;
+
+ final SparseBooleanArray seenGroups = mActionButtonGroups;
+ seenGroups.clear();
+
+ int cellSize = 0;
+ int cellsRemaining = 0;
+ if (mStrictWidthLimit) {
+ cellsRemaining = widthLimit / mMinCellSize;
+ final int cellSizeRemaining = widthLimit % mMinCellSize;
+ cellSize = mMinCellSize + cellSizeRemaining / cellsRemaining;
+ }
+
+ // Flag as many more requested items as will fit.
+ for (int i = 0; i < itemsSize; i++) {
+ MenuItemImpl item = visibleItems.get(i);
+
+ if (item.requiresActionButton()) {
+ View v = getItemView(item, mScrapActionButtonView, parent);
+ if (mScrapActionButtonView == null) {
+ mScrapActionButtonView = v;
+ }
+ if (mStrictWidthLimit) {
+ cellsRemaining -= ActionMenuView.measureChildForCells(v,
+ cellSize, cellsRemaining, querySpec, 0);
+ } else {
+ v.measure(querySpec, querySpec);
+ }
+ final int measuredWidth = v.getMeasuredWidth();
+ widthLimit -= measuredWidth;
+ if (firstActionWidth == 0) {
+ firstActionWidth = measuredWidth;
+ }
+ final int groupId = item.getGroupId();
+ if (groupId != 0) {
+ seenGroups.put(groupId, true);
+ }
+ item.setIsActionButton(true);
+ } else if (item.requestsActionButton()) {
+ // Items in a group with other items that already have an action slot
+ // can break the max actions rule, but not the width limit.
+ final int groupId = item.getGroupId();
+ final boolean inGroup = seenGroups.get(groupId);
+ boolean isAction = (maxActions > 0 || inGroup) && widthLimit > 0 &&
+ (!mStrictWidthLimit || cellsRemaining > 0);
+
+ if (isAction) {
+ View v = getItemView(item, mScrapActionButtonView, parent);
+ if (mScrapActionButtonView == null) {
+ mScrapActionButtonView = v;
+ }
+ if (mStrictWidthLimit) {
+ final int cells = ActionMenuView.measureChildForCells(v,
+ cellSize, cellsRemaining, querySpec, 0);
+ cellsRemaining -= cells;
+ if (cells == 0) {
+ isAction = false;
+ }
+ } else {
+ v.measure(querySpec, querySpec);
+ }
+ final int measuredWidth = v.getMeasuredWidth();
+ widthLimit -= measuredWidth;
+ if (firstActionWidth == 0) {
+ firstActionWidth = measuredWidth;
+ }
+
+ if (mStrictWidthLimit) {
+ isAction &= widthLimit >= 0;
+ } else {
+ // Did this push the entire first item past the limit?
+ isAction &= widthLimit + firstActionWidth > 0;
+ }
+ }
+
+ if (isAction && groupId != 0) {
+ seenGroups.put(groupId, true);
+ } else if (inGroup) {
+ // We broke the width limit. Demote the whole group, they all overflow now.
+ seenGroups.put(groupId, false);
+ for (int j = 0; j < i; j++) {
+ MenuItemImpl areYouMyGroupie = visibleItems.get(j);
+ if (areYouMyGroupie.getGroupId() == groupId) {
+ // Give back the action slot
+ if (areYouMyGroupie.isActionButton()) maxActions++;
+ areYouMyGroupie.setIsActionButton(false);
+ }
+ }
+ }
+
+ if (isAction) maxActions--;
+
+ item.setIsActionButton(isAction);
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ dismissPopupMenus();
+ super.onCloseMenu(menu, allMenusAreClosing);
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ SavedState state = new SavedState();
+ state.openSubMenuId = mOpenSubMenuId;
+ return state;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState saved = (SavedState) state;
+ if (saved.openSubMenuId > 0) {
+ MenuItem item = mMenu.findItem(saved.openSubMenuId);
+ if (item != null) {
+ SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+ onSubMenuSelected(subMenu);
+ }
+ }
+ }
+
+ @Override
+ public void onSubUiVisibilityChanged(boolean isVisible) {
+ if (isVisible) {
+ // Not a submenu, but treat it like one.
+ super.onSubMenuSelected(null);
+ } else {
+ mMenu.close(false);
+ }
+ }
+
+ private static class SavedState implements Parcelable {
+ public int openSubMenuId;
+
+ SavedState() {
+ }
+
+ SavedState(Parcel in) {
+ openSubMenuId = in.readInt();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(openSubMenuId);
+ }
+
+ @SuppressWarnings("unused")
+ public static final Parcelable.Creator<SavedState> CREATOR
+ = new Parcelable.Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ private class OverflowMenuButton extends ImageButton implements ActionMenuChildView, View_HasStateListenerSupport {
+ private final Set<View_OnAttachStateChangeListener> mListeners = new HashSet<View_OnAttachStateChangeListener>();
+
+ public OverflowMenuButton(Context context) {
+ super(context, null, R.attr.actionOverflowButtonStyle);
+
+ setClickable(true);
+ setFocusable(true);
+ setVisibility(VISIBLE);
+ setEnabled(true);
+ }
+
+ @Override
+ public boolean performClick() {
+ if (super.performClick()) {
+ return true;
+ }
+
+ playSoundEffect(SoundEffectConstants.CLICK);
+ showOverflowMenu();
+ return true;
+ }
+
+ public boolean needsDividerBefore() {
+ return false;
+ }
+
+ public boolean needsDividerAfter() {
+ return false;
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ for (View_OnAttachStateChangeListener listener : mListeners) {
+ listener.onViewAttachedToWindow(this);
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ for (View_OnAttachStateChangeListener listener : mListeners) {
+ listener.onViewDetachedFromWindow(this);
+ }
+
+ if (mOverflowPopup != null) mOverflowPopup.dismiss();
+ }
+
+ @Override
+ public void addOnAttachStateChangeListener(View_OnAttachStateChangeListener listener) {
+ mListeners.add(listener);
+ }
+
+ @Override
+ public void removeOnAttachStateChangeListener(View_OnAttachStateChangeListener listener) {
+ mListeners.remove(listener);
+ }
+ }
+
+ private class OverflowPopup extends MenuPopupHelper {
+ public OverflowPopup(Context context, MenuBuilder menu, View anchorView,
+ boolean overflowOnly) {
+ super(context, menu, anchorView, overflowOnly);
+ setCallback(mPopupPresenterCallback);
+ }
+
+ @Override
+ public void onDismiss() {
+ super.onDismiss();
+ mMenu.close();
+ mOverflowPopup = null;
+ }
+ }
+
+ private class ActionButtonSubmenu extends MenuPopupHelper {
+ //UNUSED private SubMenuBuilder mSubMenu;
+
+ public ActionButtonSubmenu(Context context, SubMenuBuilder subMenu) {
+ super(context, subMenu);
+ //UNUSED mSubMenu = subMenu;
+
+ MenuItemImpl item = (MenuItemImpl) subMenu.getItem();
+ if (!item.isActionButton()) {
+ // Give a reasonable anchor to nested submenus.
+ setAnchorView(mOverflowButton == null ? (View) mMenuView : mOverflowButton);
+ }
+
+ setCallback(mPopupPresenterCallback);
+
+ boolean preserveIconSpacing = false;
+ final int count = subMenu.size();
+ for (int i = 0; i < count; i++) {
+ MenuItem childItem = subMenu.getItem(i);
+ if (childItem.isVisible() && childItem.getIcon() != null) {
+ preserveIconSpacing = true;
+ break;
+ }
+ }
+ setForceShowIcon(preserveIconSpacing);
+ }
+
+ @Override
+ public void onDismiss() {
+ super.onDismiss();
+ mActionButtonPopup = null;
+ mOpenSubMenuId = 0;
+ }
+ }
+
+ private class PopupPresenterCallback implements MenuPresenter.Callback {
+
+ @Override
+ public boolean onOpenSubMenu(MenuBuilder subMenu) {
+ if (subMenu == null) return false;
+
+ mOpenSubMenuId = ((SubMenuBuilder) subMenu).getItem().getItemId();
+ return false;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (menu instanceof SubMenuBuilder) {
+ ((SubMenuBuilder) menu).getRootMenu().close(false);
+ }
+ }
+ }
+
+ private class OpenOverflowRunnable implements Runnable {
+ private OverflowPopup mPopup;
+
+ public OpenOverflowRunnable(OverflowPopup popup) {
+ mPopup = popup;
+ }
+
+ public void run() {
+ mMenu.changeMenuMode();
+ final View menuView = (View) mMenuView;
+ if (menuView != null && menuView.getWindowToken() != null && mPopup.tryShow()) {
+ mOverflowPopup = mPopup;
+ }
+ mPostedOpenRunnable = null;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuView.java
new file mode 100644
index 0000000000..0e3b1ae0d7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuView.java
@@ -0,0 +1,575 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Canvas;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.LinearLayout;
+import com.actionbarsherlock.internal.widget.IcsLinearLayout;
+
+/**
+ * @hide
+ */
+public class ActionMenuView extends IcsLinearLayout implements MenuBuilder.ItemInvoker, MenuView {
+ //UNUSED private static final String TAG = "ActionMenuView";
+ private static final boolean IS_FROYO = Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO;
+
+ static final int MIN_CELL_SIZE = 56; // dips
+ static final int GENERATED_ITEM_PADDING = 4; // dips
+
+ private MenuBuilder mMenu;
+
+ private boolean mReserveOverflow;
+ private ActionMenuPresenter mPresenter;
+ private boolean mFormatItems;
+ private int mFormatItemsWidth;
+ private int mMinCellSize;
+ private int mGeneratedItemPadding;
+ //UNUSED private int mMeasuredExtraWidth;
+
+ private boolean mFirst = true;
+
+ public ActionMenuView(Context context) {
+ this(context, null);
+ }
+
+ public ActionMenuView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ setBaselineAligned(false);
+ final float density = context.getResources().getDisplayMetrics().density;
+ mMinCellSize = (int) (MIN_CELL_SIZE * density);
+ mGeneratedItemPadding = (int) (GENERATED_ITEM_PADDING * density);
+ }
+
+ public void setPresenter(ActionMenuPresenter presenter) {
+ mPresenter = presenter;
+ }
+
+ public boolean isExpandedFormat() {
+ return mFormatItems;
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ if (IS_FROYO) {
+ super.onConfigurationChanged(newConfig);
+ }
+ mPresenter.updateMenuView(false);
+
+ if (mPresenter != null && mPresenter.isOverflowMenuShowing()) {
+ mPresenter.hideOverflowMenu();
+ mPresenter.showOverflowMenu();
+ }
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ //Need to trigger a relayout since we may have been added extremely
+ //late in the initial rendering (e.g., when contained in a ViewPager).
+ //See: https://github.com/JakeWharton/ActionBarSherlock/issues/272
+ if (!IS_FROYO && mFirst) {
+ mFirst = false;
+ requestLayout();
+ return;
+ }
+ super.onDraw(canvas);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // If we've been given an exact size to match, apply special formatting during layout.
+ final boolean wasFormatted = mFormatItems;
+ mFormatItems = MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY;
+
+ if (wasFormatted != mFormatItems) {
+ mFormatItemsWidth = 0; // Reset this when switching modes
+ }
+
+ // Special formatting can change whether items can fit as action buttons.
+ // Kick the menu and update presenters when this changes.
+ final int widthSize = MeasureSpec.getMode(widthMeasureSpec);
+ if (mFormatItems && mMenu != null && widthSize != mFormatItemsWidth) {
+ mFormatItemsWidth = widthSize;
+ mMenu.onItemsChanged(true);
+ }
+
+ if (mFormatItems) {
+ onMeasureExactFormat(widthMeasureSpec, heightMeasureSpec);
+ } else {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+
+ private void onMeasureExactFormat(int widthMeasureSpec, int heightMeasureSpec) {
+ // We already know the width mode is EXACTLY if we're here.
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ int heightSize = MeasureSpec.getSize(heightMeasureSpec);
+
+ final int widthPadding = getPaddingLeft() + getPaddingRight();
+ final int heightPadding = getPaddingTop() + getPaddingBottom();
+
+ widthSize -= widthPadding;
+
+ // Divide the view into cells.
+ final int cellCount = widthSize / mMinCellSize;
+ final int cellSizeRemaining = widthSize % mMinCellSize;
+
+ if (cellCount == 0) {
+ // Give up, nothing fits.
+ setMeasuredDimension(widthSize, 0);
+ return;
+ }
+
+ final int cellSize = mMinCellSize + cellSizeRemaining / cellCount;
+
+ int cellsRemaining = cellCount;
+ int maxChildHeight = 0;
+ int maxCellsUsed = 0;
+ int expandableItemCount = 0;
+ int visibleItemCount = 0;
+ boolean hasOverflow = false;
+
+ // This is used as a bitfield to locate the smallest items present. Assumes childCount < 64.
+ long smallestItemsAt = 0;
+
+ final int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ if (child.getVisibility() == GONE) continue;
+
+ final boolean isGeneratedItem = child instanceof ActionMenuItemView;
+ visibleItemCount++;
+
+ if (isGeneratedItem) {
+ // Reset padding for generated menu item views; it may change below
+ // and views are recycled.
+ child.setPadding(mGeneratedItemPadding, 0, mGeneratedItemPadding, 0);
+ }
+
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ lp.expanded = false;
+ lp.extraPixels = 0;
+ lp.cellsUsed = 0;
+ lp.expandable = false;
+ lp.leftMargin = 0;
+ lp.rightMargin = 0;
+ lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText();
+
+ // Overflow always gets 1 cell. No more, no less.
+ final int cellsAvailable = lp.isOverflowButton ? 1 : cellsRemaining;
+
+ final int cellsUsed = measureChildForCells(child, cellSize, cellsAvailable,
+ heightMeasureSpec, heightPadding);
+
+ maxCellsUsed = Math.max(maxCellsUsed, cellsUsed);
+ if (lp.expandable) expandableItemCount++;
+ if (lp.isOverflowButton) hasOverflow = true;
+
+ cellsRemaining -= cellsUsed;
+ maxChildHeight = Math.max(maxChildHeight, child.getMeasuredHeight());
+ if (cellsUsed == 1) smallestItemsAt |= (1 << i);
+ }
+
+ // When we have overflow and a single expanded (text) item, we want to try centering it
+ // visually in the available space even though overflow consumes some of it.
+ final boolean centerSingleExpandedItem = hasOverflow && visibleItemCount == 2;
+
+ // Divide space for remaining cells if we have items that can expand.
+ // Try distributing whole leftover cells to smaller items first.
+
+ boolean needsExpansion = false;
+ while (expandableItemCount > 0 && cellsRemaining > 0) {
+ int minCells = Integer.MAX_VALUE;
+ long minCellsAt = 0; // Bit locations are indices of relevant child views
+ int minCellsItemCount = 0;
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+
+ // Don't try to expand items that shouldn't.
+ if (!lp.expandable) continue;
+
+ // Mark indices of children that can receive an extra cell.
+ if (lp.cellsUsed < minCells) {
+ minCells = lp.cellsUsed;
+ minCellsAt = 1 << i;
+ minCellsItemCount = 1;
+ } else if (lp.cellsUsed == minCells) {
+ minCellsAt |= 1 << i;
+ minCellsItemCount++;
+ }
+ }
+
+ // Items that get expanded will always be in the set of smallest items when we're done.
+ smallestItemsAt |= minCellsAt;
+
+ if (minCellsItemCount > cellsRemaining) break; // Couldn't expand anything evenly. Stop.
+
+ // We have enough cells, all minimum size items will be incremented.
+ minCells++;
+
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ if ((minCellsAt & (1 << i)) == 0) {
+ // If this item is already at our small item count, mark it for later.
+ if (lp.cellsUsed == minCells) smallestItemsAt |= 1 << i;
+ continue;
+ }
+
+ if (centerSingleExpandedItem && lp.preventEdgeOffset && cellsRemaining == 1) {
+ // Add padding to this item such that it centers.
+ child.setPadding(mGeneratedItemPadding + cellSize, 0, mGeneratedItemPadding, 0);
+ }
+ lp.cellsUsed++;
+ lp.expanded = true;
+ cellsRemaining--;
+ }
+
+ needsExpansion = true;
+ }
+
+ // Divide any space left that wouldn't divide along cell boundaries
+ // evenly among the smallest items
+
+ final boolean singleItem = !hasOverflow && visibleItemCount == 1;
+ if (cellsRemaining > 0 && smallestItemsAt != 0 &&
+ (cellsRemaining < visibleItemCount - 1 || singleItem || maxCellsUsed > 1)) {
+ float expandCount = Long.bitCount(smallestItemsAt);
+
+ if (!singleItem) {
+ // The items at the far edges may only expand by half in order to pin to either side.
+ if ((smallestItemsAt & 1) != 0) {
+ LayoutParams lp = (LayoutParams) getChildAt(0).getLayoutParams();
+ if (!lp.preventEdgeOffset) expandCount -= 0.5f;
+ }
+ if ((smallestItemsAt & (1 << (childCount - 1))) != 0) {
+ LayoutParams lp = ((LayoutParams) getChildAt(childCount - 1).getLayoutParams());
+ if (!lp.preventEdgeOffset) expandCount -= 0.5f;
+ }
+ }
+
+ final int extraPixels = expandCount > 0 ?
+ (int) (cellsRemaining * cellSize / expandCount) : 0;
+
+ for (int i = 0; i < childCount; i++) {
+ if ((smallestItemsAt & (1 << i)) == 0) continue;
+
+ final View child = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ if (child instanceof ActionMenuItemView) {
+ // If this is one of our views, expand and measure at the larger size.
+ lp.extraPixels = extraPixels;
+ lp.expanded = true;
+ if (i == 0 && !lp.preventEdgeOffset) {
+ // First item gets part of its new padding pushed out of sight.
+ // The last item will get this implicitly from layout.
+ lp.leftMargin = -extraPixels / 2;
+ }
+ needsExpansion = true;
+ } else if (lp.isOverflowButton) {
+ lp.extraPixels = extraPixels;
+ lp.expanded = true;
+ lp.rightMargin = -extraPixels / 2;
+ needsExpansion = true;
+ } else {
+ // If we don't know what it is, give it some margins instead
+ // and let it center within its space. We still want to pin
+ // against the edges.
+ if (i != 0) {
+ lp.leftMargin = extraPixels / 2;
+ }
+ if (i != childCount - 1) {
+ lp.rightMargin = extraPixels / 2;
+ }
+ }
+ }
+
+ cellsRemaining = 0;
+ }
+
+ // Remeasure any items that have had extra space allocated to them.
+ if (needsExpansion) {
+ int heightSpec = MeasureSpec.makeMeasureSpec(heightSize - heightPadding, heightMode);
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+
+ if (!lp.expanded) continue;
+
+ final int width = lp.cellsUsed * cellSize + lp.extraPixels;
+ child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), heightSpec);
+ }
+ }
+
+ if (heightMode != MeasureSpec.EXACTLY) {
+ heightSize = maxChildHeight;
+ }
+
+ setMeasuredDimension(widthSize, heightSize);
+ //UNUSED mMeasuredExtraWidth = cellsRemaining * cellSize;
+ }
+
+ /**
+ * Measure a child view to fit within cell-based formatting. The child's width
+ * will be measured to a whole multiple of cellSize.
+ *
+ * <p>Sets the expandable and cellsUsed fields of LayoutParams.
+ *
+ * @param child Child to measure
+ * @param cellSize Size of one cell
+ * @param cellsRemaining Number of cells remaining that this view can expand to fill
+ * @param parentHeightMeasureSpec MeasureSpec used by the parent view
+ * @param parentHeightPadding Padding present in the parent view
+ * @return Number of cells this child was measured to occupy
+ */
+ static int measureChildForCells(View child, int cellSize, int cellsRemaining,
+ int parentHeightMeasureSpec, int parentHeightPadding) {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+
+ final int childHeightSize = MeasureSpec.getSize(parentHeightMeasureSpec) -
+ parentHeightPadding;
+ final int childHeightMode = MeasureSpec.getMode(parentHeightMeasureSpec);
+ final int childHeightSpec = MeasureSpec.makeMeasureSpec(childHeightSize, childHeightMode);
+
+ int cellsUsed = 0;
+ if (cellsRemaining > 0) {
+ final int childWidthSpec = MeasureSpec.makeMeasureSpec(
+ cellSize * cellsRemaining, MeasureSpec.AT_MOST);
+ child.measure(childWidthSpec, childHeightSpec);
+
+ final int measuredWidth = child.getMeasuredWidth();
+ cellsUsed = measuredWidth / cellSize;
+ if (measuredWidth % cellSize != 0) cellsUsed++;
+ }
+
+ final ActionMenuItemView itemView = child instanceof ActionMenuItemView ?
+ (ActionMenuItemView) child : null;
+ final boolean expandable = !lp.isOverflowButton && itemView != null && itemView.hasText();
+ lp.expandable = expandable;
+
+ lp.cellsUsed = cellsUsed;
+ final int targetWidth = cellsUsed * cellSize;
+ child.measure(MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.EXACTLY),
+ childHeightSpec);
+ return cellsUsed;
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ if (!mFormatItems) {
+ super.onLayout(changed, left, top, right, bottom);
+ return;
+ }
+
+ final int childCount = getChildCount();
+ final int midVertical = (top + bottom) / 2;
+ final int dividerWidth = 0;//getDividerWidth();
+ int overflowWidth = 0;
+ //UNUSED int nonOverflowWidth = 0;
+ int nonOverflowCount = 0;
+ int widthRemaining = right - left - getPaddingRight() - getPaddingLeft();
+ boolean hasOverflow = false;
+ for (int i = 0; i < childCount; i++) {
+ final View v = getChildAt(i);
+ if (v.getVisibility() == GONE) {
+ continue;
+ }
+
+ LayoutParams p = (LayoutParams) v.getLayoutParams();
+ if (p.isOverflowButton) {
+ overflowWidth = v.getMeasuredWidth();
+ if (hasDividerBeforeChildAt(i)) {
+ overflowWidth += dividerWidth;
+ }
+
+ int height = v.getMeasuredHeight();
+ int r = getWidth() - getPaddingRight() - p.rightMargin;
+ int l = r - overflowWidth;
+ int t = midVertical - (height / 2);
+ int b = t + height;
+ v.layout(l, t, r, b);
+
+ widthRemaining -= overflowWidth;
+ hasOverflow = true;
+ } else {
+ final int size = v.getMeasuredWidth() + p.leftMargin + p.rightMargin;
+ //UNUSED nonOverflowWidth += size;
+ widthRemaining -= size;
+ //if (hasDividerBeforeChildAt(i)) {
+ //UNUSED nonOverflowWidth += dividerWidth;
+ //}
+ nonOverflowCount++;
+ }
+ }
+
+ if (childCount == 1 && !hasOverflow) {
+ // Center a single child
+ final View v = getChildAt(0);
+ final int width = v.getMeasuredWidth();
+ final int height = v.getMeasuredHeight();
+ final int midHorizontal = (right - left) / 2;
+ final int l = midHorizontal - width / 2;
+ final int t = midVertical - height / 2;
+ v.layout(l, t, l + width, t + height);
+ return;
+ }
+
+ final int spacerCount = nonOverflowCount - (hasOverflow ? 0 : 1);
+ final int spacerSize = Math.max(0, spacerCount > 0 ? widthRemaining / spacerCount : 0);
+
+ int startLeft = getPaddingLeft();
+ for (int i = 0; i < childCount; i++) {
+ final View v = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) v.getLayoutParams();
+ if (v.getVisibility() == GONE || lp.isOverflowButton) {
+ continue;
+ }
+
+ startLeft += lp.leftMargin;
+ int width = v.getMeasuredWidth();
+ int height = v.getMeasuredHeight();
+ int t = midVertical - height / 2;
+ v.layout(startLeft, t, startLeft + width, t + height);
+ startLeft += width + lp.rightMargin + spacerSize;
+ }
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mPresenter.dismissPopupMenus();
+ }
+
+ public boolean isOverflowReserved() {
+ return mReserveOverflow;
+ }
+
+ public void setOverflowReserved(boolean reserveOverflow) {
+ mReserveOverflow = reserveOverflow;
+ }
+
+ @Override
+ protected LayoutParams generateDefaultLayoutParams() {
+ LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT);
+ params.gravity = Gravity.CENTER_VERTICAL;
+ return params;
+ }
+
+ @Override
+ public LayoutParams generateLayoutParams(AttributeSet attrs) {
+ return new LayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ protected LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
+ if (p instanceof LayoutParams) {
+ LayoutParams result = new LayoutParams((LayoutParams) p);
+ if (result.gravity <= Gravity.NO_GRAVITY) {
+ result.gravity = Gravity.CENTER_VERTICAL;
+ }
+ return result;
+ }
+ return generateDefaultLayoutParams();
+ }
+
+ @Override
+ protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
+ return p != null && p instanceof LayoutParams;
+ }
+
+ public LayoutParams generateOverflowButtonLayoutParams() {
+ LayoutParams result = generateDefaultLayoutParams();
+ result.isOverflowButton = true;
+ return result;
+ }
+
+ public boolean invokeItem(MenuItemImpl item) {
+ return mMenu.performItemAction(item, 0);
+ }
+
+ public int getWindowAnimations() {
+ return 0;
+ }
+
+ public void initialize(MenuBuilder menu) {
+ mMenu = menu;
+ }
+
+ //@Override
+ protected boolean hasDividerBeforeChildAt(int childIndex) {
+ if (childIndex == 0) {
+ return false;
+ }
+ final View childBefore = getChildAt(childIndex - 1);
+ final View child = getChildAt(childIndex);
+ boolean result = false;
+ if (childIndex < getChildCount() && childBefore instanceof ActionMenuChildView) {
+ result |= ((ActionMenuChildView) childBefore).needsDividerAfter();
+ }
+ if (childIndex > 0 && child instanceof ActionMenuChildView) {
+ result |= ((ActionMenuChildView) child).needsDividerBefore();
+ }
+ return result;
+ }
+
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ return false;
+ }
+
+ public interface ActionMenuChildView {
+ public boolean needsDividerBefore();
+ public boolean needsDividerAfter();
+ }
+
+ public static class LayoutParams extends LinearLayout.LayoutParams {
+ public boolean isOverflowButton;
+ public int cellsUsed;
+ public int extraPixels;
+ public boolean expandable;
+ public boolean preventEdgeOffset;
+
+ public boolean expanded;
+
+ public LayoutParams(Context c, AttributeSet attrs) {
+ super(c, attrs);
+ }
+
+ public LayoutParams(LayoutParams other) {
+ super((LinearLayout.LayoutParams) other);
+ isOverflowButton = other.isOverflowButton;
+ }
+
+ public LayoutParams(int width, int height) {
+ super(width, height);
+ isOverflowButton = false;
+ }
+
+ public LayoutParams(int width, int height, boolean isOverflowButton) {
+ super(width, height);
+ this.isOverflowButton = isOverflowButton;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/BaseMenuPresenter.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/BaseMenuPresenter.java
new file mode 100644
index 0000000000..6da26f2ae7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/BaseMenuPresenter.java
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.ArrayList;
+import android.content.Context;
+import android.os.Build;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * Base class for MenuPresenters that have a consistent container view and item
+ * views. Behaves similarly to an AdapterView in that existing item views will
+ * be reused if possible when items change.
+ */
+public abstract class BaseMenuPresenter implements MenuPresenter {
+ private static final boolean IS_HONEYCOMB = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
+
+ protected Context mSystemContext;
+ protected Context mContext;
+ protected MenuBuilder mMenu;
+ protected LayoutInflater mSystemInflater;
+ protected LayoutInflater mInflater;
+ private Callback mCallback;
+
+ private int mMenuLayoutRes;
+ private int mItemLayoutRes;
+
+ protected MenuView mMenuView;
+
+ private int mId;
+
+ /**
+ * Construct a new BaseMenuPresenter.
+ *
+ * @param context Context for generating system-supplied views
+ * @param menuLayoutRes Layout resource ID for the menu container view
+ * @param itemLayoutRes Layout resource ID for a single item view
+ */
+ public BaseMenuPresenter(Context context, int menuLayoutRes, int itemLayoutRes) {
+ mSystemContext = context;
+ mSystemInflater = LayoutInflater.from(context);
+ mMenuLayoutRes = menuLayoutRes;
+ mItemLayoutRes = itemLayoutRes;
+ }
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ mContext = context;
+ mInflater = LayoutInflater.from(mContext);
+ mMenu = menu;
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ if (mMenuView == null) {
+ mMenuView = (MenuView) mSystemInflater.inflate(mMenuLayoutRes, root, false);
+ mMenuView.initialize(mMenu);
+ updateMenuView(true);
+ }
+
+ return mMenuView;
+ }
+
+ /**
+ * Reuses item views when it can
+ */
+ public void updateMenuView(boolean cleared) {
+ final ViewGroup parent = (ViewGroup) mMenuView;
+ if (parent == null) return;
+
+ int childIndex = 0;
+ if (mMenu != null) {
+ mMenu.flagActionItems();
+ ArrayList<MenuItemImpl> visibleItems = mMenu.getVisibleItems();
+ final int itemCount = visibleItems.size();
+ for (int i = 0; i < itemCount; i++) {
+ MenuItemImpl item = visibleItems.get(i);
+ if (shouldIncludeItem(childIndex, item)) {
+ final View convertView = parent.getChildAt(childIndex);
+ final MenuItemImpl oldItem = convertView instanceof MenuView.ItemView ?
+ ((MenuView.ItemView) convertView).getItemData() : null;
+ final View itemView = getItemView(item, convertView, parent);
+ if (item != oldItem) {
+ // Don't let old states linger with new data.
+ itemView.setPressed(false);
+ if (IS_HONEYCOMB) itemView.jumpDrawablesToCurrentState();
+ }
+ if (itemView != convertView) {
+ addItemView(itemView, childIndex);
+ }
+ childIndex++;
+ }
+ }
+ }
+
+ // Remove leftover views.
+ while (childIndex < parent.getChildCount()) {
+ if (!filterLeftoverView(parent, childIndex)) {
+ childIndex++;
+ }
+ }
+ }
+
+ /**
+ * Add an item view at the given index.
+ *
+ * @param itemView View to add
+ * @param childIndex Index within the parent to insert at
+ */
+ protected void addItemView(View itemView, int childIndex) {
+ final ViewGroup currentParent = (ViewGroup) itemView.getParent();
+ if (currentParent != null) {
+ currentParent.removeView(itemView);
+ }
+ ((ViewGroup) mMenuView).addView(itemView, childIndex);
+ }
+
+ /**
+ * Filter the child view at index and remove it if appropriate.
+ * @param parent Parent to filter from
+ * @param childIndex Index to filter
+ * @return true if the child view at index was removed
+ */
+ protected boolean filterLeftoverView(ViewGroup parent, int childIndex) {
+ parent.removeViewAt(childIndex);
+ return true;
+ }
+
+ public void setCallback(Callback cb) {
+ mCallback = cb;
+ }
+
+ /**
+ * Create a new item view that can be re-bound to other item data later.
+ *
+ * @return The new item view
+ */
+ public MenuView.ItemView createItemView(ViewGroup parent) {
+ return (MenuView.ItemView) mSystemInflater.inflate(mItemLayoutRes, parent, false);
+ }
+
+ /**
+ * Prepare an item view for use. See AdapterView for the basic idea at work here.
+ * This may require creating a new item view, but well-behaved implementations will
+ * re-use the view passed as convertView if present. The returned view will be populated
+ * with data from the item parameter.
+ *
+ * @param item Item to present
+ * @param convertView Existing view to reuse
+ * @param parent Intended parent view - use for inflation.
+ * @return View that presents the requested menu item
+ */
+ public View getItemView(MenuItemImpl item, View convertView, ViewGroup parent) {
+ MenuView.ItemView itemView;
+ if (convertView instanceof MenuView.ItemView) {
+ itemView = (MenuView.ItemView) convertView;
+ } else {
+ itemView = createItemView(parent);
+ }
+ bindItemView(item, itemView);
+ return (View) itemView;
+ }
+
+ /**
+ * Bind item data to an existing item view.
+ *
+ * @param item Item to bind
+ * @param itemView View to populate with item data
+ */
+ public abstract void bindItemView(MenuItemImpl item, MenuView.ItemView itemView);
+
+ /**
+ * Filter item by child index and item data.
+ *
+ * @param childIndex Indended presentation index of this item
+ * @param item Item to present
+ * @return true if this item should be included in this menu presentation; false otherwise
+ */
+ public boolean shouldIncludeItem(int childIndex, MenuItemImpl item) {
+ return true;
+ }
+
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (mCallback != null) {
+ mCallback.onCloseMenu(menu, allMenusAreClosing);
+ }
+ }
+
+ public boolean onSubMenuSelected(SubMenuBuilder menu) {
+ if (mCallback != null) {
+ return mCallback.onOpenSubMenu(menu);
+ }
+ return false;
+ }
+
+ public boolean flagActionItems() {
+ return false;
+ }
+
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ public int getId() {
+ return mId;
+ }
+
+ public void setId(int id) {
+ mId = id;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ListMenuItemView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ListMenuItemView.java
new file mode 100644
index 0000000000..ac25c37369
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/ListMenuItemView.java
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import com.actionbarsherlock.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.TextView;
+
+/**
+ * The item view for each item in the ListView-based MenuViews.
+ */
+public class ListMenuItemView extends LinearLayout implements MenuView.ItemView {
+ private MenuItemImpl mItemData;
+
+ private ImageView mIconView;
+ private RadioButton mRadioButton;
+ private TextView mTitleView;
+ private CheckBox mCheckBox;
+ private TextView mShortcutView;
+
+ private Drawable mBackground;
+ private int mTextAppearance;
+ private Context mTextAppearanceContext;
+ private boolean mPreserveIconSpacing;
+
+ //UNUSED private int mMenuType;
+
+ private LayoutInflater mInflater;
+
+ private boolean mForceShowIcon;
+
+ final Context mContext;
+
+ public ListMenuItemView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs);
+ mContext = context;
+
+ TypedArray a =
+ context.obtainStyledAttributes(
+ attrs, R.styleable.SherlockMenuView, defStyle, 0);
+
+ mBackground = a.getDrawable(R.styleable.SherlockMenuView_itemBackground);
+ mTextAppearance = a.getResourceId(R.styleable.
+ SherlockMenuView_itemTextAppearance, -1);
+ mPreserveIconSpacing = a.getBoolean(
+ R.styleable.SherlockMenuView_preserveIconSpacing, false);
+ mTextAppearanceContext = context;
+
+ a.recycle();
+ }
+
+ public ListMenuItemView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ setBackgroundDrawable(mBackground);
+
+ mTitleView = (TextView) findViewById(R.id.abs__title);
+ if (mTextAppearance != -1) {
+ mTitleView.setTextAppearance(mTextAppearanceContext,
+ mTextAppearance);
+ }
+
+ mShortcutView = (TextView) findViewById(R.id.abs__shortcut);
+ }
+
+ public void initialize(MenuItemImpl itemData, int menuType) {
+ mItemData = itemData;
+ //UNUSED mMenuType = menuType;
+
+ setVisibility(itemData.isVisible() ? View.VISIBLE : View.GONE);
+
+ setTitle(itemData.getTitleForItemView(this));
+ setCheckable(itemData.isCheckable());
+ setShortcut(itemData.shouldShowShortcut(), itemData.getShortcut());
+ setIcon(itemData.getIcon());
+ setEnabled(itemData.isEnabled());
+ }
+
+ public void setForceShowIcon(boolean forceShow) {
+ mPreserveIconSpacing = mForceShowIcon = forceShow;
+ }
+
+ public void setTitle(CharSequence title) {
+ if (title != null) {
+ mTitleView.setText(title);
+
+ if (mTitleView.getVisibility() != VISIBLE) mTitleView.setVisibility(VISIBLE);
+ } else {
+ if (mTitleView.getVisibility() != GONE) mTitleView.setVisibility(GONE);
+ }
+ }
+
+ public MenuItemImpl getItemData() {
+ return mItemData;
+ }
+
+ public void setCheckable(boolean checkable) {
+
+ if (!checkable && mRadioButton == null && mCheckBox == null) {
+ return;
+ }
+
+ if (mRadioButton == null) {
+ insertRadioButton();
+ }
+ if (mCheckBox == null) {
+ insertCheckBox();
+ }
+
+ // Depending on whether its exclusive check or not, the checkbox or
+ // radio button will be the one in use (and the other will be otherCompoundButton)
+ final CompoundButton compoundButton;
+ final CompoundButton otherCompoundButton;
+
+ if (mItemData.isExclusiveCheckable()) {
+ compoundButton = mRadioButton;
+ otherCompoundButton = mCheckBox;
+ } else {
+ compoundButton = mCheckBox;
+ otherCompoundButton = mRadioButton;
+ }
+
+ if (checkable) {
+ compoundButton.setChecked(mItemData.isChecked());
+
+ final int newVisibility = checkable ? VISIBLE : GONE;
+ if (compoundButton.getVisibility() != newVisibility) {
+ compoundButton.setVisibility(newVisibility);
+ }
+
+ // Make sure the other compound button isn't visible
+ if (otherCompoundButton.getVisibility() != GONE) {
+ otherCompoundButton.setVisibility(GONE);
+ }
+ } else {
+ mCheckBox.setVisibility(GONE);
+ mRadioButton.setVisibility(GONE);
+ }
+ }
+
+ public void setChecked(boolean checked) {
+ CompoundButton compoundButton;
+
+ if (mItemData.isExclusiveCheckable()) {
+ if (mRadioButton == null) {
+ insertRadioButton();
+ }
+ compoundButton = mRadioButton;
+ } else {
+ if (mCheckBox == null) {
+ insertCheckBox();
+ }
+ compoundButton = mCheckBox;
+ }
+
+ compoundButton.setChecked(checked);
+ }
+
+ public void setShortcut(boolean showShortcut, char shortcutKey) {
+ final int newVisibility = (showShortcut && mItemData.shouldShowShortcut())
+ ? VISIBLE : GONE;
+
+ if (newVisibility == VISIBLE) {
+ mShortcutView.setText(mItemData.getShortcutLabel());
+ }
+
+ if (mShortcutView.getVisibility() != newVisibility) {
+ mShortcutView.setVisibility(newVisibility);
+ }
+ }
+
+ public void setIcon(Drawable icon) {
+ final boolean showIcon = mItemData.shouldShowIcon() || mForceShowIcon;
+ if (!showIcon && !mPreserveIconSpacing) {
+ return;
+ }
+
+ if (mIconView == null && icon == null && !mPreserveIconSpacing) {
+ return;
+ }
+
+ if (mIconView == null) {
+ insertIconView();
+ }
+
+ if (icon != null || mPreserveIconSpacing) {
+ mIconView.setImageDrawable(showIcon ? icon : null);
+
+ if (mIconView.getVisibility() != VISIBLE) {
+ mIconView.setVisibility(VISIBLE);
+ }
+ } else {
+ mIconView.setVisibility(GONE);
+ }
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (mIconView != null && mPreserveIconSpacing) {
+ // Enforce minimum icon spacing
+ ViewGroup.LayoutParams lp = getLayoutParams();
+ LayoutParams iconLp = (LayoutParams) mIconView.getLayoutParams();
+ if (lp.height > 0 && iconLp.width <= 0) {
+ iconLp.width = lp.height;
+ }
+ }
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+
+ private void insertIconView() {
+ LayoutInflater inflater = getInflater();
+ mIconView = (ImageView) inflater.inflate(R.layout.abs__list_menu_item_icon,
+ this, false);
+ addView(mIconView, 0);
+ }
+
+ private void insertRadioButton() {
+ LayoutInflater inflater = getInflater();
+ mRadioButton =
+ (RadioButton) inflater.inflate(R.layout.abs__list_menu_item_radio,
+ this, false);
+ addView(mRadioButton);
+ }
+
+ private void insertCheckBox() {
+ LayoutInflater inflater = getInflater();
+ mCheckBox =
+ (CheckBox) inflater.inflate(R.layout.abs__list_menu_item_checkbox,
+ this, false);
+ addView(mCheckBox);
+ }
+
+ public boolean prefersCondensedTitle() {
+ return false;
+ }
+
+ public boolean showsIcon() {
+ return mForceShowIcon;
+ }
+
+ private LayoutInflater getInflater() {
+ if (mInflater == null) {
+ mInflater = LayoutInflater.from(mContext);
+ }
+ return mInflater;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java
new file mode 100644
index 0000000000..51bacd7bec
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java
@@ -0,0 +1,1341 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.util.SparseArray;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.KeyCharacterMap;
+import android.view.KeyEvent;
+import android.view.View;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+/**
+ * Implementation of the {@link android.view.Menu} interface for creating a
+ * standard menu UI.
+ */
+public class MenuBuilder implements Menu {
+ //UNUSED private static final String TAG = "MenuBuilder";
+
+ private static final String PRESENTER_KEY = "android:menu:presenters";
+ private static final String ACTION_VIEW_STATES_KEY = "android:menu:actionviewstates";
+ private static final String EXPANDED_ACTION_VIEW_ID = "android:menu:expandedactionview";
+
+ private static final int[] sCategoryToOrder = new int[] {
+ 1, /* No category */
+ 4, /* CONTAINER */
+ 5, /* SYSTEM */
+ 3, /* SECONDARY */
+ 2, /* ALTERNATIVE */
+ 0, /* SELECTED_ALTERNATIVE */
+ };
+
+ private final Context mContext;
+ private final Resources mResources;
+
+ /**
+ * Whether the shortcuts should be qwerty-accessible. Use isQwertyMode()
+ * instead of accessing this directly.
+ */
+ private boolean mQwertyMode;
+
+ /**
+ * Whether the shortcuts should be visible on menus. Use isShortcutsVisible()
+ * instead of accessing this directly.
+ */
+ private boolean mShortcutsVisible;
+
+ /**
+ * Callback that will receive the various menu-related events generated by
+ * this class. Use getCallback to get a reference to the callback.
+ */
+ private Callback mCallback;
+
+ /** Contains all of the items for this menu */
+ private ArrayList<MenuItemImpl> mItems;
+
+ /** Contains only the items that are currently visible. This will be created/refreshed from
+ * {@link #getVisibleItems()} */
+ private ArrayList<MenuItemImpl> mVisibleItems;
+ /**
+ * Whether or not the items (or any one item's shown state) has changed since it was last
+ * fetched from {@link #getVisibleItems()}
+ */
+ private boolean mIsVisibleItemsStale;
+
+ /**
+ * Contains only the items that should appear in the Action Bar, if present.
+ */
+ private ArrayList<MenuItemImpl> mActionItems;
+ /**
+ * Contains items that should NOT appear in the Action Bar, if present.
+ */
+ private ArrayList<MenuItemImpl> mNonActionItems;
+
+ /**
+ * Whether or not the items (or any one item's action state) has changed since it was
+ * last fetched.
+ */
+ private boolean mIsActionItemsStale;
+
+ /**
+ * Default value for how added items should show in the action list.
+ */
+ private int mDefaultShowAsAction = MenuItem.SHOW_AS_ACTION_NEVER;
+
+ /**
+ * Current use case is Context Menus: As Views populate the context menu, each one has
+ * extra information that should be passed along. This is the current menu info that
+ * should be set on all items added to this menu.
+ */
+ private ContextMenuInfo mCurrentMenuInfo;
+
+ /** Header title for menu types that have a header (context and submenus) */
+ CharSequence mHeaderTitle;
+ /** Header icon for menu types that have a header and support icons (context) */
+ Drawable mHeaderIcon;
+ /** Header custom view for menu types that have a header and support custom views (context) */
+ View mHeaderView;
+
+ /**
+ * Contains the state of the View hierarchy for all menu views when the menu
+ * was frozen.
+ */
+ //UNUSED private SparseArray<Parcelable> mFrozenViewStates;
+
+ /**
+ * Prevents onItemsChanged from doing its junk, useful for batching commands
+ * that may individually call onItemsChanged.
+ */
+ private boolean mPreventDispatchingItemsChanged = false;
+ private boolean mItemsChangedWhileDispatchPrevented = false;
+
+ private boolean mOptionalIconsVisible = false;
+
+ private boolean mIsClosing = false;
+
+ private ArrayList<MenuItemImpl> mTempShortcutItemList = new ArrayList<MenuItemImpl>();
+
+ private CopyOnWriteArrayList<WeakReference<MenuPresenter>> mPresenters =
+ new CopyOnWriteArrayList<WeakReference<MenuPresenter>>();
+
+ /**
+ * Currently expanded menu item; must be collapsed when we clear.
+ */
+ private MenuItemImpl mExpandedItem;
+
+ /**
+ * Called by menu to notify of close and selection changes.
+ */
+ public interface Callback {
+ /**
+ * Called when a menu item is selected.
+ * @param menu The menu that is the parent of the item
+ * @param item The menu item that is selected
+ * @return whether the menu item selection was handled
+ */
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item);
+
+ /**
+ * Called when the mode of the menu changes (for example, from icon to expanded).
+ *
+ * @param menu the menu that has changed modes
+ */
+ public void onMenuModeChange(MenuBuilder menu);
+ }
+
+ /**
+ * Called by menu items to execute their associated action
+ */
+ public interface ItemInvoker {
+ public boolean invokeItem(MenuItemImpl item);
+ }
+
+ public MenuBuilder(Context context) {
+ mContext = context;
+ mResources = context.getResources();
+
+ mItems = new ArrayList<MenuItemImpl>();
+
+ mVisibleItems = new ArrayList<MenuItemImpl>();
+ mIsVisibleItemsStale = true;
+
+ mActionItems = new ArrayList<MenuItemImpl>();
+ mNonActionItems = new ArrayList<MenuItemImpl>();
+ mIsActionItemsStale = true;
+
+ setShortcutsVisibleInner(true);
+ }
+
+ public MenuBuilder setDefaultShowAsAction(int defaultShowAsAction) {
+ mDefaultShowAsAction = defaultShowAsAction;
+ return this;
+ }
+
+ /**
+ * Add a presenter to this menu. This will only hold a WeakReference;
+ * you do not need to explicitly remove a presenter, but you can using
+ * {@link #removeMenuPresenter(MenuPresenter)}.
+ *
+ * @param presenter The presenter to add
+ */
+ public void addMenuPresenter(MenuPresenter presenter) {
+ mPresenters.add(new WeakReference<MenuPresenter>(presenter));
+ presenter.initForMenu(mContext, this);
+ mIsActionItemsStale = true;
+ }
+
+ /**
+ * Remove a presenter from this menu. That presenter will no longer
+ * receive notifications of updates to this menu's data.
+ *
+ * @param presenter The presenter to remove
+ */
+ public void removeMenuPresenter(MenuPresenter presenter) {
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter item = ref.get();
+ if (item == null || item == presenter) {
+ mPresenters.remove(ref);
+ }
+ }
+ }
+
+ private void dispatchPresenterUpdate(boolean cleared) {
+ if (mPresenters.isEmpty()) return;
+
+ stopDispatchingItemsChanged();
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else {
+ presenter.updateMenuView(cleared);
+ }
+ }
+ startDispatchingItemsChanged();
+ }
+
+ private boolean dispatchSubMenuSelected(SubMenuBuilder subMenu) {
+ if (mPresenters.isEmpty()) return false;
+
+ boolean result = false;
+
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else if (!result) {
+ result = presenter.onSubMenuSelected(subMenu);
+ }
+ }
+ return result;
+ }
+
+ private void dispatchSaveInstanceState(Bundle outState) {
+ if (mPresenters.isEmpty()) return;
+
+ SparseArray<Parcelable> presenterStates = new SparseArray<Parcelable>();
+
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else {
+ final int id = presenter.getId();
+ if (id > 0) {
+ final Parcelable state = presenter.onSaveInstanceState();
+ if (state != null) {
+ presenterStates.put(id, state);
+ }
+ }
+ }
+ }
+
+ outState.putSparseParcelableArray(PRESENTER_KEY, presenterStates);
+ }
+
+ private void dispatchRestoreInstanceState(Bundle state) {
+ SparseArray<Parcelable> presenterStates = state.getSparseParcelableArray(PRESENTER_KEY);
+
+ if (presenterStates == null || mPresenters.isEmpty()) return;
+
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else {
+ final int id = presenter.getId();
+ if (id > 0) {
+ Parcelable parcel = presenterStates.get(id);
+ if (parcel != null) {
+ presenter.onRestoreInstanceState(parcel);
+ }
+ }
+ }
+ }
+ }
+
+ public void savePresenterStates(Bundle outState) {
+ dispatchSaveInstanceState(outState);
+ }
+
+ public void restorePresenterStates(Bundle state) {
+ dispatchRestoreInstanceState(state);
+ }
+
+ public void saveActionViewStates(Bundle outStates) {
+ SparseArray<Parcelable> viewStates = null;
+
+ final int itemCount = size();
+ for (int i = 0; i < itemCount; i++) {
+ final MenuItem item = getItem(i);
+ final View v = item.getActionView();
+ if (v != null && v.getId() != View.NO_ID) {
+ if (viewStates == null) {
+ viewStates = new SparseArray<Parcelable>();
+ }
+ v.saveHierarchyState(viewStates);
+ if (item.isActionViewExpanded()) {
+ outStates.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
+ }
+ }
+ if (item.hasSubMenu()) {
+ final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+ subMenu.saveActionViewStates(outStates);
+ }
+ }
+
+ if (viewStates != null) {
+ outStates.putSparseParcelableArray(getActionViewStatesKey(), viewStates);
+ }
+ }
+
+ public void restoreActionViewStates(Bundle states) {
+ if (states == null) {
+ return;
+ }
+
+ SparseArray<Parcelable> viewStates = states.getSparseParcelableArray(
+ getActionViewStatesKey());
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB && viewStates == null) {
+ //Fixes Issue #652 with sdk <= 2.3.6
+ return;
+ }
+
+ final int itemCount = size();
+ for (int i = 0; i < itemCount; i++) {
+ final MenuItem item = getItem(i);
+ final View v = item.getActionView();
+ if (v != null && v.getId() != View.NO_ID) {
+ v.restoreHierarchyState(viewStates);
+ }
+ if (item.hasSubMenu()) {
+ final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+ subMenu.restoreActionViewStates(states);
+ }
+ }
+
+ final int expandedId = states.getInt(EXPANDED_ACTION_VIEW_ID);
+ if (expandedId > 0) {
+ MenuItem itemToExpand = findItem(expandedId);
+ if (itemToExpand != null) {
+ itemToExpand.expandActionView();
+ }
+ }
+ }
+
+ protected String getActionViewStatesKey() {
+ return ACTION_VIEW_STATES_KEY;
+ }
+
+ public void setCallback(Callback cb) {
+ mCallback = cb;
+ }
+
+ /**
+ * Adds an item to the menu. The other add methods funnel to this.
+ */
+ private MenuItem addInternal(int group, int id, int categoryOrder, CharSequence title) {
+ final int ordering = getOrdering(categoryOrder);
+
+ final MenuItemImpl item = new MenuItemImpl(this, group, id, categoryOrder,
+ ordering, title, mDefaultShowAsAction);
+
+ if (mCurrentMenuInfo != null) {
+ // Pass along the current menu info
+ item.setMenuInfo(mCurrentMenuInfo);
+ }
+
+ mItems.add(findInsertIndex(mItems, ordering), item);
+ onItemsChanged(true);
+
+ return item;
+ }
+
+ public MenuItem add(CharSequence title) {
+ return addInternal(0, 0, 0, title);
+ }
+
+ public MenuItem add(int titleRes) {
+ return addInternal(0, 0, 0, mResources.getString(titleRes));
+ }
+
+ public MenuItem add(int group, int id, int categoryOrder, CharSequence title) {
+ return addInternal(group, id, categoryOrder, title);
+ }
+
+ public MenuItem add(int group, int id, int categoryOrder, int title) {
+ return addInternal(group, id, categoryOrder, mResources.getString(title));
+ }
+
+ public SubMenu addSubMenu(CharSequence title) {
+ return addSubMenu(0, 0, 0, title);
+ }
+
+ public SubMenu addSubMenu(int titleRes) {
+ return addSubMenu(0, 0, 0, mResources.getString(titleRes));
+ }
+
+ public SubMenu addSubMenu(int group, int id, int categoryOrder, CharSequence title) {
+ final MenuItemImpl item = (MenuItemImpl) addInternal(group, id, categoryOrder, title);
+ final SubMenuBuilder subMenu = new SubMenuBuilder(mContext, this, item);
+ item.setSubMenu(subMenu);
+
+ return subMenu;
+ }
+
+ public SubMenu addSubMenu(int group, int id, int categoryOrder, int title) {
+ return addSubMenu(group, id, categoryOrder, mResources.getString(title));
+ }
+
+ public int addIntentOptions(int group, int id, int categoryOrder, ComponentName caller,
+ Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems) {
+ PackageManager pm = mContext.getPackageManager();
+ final List<ResolveInfo> lri =
+ pm.queryIntentActivityOptions(caller, specifics, intent, 0);
+ final int N = lri != null ? lri.size() : 0;
+
+ if ((flags & FLAG_APPEND_TO_GROUP) == 0) {
+ removeGroup(group);
+ }
+
+ for (int i=0; i<N; i++) {
+ final ResolveInfo ri = lri.get(i);
+ Intent rintent = new Intent(
+ ri.specificIndex < 0 ? intent : specifics[ri.specificIndex]);
+ rintent.setComponent(new ComponentName(
+ ri.activityInfo.applicationInfo.packageName,
+ ri.activityInfo.name));
+ final MenuItem item = add(group, id, categoryOrder, ri.loadLabel(pm))
+ .setIcon(ri.loadIcon(pm))
+ .setIntent(rintent);
+ if (outSpecificItems != null && ri.specificIndex >= 0) {
+ outSpecificItems[ri.specificIndex] = item;
+ }
+ }
+
+ return N;
+ }
+
+ public void removeItem(int id) {
+ removeItemAtInt(findItemIndex(id), true);
+ }
+
+ public void removeGroup(int group) {
+ final int i = findGroupIndex(group);
+
+ if (i >= 0) {
+ final int maxRemovable = mItems.size() - i;
+ int numRemoved = 0;
+ while ((numRemoved++ < maxRemovable) && (mItems.get(i).getGroupId() == group)) {
+ // Don't force update for each one, this method will do it at the end
+ removeItemAtInt(i, false);
+ }
+
+ // Notify menu views
+ onItemsChanged(true);
+ }
+ }
+
+ /**
+ * Remove the item at the given index and optionally forces menu views to
+ * update.
+ *
+ * @param index The index of the item to be removed. If this index is
+ * invalid an exception is thrown.
+ * @param updateChildrenOnMenuViews Whether to force update on menu views.
+ * Please make sure you eventually call this after your batch of
+ * removals.
+ */
+ private void removeItemAtInt(int index, boolean updateChildrenOnMenuViews) {
+ if ((index < 0) || (index >= mItems.size())) return;
+
+ mItems.remove(index);
+
+ if (updateChildrenOnMenuViews) onItemsChanged(true);
+ }
+
+ public void removeItemAt(int index) {
+ removeItemAtInt(index, true);
+ }
+
+ public void clearAll() {
+ mPreventDispatchingItemsChanged = true;
+ clear();
+ clearHeader();
+ mPreventDispatchingItemsChanged = false;
+ mItemsChangedWhileDispatchPrevented = false;
+ onItemsChanged(true);
+ }
+
+ public void clear() {
+ if (mExpandedItem != null) {
+ collapseItemActionView(mExpandedItem);
+ }
+ mItems.clear();
+
+ onItemsChanged(true);
+ }
+
+ void setExclusiveItemChecked(MenuItem item) {
+ final int group = item.getGroupId();
+
+ final int N = mItems.size();
+ for (int i = 0; i < N; i++) {
+ MenuItemImpl curItem = mItems.get(i);
+ if (curItem.getGroupId() == group) {
+ if (!curItem.isExclusiveCheckable()) continue;
+ if (!curItem.isCheckable()) continue;
+
+ // Check the item meant to be checked, uncheck the others (that are in the group)
+ curItem.setCheckedInt(curItem == item);
+ }
+ }
+ }
+
+ public void setGroupCheckable(int group, boolean checkable, boolean exclusive) {
+ final int N = mItems.size();
+
+ for (int i = 0; i < N; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.getGroupId() == group) {
+ item.setExclusiveCheckable(exclusive);
+ item.setCheckable(checkable);
+ }
+ }
+ }
+
+ public void setGroupVisible(int group, boolean visible) {
+ final int N = mItems.size();
+
+ // We handle the notification of items being changed ourselves, so we use setVisibleInt rather
+ // than setVisible and at the end notify of items being changed
+
+ boolean changedAtLeastOneItem = false;
+ for (int i = 0; i < N; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.getGroupId() == group) {
+ if (item.setVisibleInt(visible)) changedAtLeastOneItem = true;
+ }
+ }
+
+ if (changedAtLeastOneItem) onItemsChanged(true);
+ }
+
+ public void setGroupEnabled(int group, boolean enabled) {
+ final int N = mItems.size();
+
+ for (int i = 0; i < N; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.getGroupId() == group) {
+ item.setEnabled(enabled);
+ }
+ }
+ }
+
+ public boolean hasVisibleItems() {
+ final int size = size();
+
+ for (int i = 0; i < size; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.isVisible()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public MenuItem findItem(int id) {
+ final int size = size();
+ for (int i = 0; i < size; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.getItemId() == id) {
+ return item;
+ } else if (item.hasSubMenu()) {
+ MenuItem possibleItem = item.getSubMenu().findItem(id);
+
+ if (possibleItem != null) {
+ return possibleItem;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public int findItemIndex(int id) {
+ final int size = size();
+
+ for (int i = 0; i < size; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.getItemId() == id) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ public int findGroupIndex(int group) {
+ return findGroupIndex(group, 0);
+ }
+
+ public int findGroupIndex(int group, int start) {
+ final int size = size();
+
+ if (start < 0) {
+ start = 0;
+ }
+
+ for (int i = start; i < size; i++) {
+ final MenuItemImpl item = mItems.get(i);
+
+ if (item.getGroupId() == group) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ public int size() {
+ return mItems.size();
+ }
+
+ /** {@inheritDoc} */
+ public MenuItem getItem(int index) {
+ return mItems.get(index);
+ }
+
+ public boolean isShortcutKey(int keyCode, KeyEvent event) {
+ return findItemWithShortcutForKey(keyCode, event) != null;
+ }
+
+ public void setQwertyMode(boolean isQwerty) {
+ mQwertyMode = isQwerty;
+
+ onItemsChanged(false);
+ }
+
+ /**
+ * Returns the ordering across all items. This will grab the category from
+ * the upper bits, find out how to order the category with respect to other
+ * categories, and combine it with the lower bits.
+ *
+ * @param categoryOrder The category order for a particular item (if it has
+ * not been or/add with a category, the default category is
+ * assumed).
+ * @return An ordering integer that can be used to order this item across
+ * all the items (even from other categories).
+ */
+ private static int getOrdering(int categoryOrder) {
+ final int index = (categoryOrder & CATEGORY_MASK) >> CATEGORY_SHIFT;
+
+ if (index < 0 || index >= sCategoryToOrder.length) {
+ throw new IllegalArgumentException("order does not contain a valid category.");
+ }
+
+ return (sCategoryToOrder[index] << CATEGORY_SHIFT) | (categoryOrder & USER_MASK);
+ }
+
+ /**
+ * @return whether the menu shortcuts are in qwerty mode or not
+ */
+ boolean isQwertyMode() {
+ return mQwertyMode;
+ }
+
+ /**
+ * Sets whether the shortcuts should be visible on menus. Devices without hardware
+ * key input will never make shortcuts visible even if this method is passed 'true'.
+ *
+ * @param shortcutsVisible Whether shortcuts should be visible (if true and a
+ * menu item does not have a shortcut defined, that item will
+ * still NOT show a shortcut)
+ */
+ public void setShortcutsVisible(boolean shortcutsVisible) {
+ if (mShortcutsVisible == shortcutsVisible) return;
+
+ setShortcutsVisibleInner(shortcutsVisible);
+ onItemsChanged(false);
+ }
+
+ private void setShortcutsVisibleInner(boolean shortcutsVisible) {
+ mShortcutsVisible = shortcutsVisible
+ && mResources.getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS
+ && mResources.getBoolean(
+ R.bool.abs__config_showMenuShortcutsWhenKeyboardPresent);
+ }
+
+ /**
+ * @return Whether shortcuts should be visible on menus.
+ */
+ public boolean isShortcutsVisible() {
+ return mShortcutsVisible;
+ }
+
+ Resources getResources() {
+ return mResources;
+ }
+
+ public Context getContext() {
+ return mContext;
+ }
+
+ boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ return mCallback != null && mCallback.onMenuItemSelected(menu, item);
+ }
+
+ /**
+ * Dispatch a mode change event to this menu's callback.
+ */
+ public void changeMenuMode() {
+ if (mCallback != null) {
+ mCallback.onMenuModeChange(this);
+ }
+ }
+
+ private static int findInsertIndex(ArrayList<MenuItemImpl> items, int ordering) {
+ for (int i = items.size() - 1; i >= 0; i--) {
+ MenuItemImpl item = items.get(i);
+ if (item.getOrdering() <= ordering) {
+ return i + 1;
+ }
+ }
+
+ return 0;
+ }
+
+ public boolean performShortcut(int keyCode, KeyEvent event, int flags) {
+ final MenuItemImpl item = findItemWithShortcutForKey(keyCode, event);
+
+ boolean handled = false;
+
+ if (item != null) {
+ handled = performItemAction(item, flags);
+ }
+
+ if ((flags & FLAG_ALWAYS_PERFORM_CLOSE) != 0) {
+ close(true);
+ }
+
+ return handled;
+ }
+
+ /*
+ * This function will return all the menu and sub-menu items that can
+ * be directly (the shortcut directly corresponds) and indirectly
+ * (the ALT-enabled char corresponds to the shortcut) associated
+ * with the keyCode.
+ */
+ @SuppressWarnings("deprecation")
+ void findItemsWithShortcutForKey(List<MenuItemImpl> items, int keyCode, KeyEvent event) {
+ final boolean qwerty = isQwertyMode();
+ final int metaState = event.getMetaState();
+ final KeyCharacterMap.KeyData possibleChars = new KeyCharacterMap.KeyData();
+ // Get the chars associated with the keyCode (i.e using any chording combo)
+ final boolean isKeyCodeMapped = event.getKeyData(possibleChars);
+ // The delete key is not mapped to '\b' so we treat it specially
+ if (!isKeyCodeMapped && (keyCode != KeyEvent.KEYCODE_DEL)) {
+ return;
+ }
+
+ // Look for an item whose shortcut is this key.
+ final int N = mItems.size();
+ for (int i = 0; i < N; i++) {
+ MenuItemImpl item = mItems.get(i);
+ if (item.hasSubMenu()) {
+ ((MenuBuilder)item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event);
+ }
+ final char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
+ if (((metaState & (KeyEvent.META_SHIFT_ON | KeyEvent.META_SYM_ON)) == 0) &&
+ (shortcutChar != 0) &&
+ (shortcutChar == possibleChars.meta[0]
+ || shortcutChar == possibleChars.meta[2]
+ || (qwerty && shortcutChar == '\b' &&
+ keyCode == KeyEvent.KEYCODE_DEL)) &&
+ item.isEnabled()) {
+ items.add(item);
+ }
+ }
+ }
+
+ /*
+ * We want to return the menu item associated with the key, but if there is no
+ * ambiguity (i.e. there is only one menu item corresponding to the key) we want
+ * to return it even if it's not an exact match; this allow the user to
+ * _not_ use the ALT key for example, making the use of shortcuts slightly more
+ * user-friendly. An example is on the G1, '!' and '1' are on the same key, and
+ * in Gmail, Menu+1 will trigger Menu+! (the actual shortcut).
+ *
+ * On the other hand, if two (or more) shortcuts corresponds to the same key,
+ * we have to only return the exact match.
+ */
+ @SuppressWarnings("deprecation")
+ MenuItemImpl findItemWithShortcutForKey(int keyCode, KeyEvent event) {
+ // Get all items that can be associated directly or indirectly with the keyCode
+ ArrayList<MenuItemImpl> items = mTempShortcutItemList;
+ items.clear();
+ findItemsWithShortcutForKey(items, keyCode, event);
+
+ if (items.isEmpty()) {
+ return null;
+ }
+
+ final int metaState = event.getMetaState();
+ final KeyCharacterMap.KeyData possibleChars = new KeyCharacterMap.KeyData();
+ // Get the chars associated with the keyCode (i.e using any chording combo)
+ event.getKeyData(possibleChars);
+
+ // If we have only one element, we can safely returns it
+ final int size = items.size();
+ if (size == 1) {
+ return items.get(0);
+ }
+
+ final boolean qwerty = isQwertyMode();
+ // If we found more than one item associated with the key,
+ // we have to return the exact match
+ for (int i = 0; i < size; i++) {
+ final MenuItemImpl item = items.get(i);
+ final char shortcutChar = qwerty ? item.getAlphabeticShortcut() :
+ item.getNumericShortcut();
+ if ((shortcutChar == possibleChars.meta[0] &&
+ (metaState & KeyEvent.META_ALT_ON) == 0)
+ || (shortcutChar == possibleChars.meta[2] &&
+ (metaState & KeyEvent.META_ALT_ON) != 0)
+ || (qwerty && shortcutChar == '\b' &&
+ keyCode == KeyEvent.KEYCODE_DEL)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ public boolean performIdentifierAction(int id, int flags) {
+ // Look for an item whose identifier is the id.
+ return performItemAction(findItem(id), flags);
+ }
+
+ public boolean performItemAction(MenuItem item, int flags) {
+ MenuItemImpl itemImpl = (MenuItemImpl) item;
+
+ if (itemImpl == null || !itemImpl.isEnabled()) {
+ return false;
+ }
+
+ boolean invoked = itemImpl.invoke();
+
+ if (itemImpl.hasCollapsibleActionView()) {
+ invoked |= itemImpl.expandActionView();
+ if (invoked) close(true);
+ } else if (item.hasSubMenu()) {
+ close(false);
+
+ final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
+ final ActionProvider provider = item.getActionProvider();
+ if (provider != null && provider.hasSubMenu()) {
+ provider.onPrepareSubMenu(subMenu);
+ }
+ invoked |= dispatchSubMenuSelected(subMenu);
+ if (!invoked) close(true);
+ } else {
+ if ((flags & FLAG_PERFORM_NO_CLOSE) == 0) {
+ close(true);
+ }
+ }
+
+ return invoked;
+ }
+
+ /**
+ * Closes the visible menu.
+ *
+ * @param allMenusAreClosing Whether the menus are completely closing (true),
+ * or whether there is another menu coming in this menu's place
+ * (false). For example, if the menu is closing because a
+ * sub menu is about to be shown, <var>allMenusAreClosing</var>
+ * is false.
+ */
+ final void close(boolean allMenusAreClosing) {
+ if (mIsClosing) return;
+
+ mIsClosing = true;
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else {
+ presenter.onCloseMenu(this, allMenusAreClosing);
+ }
+ }
+ mIsClosing = false;
+ }
+
+ /** {@inheritDoc} */
+ public void close() {
+ close(true);
+ }
+
+ /**
+ * Called when an item is added or removed.
+ *
+ * @param structureChanged true if the menu structure changed,
+ * false if only item properties changed.
+ * (Visibility is a structural property since it affects layout.)
+ */
+ void onItemsChanged(boolean structureChanged) {
+ if (!mPreventDispatchingItemsChanged) {
+ if (structureChanged) {
+ mIsVisibleItemsStale = true;
+ mIsActionItemsStale = true;
+ }
+
+ dispatchPresenterUpdate(structureChanged);
+ } else {
+ mItemsChangedWhileDispatchPrevented = true;
+ }
+ }
+
+ /**
+ * Stop dispatching item changed events to presenters until
+ * {@link #startDispatchingItemsChanged()} is called. Useful when
+ * many menu operations are going to be performed as a batch.
+ */
+ public void stopDispatchingItemsChanged() {
+ if (!mPreventDispatchingItemsChanged) {
+ mPreventDispatchingItemsChanged = true;
+ mItemsChangedWhileDispatchPrevented = false;
+ }
+ }
+
+ public void startDispatchingItemsChanged() {
+ mPreventDispatchingItemsChanged = false;
+
+ if (mItemsChangedWhileDispatchPrevented) {
+ mItemsChangedWhileDispatchPrevented = false;
+ onItemsChanged(true);
+ }
+ }
+
+ /**
+ * Called by {@link MenuItemImpl} when its visible flag is changed.
+ * @param item The item that has gone through a visibility change.
+ */
+ void onItemVisibleChanged(MenuItemImpl item) {
+ // Notify of items being changed
+ mIsVisibleItemsStale = true;
+ onItemsChanged(true);
+ }
+
+ /**
+ * Called by {@link MenuItemImpl} when its action request status is changed.
+ * @param item The item that has gone through a change in action request status.
+ */
+ void onItemActionRequestChanged(MenuItemImpl item) {
+ // Notify of items being changed
+ mIsActionItemsStale = true;
+ onItemsChanged(true);
+ }
+
+ ArrayList<MenuItemImpl> getVisibleItems() {
+ if (!mIsVisibleItemsStale) return mVisibleItems;
+
+ // Refresh the visible items
+ mVisibleItems.clear();
+
+ final int itemsSize = mItems.size();
+ MenuItemImpl item;
+ for (int i = 0; i < itemsSize; i++) {
+ item = mItems.get(i);
+ if (item.isVisible()) mVisibleItems.add(item);
+ }
+
+ mIsVisibleItemsStale = false;
+ mIsActionItemsStale = true;
+
+ return mVisibleItems;
+ }
+
+ /**
+ * This method determines which menu items get to be 'action items' that will appear
+ * in an action bar and which items should be 'overflow items' in a secondary menu.
+ * The rules are as follows:
+ *
+ * <p>Items are considered for inclusion in the order specified within the menu.
+ * There is a limit of mMaxActionItems as a total count, optionally including the overflow
+ * menu button itself. This is a soft limit; if an item shares a group ID with an item
+ * previously included as an action item, the new item will stay with its group and become
+ * an action item itself even if it breaks the max item count limit. This is done to
+ * limit the conceptual complexity of the items presented within an action bar. Only a few
+ * unrelated concepts should be presented to the user in this space, and groups are treated
+ * as a single concept.
+ *
+ * <p>There is also a hard limit of consumed measurable space: mActionWidthLimit. This
+ * limit may be broken by a single item that exceeds the remaining space, but no further
+ * items may be added. If an item that is part of a group cannot fit within the remaining
+ * measured width, the entire group will be demoted to overflow. This is done to ensure room
+ * for navigation and other affordances in the action bar as well as reduce general UI clutter.
+ *
+ * <p>The space freed by demoting a full group cannot be consumed by future menu items.
+ * Once items begin to overflow, all future items become overflow items as well. This is
+ * to avoid inadvertent reordering that may break the app's intended design.
+ */
+ public void flagActionItems() {
+ if (!mIsActionItemsStale) {
+ return;
+ }
+
+ // Presenters flag action items as needed.
+ boolean flagged = false;
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else {
+ flagged |= presenter.flagActionItems();
+ }
+ }
+
+ if (flagged) {
+ mActionItems.clear();
+ mNonActionItems.clear();
+ ArrayList<MenuItemImpl> visibleItems = getVisibleItems();
+ final int itemsSize = visibleItems.size();
+ for (int i = 0; i < itemsSize; i++) {
+ MenuItemImpl item = visibleItems.get(i);
+ if (item.isActionButton()) {
+ mActionItems.add(item);
+ } else {
+ mNonActionItems.add(item);
+ }
+ }
+ } else {
+ // Nobody flagged anything, everything is a non-action item.
+ // (This happens during a first pass with no action-item presenters.)
+ mActionItems.clear();
+ mNonActionItems.clear();
+ mNonActionItems.addAll(getVisibleItems());
+ }
+ mIsActionItemsStale = false;
+ }
+
+ ArrayList<MenuItemImpl> getActionItems() {
+ flagActionItems();
+ return mActionItems;
+ }
+
+ ArrayList<MenuItemImpl> getNonActionItems() {
+ flagActionItems();
+ return mNonActionItems;
+ }
+
+ public void clearHeader() {
+ mHeaderIcon = null;
+ mHeaderTitle = null;
+ mHeaderView = null;
+
+ onItemsChanged(false);
+ }
+
+ private void setHeaderInternal(final int titleRes, final CharSequence title, final int iconRes,
+ final Drawable icon, final View view) {
+ final Resources r = getResources();
+
+ if (view != null) {
+ mHeaderView = view;
+
+ // If using a custom view, then the title and icon aren't used
+ mHeaderTitle = null;
+ mHeaderIcon = null;
+ } else {
+ if (titleRes > 0) {
+ mHeaderTitle = r.getText(titleRes);
+ } else if (title != null) {
+ mHeaderTitle = title;
+ }
+
+ if (iconRes > 0) {
+ mHeaderIcon = r.getDrawable(iconRes);
+ } else if (icon != null) {
+ mHeaderIcon = icon;
+ }
+
+ // If using the title or icon, then a custom view isn't used
+ mHeaderView = null;
+ }
+
+ // Notify of change
+ onItemsChanged(false);
+ }
+
+ /**
+ * Sets the header's title. This replaces the header view. Called by the
+ * builder-style methods of subclasses.
+ *
+ * @param title The new title.
+ * @return This MenuBuilder so additional setters can be called.
+ */
+ protected MenuBuilder setHeaderTitleInt(CharSequence title) {
+ setHeaderInternal(0, title, 0, null, null);
+ return this;
+ }
+
+ /**
+ * Sets the header's title. This replaces the header view. Called by the
+ * builder-style methods of subclasses.
+ *
+ * @param titleRes The new title (as a resource ID).
+ * @return This MenuBuilder so additional setters can be called.
+ */
+ protected MenuBuilder setHeaderTitleInt(int titleRes) {
+ setHeaderInternal(titleRes, null, 0, null, null);
+ return this;
+ }
+
+ /**
+ * Sets the header's icon. This replaces the header view. Called by the
+ * builder-style methods of subclasses.
+ *
+ * @param icon The new icon.
+ * @return This MenuBuilder so additional setters can be called.
+ */
+ protected MenuBuilder setHeaderIconInt(Drawable icon) {
+ setHeaderInternal(0, null, 0, icon, null);
+ return this;
+ }
+
+ /**
+ * Sets the header's icon. This replaces the header view. Called by the
+ * builder-style methods of subclasses.
+ *
+ * @param iconRes The new icon (as a resource ID).
+ * @return This MenuBuilder so additional setters can be called.
+ */
+ protected MenuBuilder setHeaderIconInt(int iconRes) {
+ setHeaderInternal(0, null, iconRes, null, null);
+ return this;
+ }
+
+ /**
+ * Sets the header's view. This replaces the title and icon. Called by the
+ * builder-style methods of subclasses.
+ *
+ * @param view The new view.
+ * @return This MenuBuilder so additional setters can be called.
+ */
+ protected MenuBuilder setHeaderViewInt(View view) {
+ setHeaderInternal(0, null, 0, null, view);
+ return this;
+ }
+
+ public CharSequence getHeaderTitle() {
+ return mHeaderTitle;
+ }
+
+ public Drawable getHeaderIcon() {
+ return mHeaderIcon;
+ }
+
+ public View getHeaderView() {
+ return mHeaderView;
+ }
+
+ /**
+ * Gets the root menu (if this is a submenu, find its root menu).
+ * @return The root menu.
+ */
+ public MenuBuilder getRootMenu() {
+ return this;
+ }
+
+ /**
+ * Sets the current menu info that is set on all items added to this menu
+ * (until this is called again with different menu info, in which case that
+ * one will be added to all subsequent item additions).
+ *
+ * @param menuInfo The extra menu information to add.
+ */
+ public void setCurrentMenuInfo(ContextMenuInfo menuInfo) {
+ mCurrentMenuInfo = menuInfo;
+ }
+
+ void setOptionalIconsVisible(boolean visible) {
+ mOptionalIconsVisible = visible;
+ }
+
+ boolean getOptionalIconsVisible() {
+ return mOptionalIconsVisible;
+ }
+
+ public boolean expandItemActionView(MenuItemImpl item) {
+ if (mPresenters.isEmpty()) return false;
+
+ boolean expanded = false;
+
+ stopDispatchingItemsChanged();
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else if ((expanded = presenter.expandItemActionView(this, item))) {
+ break;
+ }
+ }
+ startDispatchingItemsChanged();
+
+ if (expanded) {
+ mExpandedItem = item;
+ }
+ return expanded;
+ }
+
+ public boolean collapseItemActionView(MenuItemImpl item) {
+ if (mPresenters.isEmpty() || mExpandedItem != item) return false;
+
+ boolean collapsed = false;
+
+ stopDispatchingItemsChanged();
+ for (WeakReference<MenuPresenter> ref : mPresenters) {
+ final MenuPresenter presenter = ref.get();
+ if (presenter == null) {
+ mPresenters.remove(ref);
+ } else if ((collapsed = presenter.collapseItemActionView(this, item))) {
+ break;
+ }
+ }
+ startDispatchingItemsChanged();
+
+ if (collapsed) {
+ mExpandedItem = null;
+ }
+ return collapsed;
+ }
+
+ public MenuItemImpl getExpandedItem() {
+ return mExpandedItem;
+ }
+
+ public boolean bindNativeOverflow(android.view.Menu menu, android.view.MenuItem.OnMenuItemClickListener listener, HashMap<android.view.MenuItem, MenuItemImpl> map) {
+ final List<MenuItemImpl> nonActionItems = getNonActionItems();
+ if (nonActionItems == null || nonActionItems.size() == 0) {
+ return false;
+ }
+
+ boolean visible = false;
+ menu.clear();
+ for (MenuItemImpl nonActionItem : nonActionItems) {
+ if (!nonActionItem.isVisible()) {
+ continue;
+ }
+ visible = true;
+
+ android.view.MenuItem nativeItem;
+ if (nonActionItem.hasSubMenu()) {
+ android.view.SubMenu nativeSub = menu.addSubMenu(nonActionItem.getGroupId(), nonActionItem.getItemId(),
+ nonActionItem.getOrder(), nonActionItem.getTitle());
+
+ SubMenuBuilder subMenu = (SubMenuBuilder)nonActionItem.getSubMenu();
+ for (MenuItemImpl subItem : subMenu.getVisibleItems()) {
+ android.view.MenuItem nativeSubItem = nativeSub.add(subItem.getGroupId(), subItem.getItemId(),
+ subItem.getOrder(), subItem.getTitle());
+
+ nativeSubItem.setIcon(subItem.getIcon());
+ nativeSubItem.setOnMenuItemClickListener(listener);
+ nativeSubItem.setEnabled(subItem.isEnabled());
+ nativeSubItem.setIntent(subItem.getIntent());
+ nativeSubItem.setNumericShortcut(subItem.getNumericShortcut());
+ nativeSubItem.setAlphabeticShortcut(subItem.getAlphabeticShortcut());
+ nativeSubItem.setTitleCondensed(subItem.getTitleCondensed());
+ nativeSubItem.setCheckable(subItem.isCheckable());
+ nativeSubItem.setChecked(subItem.isChecked());
+
+ if (subItem.isExclusiveCheckable()) {
+ nativeSub.setGroupCheckable(subItem.getGroupId(), true, true);
+ }
+
+ map.put(nativeSubItem, subItem);
+ }
+
+ nativeItem = nativeSub.getItem();
+ } else {
+ nativeItem = menu.add(nonActionItem.getGroupId(), nonActionItem.getItemId(),
+ nonActionItem.getOrder(), nonActionItem.getTitle());
+ }
+ nativeItem.setIcon(nonActionItem.getIcon());
+ nativeItem.setOnMenuItemClickListener(listener);
+ nativeItem.setEnabled(nonActionItem.isEnabled());
+ nativeItem.setIntent(nonActionItem.getIntent());
+ nativeItem.setNumericShortcut(nonActionItem.getNumericShortcut());
+ nativeItem.setAlphabeticShortcut(nonActionItem.getAlphabeticShortcut());
+ nativeItem.setTitleCondensed(nonActionItem.getTitleCondensed());
+ nativeItem.setCheckable(nonActionItem.isCheckable());
+ nativeItem.setChecked(nonActionItem.isChecked());
+
+ if (nonActionItem.isExclusiveCheckable()) {
+ menu.setGroupCheckable(nonActionItem.getGroupId(), true, true);
+ }
+
+ map.put(nativeItem, nonActionItem);
+ }
+ return visible;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemImpl.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemImpl.java
new file mode 100644
index 0000000000..f5359fb407
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemImpl.java
@@ -0,0 +1,647 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.util.Log;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewDebug;
+import android.widget.LinearLayout;
+
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+/**
+ * @hide
+ */
+public final class MenuItemImpl implements MenuItem {
+ private static final String TAG = "MenuItemImpl";
+
+ private static final int SHOW_AS_ACTION_MASK = SHOW_AS_ACTION_NEVER |
+ SHOW_AS_ACTION_IF_ROOM |
+ SHOW_AS_ACTION_ALWAYS;
+
+ private final int mId;
+ private final int mGroup;
+ private final int mCategoryOrder;
+ private final int mOrdering;
+ private CharSequence mTitle;
+ private CharSequence mTitleCondensed;
+ private Intent mIntent;
+ private char mShortcutNumericChar;
+ private char mShortcutAlphabeticChar;
+
+ /** The icon's drawable which is only created as needed */
+ private Drawable mIconDrawable;
+ /**
+ * The icon's resource ID which is used to get the Drawable when it is
+ * needed (if the Drawable isn't already obtained--only one of the two is
+ * needed).
+ */
+ private int mIconResId = NO_ICON;
+
+ /** The menu to which this item belongs */
+ private MenuBuilder mMenu;
+ /** If this item should launch a sub menu, this is the sub menu to launch */
+ private SubMenuBuilder mSubMenu;
+
+ private Runnable mItemCallback;
+ private MenuItem.OnMenuItemClickListener mClickListener;
+
+ private int mFlags = ENABLED;
+ private static final int CHECKABLE = 0x00000001;
+ private static final int CHECKED = 0x00000002;
+ private static final int EXCLUSIVE = 0x00000004;
+ private static final int HIDDEN = 0x00000008;
+ private static final int ENABLED = 0x00000010;
+ private static final int IS_ACTION = 0x00000020;
+
+ private int mShowAsAction = SHOW_AS_ACTION_NEVER;
+
+ private View mActionView;
+ private ActionProvider mActionProvider;
+ private OnActionExpandListener mOnActionExpandListener;
+ private boolean mIsActionViewExpanded = false;
+
+ /** Used for the icon resource ID if this item does not have an icon */
+ static final int NO_ICON = 0;
+
+ /**
+ * Current use case is for context menu: Extra information linked to the
+ * View that added this item to the context menu.
+ */
+ private ContextMenuInfo mMenuInfo;
+
+ private static String sPrependShortcutLabel;
+ private static String sEnterShortcutLabel;
+ private static String sDeleteShortcutLabel;
+ private static String sSpaceShortcutLabel;
+
+
+ /**
+ * Instantiates this menu item.
+ *
+ * @param menu
+ * @param group Item ordering grouping control. The item will be added after
+ * all other items whose order is <= this number, and before any
+ * that are larger than it. This can also be used to define
+ * groups of items for batch state changes. Normally use 0.
+ * @param id Unique item ID. Use 0 if you do not need a unique ID.
+ * @param categoryOrder The ordering for this item.
+ * @param title The text to display for the item.
+ */
+ MenuItemImpl(MenuBuilder menu, int group, int id, int categoryOrder, int ordering,
+ CharSequence title, int showAsAction) {
+
+ /* TODO if (sPrependShortcutLabel == null) {
+ // This is instantiated from the UI thread, so no chance of sync issues
+ sPrependShortcutLabel = menu.getContext().getResources().getString(
+ com.android.internal.R.string.prepend_shortcut_label);
+ sEnterShortcutLabel = menu.getContext().getResources().getString(
+ com.android.internal.R.string.menu_enter_shortcut_label);
+ sDeleteShortcutLabel = menu.getContext().getResources().getString(
+ com.android.internal.R.string.menu_delete_shortcut_label);
+ sSpaceShortcutLabel = menu.getContext().getResources().getString(
+ com.android.internal.R.string.menu_space_shortcut_label);
+ }*/
+
+ mMenu = menu;
+ mId = id;
+ mGroup = group;
+ mCategoryOrder = categoryOrder;
+ mOrdering = ordering;
+ mTitle = title;
+ mShowAsAction = showAsAction;
+ }
+
+ /**
+ * Invokes the item by calling various listeners or callbacks.
+ *
+ * @return true if the invocation was handled, false otherwise
+ */
+ public boolean invoke() {
+ if (mClickListener != null &&
+ mClickListener.onMenuItemClick(this)) {
+ return true;
+ }
+
+ if (mMenu.dispatchMenuItemSelected(mMenu.getRootMenu(), this)) {
+ return true;
+ }
+
+ if (mItemCallback != null) {
+ mItemCallback.run();
+ return true;
+ }
+
+ if (mIntent != null) {
+ try {
+ mMenu.getContext().startActivity(mIntent);
+ return true;
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "Can't find activity to handle intent; ignoring", e);
+ }
+ }
+
+ if (mActionProvider != null && mActionProvider.onPerformDefaultAction()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public boolean isEnabled() {
+ return (mFlags & ENABLED) != 0;
+ }
+
+ public MenuItem setEnabled(boolean enabled) {
+ if (enabled) {
+ mFlags |= ENABLED;
+ } else {
+ mFlags &= ~ENABLED;
+ }
+
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public int getGroupId() {
+ return mGroup;
+ }
+
+ @ViewDebug.CapturedViewProperty
+ public int getItemId() {
+ return mId;
+ }
+
+ public int getOrder() {
+ return mCategoryOrder;
+ }
+
+ public int getOrdering() {
+ return mOrdering;
+ }
+
+ public Intent getIntent() {
+ return mIntent;
+ }
+
+ public MenuItem setIntent(Intent intent) {
+ mIntent = intent;
+ return this;
+ }
+
+ Runnable getCallback() {
+ return mItemCallback;
+ }
+
+ public MenuItem setCallback(Runnable callback) {
+ mItemCallback = callback;
+ return this;
+ }
+
+ public char getAlphabeticShortcut() {
+ return mShortcutAlphabeticChar;
+ }
+
+ public MenuItem setAlphabeticShortcut(char alphaChar) {
+ if (mShortcutAlphabeticChar == alphaChar) return this;
+
+ mShortcutAlphabeticChar = Character.toLowerCase(alphaChar);
+
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public char getNumericShortcut() {
+ return mShortcutNumericChar;
+ }
+
+ public MenuItem setNumericShortcut(char numericChar) {
+ if (mShortcutNumericChar == numericChar) return this;
+
+ mShortcutNumericChar = numericChar;
+
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public MenuItem setShortcut(char numericChar, char alphaChar) {
+ mShortcutNumericChar = numericChar;
+ mShortcutAlphabeticChar = Character.toLowerCase(alphaChar);
+
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ /**
+ * @return The active shortcut (based on QWERTY-mode of the menu).
+ */
+ char getShortcut() {
+ return (mMenu.isQwertyMode() ? mShortcutAlphabeticChar : mShortcutNumericChar);
+ }
+
+ /**
+ * @return The label to show for the shortcut. This includes the chording
+ * key (for example 'Menu+a'). Also, any non-human readable
+ * characters should be human readable (for example 'Menu+enter').
+ */
+ String getShortcutLabel() {
+
+ char shortcut = getShortcut();
+ if (shortcut == 0) {
+ return "";
+ }
+
+ StringBuilder sb = new StringBuilder(sPrependShortcutLabel);
+ switch (shortcut) {
+
+ case '\n':
+ sb.append(sEnterShortcutLabel);
+ break;
+
+ case '\b':
+ sb.append(sDeleteShortcutLabel);
+ break;
+
+ case ' ':
+ sb.append(sSpaceShortcutLabel);
+ break;
+
+ default:
+ sb.append(shortcut);
+ break;
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * @return Whether this menu item should be showing shortcuts (depends on
+ * whether the menu should show shortcuts and whether this item has
+ * a shortcut defined)
+ */
+ boolean shouldShowShortcut() {
+ // Show shortcuts if the menu is supposed to show shortcuts AND this item has a shortcut
+ return mMenu.isShortcutsVisible() && (getShortcut() != 0);
+ }
+
+ public SubMenu getSubMenu() {
+ return mSubMenu;
+ }
+
+ public boolean hasSubMenu() {
+ return mSubMenu != null;
+ }
+
+ void setSubMenu(SubMenuBuilder subMenu) {
+ mSubMenu = subMenu;
+
+ subMenu.setHeaderTitle(getTitle());
+ }
+
+ @ViewDebug.CapturedViewProperty
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ /**
+ * Gets the title for a particular {@link ItemView}
+ *
+ * @param itemView The ItemView that is receiving the title
+ * @return Either the title or condensed title based on what the ItemView
+ * prefers
+ */
+ CharSequence getTitleForItemView(MenuView.ItemView itemView) {
+ return ((itemView != null) && itemView.prefersCondensedTitle())
+ ? getTitleCondensed()
+ : getTitle();
+ }
+
+ public MenuItem setTitle(CharSequence title) {
+ mTitle = title;
+
+ mMenu.onItemsChanged(false);
+
+ if (mSubMenu != null) {
+ mSubMenu.setHeaderTitle(title);
+ }
+
+ return this;
+ }
+
+ public MenuItem setTitle(int title) {
+ return setTitle(mMenu.getContext().getString(title));
+ }
+
+ public CharSequence getTitleCondensed() {
+ return mTitleCondensed != null ? mTitleCondensed : mTitle;
+ }
+
+ public MenuItem setTitleCondensed(CharSequence title) {
+ mTitleCondensed = title;
+
+ // Could use getTitle() in the loop below, but just cache what it would do here
+ if (title == null) {
+ title = mTitle;
+ }
+
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public Drawable getIcon() {
+ if (mIconDrawable != null) {
+ return mIconDrawable;
+ }
+
+ if (mIconResId != NO_ICON) {
+ return mMenu.getResources().getDrawable(mIconResId);
+ }
+
+ return null;
+ }
+
+ public MenuItem setIcon(Drawable icon) {
+ mIconResId = NO_ICON;
+ mIconDrawable = icon;
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public MenuItem setIcon(int iconResId) {
+ mIconDrawable = null;
+ mIconResId = iconResId;
+
+ // If we have a view, we need to push the Drawable to them
+ mMenu.onItemsChanged(false);
+
+ return this;
+ }
+
+ public boolean isCheckable() {
+ return (mFlags & CHECKABLE) == CHECKABLE;
+ }
+
+ public MenuItem setCheckable(boolean checkable) {
+ final int oldFlags = mFlags;
+ mFlags = (mFlags & ~CHECKABLE) | (checkable ? CHECKABLE : 0);
+ if (oldFlags != mFlags) {
+ mMenu.onItemsChanged(false);
+ }
+
+ return this;
+ }
+
+ public void setExclusiveCheckable(boolean exclusive) {
+ mFlags = (mFlags & ~EXCLUSIVE) | (exclusive ? EXCLUSIVE : 0);
+ }
+
+ public boolean isExclusiveCheckable() {
+ return (mFlags & EXCLUSIVE) != 0;
+ }
+
+ public boolean isChecked() {
+ return (mFlags & CHECKED) == CHECKED;
+ }
+
+ public MenuItem setChecked(boolean checked) {
+ if ((mFlags & EXCLUSIVE) != 0) {
+ // Call the method on the Menu since it knows about the others in this
+ // exclusive checkable group
+ mMenu.setExclusiveItemChecked(this);
+ } else {
+ setCheckedInt(checked);
+ }
+
+ return this;
+ }
+
+ void setCheckedInt(boolean checked) {
+ final int oldFlags = mFlags;
+ mFlags = (mFlags & ~CHECKED) | (checked ? CHECKED : 0);
+ if (oldFlags != mFlags) {
+ mMenu.onItemsChanged(false);
+ }
+ }
+
+ public boolean isVisible() {
+ return (mFlags & HIDDEN) == 0;
+ }
+
+ /**
+ * Changes the visibility of the item. This method DOES NOT notify the
+ * parent menu of a change in this item, so this should only be called from
+ * methods that will eventually trigger this change. If unsure, use {@link #setVisible(boolean)}
+ * instead.
+ *
+ * @param shown Whether to show (true) or hide (false).
+ * @return Whether the item's shown state was changed
+ */
+ boolean setVisibleInt(boolean shown) {
+ final int oldFlags = mFlags;
+ mFlags = (mFlags & ~HIDDEN) | (shown ? 0 : HIDDEN);
+ return oldFlags != mFlags;
+ }
+
+ public MenuItem setVisible(boolean shown) {
+ // Try to set the shown state to the given state. If the shown state was changed
+ // (i.e. the previous state isn't the same as given state), notify the parent menu that
+ // the shown state has changed for this item
+ if (setVisibleInt(shown)) mMenu.onItemVisibleChanged(this);
+
+ return this;
+ }
+
+ public MenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener clickListener) {
+ mClickListener = clickListener;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return mTitle.toString();
+ }
+
+ void setMenuInfo(ContextMenuInfo menuInfo) {
+ mMenuInfo = menuInfo;
+ }
+
+ public ContextMenuInfo getMenuInfo() {
+ return mMenuInfo;
+ }
+
+ public void actionFormatChanged() {
+ mMenu.onItemActionRequestChanged(this);
+ }
+
+ /**
+ * @return Whether the menu should show icons for menu items.
+ */
+ public boolean shouldShowIcon() {
+ return mMenu.getOptionalIconsVisible();
+ }
+
+ public boolean isActionButton() {
+ return (mFlags & IS_ACTION) == IS_ACTION;
+ }
+
+ public boolean requestsActionButton() {
+ return (mShowAsAction & SHOW_AS_ACTION_IF_ROOM) == SHOW_AS_ACTION_IF_ROOM;
+ }
+
+ public boolean requiresActionButton() {
+ return (mShowAsAction & SHOW_AS_ACTION_ALWAYS) == SHOW_AS_ACTION_ALWAYS;
+ }
+
+ public void setIsActionButton(boolean isActionButton) {
+ if (isActionButton) {
+ mFlags |= IS_ACTION;
+ } else {
+ mFlags &= ~IS_ACTION;
+ }
+ }
+
+ public boolean showsTextAsAction() {
+ return (mShowAsAction & SHOW_AS_ACTION_WITH_TEXT) == SHOW_AS_ACTION_WITH_TEXT;
+ }
+
+ public void setShowAsAction(int actionEnum) {
+ switch (actionEnum & SHOW_AS_ACTION_MASK) {
+ case SHOW_AS_ACTION_ALWAYS:
+ case SHOW_AS_ACTION_IF_ROOM:
+ case SHOW_AS_ACTION_NEVER:
+ // Looks good!
+ break;
+
+ default:
+ // Mutually exclusive options selected!
+ throw new IllegalArgumentException("SHOW_AS_ACTION_ALWAYS, SHOW_AS_ACTION_IF_ROOM,"
+ + " and SHOW_AS_ACTION_NEVER are mutually exclusive.");
+ }
+ mShowAsAction = actionEnum;
+ mMenu.onItemActionRequestChanged(this);
+ }
+
+ public MenuItem setActionView(View view) {
+ mActionView = view;
+ mActionProvider = null;
+ if (view != null && view.getId() == View.NO_ID && mId > 0) {
+ view.setId(mId);
+ }
+ mMenu.onItemActionRequestChanged(this);
+ return this;
+ }
+
+ public MenuItem setActionView(int resId) {
+ final Context context = mMenu.getContext();
+ final LayoutInflater inflater = LayoutInflater.from(context);
+ setActionView(inflater.inflate(resId, new LinearLayout(context), false));
+ return this;
+ }
+
+ public View getActionView() {
+ if (mActionView != null) {
+ return mActionView;
+ } else if (mActionProvider != null) {
+ mActionView = mActionProvider.onCreateActionView();
+ return mActionView;
+ } else {
+ return null;
+ }
+ }
+
+ public ActionProvider getActionProvider() {
+ return mActionProvider;
+ }
+
+ public MenuItem setActionProvider(ActionProvider actionProvider) {
+ mActionView = null;
+ mActionProvider = actionProvider;
+ mMenu.onItemsChanged(true); // Measurement can be changed
+ return this;
+ }
+
+ @Override
+ public MenuItem setShowAsActionFlags(int actionEnum) {
+ setShowAsAction(actionEnum);
+ return this;
+ }
+
+ @Override
+ public boolean expandActionView() {
+ if ((mShowAsAction & SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW) == 0 || mActionView == null) {
+ return false;
+ }
+
+ if (mOnActionExpandListener == null ||
+ mOnActionExpandListener.onMenuItemActionExpand(this)) {
+ return mMenu.expandItemActionView(this);
+ }
+
+ return false;
+ }
+
+ @Override
+ public boolean collapseActionView() {
+ if ((mShowAsAction & SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW) == 0) {
+ return false;
+ }
+ if (mActionView == null) {
+ // We're already collapsed if we have no action view.
+ return true;
+ }
+
+ if (mOnActionExpandListener == null ||
+ mOnActionExpandListener.onMenuItemActionCollapse(this)) {
+ return mMenu.collapseItemActionView(this);
+ }
+
+ return false;
+ }
+
+ @Override
+ public MenuItem setOnActionExpandListener(OnActionExpandListener listener) {
+ mOnActionExpandListener = listener;
+ return this;
+ }
+
+ public boolean hasCollapsibleActionView() {
+ return (mShowAsAction & SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW) != 0 && mActionView != null;
+ }
+
+ public void setActionViewExpanded(boolean isExpanded) {
+ mIsActionViewExpanded = isExpanded;
+ mMenu.onItemsChanged(false);
+ }
+
+ public boolean isActionViewExpanded() {
+ return mIsActionViewExpanded;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemWrapper.java
new file mode 100644
index 0000000000..aaf2997b74
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuItemWrapper.java
@@ -0,0 +1,310 @@
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+import com.actionbarsherlock.internal.view.ActionProviderWrapper;
+import com.actionbarsherlock.internal.widget.CollapsibleActionViewWrapper;
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.CollapsibleActionView;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+public class MenuItemWrapper implements MenuItem, android.view.MenuItem.OnMenuItemClickListener {
+ private final android.view.MenuItem mNativeItem;
+ private SubMenu mSubMenu = null;
+ private OnMenuItemClickListener mMenuItemClickListener = null;
+ private OnActionExpandListener mActionExpandListener = null;
+ private android.view.MenuItem.OnActionExpandListener mNativeActionExpandListener = null;
+
+
+ public MenuItemWrapper(android.view.MenuItem nativeItem) {
+ if (nativeItem == null) {
+ throw new IllegalStateException("Wrapped menu item cannot be null.");
+ }
+ mNativeItem = nativeItem;
+ }
+
+
+ @Override
+ public int getItemId() {
+ return mNativeItem.getItemId();
+ }
+
+ @Override
+ public int getGroupId() {
+ return mNativeItem.getGroupId();
+ }
+
+ @Override
+ public int getOrder() {
+ return mNativeItem.getOrder();
+ }
+
+ @Override
+ public MenuItem setTitle(CharSequence title) {
+ mNativeItem.setTitle(title);
+ return this;
+ }
+
+ @Override
+ public MenuItem setTitle(int title) {
+ mNativeItem.setTitle(title);
+ return this;
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return mNativeItem.getTitle();
+ }
+
+ @Override
+ public MenuItem setTitleCondensed(CharSequence title) {
+ mNativeItem.setTitleCondensed(title);
+ return this;
+ }
+
+ @Override
+ public CharSequence getTitleCondensed() {
+ return mNativeItem.getTitleCondensed();
+ }
+
+ @Override
+ public MenuItem setIcon(Drawable icon) {
+ mNativeItem.setIcon(icon);
+ return this;
+ }
+
+ @Override
+ public MenuItem setIcon(int iconRes) {
+ mNativeItem.setIcon(iconRes);
+ return this;
+ }
+
+ @Override
+ public Drawable getIcon() {
+ return mNativeItem.getIcon();
+ }
+
+ @Override
+ public MenuItem setIntent(Intent intent) {
+ mNativeItem.setIntent(intent);
+ return this;
+ }
+
+ @Override
+ public Intent getIntent() {
+ return mNativeItem.getIntent();
+ }
+
+ @Override
+ public MenuItem setShortcut(char numericChar, char alphaChar) {
+ mNativeItem.setShortcut(numericChar, alphaChar);
+ return this;
+ }
+
+ @Override
+ public MenuItem setNumericShortcut(char numericChar) {
+ mNativeItem.setNumericShortcut(numericChar);
+ return this;
+ }
+
+ @Override
+ public char getNumericShortcut() {
+ return mNativeItem.getNumericShortcut();
+ }
+
+ @Override
+ public MenuItem setAlphabeticShortcut(char alphaChar) {
+ mNativeItem.setAlphabeticShortcut(alphaChar);
+ return this;
+ }
+
+ @Override
+ public char getAlphabeticShortcut() {
+ return mNativeItem.getAlphabeticShortcut();
+ }
+
+ @Override
+ public MenuItem setCheckable(boolean checkable) {
+ mNativeItem.setCheckable(checkable);
+ return this;
+ }
+
+ @Override
+ public boolean isCheckable() {
+ return mNativeItem.isCheckable();
+ }
+
+ @Override
+ public MenuItem setChecked(boolean checked) {
+ mNativeItem.setChecked(checked);
+ return this;
+ }
+
+ @Override
+ public boolean isChecked() {
+ return mNativeItem.isChecked();
+ }
+
+ @Override
+ public MenuItem setVisible(boolean visible) {
+ mNativeItem.setVisible(visible);
+ return this;
+ }
+
+ @Override
+ public boolean isVisible() {
+ return mNativeItem.isVisible();
+ }
+
+ @Override
+ public MenuItem setEnabled(boolean enabled) {
+ mNativeItem.setEnabled(enabled);
+ return this;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return mNativeItem.isEnabled();
+ }
+
+ @Override
+ public boolean hasSubMenu() {
+ return mNativeItem.hasSubMenu();
+ }
+
+ @Override
+ public SubMenu getSubMenu() {
+ if (hasSubMenu() && (mSubMenu == null)) {
+ mSubMenu = new SubMenuWrapper(mNativeItem.getSubMenu());
+ }
+ return mSubMenu;
+ }
+
+ @Override
+ public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener menuItemClickListener) {
+ mMenuItemClickListener = menuItemClickListener;
+ //Register ourselves as the listener to proxy
+ mNativeItem.setOnMenuItemClickListener(this);
+ return this;
+ }
+
+ @Override
+ public boolean onMenuItemClick(android.view.MenuItem item) {
+ if (mMenuItemClickListener != null) {
+ return mMenuItemClickListener.onMenuItemClick(this);
+ }
+ return false;
+ }
+
+ @Override
+ public ContextMenuInfo getMenuInfo() {
+ return mNativeItem.getMenuInfo();
+ }
+
+ @Override
+ public void setShowAsAction(int actionEnum) {
+ mNativeItem.setShowAsAction(actionEnum);
+ }
+
+ @Override
+ public MenuItem setShowAsActionFlags(int actionEnum) {
+ mNativeItem.setShowAsActionFlags(actionEnum);
+ return this;
+ }
+
+ @Override
+ public MenuItem setActionView(View view) {
+ if (view != null && view instanceof CollapsibleActionView) {
+ view = new CollapsibleActionViewWrapper(view);
+ }
+ mNativeItem.setActionView(view);
+ return this;
+ }
+
+ @Override
+ public MenuItem setActionView(int resId) {
+ //Allow the native menu to inflate the resource
+ mNativeItem.setActionView(resId);
+ if (resId != 0) {
+ //Get newly created view
+ View view = mNativeItem.getActionView();
+ if (view instanceof CollapsibleActionView) {
+ //Wrap it and re-set it
+ mNativeItem.setActionView(new CollapsibleActionViewWrapper(view));
+ }
+ }
+ return this;
+ }
+
+ @Override
+ public View getActionView() {
+ View actionView = mNativeItem.getActionView();
+ if (actionView instanceof CollapsibleActionViewWrapper) {
+ return ((CollapsibleActionViewWrapper)actionView).unwrap();
+ }
+ return actionView;
+ }
+
+ @Override
+ public MenuItem setActionProvider(ActionProvider actionProvider) {
+ mNativeItem.setActionProvider(new ActionProviderWrapper(actionProvider));
+ return this;
+ }
+
+ @Override
+ public ActionProvider getActionProvider() {
+ android.view.ActionProvider nativeProvider = mNativeItem.getActionProvider();
+ if (nativeProvider != null && nativeProvider instanceof ActionProviderWrapper) {
+ return ((ActionProviderWrapper)nativeProvider).unwrap();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean expandActionView() {
+ return mNativeItem.expandActionView();
+ }
+
+ @Override
+ public boolean collapseActionView() {
+ return mNativeItem.collapseActionView();
+ }
+
+ @Override
+ public boolean isActionViewExpanded() {
+ return mNativeItem.isActionViewExpanded();
+ }
+
+ @Override
+ public MenuItem setOnActionExpandListener(OnActionExpandListener listener) {
+ mActionExpandListener = listener;
+
+ if (mNativeActionExpandListener == null) {
+ mNativeActionExpandListener = new android.view.MenuItem.OnActionExpandListener() {
+ @Override
+ public boolean onMenuItemActionExpand(android.view.MenuItem menuItem) {
+ if (mActionExpandListener != null) {
+ return mActionExpandListener.onMenuItemActionExpand(MenuItemWrapper.this);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onMenuItemActionCollapse(android.view.MenuItem menuItem) {
+ if (mActionExpandListener != null) {
+ return mActionExpandListener.onMenuItemActionCollapse(MenuItemWrapper.this);
+ }
+ return false;
+ }
+ };
+
+ //Register our inner-class as the listener to proxy method calls
+ mNativeItem.setOnActionExpandListener(mNativeActionExpandListener);
+ }
+
+ return this;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPopupHelper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPopupHelper.java
new file mode 100644
index 0000000000..f030de310a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPopupHelper.java
@@ -0,0 +1,376 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.ArrayList;
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.DataSetObserver;
+import android.os.Parcelable;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.MeasureSpec;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.FrameLayout;
+import android.widget.ListAdapter;
+import android.widget.PopupWindow;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.view.View_HasStateListenerSupport;
+import com.actionbarsherlock.internal.view.View_OnAttachStateChangeListener;
+import com.actionbarsherlock.internal.widget.IcsListPopupWindow;
+import com.actionbarsherlock.view.MenuItem;
+
+/**
+ * Presents a menu as a small, simple popup anchored to another view.
+ * @hide
+ */
+public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.OnKeyListener,
+ ViewTreeObserver.OnGlobalLayoutListener, PopupWindow.OnDismissListener,
+ View_OnAttachStateChangeListener, MenuPresenter {
+ //UNUSED private static final String TAG = "MenuPopupHelper";
+
+ static final int ITEM_LAYOUT = R.layout.abs__popup_menu_item_layout;
+
+ private Context mContext;
+ private LayoutInflater mInflater;
+ private IcsListPopupWindow mPopup;
+ private MenuBuilder mMenu;
+ private int mPopupMaxWidth;
+ private View mAnchorView;
+ private boolean mOverflowOnly;
+ private ViewTreeObserver mTreeObserver;
+
+ private MenuAdapter mAdapter;
+
+ private Callback mPresenterCallback;
+
+ boolean mForceShowIcon;
+
+ private ViewGroup mMeasureParent;
+
+ public MenuPopupHelper(Context context, MenuBuilder menu) {
+ this(context, menu, null, false);
+ }
+
+ public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) {
+ this(context, menu, anchorView, false);
+ }
+
+ public MenuPopupHelper(Context context, MenuBuilder menu,
+ View anchorView, boolean overflowOnly) {
+ mContext = context;
+ mInflater = LayoutInflater.from(context);
+ mMenu = menu;
+ mOverflowOnly = overflowOnly;
+
+ final Resources res = context.getResources();
+ mPopupMaxWidth = Math.max(res.getDisplayMetrics().widthPixels / 2,
+ res.getDimensionPixelSize(R.dimen.abs__config_prefDialogWidth));
+
+ mAnchorView = anchorView;
+
+ menu.addMenuPresenter(this);
+ }
+
+ public void setAnchorView(View anchor) {
+ mAnchorView = anchor;
+ }
+
+ public void setForceShowIcon(boolean forceShow) {
+ mForceShowIcon = forceShow;
+ }
+
+ public void show() {
+ if (!tryShow()) {
+ throw new IllegalStateException("MenuPopupHelper cannot be used without an anchor");
+ }
+ }
+
+ public boolean tryShow() {
+ mPopup = new IcsListPopupWindow(mContext, null, R.attr.popupMenuStyle);
+ mPopup.setOnDismissListener(this);
+ mPopup.setOnItemClickListener(this);
+
+ mAdapter = new MenuAdapter(mMenu);
+ mPopup.setAdapter(mAdapter);
+ mPopup.setModal(true);
+
+ View anchor = mAnchorView;
+ if (anchor != null) {
+ final boolean addGlobalListener = mTreeObserver == null;
+ mTreeObserver = anchor.getViewTreeObserver(); // Refresh to latest
+ if (addGlobalListener) mTreeObserver.addOnGlobalLayoutListener(this);
+ ((View_HasStateListenerSupport)anchor).addOnAttachStateChangeListener(this);
+ mPopup.setAnchorView(anchor);
+ } else {
+ return false;
+ }
+
+ mPopup.setContentWidth(Math.min(measureContentWidth(mAdapter), mPopupMaxWidth));
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ mPopup.show();
+ mPopup.getListView().setOnKeyListener(this);
+ return true;
+ }
+
+ public void dismiss() {
+ if (isShowing()) {
+ mPopup.dismiss();
+ }
+ }
+
+ public void onDismiss() {
+ mPopup = null;
+ mMenu.close();
+ if (mTreeObserver != null) {
+ if (!mTreeObserver.isAlive()) mTreeObserver = mAnchorView.getViewTreeObserver();
+ mTreeObserver.removeGlobalOnLayoutListener(this);
+ mTreeObserver = null;
+ }
+ ((View_HasStateListenerSupport)mAnchorView).removeOnAttachStateChangeListener(this);
+ }
+
+ public boolean isShowing() {
+ return mPopup != null && mPopup.isShowing();
+ }
+
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ MenuAdapter adapter = mAdapter;
+ adapter.mAdapterMenu.performItemAction(adapter.getItem(position), 0);
+ }
+
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
+ if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_MENU) {
+ dismiss();
+ return true;
+ }
+ return false;
+ }
+
+ private int measureContentWidth(ListAdapter adapter) {
+ // Menus don't tend to be long, so this is more sane than it looks.
+ int width = 0;
+ View itemView = null;
+ int itemType = 0;
+ final int widthMeasureSpec =
+ MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final int heightMeasureSpec =
+ MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final int count = adapter.getCount();
+ for (int i = 0; i < count; i++) {
+ final int positionType = adapter.getItemViewType(i);
+ if (positionType != itemType) {
+ itemType = positionType;
+ itemView = null;
+ }
+ if (mMeasureParent == null) {
+ mMeasureParent = new FrameLayout(mContext);
+ }
+ itemView = adapter.getView(i, itemView, mMeasureParent);
+ itemView.measure(widthMeasureSpec, heightMeasureSpec);
+ width = Math.max(width, itemView.getMeasuredWidth());
+ }
+ return width;
+ }
+
+ @Override
+ public void onGlobalLayout() {
+ if (isShowing()) {
+ final View anchor = mAnchorView;
+ if (anchor == null || !anchor.isShown()) {
+ dismiss();
+ } else if (isShowing()) {
+ // Recompute window size and position
+ mPopup.show();
+ }
+ }
+ }
+
+ @Override
+ public void onViewAttachedToWindow(View v) {
+ }
+
+ @Override
+ public void onViewDetachedFromWindow(View v) {
+ if (mTreeObserver != null) {
+ if (!mTreeObserver.isAlive()) mTreeObserver = v.getViewTreeObserver();
+ mTreeObserver.removeGlobalOnLayoutListener(this);
+ }
+ ((View_HasStateListenerSupport)v).removeOnAttachStateChangeListener(this);
+ }
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ // Don't need to do anything; we added as a presenter in the constructor.
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ throw new UnsupportedOperationException("MenuPopupHelpers manage their own views");
+ }
+
+ @Override
+ public void updateMenuView(boolean cleared) {
+ if (mAdapter != null) mAdapter.notifyDataSetChanged();
+ }
+
+ @Override
+ public void setCallback(Callback cb) {
+ mPresenterCallback = cb;
+ }
+
+ @Override
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (subMenu.hasVisibleItems()) {
+ MenuPopupHelper subPopup = new MenuPopupHelper(mContext, subMenu, mAnchorView, false);
+ subPopup.setCallback(mPresenterCallback);
+
+ boolean preserveIconSpacing = false;
+ final int count = subMenu.size();
+ for (int i = 0; i < count; i++) {
+ MenuItem childItem = subMenu.getItem(i);
+ if (childItem.isVisible() && childItem.getIcon() != null) {
+ preserveIconSpacing = true;
+ break;
+ }
+ }
+ subPopup.setForceShowIcon(preserveIconSpacing);
+
+ if (subPopup.tryShow()) {
+ if (mPresenterCallback != null) {
+ mPresenterCallback.onOpenSubMenu(subMenu);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ // Only care about the (sub)menu we're presenting.
+ if (menu != mMenu) return;
+
+ dismiss();
+ if (mPresenterCallback != null) {
+ mPresenterCallback.onCloseMenu(menu, allMenusAreClosing);
+ }
+ }
+
+ @Override
+ public boolean flagActionItems() {
+ return false;
+ }
+
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ @Override
+ public int getId() {
+ return 0;
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ return null;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ }
+
+ private class MenuAdapter extends BaseAdapter {
+ private MenuBuilder mAdapterMenu;
+ private int mExpandedIndex = -1;
+
+ public MenuAdapter(MenuBuilder menu) {
+ mAdapterMenu = menu;
+ registerDataSetObserver(new ExpandedIndexObserver());
+ findExpandedIndex();
+ }
+
+ public int getCount() {
+ ArrayList<MenuItemImpl> items = mOverflowOnly ?
+ mAdapterMenu.getNonActionItems() : mAdapterMenu.getVisibleItems();
+ if (mExpandedIndex < 0) {
+ return items.size();
+ }
+ return items.size() - 1;
+ }
+
+ public MenuItemImpl getItem(int position) {
+ ArrayList<MenuItemImpl> items = mOverflowOnly ?
+ mAdapterMenu.getNonActionItems() : mAdapterMenu.getVisibleItems();
+ if (mExpandedIndex >= 0 && position >= mExpandedIndex) {
+ position++;
+ }
+ return items.get(position);
+ }
+
+ public long getItemId(int position) {
+ // Since a menu item's ID is optional, we'll use the position as an
+ // ID for the item in the AdapterView
+ return position;
+ }
+
+ public View getView(int position, View convertView, ViewGroup parent) {
+ if (convertView == null) {
+ convertView = mInflater.inflate(ITEM_LAYOUT, parent, false);
+ }
+
+ MenuView.ItemView itemView = (MenuView.ItemView) convertView;
+ if (mForceShowIcon) {
+ ((ListMenuItemView) convertView).setForceShowIcon(true);
+ }
+ itemView.initialize(getItem(position), 0);
+ return convertView;
+ }
+
+ void findExpandedIndex() {
+ final MenuItemImpl expandedItem = mMenu.getExpandedItem();
+ if (expandedItem != null) {
+ final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
+ final int count = items.size();
+ for (int i = 0; i < count; i++) {
+ final MenuItemImpl item = items.get(i);
+ if (item == expandedItem) {
+ mExpandedIndex = i;
+ return;
+ }
+ }
+ }
+ mExpandedIndex = -1;
+ }
+ }
+
+ private class ExpandedIndexObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ mAdapter.findExpandedIndex();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPresenter.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPresenter.java
new file mode 100644
index 0000000000..c3f35472c5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuPresenter.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.Context;
+import android.os.Parcelable;
+import android.view.ViewGroup;
+
+/**
+ * A MenuPresenter is responsible for building views for a Menu object.
+ * It takes over some responsibility from the old style monolithic MenuBuilder class.
+ */
+public interface MenuPresenter {
+ /**
+ * Called by menu implementation to notify another component of open/close events.
+ */
+ public interface Callback {
+ /**
+ * Called when a menu is closing.
+ * @param menu
+ * @param allMenusAreClosing
+ */
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing);
+
+ /**
+ * Called when a submenu opens. Useful for notifying the application
+ * of menu state so that it does not attempt to hide the action bar
+ * while a submenu is open or similar.
+ *
+ * @param subMenu Submenu currently being opened
+ * @return true if the Callback will handle presenting the submenu, false if
+ * the presenter should attempt to do so.
+ */
+ public boolean onOpenSubMenu(MenuBuilder subMenu);
+ }
+
+ /**
+ * Initialize this presenter for the given context and menu.
+ * This method is called by MenuBuilder when a presenter is
+ * added. See {@link MenuBuilder#addMenuPresenter(MenuPresenter)}
+ *
+ * @param context Context for this presenter; used for view creation and resource management
+ * @param menu Menu to host
+ */
+ public void initForMenu(Context context, MenuBuilder menu);
+
+ /**
+ * Retrieve a MenuView to display the menu specified in
+ * {@link #initForMenu(Context, Menu)}.
+ *
+ * @param root Intended parent of the MenuView.
+ * @return A freshly created MenuView.
+ */
+ public MenuView getMenuView(ViewGroup root);
+
+ /**
+ * Update the menu UI in response to a change. Called by
+ * MenuBuilder during the normal course of operation.
+ *
+ * @param cleared true if the menu was entirely cleared
+ */
+ public void updateMenuView(boolean cleared);
+
+ /**
+ * Set a callback object that will be notified of menu events
+ * related to this specific presentation.
+ * @param cb Callback that will be notified of future events
+ */
+ public void setCallback(Callback cb);
+
+ /**
+ * Called by Menu implementations to indicate that a submenu item
+ * has been selected. An active Callback should be notified, and
+ * if applicable the presenter should present the submenu.
+ *
+ * @param subMenu SubMenu being opened
+ * @return true if the the event was handled, false otherwise.
+ */
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu);
+
+ /**
+ * Called by Menu implementations to indicate that a menu or submenu is
+ * closing. Presenter implementations should close the representation
+ * of the menu indicated as necessary and notify a registered callback.
+ *
+ * @param menu Menu or submenu that is closing.
+ * @param allMenusAreClosing True if all associated menus are closing.
+ */
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing);
+
+ /**
+ * Called by Menu implementations to flag items that will be shown as actions.
+ * @return true if this presenter changed the action status of any items.
+ */
+ public boolean flagActionItems();
+
+ /**
+ * Called when a menu item with a collapsable action view should expand its action view.
+ *
+ * @param menu Menu containing the item to be expanded
+ * @param item Item to be expanded
+ * @return true if this presenter expanded the action view, false otherwise.
+ */
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item);
+
+ /**
+ * Called when a menu item with a collapsable action view should collapse its action view.
+ *
+ * @param menu Menu containing the item to be collapsed
+ * @param item Item to be collapsed
+ * @return true if this presenter collapsed the action view, false otherwise.
+ */
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item);
+
+ /**
+ * Returns an ID for determining how to save/restore instance state.
+ * @return a valid ID value.
+ */
+ public int getId();
+
+ /**
+ * Returns a Parcelable describing the current state of the presenter.
+ * It will be passed to the {@link #onRestoreInstanceState(Parcelable)}
+ * method of the presenter sharing the same ID later.
+ * @return The saved instance state
+ */
+ public Parcelable onSaveInstanceState();
+
+ /**
+ * Supplies the previously saved instance state to be restored.
+ * @param state The previously saved instance state
+ */
+ public void onRestoreInstanceState(Parcelable state);
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuView.java
new file mode 100644
index 0000000000..323ba2d88d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuView.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.graphics.drawable.Drawable;
+
+/**
+ * Minimal interface for a menu view. {@link #initialize(MenuBuilder)} must be called for the
+ * menu to be functional.
+ *
+ * @hide
+ */
+public interface MenuView {
+ /**
+ * Initializes the menu to the given menu. This should be called after the
+ * view is inflated.
+ *
+ * @param menu The menu that this MenuView should display.
+ */
+ public void initialize(MenuBuilder menu);
+
+ /**
+ * Returns the default animations to be used for this menu when entering/exiting.
+ * @return A resource ID for the default animations to be used for this menu.
+ */
+ public int getWindowAnimations();
+
+ /**
+ * Minimal interface for a menu item view. {@link #initialize(MenuItemImpl, int)} must be called
+ * for the item to be functional.
+ */
+ public interface ItemView {
+ /**
+ * Initializes with the provided MenuItemData. This should be called after the view is
+ * inflated.
+ * @param itemData The item that this ItemView should display.
+ * @param menuType The type of this menu, one of
+ * {@link MenuBuilder#TYPE_ICON}, {@link MenuBuilder#TYPE_EXPANDED},
+ * {@link MenuBuilder#TYPE_DIALOG}).
+ */
+ public void initialize(MenuItemImpl itemData, int menuType);
+
+ /**
+ * Gets the item data that this view is displaying.
+ * @return the item data, or null if there is not one
+ */
+ public MenuItemImpl getItemData();
+
+ /**
+ * Sets the title of the item view.
+ * @param title The title to set.
+ */
+ public void setTitle(CharSequence title);
+
+ /**
+ * Sets the enabled state of the item view.
+ * @param enabled Whether the item view should be enabled.
+ */
+ public void setEnabled(boolean enabled);
+
+ /**
+ * Displays the checkbox for the item view. This does not ensure the item view will be
+ * checked, for that use {@link #setChecked}.
+ * @param checkable Whether to display the checkbox or to hide it
+ */
+ public void setCheckable(boolean checkable);
+
+ /**
+ * Checks the checkbox for the item view. If the checkbox is hidden, it will NOT be
+ * made visible, call {@link #setCheckable(boolean)} for that.
+ * @param checked Whether the checkbox should be checked
+ */
+ public void setChecked(boolean checked);
+
+ /**
+ * Sets the shortcut for the item.
+ * @param showShortcut Whether a shortcut should be shown(if false, the value of
+ * shortcutKey should be ignored).
+ * @param shortcutKey The shortcut key that should be shown on the ItemView.
+ */
+ public void setShortcut(boolean showShortcut, char shortcutKey);
+
+ /**
+ * Set the icon of this item view.
+ * @param icon The icon of this item. null to hide the icon.
+ */
+ public void setIcon(Drawable icon);
+
+ /**
+ * Whether this item view prefers displaying the condensed title rather
+ * than the normal title. If a condensed title is not available, the
+ * normal title will be used.
+ *
+ * @return Whether this item view prefers displaying the condensed
+ * title.
+ */
+ public boolean prefersCondensedTitle();
+
+ /**
+ * Whether this item view shows an icon.
+ *
+ * @return Whether this item view shows an icon.
+ */
+ public boolean showsIcon();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuWrapper.java
new file mode 100644
index 0000000000..4eb8d09f45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/MenuWrapper.java
@@ -0,0 +1,206 @@
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.WeakHashMap;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.view.KeyEvent;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+public class MenuWrapper implements Menu {
+ private final android.view.Menu mNativeMenu;
+
+ private final WeakHashMap<android.view.MenuItem, MenuItem> mNativeMap =
+ new WeakHashMap<android.view.MenuItem, MenuItem>();
+
+
+ public MenuWrapper(android.view.Menu nativeMenu) {
+ mNativeMenu = nativeMenu;
+ }
+
+ public android.view.Menu unwrap() {
+ return mNativeMenu;
+ }
+
+ private MenuItem addInternal(android.view.MenuItem nativeItem) {
+ MenuItem item = new MenuItemWrapper(nativeItem);
+ mNativeMap.put(nativeItem, item);
+ return item;
+ }
+
+ @Override
+ public MenuItem add(CharSequence title) {
+ return addInternal(mNativeMenu.add(title));
+ }
+
+ @Override
+ public MenuItem add(int titleRes) {
+ return addInternal(mNativeMenu.add(titleRes));
+ }
+
+ @Override
+ public MenuItem add(int groupId, int itemId, int order, CharSequence title) {
+ return addInternal(mNativeMenu.add(groupId, itemId, order, title));
+ }
+
+ @Override
+ public MenuItem add(int groupId, int itemId, int order, int titleRes) {
+ return addInternal(mNativeMenu.add(groupId, itemId, order, titleRes));
+ }
+
+ private SubMenu addInternal(android.view.SubMenu nativeSubMenu) {
+ SubMenu subMenu = new SubMenuWrapper(nativeSubMenu);
+ android.view.MenuItem nativeItem = nativeSubMenu.getItem();
+ MenuItem item = subMenu.getItem();
+ mNativeMap.put(nativeItem, item);
+ return subMenu;
+ }
+
+ @Override
+ public SubMenu addSubMenu(CharSequence title) {
+ return addInternal(mNativeMenu.addSubMenu(title));
+ }
+
+ @Override
+ public SubMenu addSubMenu(int titleRes) {
+ return addInternal(mNativeMenu.addSubMenu(titleRes));
+ }
+
+ @Override
+ public SubMenu addSubMenu(int groupId, int itemId, int order, CharSequence title) {
+ return addInternal(mNativeMenu.addSubMenu(groupId, itemId, order, title));
+ }
+
+ @Override
+ public SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes) {
+ return addInternal(mNativeMenu.addSubMenu(groupId, itemId, order, titleRes));
+ }
+
+ @Override
+ public int addIntentOptions(int groupId, int itemId, int order, ComponentName caller, Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems) {
+ int result;
+ if (outSpecificItems != null) {
+ android.view.MenuItem[] nativeOutItems = new android.view.MenuItem[outSpecificItems.length];
+ result = mNativeMenu.addIntentOptions(groupId, itemId, order, caller, specifics, intent, flags, nativeOutItems);
+ for (int i = 0, length = outSpecificItems.length; i < length; i++) {
+ outSpecificItems[i] = new MenuItemWrapper(nativeOutItems[i]);
+ }
+ } else {
+ result = mNativeMenu.addIntentOptions(groupId, itemId, order, caller, specifics, intent, flags, null);
+ }
+ return result;
+ }
+
+ @Override
+ public void removeItem(int id) {
+ mNativeMap.remove(mNativeMenu.findItem(id));
+ mNativeMenu.removeItem(id);
+ }
+
+ @Override
+ public void removeGroup(int groupId) {
+ for (int i = 0; i < mNativeMenu.size(); i++) {
+ final android.view.MenuItem item = mNativeMenu.getItem(i);
+ if (item.getGroupId() == groupId) {
+ mNativeMap.remove(item);
+ }
+ }
+ mNativeMenu.removeGroup(groupId);
+ }
+
+ @Override
+ public void clear() {
+ mNativeMap.clear();
+ mNativeMenu.clear();
+ }
+
+ public void invalidate() {
+ if (mNativeMap.isEmpty()) return;
+
+ final WeakHashMap<android.view.MenuItem, MenuItem> menuMapCopy = new WeakHashMap<android.view.MenuItem, MenuItem>(mNativeMap.size());
+
+ for (int i = 0; i < mNativeMenu.size(); i++) {
+ final android.view.MenuItem item = mNativeMenu.getItem(i);
+ menuMapCopy.put(item, mNativeMap.get(item));
+ }
+
+ mNativeMap.clear();
+ mNativeMap.putAll(menuMapCopy);
+ }
+
+ @Override
+ public void setGroupCheckable(int group, boolean checkable, boolean exclusive) {
+ mNativeMenu.setGroupCheckable(group, checkable, exclusive);
+ }
+
+ @Override
+ public void setGroupVisible(int group, boolean visible) {
+ mNativeMenu.setGroupVisible(group, visible);
+ }
+
+ @Override
+ public void setGroupEnabled(int group, boolean enabled) {
+ mNativeMenu.setGroupEnabled(group, enabled);
+ }
+
+ @Override
+ public boolean hasVisibleItems() {
+ return mNativeMenu.hasVisibleItems();
+ }
+
+ @Override
+ public MenuItem findItem(int id) {
+ android.view.MenuItem nativeItem = mNativeMenu.findItem(id);
+ return findItem(nativeItem);
+ }
+
+ public MenuItem findItem(android.view.MenuItem nativeItem) {
+ if (nativeItem == null) {
+ return null;
+ }
+
+ MenuItem wrapped = mNativeMap.get(nativeItem);
+ if (wrapped != null) {
+ return wrapped;
+ }
+
+ return addInternal(nativeItem);
+ }
+
+ @Override
+ public int size() {
+ return mNativeMenu.size();
+ }
+
+ @Override
+ public MenuItem getItem(int index) {
+ android.view.MenuItem nativeItem = mNativeMenu.getItem(index);
+ return findItem(nativeItem);
+ }
+
+ @Override
+ public void close() {
+ mNativeMenu.close();
+ }
+
+ @Override
+ public boolean performShortcut(int keyCode, KeyEvent event, int flags) {
+ return mNativeMenu.performShortcut(keyCode, event, flags);
+ }
+
+ @Override
+ public boolean isShortcutKey(int keyCode, KeyEvent event) {
+ return mNativeMenu.isShortcutKey(keyCode, event);
+ }
+
+ @Override
+ public boolean performIdentifierAction(int id, int flags) {
+ return mNativeMenu.performIdentifierAction(id, flags);
+ }
+
+ @Override
+ public void setQwertyMode(boolean isQwerty) {
+ mNativeMenu.setQwertyMode(isQwerty);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuBuilder.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuBuilder.java
new file mode 100644
index 0000000000..6679cf3860
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuBuilder.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+/**
+ * The model for a sub menu, which is an extension of the menu. Most methods are proxied to
+ * the parent menu.
+ */
+public class SubMenuBuilder extends MenuBuilder implements SubMenu {
+ private MenuBuilder mParentMenu;
+ private MenuItemImpl mItem;
+
+ public SubMenuBuilder(Context context, MenuBuilder parentMenu, MenuItemImpl item) {
+ super(context);
+
+ mParentMenu = parentMenu;
+ mItem = item;
+ }
+
+ @Override
+ public void setQwertyMode(boolean isQwerty) {
+ mParentMenu.setQwertyMode(isQwerty);
+ }
+
+ @Override
+ public boolean isQwertyMode() {
+ return mParentMenu.isQwertyMode();
+ }
+
+ @Override
+ public void setShortcutsVisible(boolean shortcutsVisible) {
+ mParentMenu.setShortcutsVisible(shortcutsVisible);
+ }
+
+ @Override
+ public boolean isShortcutsVisible() {
+ return mParentMenu.isShortcutsVisible();
+ }
+
+ public Menu getParentMenu() {
+ return mParentMenu;
+ }
+
+ public MenuItem getItem() {
+ return mItem;
+ }
+
+ @Override
+ public void setCallback(Callback callback) {
+ mParentMenu.setCallback(callback);
+ }
+
+ @Override
+ public MenuBuilder getRootMenu() {
+ return mParentMenu;
+ }
+
+ @Override
+ boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ return super.dispatchMenuItemSelected(menu, item) ||
+ mParentMenu.dispatchMenuItemSelected(menu, item);
+ }
+
+ public SubMenu setIcon(Drawable icon) {
+ mItem.setIcon(icon);
+ return this;
+ }
+
+ public SubMenu setIcon(int iconRes) {
+ mItem.setIcon(iconRes);
+ return this;
+ }
+
+ public SubMenu setHeaderIcon(Drawable icon) {
+ return (SubMenu) super.setHeaderIconInt(icon);
+ }
+
+ public SubMenu setHeaderIcon(int iconRes) {
+ return (SubMenu) super.setHeaderIconInt(iconRes);
+ }
+
+ public SubMenu setHeaderTitle(CharSequence title) {
+ return (SubMenu) super.setHeaderTitleInt(title);
+ }
+
+ public SubMenu setHeaderTitle(int titleRes) {
+ return (SubMenu) super.setHeaderTitleInt(titleRes);
+ }
+
+ public SubMenu setHeaderView(View view) {
+ return (SubMenu) super.setHeaderViewInt(view);
+ }
+
+ @Override
+ public boolean expandItemActionView(MenuItemImpl item) {
+ return mParentMenu.expandItemActionView(item);
+ }
+
+ @Override
+ public boolean collapseItemActionView(MenuItemImpl item) {
+ return mParentMenu.collapseItemActionView(item);
+ }
+
+ @Override
+ public String getActionViewStatesKey() {
+ final int itemId = mItem != null ? mItem.getItemId() : 0;
+ if (itemId == 0) {
+ return null;
+ }
+ return super.getActionViewStatesKey() + ":" + itemId;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuWrapper.java
new file mode 100644
index 0000000000..7d307acb10
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/view/menu/SubMenuWrapper.java
@@ -0,0 +1,72 @@
+package com.actionbarsherlock.internal.view.menu;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.SubMenu;
+
+public class SubMenuWrapper extends MenuWrapper implements SubMenu {
+ private final android.view.SubMenu mNativeSubMenu;
+ private MenuItem mItem = null;
+
+ public SubMenuWrapper(android.view.SubMenu nativeSubMenu) {
+ super(nativeSubMenu);
+ mNativeSubMenu = nativeSubMenu;
+ }
+
+
+ @Override
+ public SubMenu setHeaderTitle(int titleRes) {
+ mNativeSubMenu.setHeaderTitle(titleRes);
+ return this;
+ }
+
+ @Override
+ public SubMenu setHeaderTitle(CharSequence title) {
+ mNativeSubMenu.setHeaderTitle(title);
+ return this;
+ }
+
+ @Override
+ public SubMenu setHeaderIcon(int iconRes) {
+ mNativeSubMenu.setHeaderIcon(iconRes);
+ return this;
+ }
+
+ @Override
+ public SubMenu setHeaderIcon(Drawable icon) {
+ mNativeSubMenu.setHeaderIcon(icon);
+ return this;
+ }
+
+ @Override
+ public SubMenu setHeaderView(View view) {
+ mNativeSubMenu.setHeaderView(view);
+ return this;
+ }
+
+ @Override
+ public void clearHeader() {
+ mNativeSubMenu.clearHeader();
+ }
+
+ @Override
+ public SubMenu setIcon(int iconRes) {
+ mNativeSubMenu.setIcon(iconRes);
+ return this;
+ }
+
+ @Override
+ public SubMenu setIcon(Drawable icon) {
+ mNativeSubMenu.setIcon(icon);
+ return this;
+ }
+
+ @Override
+ public MenuItem getItem() {
+ if (mItem == null) {
+ mItem = new MenuItemWrapper(mNativeSubMenu.getItem());
+ }
+ return mItem;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/AbsActionBarView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/AbsActionBarView.java
new file mode 100644
index 0000000000..3a4a446756
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/AbsActionBarView.java
@@ -0,0 +1,291 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.Interpolator;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator;
+import com.actionbarsherlock.internal.nineoldandroids.animation.AnimatorSet;
+import com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator;
+import com.actionbarsherlock.internal.nineoldandroids.view.NineViewGroup;
+import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
+import com.actionbarsherlock.internal.view.menu.ActionMenuView;
+
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getBoolean;
+
+public abstract class AbsActionBarView extends NineViewGroup {
+ protected ActionMenuView mMenuView;
+ protected ActionMenuPresenter mActionMenuPresenter;
+ protected ActionBarContainer mSplitView;
+ protected boolean mSplitActionBar;
+ protected boolean mSplitWhenNarrow;
+ protected int mContentHeight;
+
+ final Context mContext;
+
+ protected Animator mVisibilityAnim;
+ protected final VisibilityAnimListener mVisAnimListener = new VisibilityAnimListener();
+
+ private static final /*Time*/Interpolator sAlphaInterpolator = new DecelerateInterpolator();
+
+ private static final int FADE_DURATION = 200;
+
+ public AbsActionBarView(Context context) {
+ super(context);
+ mContext = context;
+ }
+
+ public AbsActionBarView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mContext = context;
+ }
+
+ public AbsActionBarView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mContext = context;
+ }
+
+ /*
+ * Must be public so we can dispatch pre-2.2 via ActionBarImpl.
+ */
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {
+ super.onConfigurationChanged(newConfig);
+ } else if (mMenuView != null) {
+ mMenuView.onConfigurationChanged(newConfig);
+ }
+
+ // Action bar can change size on configuration changes.
+ // Reread the desired height from the theme-specified style.
+ TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.SherlockActionBar,
+ R.attr.actionBarStyle, 0);
+ setContentHeight(a.getLayoutDimension(R.styleable.SherlockActionBar_height, 0));
+ a.recycle();
+ if (mSplitWhenNarrow) {
+ setSplitActionBar(getResources_getBoolean(getContext(),
+ R.bool.abs__split_action_bar_is_narrow));
+ }
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.onConfigurationChanged(newConfig);
+ }
+ }
+
+ /**
+ * Sets whether the bar should be split right now, no questions asked.
+ * @param split true if the bar should split
+ */
+ public void setSplitActionBar(boolean split) {
+ mSplitActionBar = split;
+ }
+
+ /**
+ * Sets whether the bar should split if we enter a narrow screen configuration.
+ * @param splitWhenNarrow true if the bar should check to split after a config change
+ */
+ public void setSplitWhenNarrow(boolean splitWhenNarrow) {
+ mSplitWhenNarrow = splitWhenNarrow;
+ }
+
+ public void setContentHeight(int height) {
+ mContentHeight = height;
+ requestLayout();
+ }
+
+ public int getContentHeight() {
+ return mContentHeight;
+ }
+
+ public void setSplitView(ActionBarContainer splitView) {
+ mSplitView = splitView;
+ }
+
+ /**
+ * @return Current visibility or if animating, the visibility being animated to.
+ */
+ public int getAnimatedVisibility() {
+ if (mVisibilityAnim != null) {
+ return mVisAnimListener.mFinalVisibility;
+ }
+ return getVisibility();
+ }
+
+ public void animateToVisibility(int visibility) {
+ if (mVisibilityAnim != null) {
+ mVisibilityAnim.cancel();
+ }
+ if (visibility == VISIBLE) {
+ if (getVisibility() != VISIBLE) {
+ setAlpha(0);
+ if (mSplitView != null && mMenuView != null) {
+ mMenuView.setAlpha(0);
+ }
+ }
+ ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
+ anim.setDuration(FADE_DURATION);
+ anim.setInterpolator(sAlphaInterpolator);
+ if (mSplitView != null && mMenuView != null) {
+ AnimatorSet set = new AnimatorSet();
+ ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 1);
+ splitAnim.setDuration(FADE_DURATION);
+ set.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ set.play(anim).with(splitAnim);
+ set.start();
+ } else {
+ anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ anim.start();
+ }
+ } else {
+ ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
+ anim.setDuration(FADE_DURATION);
+ anim.setInterpolator(sAlphaInterpolator);
+ if (mSplitView != null && mMenuView != null) {
+ AnimatorSet set = new AnimatorSet();
+ ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 0);
+ splitAnim.setDuration(FADE_DURATION);
+ set.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ set.play(anim).with(splitAnim);
+ set.start();
+ } else {
+ anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ anim.start();
+ }
+ }
+ }
+
+ @Override
+ public void setVisibility(int visibility) {
+ if (mVisibilityAnim != null) {
+ mVisibilityAnim.end();
+ }
+ super.setVisibility(visibility);
+ }
+
+ public boolean showOverflowMenu() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.showOverflowMenu();
+ }
+ return false;
+ }
+
+ public void postShowOverflowMenu() {
+ post(new Runnable() {
+ public void run() {
+ showOverflowMenu();
+ }
+ });
+ }
+
+ public boolean hideOverflowMenu() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.hideOverflowMenu();
+ }
+ return false;
+ }
+
+ public boolean isOverflowMenuShowing() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.isOverflowMenuShowing();
+ }
+ return false;
+ }
+
+ public boolean isOverflowReserved() {
+ return mActionMenuPresenter != null && mActionMenuPresenter.isOverflowReserved();
+ }
+
+ public void dismissPopupMenus() {
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.dismissPopupMenus();
+ }
+ }
+
+ protected int measureChildView(View child, int availableWidth, int childSpecHeight,
+ int spacing) {
+ child.measure(MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
+ childSpecHeight);
+
+ availableWidth -= child.getMeasuredWidth();
+ availableWidth -= spacing;
+
+ return Math.max(0, availableWidth);
+ }
+
+ protected int positionChild(View child, int x, int y, int contentHeight) {
+ int childWidth = child.getMeasuredWidth();
+ int childHeight = child.getMeasuredHeight();
+ int childTop = y + (contentHeight - childHeight) / 2;
+
+ child.layout(x, childTop, x + childWidth, childTop + childHeight);
+
+ return childWidth;
+ }
+
+ protected int positionChildInverse(View child, int x, int y, int contentHeight) {
+ int childWidth = child.getMeasuredWidth();
+ int childHeight = child.getMeasuredHeight();
+ int childTop = y + (contentHeight - childHeight) / 2;
+
+ child.layout(x - childWidth, childTop, x, childTop + childHeight);
+
+ return childWidth;
+ }
+
+ protected class VisibilityAnimListener implements Animator.AnimatorListener {
+ private boolean mCanceled = false;
+ int mFinalVisibility;
+
+ public VisibilityAnimListener withFinalVisibility(int visibility) {
+ mFinalVisibility = visibility;
+ return this;
+ }
+
+ @Override
+ public void onAnimationStart(Animator animation) {
+ setVisibility(VISIBLE);
+ mVisibilityAnim = animation;
+ mCanceled = false;
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mCanceled) return;
+
+ mVisibilityAnim = null;
+ setVisibility(mFinalVisibility);
+ if (mSplitView != null && mMenuView != null) {
+ mMenuView.setVisibility(mFinalVisibility);
+ }
+ }
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ mCanceled = true;
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContainer.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContainer.java
new file mode 100644
index 0000000000..0889825c00
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContainer.java
@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.nineoldandroids.widget.NineFrameLayout;
+
+/**
+ * This class acts as a container for the action bar view and action mode context views.
+ * It applies special styles as needed to help handle animated transitions between them.
+ * @hide
+ */
+public class ActionBarContainer extends NineFrameLayout {
+ private boolean mIsTransitioning;
+ private View mTabContainer;
+ private ActionBarView mActionBarView;
+
+ private Drawable mBackground;
+ private Drawable mStackedBackground;
+ private Drawable mSplitBackground;
+ private boolean mIsSplit;
+ private boolean mIsStacked;
+
+ public ActionBarContainer(Context context) {
+ this(context, null);
+ }
+
+ public ActionBarContainer(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setBackgroundDrawable(null);
+
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.SherlockActionBar);
+ mBackground = a.getDrawable(R.styleable.SherlockActionBar_background);
+ mStackedBackground = a.getDrawable(
+ R.styleable.SherlockActionBar_backgroundStacked);
+
+ //Fix for issue #379
+ if (mStackedBackground instanceof ColorDrawable && Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ mStackedBackground = new IcsColorDrawable((ColorDrawable) mStackedBackground);
+ }
+
+ if (getId() == R.id.abs__split_action_bar) {
+ mIsSplit = true;
+ mSplitBackground = a.getDrawable(
+ R.styleable.SherlockActionBar_backgroundSplit);
+ }
+ a.recycle();
+
+ setWillNotDraw(mIsSplit ? mSplitBackground == null :
+ mBackground == null && mStackedBackground == null);
+ }
+
+ @Override
+ public void onFinishInflate() {
+ super.onFinishInflate();
+ mActionBarView = (ActionBarView) findViewById(R.id.abs__action_bar);
+ }
+
+ public void setPrimaryBackground(Drawable bg) {
+ mBackground = bg;
+ invalidate();
+ }
+
+ public void setStackedBackground(Drawable bg) {
+ mStackedBackground = bg;
+ invalidate();
+ }
+
+ public void setSplitBackground(Drawable bg) {
+ mSplitBackground = bg;
+ invalidate();
+ }
+
+ /**
+ * Set the action bar into a "transitioning" state. While transitioning
+ * the bar will block focus and touch from all of its descendants. This
+ * prevents the user from interacting with the bar while it is animating
+ * in or out.
+ *
+ * @param isTransitioning true if the bar is currently transitioning, false otherwise.
+ */
+ public void setTransitioning(boolean isTransitioning) {
+ mIsTransitioning = isTransitioning;
+ setDescendantFocusability(isTransitioning ? FOCUS_BLOCK_DESCENDANTS
+ : FOCUS_AFTER_DESCENDANTS);
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ return mIsTransitioning || super.onInterceptTouchEvent(ev);
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ super.onTouchEvent(ev);
+
+ // An action bar always eats touch events.
+ return true;
+ }
+
+ @Override
+ public boolean onHoverEvent(MotionEvent ev) {
+ super.onHoverEvent(ev);
+
+ // An action bar always eats hover events.
+ return true;
+ }
+
+ public void setTabContainer(ScrollingTabContainerView tabView) {
+ if (mTabContainer != null) {
+ removeView(mTabContainer);
+ }
+ mTabContainer = tabView;
+ if (tabView != null) {
+ addView(tabView);
+ final ViewGroup.LayoutParams lp = tabView.getLayoutParams();
+ lp.width = LayoutParams.MATCH_PARENT;
+ lp.height = LayoutParams.WRAP_CONTENT;
+ tabView.setAllowCollapse(false);
+ }
+ }
+
+ public View getTabContainer() {
+ return mTabContainer;
+ }
+
+ @Override
+ public void onDraw(Canvas canvas) {
+ if (getWidth() == 0 || getHeight() == 0) {
+ return;
+ }
+
+ if (mIsSplit) {
+ if (mSplitBackground != null) mSplitBackground.draw(canvas);
+ } else {
+ if (mBackground != null) {
+ mBackground.draw(canvas);
+ }
+ if (mStackedBackground != null && mIsStacked) {
+ mStackedBackground.draw(canvas);
+ }
+ }
+ }
+
+ //This causes the animation reflection to fail on pre-HC platforms
+ //@Override
+ //public android.view.ActionMode startActionModeForChild(View child, android.view.ActionMode.Callback callback) {
+ // // No starting an action mode for an action bar child! (Where would it go?)
+ // return null;
+ //}
+
+ @Override
+ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+ if (mActionBarView == null) return;
+
+ final LayoutParams lp = (LayoutParams) mActionBarView.getLayoutParams();
+ final int actionBarViewHeight = mActionBarView.isCollapsed() ? 0 :
+ mActionBarView.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;
+
+ if (mTabContainer != null && mTabContainer.getVisibility() != GONE) {
+ final int mode = MeasureSpec.getMode(heightMeasureSpec);
+ if (mode == MeasureSpec.AT_MOST) {
+ final int maxHeight = MeasureSpec.getSize(heightMeasureSpec);
+ setMeasuredDimension(getMeasuredWidth(),
+ Math.min(actionBarViewHeight + mTabContainer.getMeasuredHeight(),
+ maxHeight));
+ }
+ }
+ }
+
+ @Override
+ public void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+
+ final boolean hasTabs = mTabContainer != null && mTabContainer.getVisibility() != GONE;
+
+ if (mTabContainer != null && mTabContainer.getVisibility() != GONE) {
+ final int containerHeight = getMeasuredHeight();
+ final int tabHeight = mTabContainer.getMeasuredHeight();
+
+ if ((mActionBarView.getDisplayOptions() & ActionBar.DISPLAY_SHOW_HOME) == 0) {
+ // Not showing home, put tabs on top.
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getChildAt(i);
+
+ if (child == mTabContainer) continue;
+
+ if (!mActionBarView.isCollapsed()) {
+ child.offsetTopAndBottom(tabHeight);
+ }
+ }
+ mTabContainer.layout(l, 0, r, tabHeight);
+ } else {
+ mTabContainer.layout(l, containerHeight - tabHeight, r, containerHeight);
+ }
+ }
+
+ boolean needsInvalidate = false;
+ if (mIsSplit) {
+ if (mSplitBackground != null) {
+ mSplitBackground.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
+ needsInvalidate = true;
+ }
+ } else {
+ if (mBackground != null) {
+ mBackground.setBounds(mActionBarView.getLeft(), mActionBarView.getTop(),
+ mActionBarView.getRight(), mActionBarView.getBottom());
+ needsInvalidate = true;
+ }
+ if ((mIsStacked = hasTabs && mStackedBackground != null)) {
+ mStackedBackground.setBounds(mTabContainer.getLeft(), mTabContainer.getTop(),
+ mTabContainer.getRight(), mTabContainer.getBottom());
+ needsInvalidate = true;
+ }
+ }
+
+ if (needsInvalidate) {
+ invalidate();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContextView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContextView.java
new file mode 100644
index 0000000000..9ec250f387
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarContextView.java
@@ -0,0 +1,518 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.animation.DecelerateInterpolator;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator.AnimatorListener;
+import com.actionbarsherlock.internal.nineoldandroids.animation.AnimatorSet;
+import com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator;
+import com.actionbarsherlock.internal.nineoldandroids.view.animation.AnimatorProxy;
+import com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout;
+import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
+import com.actionbarsherlock.internal.view.menu.ActionMenuView;
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.view.ActionMode;
+
+/**
+ * @hide
+ */
+public class ActionBarContextView extends AbsActionBarView implements AnimatorListener {
+ //UNUSED private static final String TAG = "ActionBarContextView";
+
+ private CharSequence mTitle;
+ private CharSequence mSubtitle;
+
+ private NineLinearLayout mClose;
+ private View mCustomView;
+ private LinearLayout mTitleLayout;
+ private TextView mTitleView;
+ private TextView mSubtitleView;
+ private int mTitleStyleRes;
+ private int mSubtitleStyleRes;
+ private Drawable mSplitBackground;
+
+ private Animator mCurrentAnimation;
+ private boolean mAnimateInOnLayout;
+ private int mAnimationMode;
+
+ private static final int ANIMATE_IDLE = 0;
+ private static final int ANIMATE_IN = 1;
+ private static final int ANIMATE_OUT = 2;
+
+ public ActionBarContextView(Context context) {
+ this(context, null);
+ }
+
+ public ActionBarContextView(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.actionModeStyle);
+ }
+
+ public ActionBarContextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SherlockActionMode, defStyle, 0);
+ setBackgroundDrawable(a.getDrawable(
+ R.styleable.SherlockActionMode_background));
+ mTitleStyleRes = a.getResourceId(
+ R.styleable.SherlockActionMode_titleTextStyle, 0);
+ mSubtitleStyleRes = a.getResourceId(
+ R.styleable.SherlockActionMode_subtitleTextStyle, 0);
+
+ mContentHeight = a.getLayoutDimension(
+ R.styleable.SherlockActionMode_height, 0);
+
+ mSplitBackground = a.getDrawable(
+ R.styleable.SherlockActionMode_backgroundSplit);
+
+ a.recycle();
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.hideOverflowMenu();
+ mActionMenuPresenter.hideSubMenus();
+ }
+ }
+
+ @Override
+ public void setSplitActionBar(boolean split) {
+ if (mSplitActionBar != split) {
+ if (mActionMenuPresenter != null) {
+ // Mode is already active; move everything over and adjust the menu itself.
+ final LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT);
+ if (!split) {
+ mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ mMenuView.setBackgroundDrawable(null);
+ final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
+ if (oldParent != null) oldParent.removeView(mMenuView);
+ addView(mMenuView, layoutParams);
+ } else {
+ // Allow full screen width in split mode.
+ mActionMenuPresenter.setWidthLimit(
+ getContext().getResources().getDisplayMetrics().widthPixels, true);
+ // No limit to the item count; use whatever will fit.
+ mActionMenuPresenter.setItemLimit(Integer.MAX_VALUE);
+ // Span the whole width
+ layoutParams.width = LayoutParams.MATCH_PARENT;
+ layoutParams.height = mContentHeight;
+ mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ mMenuView.setBackgroundDrawable(mSplitBackground);
+ final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
+ if (oldParent != null) oldParent.removeView(mMenuView);
+ mSplitView.addView(mMenuView, layoutParams);
+ }
+ }
+ super.setSplitActionBar(split);
+ }
+ }
+
+ public void setContentHeight(int height) {
+ mContentHeight = height;
+ }
+
+ public void setCustomView(View view) {
+ if (mCustomView != null) {
+ removeView(mCustomView);
+ }
+ mCustomView = view;
+ if (mTitleLayout != null) {
+ removeView(mTitleLayout);
+ mTitleLayout = null;
+ }
+ if (view != null) {
+ addView(view);
+ }
+ requestLayout();
+ }
+
+ public void setTitle(CharSequence title) {
+ mTitle = title;
+ initTitle();
+ }
+
+ public void setSubtitle(CharSequence subtitle) {
+ mSubtitle = subtitle;
+ initTitle();
+ }
+
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ public CharSequence getSubtitle() {
+ return mSubtitle;
+ }
+
+ private void initTitle() {
+ if (mTitleLayout == null) {
+ LayoutInflater inflater = LayoutInflater.from(getContext());
+ inflater.inflate(R.layout.abs__action_bar_title_item, this);
+ mTitleLayout = (LinearLayout) getChildAt(getChildCount() - 1);
+ mTitleView = (TextView) mTitleLayout.findViewById(R.id.abs__action_bar_title);
+ mSubtitleView = (TextView) mTitleLayout.findViewById(R.id.abs__action_bar_subtitle);
+ if (mTitleStyleRes != 0) {
+ mTitleView.setTextAppearance(mContext, mTitleStyleRes);
+ }
+ if (mSubtitleStyleRes != 0) {
+ mSubtitleView.setTextAppearance(mContext, mSubtitleStyleRes);
+ }
+ }
+
+ mTitleView.setText(mTitle);
+ mSubtitleView.setText(mSubtitle);
+
+ final boolean hasTitle = !TextUtils.isEmpty(mTitle);
+ final boolean hasSubtitle = !TextUtils.isEmpty(mSubtitle);
+ mSubtitleView.setVisibility(hasSubtitle ? VISIBLE : GONE);
+ mTitleLayout.setVisibility(hasTitle || hasSubtitle ? VISIBLE : GONE);
+ if (mTitleLayout.getParent() == null) {
+ addView(mTitleLayout);
+ }
+ }
+
+ public void initForMode(final ActionMode mode) {
+ if (mClose == null) {
+ LayoutInflater inflater = LayoutInflater.from(mContext);
+ mClose = (NineLinearLayout)inflater.inflate(R.layout.abs__action_mode_close_item, this, false);
+ addView(mClose);
+ } else if (mClose.getParent() == null) {
+ addView(mClose);
+ }
+
+ View closeButton = mClose.findViewById(R.id.abs__action_mode_close_button);
+ closeButton.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ mode.finish();
+ }
+ });
+
+ final MenuBuilder menu = (MenuBuilder) mode.getMenu();
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.dismissPopupMenus();
+ }
+ mActionMenuPresenter = new ActionMenuPresenter(mContext);
+ mActionMenuPresenter.setReserveOverflow(true);
+
+ final LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT);
+ if (!mSplitActionBar) {
+ menu.addMenuPresenter(mActionMenuPresenter);
+ mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ mMenuView.setBackgroundDrawable(null);
+ addView(mMenuView, layoutParams);
+ } else {
+ // Allow full screen width in split mode.
+ mActionMenuPresenter.setWidthLimit(
+ getContext().getResources().getDisplayMetrics().widthPixels, true);
+ // No limit to the item count; use whatever will fit.
+ mActionMenuPresenter.setItemLimit(Integer.MAX_VALUE);
+ // Span the whole width
+ layoutParams.width = LayoutParams.MATCH_PARENT;
+ layoutParams.height = mContentHeight;
+ menu.addMenuPresenter(mActionMenuPresenter);
+ mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ mMenuView.setBackgroundDrawable(mSplitBackground);
+ mSplitView.addView(mMenuView, layoutParams);
+ }
+
+ mAnimateInOnLayout = true;
+ }
+
+ public void closeMode() {
+ if (mAnimationMode == ANIMATE_OUT) {
+ // Called again during close; just finish what we were doing.
+ return;
+ }
+ if (mClose == null) {
+ killMode();
+ return;
+ }
+
+ finishAnimation();
+ mAnimationMode = ANIMATE_OUT;
+ mCurrentAnimation = makeOutAnimation();
+ mCurrentAnimation.start();
+ }
+
+ private void finishAnimation() {
+ final Animator a = mCurrentAnimation;
+ if (a != null) {
+ mCurrentAnimation = null;
+ a.end();
+ }
+ }
+
+ public void killMode() {
+ finishAnimation();
+ removeAllViews();
+ if (mSplitView != null) {
+ mSplitView.removeView(mMenuView);
+ }
+ mCustomView = null;
+ mMenuView = null;
+ mAnimateInOnLayout = false;
+ }
+
+ @Override
+ public boolean showOverflowMenu() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.showOverflowMenu();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean hideOverflowMenu() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.hideOverflowMenu();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isOverflowMenuShowing() {
+ if (mActionMenuPresenter != null) {
+ return mActionMenuPresenter.isOverflowMenuShowing();
+ }
+ return false;
+ }
+
+ @Override
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
+ // Used by custom views if they don't supply layout params. Everything else
+ // added to an ActionBarContextView should have them already.
+ return new MarginLayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
+ }
+
+ @Override
+ public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
+ return new MarginLayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ if (widthMode != MeasureSpec.EXACTLY) {
+ throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
+ "with android:layout_width=\"match_parent\" (or fill_parent)");
+ }
+
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ if (heightMode == MeasureSpec.UNSPECIFIED) {
+ throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
+ "with android:layout_height=\"wrap_content\"");
+ }
+
+ final int contentWidth = MeasureSpec.getSize(widthMeasureSpec);
+
+ int maxHeight = mContentHeight > 0 ?
+ mContentHeight : MeasureSpec.getSize(heightMeasureSpec);
+
+ final int verticalPadding = getPaddingTop() + getPaddingBottom();
+ int availableWidth = contentWidth - getPaddingLeft() - getPaddingRight();
+ final int height = maxHeight - verticalPadding;
+ final int childSpecHeight = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
+
+ if (mClose != null) {
+ availableWidth = measureChildView(mClose, availableWidth, childSpecHeight, 0);
+ MarginLayoutParams lp = (MarginLayoutParams) mClose.getLayoutParams();
+ availableWidth -= lp.leftMargin + lp.rightMargin;
+ }
+
+ if (mMenuView != null && mMenuView.getParent() == this) {
+ availableWidth = measureChildView(mMenuView, availableWidth,
+ childSpecHeight, 0);
+ }
+
+ if (mTitleLayout != null && mCustomView == null) {
+ availableWidth = measureChildView(mTitleLayout, availableWidth, childSpecHeight, 0);
+ }
+
+ if (mCustomView != null) {
+ ViewGroup.LayoutParams lp = mCustomView.getLayoutParams();
+ final int customWidthMode = lp.width != LayoutParams.WRAP_CONTENT ?
+ MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
+ final int customWidth = lp.width >= 0 ?
+ Math.min(lp.width, availableWidth) : availableWidth;
+ final int customHeightMode = lp.height != LayoutParams.WRAP_CONTENT ?
+ MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
+ final int customHeight = lp.height >= 0 ?
+ Math.min(lp.height, height) : height;
+ mCustomView.measure(MeasureSpec.makeMeasureSpec(customWidth, customWidthMode),
+ MeasureSpec.makeMeasureSpec(customHeight, customHeightMode));
+ }
+
+ if (mContentHeight <= 0) {
+ int measuredHeight = 0;
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ View v = getChildAt(i);
+ int paddedViewHeight = v.getMeasuredHeight() + verticalPadding;
+ if (paddedViewHeight > measuredHeight) {
+ measuredHeight = paddedViewHeight;
+ }
+ }
+ setMeasuredDimension(contentWidth, measuredHeight);
+ } else {
+ setMeasuredDimension(contentWidth, maxHeight);
+ }
+ }
+
+ private Animator makeInAnimation() {
+ mClose.setTranslationX(-mClose.getWidth() -
+ ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin);
+ ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX", 0);
+ buttonAnimator.setDuration(200);
+ buttonAnimator.addListener(this);
+ buttonAnimator.setInterpolator(new DecelerateInterpolator());
+
+ AnimatorSet set = new AnimatorSet();
+ AnimatorSet.Builder b = set.play(buttonAnimator);
+
+ if (mMenuView != null) {
+ final int count = mMenuView.getChildCount();
+ if (count > 0) {
+ for (int i = count - 1, j = 0; i >= 0; i--, j++) {
+ AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i));
+ child.setScaleY(0);
+ ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0, 1);
+ a.setDuration(100);
+ a.setStartDelay(j * 70);
+ b.with(a);
+ }
+ }
+ }
+
+ return set;
+ }
+
+ private Animator makeOutAnimation() {
+ ObjectAnimator buttonAnimator = ObjectAnimator.ofFloat(mClose, "translationX",
+ -mClose.getWidth() - ((MarginLayoutParams) mClose.getLayoutParams()).leftMargin);
+ buttonAnimator.setDuration(200);
+ buttonAnimator.addListener(this);
+ buttonAnimator.setInterpolator(new DecelerateInterpolator());
+
+ AnimatorSet set = new AnimatorSet();
+ AnimatorSet.Builder b = set.play(buttonAnimator);
+
+ if (mMenuView != null) {
+ final int count = mMenuView.getChildCount();
+ if (count > 0) {
+ for (int i = 0; i < 0; i++) {
+ AnimatorProxy child = AnimatorProxy.wrap(mMenuView.getChildAt(i));
+ child.setScaleY(0);
+ ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0);
+ a.setDuration(100);
+ a.setStartDelay(i * 70);
+ b.with(a);
+ }
+ }
+ }
+
+ return set;
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ int x = getPaddingLeft();
+ final int y = getPaddingTop();
+ final int contentHeight = b - t - getPaddingTop() - getPaddingBottom();
+
+ if (mClose != null && mClose.getVisibility() != GONE) {
+ MarginLayoutParams lp = (MarginLayoutParams) mClose.getLayoutParams();
+ x += lp.leftMargin;
+ x += positionChild(mClose, x, y, contentHeight);
+ x += lp.rightMargin;
+
+ if (mAnimateInOnLayout) {
+ mAnimationMode = ANIMATE_IN;
+ mCurrentAnimation = makeInAnimation();
+ mCurrentAnimation.start();
+ mAnimateInOnLayout = false;
+ }
+ }
+
+ if (mTitleLayout != null && mCustomView == null) {
+ x += positionChild(mTitleLayout, x, y, contentHeight);
+ }
+
+ if (mCustomView != null) {
+ x += positionChild(mCustomView, x, y, contentHeight);
+ }
+
+ x = r - l - getPaddingRight();
+
+ if (mMenuView != null) {
+ x -= positionChildInverse(mMenuView, x, y, contentHeight);
+ }
+ }
+
+ @Override
+ public void onAnimationStart(Animator animation) {
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mAnimationMode == ANIMATE_OUT) {
+ killMode();
+ }
+ mAnimationMode = ANIMATE_IDLE;
+ }
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ }
+
+ @Override
+ public boolean shouldDelayChildPressedState() {
+ return false;
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
+ // Action mode started
+ //TODO event.setSource(this);
+ event.setClassName(getClass().getName());
+ event.setPackageName(getContext().getPackageName());
+ event.setContentDescription(mTitle);
+ } else {
+ //TODO super.onInitializeAccessibilityEvent(event);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java
new file mode 100644
index 0000000000..61e55b0a21
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java
@@ -0,0 +1,1465 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import com.actionbarsherlock.internal.ResourcesCompat;
+import android.app.Activity;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.SpinnerAdapter;
+import android.widget.TextView;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.app.ActionBar.OnNavigationListener;
+import com.actionbarsherlock.internal.view.menu.ActionMenuItem;
+import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
+import com.actionbarsherlock.internal.view.menu.ActionMenuView;
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.internal.view.menu.MenuItemImpl;
+import com.actionbarsherlock.internal.view.menu.MenuPresenter;
+import com.actionbarsherlock.internal.view.menu.MenuView;
+import com.actionbarsherlock.internal.view.menu.SubMenuBuilder;
+import com.actionbarsherlock.view.CollapsibleActionView;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.Window;
+
+import static com.actionbarsherlock.internal.ResourcesCompat.getResources_getBoolean;
+
+/**
+ * @hide
+ */
+public class ActionBarView extends AbsActionBarView {
+ private static final String TAG = "ActionBarView";
+
+ /**
+ * Display options applied by default
+ */
+ public static final int DISPLAY_DEFAULT = 0;
+
+ /**
+ * Display options that require re-layout as opposed to a simple invalidate
+ */
+ private static final int DISPLAY_RELAYOUT_MASK =
+ ActionBar.DISPLAY_SHOW_HOME |
+ ActionBar.DISPLAY_USE_LOGO |
+ ActionBar.DISPLAY_HOME_AS_UP |
+ ActionBar.DISPLAY_SHOW_CUSTOM |
+ ActionBar.DISPLAY_SHOW_TITLE;
+
+ private static final int DEFAULT_CUSTOM_GRAVITY = Gravity.LEFT | Gravity.CENTER_VERTICAL;
+
+ private int mNavigationMode;
+ private int mDisplayOptions = -1;
+ private CharSequence mTitle;
+ private CharSequence mSubtitle;
+ private Drawable mIcon;
+ private Drawable mLogo;
+
+ private HomeView mHomeLayout;
+ private HomeView mExpandedHomeLayout;
+ private LinearLayout mTitleLayout;
+ private TextView mTitleView;
+ private TextView mSubtitleView;
+ private View mTitleUpView;
+
+ private IcsSpinner mSpinner;
+ private IcsLinearLayout mListNavLayout;
+ private ScrollingTabContainerView mTabScrollView;
+ private View mCustomNavView;
+ private IcsProgressBar mProgressView;
+ private IcsProgressBar mIndeterminateProgressView;
+
+ private int mProgressBarPadding;
+ private int mItemPadding;
+
+ private int mTitleStyleRes;
+ private int mSubtitleStyleRes;
+ private int mProgressStyle;
+ private int mIndeterminateProgressStyle;
+
+ private boolean mUserTitle;
+ private boolean mIncludeTabs;
+ private boolean mIsCollapsable;
+ private boolean mIsCollapsed;
+
+ private MenuBuilder mOptionsMenu;
+
+ private ActionBarContextView mContextView;
+
+ private ActionMenuItem mLogoNavItem;
+
+ private SpinnerAdapter mSpinnerAdapter;
+ private OnNavigationListener mCallback;
+
+ //UNUSED private Runnable mTabSelector;
+
+ private ExpandedActionViewMenuPresenter mExpandedMenuPresenter;
+ View mExpandedActionView;
+
+ Window.Callback mWindowCallback;
+
+ @SuppressWarnings("rawtypes")
+ private final IcsAdapterView.OnItemSelectedListener mNavItemSelectedListener =
+ new IcsAdapterView.OnItemSelectedListener() {
+ public void onItemSelected(IcsAdapterView parent, View view, int position, long id) {
+ if (mCallback != null) {
+ mCallback.onNavigationItemSelected(position, id);
+ }
+ }
+ public void onNothingSelected(IcsAdapterView parent) {
+ // Do nothing
+ }
+ };
+
+ private final OnClickListener mExpandedActionViewUpListener = new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ final MenuItemImpl item = mExpandedMenuPresenter.mCurrentExpandedItem;
+ if (item != null) {
+ item.collapseActionView();
+ }
+ }
+ };
+
+ private final OnClickListener mUpClickListener = new OnClickListener() {
+ public void onClick(View v) {
+ mWindowCallback.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem);
+ }
+ };
+
+ public ActionBarView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ // Background is always provided by the container.
+ setBackgroundResource(0);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SherlockActionBar,
+ R.attr.actionBarStyle, 0);
+
+ ApplicationInfo appInfo = context.getApplicationInfo();
+ PackageManager pm = context.getPackageManager();
+ mNavigationMode = a.getInt(R.styleable.SherlockActionBar_navigationMode,
+ ActionBar.NAVIGATION_MODE_STANDARD);
+ mTitle = a.getText(R.styleable.SherlockActionBar_title);
+ mSubtitle = a.getText(R.styleable.SherlockActionBar_subtitle);
+
+ mLogo = a.getDrawable(R.styleable.SherlockActionBar_logo);
+ if (mLogo == null) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ if (context instanceof Activity) {
+ //Even though native methods existed in API 9 and 10 they don't work
+ //so just parse the manifest to look for the logo pre-Honeycomb
+ final int resId = ResourcesCompat.loadLogoFromManifest((Activity) context);
+ if (resId != 0) {
+ mLogo = context.getResources().getDrawable(resId);
+ }
+ }
+ } else {
+ if (context instanceof Activity) {
+ try {
+ mLogo = pm.getActivityLogo(((Activity) context).getComponentName());
+ } catch (NameNotFoundException e) {
+ Log.e(TAG, "Activity component name not found!", e);
+ }
+ }
+ if (mLogo == null) {
+ mLogo = appInfo.loadLogo(pm);
+ }
+ }
+ }
+
+ mIcon = a.getDrawable(R.styleable.SherlockActionBar_icon);
+ if (mIcon == null) {
+ if (context instanceof Activity) {
+ try {
+ mIcon = pm.getActivityIcon(((Activity) context).getComponentName());
+ } catch (NameNotFoundException e) {
+ Log.e(TAG, "Activity component name not found!", e);
+ }
+ }
+ if (mIcon == null) {
+ mIcon = appInfo.loadIcon(pm);
+ }
+ }
+
+ final LayoutInflater inflater = LayoutInflater.from(context);
+
+ final int homeResId = a.getResourceId(
+ R.styleable.SherlockActionBar_homeLayout,
+ R.layout.abs__action_bar_home);
+
+ mHomeLayout = (HomeView) inflater.inflate(homeResId, this, false);
+
+ mExpandedHomeLayout = (HomeView) inflater.inflate(homeResId, this, false);
+ mExpandedHomeLayout.setUp(true);
+ mExpandedHomeLayout.setOnClickListener(mExpandedActionViewUpListener);
+ mExpandedHomeLayout.setContentDescription(getResources().getText(
+ R.string.abs__action_bar_up_description));
+
+ mTitleStyleRes = a.getResourceId(R.styleable.SherlockActionBar_titleTextStyle, 0);
+ mSubtitleStyleRes = a.getResourceId(R.styleable.SherlockActionBar_subtitleTextStyle, 0);
+ mProgressStyle = a.getResourceId(R.styleable.SherlockActionBar_progressBarStyle, 0);
+ mIndeterminateProgressStyle = a.getResourceId(
+ R.styleable.SherlockActionBar_indeterminateProgressStyle, 0);
+
+ mProgressBarPadding = a.getDimensionPixelOffset(R.styleable.SherlockActionBar_progressBarPadding, 0);
+ mItemPadding = a.getDimensionPixelOffset(R.styleable.SherlockActionBar_itemPadding, 0);
+
+ setDisplayOptions(a.getInt(R.styleable.SherlockActionBar_displayOptions, DISPLAY_DEFAULT));
+
+ final int customNavId = a.getResourceId(R.styleable.SherlockActionBar_customNavigationLayout, 0);
+ if (customNavId != 0) {
+ mCustomNavView = inflater.inflate(customNavId, this, false);
+ mNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD;
+ setDisplayOptions(mDisplayOptions | ActionBar.DISPLAY_SHOW_CUSTOM);
+ }
+
+ mContentHeight = a.getLayoutDimension(R.styleable.SherlockActionBar_height, 0);
+
+ a.recycle();
+
+ mLogoNavItem = new ActionMenuItem(context, 0, android.R.id.home, 0, 0, mTitle);
+ mHomeLayout.setOnClickListener(mUpClickListener);
+ mHomeLayout.setClickable(true);
+ mHomeLayout.setFocusable(true);
+ }
+
+ /*
+ * Must be public so we can dispatch pre-2.2 via ActionBarImpl.
+ */
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ mTitleView = null;
+ mSubtitleView = null;
+ mTitleUpView = null;
+ if (mTitleLayout != null && mTitleLayout.getParent() == this) {
+ removeView(mTitleLayout);
+ }
+ mTitleLayout = null;
+ if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0) {
+ initTitle();
+ }
+
+ if (mTabScrollView != null && mIncludeTabs) {
+ ViewGroup.LayoutParams lp = mTabScrollView.getLayoutParams();
+ if (lp != null) {
+ lp.width = LayoutParams.WRAP_CONTENT;
+ lp.height = LayoutParams.MATCH_PARENT;
+ }
+ mTabScrollView.setAllowCollapse(true);
+ }
+ }
+
+ /**
+ * Set the window callback used to invoke menu items; used for dispatching home button presses.
+ * @param cb Window callback to dispatch to
+ */
+ public void setWindowCallback(Window.Callback cb) {
+ mWindowCallback = cb;
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ //UNUSED removeCallbacks(mTabSelector);
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.hideOverflowMenu();
+ mActionMenuPresenter.hideSubMenus();
+ }
+ }
+
+ @Override
+ public boolean shouldDelayChildPressedState() {
+ return false;
+ }
+
+ public void initProgress() {
+ mProgressView = new IcsProgressBar(mContext, null, 0, mProgressStyle);
+ mProgressView.setId(R.id.abs__progress_horizontal);
+ mProgressView.setMax(10000);
+ addView(mProgressView);
+ }
+
+ public void initIndeterminateProgress() {
+ mIndeterminateProgressView = new IcsProgressBar(mContext, null, 0, mIndeterminateProgressStyle);
+ mIndeterminateProgressView.setId(R.id.abs__progress_circular);
+ addView(mIndeterminateProgressView);
+ }
+
+ @Override
+ public void setSplitActionBar(boolean splitActionBar) {
+ if (mSplitActionBar != splitActionBar) {
+ if (mMenuView != null) {
+ final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
+ if (oldParent != null) {
+ oldParent.removeView(mMenuView);
+ }
+ if (splitActionBar) {
+ if (mSplitView != null) {
+ mSplitView.addView(mMenuView);
+ }
+ } else {
+ addView(mMenuView);
+ }
+ }
+ if (mSplitView != null) {
+ mSplitView.setVisibility(splitActionBar ? VISIBLE : GONE);
+ }
+ super.setSplitActionBar(splitActionBar);
+ }
+ }
+
+ public boolean isSplitActionBar() {
+ return mSplitActionBar;
+ }
+
+ public boolean hasEmbeddedTabs() {
+ return mIncludeTabs;
+ }
+
+ public void setEmbeddedTabView(ScrollingTabContainerView tabs) {
+ if (mTabScrollView != null) {
+ removeView(mTabScrollView);
+ }
+ mTabScrollView = tabs;
+ mIncludeTabs = tabs != null;
+ if (mIncludeTabs && mNavigationMode == ActionBar.NAVIGATION_MODE_TABS) {
+ addView(mTabScrollView);
+ ViewGroup.LayoutParams lp = mTabScrollView.getLayoutParams();
+ lp.width = LayoutParams.WRAP_CONTENT;
+ lp.height = LayoutParams.MATCH_PARENT;
+ tabs.setAllowCollapse(true);
+ }
+ }
+
+ public void setCallback(OnNavigationListener callback) {
+ mCallback = callback;
+ }
+
+ public void setMenu(Menu menu, MenuPresenter.Callback cb) {
+ if (menu == mOptionsMenu) return;
+
+ if (mOptionsMenu != null) {
+ mOptionsMenu.removeMenuPresenter(mActionMenuPresenter);
+ mOptionsMenu.removeMenuPresenter(mExpandedMenuPresenter);
+ }
+
+ MenuBuilder builder = (MenuBuilder) menu;
+ mOptionsMenu = builder;
+ if (mMenuView != null) {
+ final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
+ if (oldParent != null) {
+ oldParent.removeView(mMenuView);
+ }
+ }
+ if (mActionMenuPresenter == null) {
+ mActionMenuPresenter = new ActionMenuPresenter(mContext);
+ mActionMenuPresenter.setCallback(cb);
+ mActionMenuPresenter.setId(R.id.abs__action_menu_presenter);
+ mExpandedMenuPresenter = new ExpandedActionViewMenuPresenter();
+ }
+
+ ActionMenuView menuView;
+ final LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT);
+ if (!mSplitActionBar) {
+ mActionMenuPresenter.setExpandedActionViewsExclusive(
+ getResources_getBoolean(getContext(),
+ R.bool.abs__action_bar_expanded_action_views_exclusive));
+ configPresenters(builder);
+ menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ final ViewGroup oldParent = (ViewGroup) menuView.getParent();
+ if (oldParent != null && oldParent != this) {
+ oldParent.removeView(menuView);
+ }
+ addView(menuView, layoutParams);
+ } else {
+ mActionMenuPresenter.setExpandedActionViewsExclusive(false);
+ // Allow full screen width in split mode.
+ mActionMenuPresenter.setWidthLimit(
+ getContext().getResources().getDisplayMetrics().widthPixels, true);
+ // No limit to the item count; use whatever will fit.
+ mActionMenuPresenter.setItemLimit(Integer.MAX_VALUE);
+ // Span the whole width
+ layoutParams.width = LayoutParams.MATCH_PARENT;
+ configPresenters(builder);
+ menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+ if (mSplitView != null) {
+ final ViewGroup oldParent = (ViewGroup) menuView.getParent();
+ if (oldParent != null && oldParent != mSplitView) {
+ oldParent.removeView(menuView);
+ }
+ menuView.setVisibility(getAnimatedVisibility());
+ mSplitView.addView(menuView, layoutParams);
+ } else {
+ // We'll add this later if we missed it this time.
+ menuView.setLayoutParams(layoutParams);
+ }
+ }
+ mMenuView = menuView;
+ }
+
+ private void configPresenters(MenuBuilder builder) {
+ if (builder != null) {
+ builder.addMenuPresenter(mActionMenuPresenter);
+ builder.addMenuPresenter(mExpandedMenuPresenter);
+ } else {
+ mActionMenuPresenter.initForMenu(mContext, null);
+ mExpandedMenuPresenter.initForMenu(mContext, null);
+ mActionMenuPresenter.updateMenuView(true);
+ mExpandedMenuPresenter.updateMenuView(true);
+ }
+ }
+
+ public boolean hasExpandedActionView() {
+ return mExpandedMenuPresenter != null &&
+ mExpandedMenuPresenter.mCurrentExpandedItem != null;
+ }
+
+ public void collapseActionView() {
+ final MenuItemImpl item = mExpandedMenuPresenter == null ? null :
+ mExpandedMenuPresenter.mCurrentExpandedItem;
+ if (item != null) {
+ item.collapseActionView();
+ }
+ }
+
+ public void setCustomNavigationView(View view) {
+ final boolean showCustom = (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0;
+ if (mCustomNavView != null && showCustom) {
+ removeView(mCustomNavView);
+ }
+ mCustomNavView = view;
+ if (mCustomNavView != null && showCustom) {
+ addView(mCustomNavView);
+ }
+ }
+
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ /**
+ * Set the action bar title. This will always replace or override window titles.
+ * @param title Title to set
+ *
+ * @see #setWindowTitle(CharSequence)
+ */
+ public void setTitle(CharSequence title) {
+ mUserTitle = true;
+ setTitleImpl(title);
+ }
+
+ /**
+ * Set the window title. A window title will always be replaced or overridden by a user title.
+ * @param title Title to set
+ *
+ * @see #setTitle(CharSequence)
+ */
+ public void setWindowTitle(CharSequence title) {
+ if (!mUserTitle) {
+ setTitleImpl(title);
+ }
+ }
+
+ private void setTitleImpl(CharSequence title) {
+ mTitle = title;
+ if (mTitleView != null) {
+ mTitleView.setText(title);
+ final boolean visible = mExpandedActionView == null &&
+ (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0 &&
+ (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle));
+ mTitleLayout.setVisibility(visible ? VISIBLE : GONE);
+ }
+ if (mLogoNavItem != null) {
+ mLogoNavItem.setTitle(title);
+ }
+ }
+
+ public CharSequence getSubtitle() {
+ return mSubtitle;
+ }
+
+ public void setSubtitle(CharSequence subtitle) {
+ mSubtitle = subtitle;
+ if (mSubtitleView != null) {
+ mSubtitleView.setText(subtitle);
+ mSubtitleView.setVisibility(subtitle != null ? VISIBLE : GONE);
+ final boolean visible = mExpandedActionView == null &&
+ (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0 &&
+ (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle));
+ mTitleLayout.setVisibility(visible ? VISIBLE : GONE);
+ }
+ }
+
+ public void setHomeButtonEnabled(boolean enable) {
+ mHomeLayout.setEnabled(enable);
+ mHomeLayout.setFocusable(enable);
+ // Make sure the home button has an accurate content description for accessibility.
+ if (!enable) {
+ mHomeLayout.setContentDescription(null);
+ } else if ((mDisplayOptions & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+ mHomeLayout.setContentDescription(mContext.getResources().getText(
+ R.string.abs__action_bar_up_description));
+ } else {
+ mHomeLayout.setContentDescription(mContext.getResources().getText(
+ R.string.abs__action_bar_home_description));
+ }
+ }
+
+ public void setDisplayOptions(int options) {
+ final int flagsChanged = mDisplayOptions == -1 ? -1 : options ^ mDisplayOptions;
+ mDisplayOptions = options;
+
+ if ((flagsChanged & DISPLAY_RELAYOUT_MASK) != 0) {
+ final boolean showHome = (options & ActionBar.DISPLAY_SHOW_HOME) != 0;
+ final int vis = showHome && mExpandedActionView == null ? VISIBLE : GONE;
+ mHomeLayout.setVisibility(vis);
+
+ if ((flagsChanged & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+ final boolean setUp = (options & ActionBar.DISPLAY_HOME_AS_UP) != 0;
+ mHomeLayout.setUp(setUp);
+
+ // Showing home as up implicitly enables interaction with it.
+ // In honeycomb it was always enabled, so make this transition
+ // a bit easier for developers in the common case.
+ // (It would be silly to show it as up without responding to it.)
+ if (setUp) {
+ setHomeButtonEnabled(true);
+ }
+ }
+
+ if ((flagsChanged & ActionBar.DISPLAY_USE_LOGO) != 0) {
+ final boolean logoVis = mLogo != null && (options & ActionBar.DISPLAY_USE_LOGO) != 0;
+ mHomeLayout.setIcon(logoVis ? mLogo : mIcon);
+ }
+
+ if ((flagsChanged & ActionBar.DISPLAY_SHOW_TITLE) != 0) {
+ if ((options & ActionBar.DISPLAY_SHOW_TITLE) != 0) {
+ initTitle();
+ } else {
+ removeView(mTitleLayout);
+ }
+ }
+
+ if (mTitleLayout != null && (flagsChanged &
+ (ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_HOME)) != 0) {
+ final boolean homeAsUp = (mDisplayOptions & ActionBar.DISPLAY_HOME_AS_UP) != 0;
+ mTitleUpView.setVisibility(!showHome ? (homeAsUp ? VISIBLE : INVISIBLE) : GONE);
+ mTitleLayout.setEnabled(!showHome && homeAsUp);
+ }
+
+ if ((flagsChanged & ActionBar.DISPLAY_SHOW_CUSTOM) != 0 && mCustomNavView != null) {
+ if ((options & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) {
+ addView(mCustomNavView);
+ } else {
+ removeView(mCustomNavView);
+ }
+ }
+
+ requestLayout();
+ } else {
+ invalidate();
+ }
+
+ // Make sure the home button has an accurate content description for accessibility.
+ if (!mHomeLayout.isEnabled()) {
+ mHomeLayout.setContentDescription(null);
+ } else if ((options & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+ mHomeLayout.setContentDescription(mContext.getResources().getText(
+ R.string.abs__action_bar_up_description));
+ } else {
+ mHomeLayout.setContentDescription(mContext.getResources().getText(
+ R.string.abs__action_bar_home_description));
+ }
+ }
+
+ public void setIcon(Drawable icon) {
+ mIcon = icon;
+ if (icon != null &&
+ ((mDisplayOptions & ActionBar.DISPLAY_USE_LOGO) == 0 || mLogo == null)) {
+ mHomeLayout.setIcon(icon);
+ }
+ }
+
+ public void setIcon(int resId) {
+ setIcon(mContext.getResources().getDrawable(resId));
+ }
+
+ public void setLogo(Drawable logo) {
+ mLogo = logo;
+ if (logo != null && (mDisplayOptions & ActionBar.DISPLAY_USE_LOGO) != 0) {
+ mHomeLayout.setIcon(logo);
+ }
+ }
+
+ public void setLogo(int resId) {
+ setLogo(mContext.getResources().getDrawable(resId));
+ }
+
+ public void setNavigationMode(int mode) {
+ final int oldMode = mNavigationMode;
+ if (mode != oldMode) {
+ switch (oldMode) {
+ case ActionBar.NAVIGATION_MODE_LIST:
+ if (mListNavLayout != null) {
+ removeView(mListNavLayout);
+ }
+ break;
+ case ActionBar.NAVIGATION_MODE_TABS:
+ if (mTabScrollView != null && mIncludeTabs) {
+ removeView(mTabScrollView);
+ }
+ }
+
+ switch (mode) {
+ case ActionBar.NAVIGATION_MODE_LIST:
+ if (mSpinner == null) {
+ mSpinner = new IcsSpinner(mContext, null,
+ R.attr.actionDropDownStyle);
+ mListNavLayout = (IcsLinearLayout) LayoutInflater.from(mContext)
+ .inflate(R.layout.abs__action_bar_tab_bar_view, null);
+ LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+ LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
+ params.gravity = Gravity.CENTER;
+ mListNavLayout.addView(mSpinner, params);
+ }
+ if (mSpinner.getAdapter() != mSpinnerAdapter) {
+ mSpinner.setAdapter(mSpinnerAdapter);
+ }
+ mSpinner.setOnItemSelectedListener(mNavItemSelectedListener);
+ addView(mListNavLayout);
+ break;
+ case ActionBar.NAVIGATION_MODE_TABS:
+ if (mTabScrollView != null && mIncludeTabs) {
+ addView(mTabScrollView);
+ }
+ break;
+ }
+ mNavigationMode = mode;
+ requestLayout();
+ }
+ }
+
+ public void setDropdownAdapter(SpinnerAdapter adapter) {
+ mSpinnerAdapter = adapter;
+ if (mSpinner != null) {
+ mSpinner.setAdapter(adapter);
+ }
+ }
+
+ public SpinnerAdapter getDropdownAdapter() {
+ return mSpinnerAdapter;
+ }
+
+ public void setDropdownSelectedPosition(int position) {
+ mSpinner.setSelection(position);
+ }
+
+ public int getDropdownSelectedPosition() {
+ return mSpinner.getSelectedItemPosition();
+ }
+
+ public View getCustomNavigationView() {
+ return mCustomNavView;
+ }
+
+ public int getNavigationMode() {
+ return mNavigationMode;
+ }
+
+ public int getDisplayOptions() {
+ return mDisplayOptions;
+ }
+
+ @Override
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
+ // Used by custom nav views if they don't supply layout params. Everything else
+ // added to an ActionBarView should have them already.
+ return new ActionBar.LayoutParams(DEFAULT_CUSTOM_GRAVITY);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ addView(mHomeLayout);
+
+ if (mCustomNavView != null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) {
+ final ViewParent parent = mCustomNavView.getParent();
+ if (parent != this) {
+ if (parent instanceof ViewGroup) {
+ ((ViewGroup) parent).removeView(mCustomNavView);
+ }
+ addView(mCustomNavView);
+ }
+ }
+ }
+
+ private void initTitle() {
+ if (mTitleLayout == null) {
+ LayoutInflater inflater = LayoutInflater.from(getContext());
+ mTitleLayout = (LinearLayout) inflater.inflate(R.layout.abs__action_bar_title_item,
+ this, false);
+ mTitleView = (TextView) mTitleLayout.findViewById(R.id.abs__action_bar_title);
+ mSubtitleView = (TextView) mTitleLayout.findViewById(R.id.abs__action_bar_subtitle);
+ mTitleUpView = mTitleLayout.findViewById(R.id.abs__up);
+
+ mTitleLayout.setOnClickListener(mUpClickListener);
+
+ if (mTitleStyleRes != 0) {
+ mTitleView.setTextAppearance(mContext, mTitleStyleRes);
+ }
+ if (mTitle != null) {
+ mTitleView.setText(mTitle);
+ }
+
+ if (mSubtitleStyleRes != 0) {
+ mSubtitleView.setTextAppearance(mContext, mSubtitleStyleRes);
+ }
+ if (mSubtitle != null) {
+ mSubtitleView.setText(mSubtitle);
+ mSubtitleView.setVisibility(VISIBLE);
+ }
+
+ final boolean homeAsUp = (mDisplayOptions & ActionBar.DISPLAY_HOME_AS_UP) != 0;
+ final boolean showHome = (mDisplayOptions & ActionBar.DISPLAY_SHOW_HOME) != 0;
+ mTitleUpView.setVisibility(!showHome ? (homeAsUp ? VISIBLE : INVISIBLE) : GONE);
+ mTitleLayout.setEnabled(homeAsUp && !showHome);
+ }
+
+ addView(mTitleLayout);
+ if (mExpandedActionView != null ||
+ (TextUtils.isEmpty(mTitle) && TextUtils.isEmpty(mSubtitle))) {
+ // Don't show while in expanded mode or with empty text
+ mTitleLayout.setVisibility(GONE);
+ }
+ }
+
+ public void setContextView(ActionBarContextView view) {
+ mContextView = view;
+ }
+
+ public void setCollapsable(boolean collapsable) {
+ mIsCollapsable = collapsable;
+ }
+
+ public boolean isCollapsed() {
+ return mIsCollapsed;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ final int childCount = getChildCount();
+ if (mIsCollapsable) {
+ int visibleChildren = 0;
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ if (child.getVisibility() != GONE &&
+ !(child == mMenuView && mMenuView.getChildCount() == 0)) {
+ visibleChildren++;
+ }
+ }
+
+ if (visibleChildren == 0) {
+ // No size for an empty action bar when collapsable.
+ setMeasuredDimension(0, 0);
+ mIsCollapsed = true;
+ return;
+ }
+ }
+ mIsCollapsed = false;
+
+ int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ if (widthMode != MeasureSpec.EXACTLY) {
+ throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
+ "with android:layout_width=\"match_parent\" (or fill_parent)");
+ }
+
+ int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ if (heightMode != MeasureSpec.AT_MOST) {
+ throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
+ "with android:layout_height=\"wrap_content\"");
+ }
+
+ int contentWidth = MeasureSpec.getSize(widthMeasureSpec);
+
+ int maxHeight = mContentHeight > 0 ?
+ mContentHeight : MeasureSpec.getSize(heightMeasureSpec);
+
+ final int verticalPadding = getPaddingTop() + getPaddingBottom();
+ final int paddingLeft = getPaddingLeft();
+ final int paddingRight = getPaddingRight();
+ final int height = maxHeight - verticalPadding;
+ final int childSpecHeight = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
+
+ int availableWidth = contentWidth - paddingLeft - paddingRight;
+ int leftOfCenter = availableWidth / 2;
+ int rightOfCenter = leftOfCenter;
+
+ HomeView homeLayout = mExpandedActionView != null ? mExpandedHomeLayout : mHomeLayout;
+
+ if (homeLayout.getVisibility() != GONE) {
+ final ViewGroup.LayoutParams lp = homeLayout.getLayoutParams();
+ int homeWidthSpec;
+ if (lp.width < 0) {
+ homeWidthSpec = MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST);
+ } else {
+ homeWidthSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY);
+ }
+ homeLayout.measure(homeWidthSpec,
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
+ final int homeWidth = homeLayout.getMeasuredWidth() + homeLayout.getLeftOffset();
+ availableWidth = Math.max(0, availableWidth - homeWidth);
+ leftOfCenter = Math.max(0, availableWidth - homeWidth);
+ }
+
+ if (mMenuView != null && mMenuView.getParent() == this) {
+ availableWidth = measureChildView(mMenuView, availableWidth,
+ childSpecHeight, 0);
+ rightOfCenter = Math.max(0, rightOfCenter - mMenuView.getMeasuredWidth());
+ }
+
+ if (mIndeterminateProgressView != null &&
+ mIndeterminateProgressView.getVisibility() != GONE) {
+ availableWidth = measureChildView(mIndeterminateProgressView, availableWidth,
+ childSpecHeight, 0);
+ rightOfCenter = Math.max(0,
+ rightOfCenter - mIndeterminateProgressView.getMeasuredWidth());
+ }
+
+ final boolean showTitle = mTitleLayout != null && mTitleLayout.getVisibility() != GONE &&
+ (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0;
+
+ if (mExpandedActionView == null) {
+ switch (mNavigationMode) {
+ case ActionBar.NAVIGATION_MODE_LIST:
+ if (mListNavLayout != null) {
+ final int itemPaddingSize = showTitle ? mItemPadding * 2 : mItemPadding;
+ availableWidth = Math.max(0, availableWidth - itemPaddingSize);
+ leftOfCenter = Math.max(0, leftOfCenter - itemPaddingSize);
+ mListNavLayout.measure(
+ MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
+ final int listNavWidth = mListNavLayout.getMeasuredWidth();
+ availableWidth = Math.max(0, availableWidth - listNavWidth);
+ leftOfCenter = Math.max(0, leftOfCenter - listNavWidth);
+ }
+ break;
+ case ActionBar.NAVIGATION_MODE_TABS:
+ if (mTabScrollView != null) {
+ final int itemPaddingSize = showTitle ? mItemPadding * 2 : mItemPadding;
+ availableWidth = Math.max(0, availableWidth - itemPaddingSize);
+ leftOfCenter = Math.max(0, leftOfCenter - itemPaddingSize);
+ mTabScrollView.measure(
+ MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
+ final int tabWidth = mTabScrollView.getMeasuredWidth();
+ availableWidth = Math.max(0, availableWidth - tabWidth);
+ leftOfCenter = Math.max(0, leftOfCenter - tabWidth);
+ }
+ break;
+ }
+ }
+
+ View customView = null;
+ if (mExpandedActionView != null) {
+ customView = mExpandedActionView;
+ } else if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0 &&
+ mCustomNavView != null) {
+ customView = mCustomNavView;
+ }
+
+ if (customView != null) {
+ final ViewGroup.LayoutParams lp = generateLayoutParams(customView.getLayoutParams());
+ final ActionBar.LayoutParams ablp = lp instanceof ActionBar.LayoutParams ?
+ (ActionBar.LayoutParams) lp : null;
+
+ int horizontalMargin = 0;
+ int verticalMargin = 0;
+ if (ablp != null) {
+ horizontalMargin = ablp.leftMargin + ablp.rightMargin;
+ verticalMargin = ablp.topMargin + ablp.bottomMargin;
+ }
+
+ // If the action bar is wrapping to its content height, don't allow a custom
+ // view to MATCH_PARENT.
+ int customNavHeightMode;
+ if (mContentHeight <= 0) {
+ customNavHeightMode = MeasureSpec.AT_MOST;
+ } else {
+ customNavHeightMode = lp.height != LayoutParams.WRAP_CONTENT ?
+ MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
+ }
+ final int customNavHeight = Math.max(0,
+ (lp.height >= 0 ? Math.min(lp.height, height) : height) - verticalMargin);
+
+ final int customNavWidthMode = lp.width != LayoutParams.WRAP_CONTENT ?
+ MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
+ int customNavWidth = Math.max(0,
+ (lp.width >= 0 ? Math.min(lp.width, availableWidth) : availableWidth)
+ - horizontalMargin);
+ final int hgrav = (ablp != null ? ablp.gravity : DEFAULT_CUSTOM_GRAVITY) &
+ Gravity.HORIZONTAL_GRAVITY_MASK;
+
+ // Centering a custom view is treated specially; we try to center within the whole
+ // action bar rather than in the available space.
+ if (hgrav == Gravity.CENTER_HORIZONTAL && lp.width == LayoutParams.MATCH_PARENT) {
+ customNavWidth = Math.min(leftOfCenter, rightOfCenter) * 2;
+ }
+
+ customView.measure(
+ MeasureSpec.makeMeasureSpec(customNavWidth, customNavWidthMode),
+ MeasureSpec.makeMeasureSpec(customNavHeight, customNavHeightMode));
+ availableWidth -= horizontalMargin + customView.getMeasuredWidth();
+ }
+
+ if (mExpandedActionView == null && showTitle) {
+ availableWidth = measureChildView(mTitleLayout, availableWidth,
+ MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY), 0);
+ leftOfCenter = Math.max(0, leftOfCenter - mTitleLayout.getMeasuredWidth());
+ }
+
+ if (mContentHeight <= 0) {
+ int measuredHeight = 0;
+ for (int i = 0; i < childCount; i++) {
+ View v = getChildAt(i);
+ int paddedViewHeight = v.getMeasuredHeight() + verticalPadding;
+ if (paddedViewHeight > measuredHeight) {
+ measuredHeight = paddedViewHeight;
+ }
+ }
+ setMeasuredDimension(contentWidth, measuredHeight);
+ } else {
+ setMeasuredDimension(contentWidth, maxHeight);
+ }
+
+ if (mContextView != null) {
+ mContextView.setContentHeight(getMeasuredHeight());
+ }
+
+ if (mProgressView != null && mProgressView.getVisibility() != GONE) {
+ mProgressView.measure(MeasureSpec.makeMeasureSpec(
+ contentWidth - mProgressBarPadding * 2, MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST));
+ }
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ int x = getPaddingLeft();
+ final int y = getPaddingTop();
+ final int contentHeight = b - t - getPaddingTop() - getPaddingBottom();
+
+ if (contentHeight <= 0) {
+ // Nothing to do if we can't see anything.
+ return;
+ }
+
+ HomeView homeLayout = mExpandedActionView != null ? mExpandedHomeLayout : mHomeLayout;
+ if (homeLayout.getVisibility() != GONE) {
+ final int leftOffset = homeLayout.getLeftOffset();
+ x += positionChild(homeLayout, x + leftOffset, y, contentHeight) + leftOffset;
+ }
+
+ if (mExpandedActionView == null) {
+ final boolean showTitle = mTitleLayout != null && mTitleLayout.getVisibility() != GONE &&
+ (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0;
+ if (showTitle) {
+ x += positionChild(mTitleLayout, x, y, contentHeight);
+ }
+
+ switch (mNavigationMode) {
+ case ActionBar.NAVIGATION_MODE_STANDARD:
+ break;
+ case ActionBar.NAVIGATION_MODE_LIST:
+ if (mListNavLayout != null) {
+ if (showTitle) x += mItemPadding;
+ x += positionChild(mListNavLayout, x, y, contentHeight) + mItemPadding;
+ }
+ break;
+ case ActionBar.NAVIGATION_MODE_TABS:
+ if (mTabScrollView != null) {
+ if (showTitle) x += mItemPadding;
+ x += positionChild(mTabScrollView, x, y, contentHeight) + mItemPadding;
+ }
+ break;
+ }
+ }
+
+ int menuLeft = r - l - getPaddingRight();
+ if (mMenuView != null && mMenuView.getParent() == this) {
+ positionChildInverse(mMenuView, menuLeft, y, contentHeight);
+ menuLeft -= mMenuView.getMeasuredWidth();
+ }
+
+ if (mIndeterminateProgressView != null &&
+ mIndeterminateProgressView.getVisibility() != GONE) {
+ positionChildInverse(mIndeterminateProgressView, menuLeft, y, contentHeight);
+ menuLeft -= mIndeterminateProgressView.getMeasuredWidth();
+ }
+
+ View customView = null;
+ if (mExpandedActionView != null) {
+ customView = mExpandedActionView;
+ } else if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0 &&
+ mCustomNavView != null) {
+ customView = mCustomNavView;
+ }
+ if (customView != null) {
+ ViewGroup.LayoutParams lp = customView.getLayoutParams();
+ final ActionBar.LayoutParams ablp = lp instanceof ActionBar.LayoutParams ?
+ (ActionBar.LayoutParams) lp : null;
+
+ final int gravity = ablp != null ? ablp.gravity : DEFAULT_CUSTOM_GRAVITY;
+ final int navWidth = customView.getMeasuredWidth();
+
+ int topMargin = 0;
+ int bottomMargin = 0;
+ if (ablp != null) {
+ x += ablp.leftMargin;
+ menuLeft -= ablp.rightMargin;
+ topMargin = ablp.topMargin;
+ bottomMargin = ablp.bottomMargin;
+ }
+
+ int hgravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
+ // See if we actually have room to truly center; if not push against left or right.
+ if (hgravity == Gravity.CENTER_HORIZONTAL) {
+ final int centeredLeft = ((getRight() - getLeft()) - navWidth) / 2;
+ if (centeredLeft < x) {
+ hgravity = Gravity.LEFT;
+ } else if (centeredLeft + navWidth > menuLeft) {
+ hgravity = Gravity.RIGHT;
+ }
+ } else if (gravity == -1) {
+ hgravity = Gravity.LEFT;
+ }
+
+ int xpos = 0;
+ switch (hgravity) {
+ case Gravity.CENTER_HORIZONTAL:
+ xpos = ((getRight() - getLeft()) - navWidth) / 2;
+ break;
+ case Gravity.LEFT:
+ xpos = x;
+ break;
+ case Gravity.RIGHT:
+ xpos = menuLeft - navWidth;
+ break;
+ }
+
+ int vgravity = gravity & Gravity.VERTICAL_GRAVITY_MASK;
+
+ if (gravity == -1) {
+ vgravity = Gravity.CENTER_VERTICAL;
+ }
+
+ int ypos = 0;
+ switch (vgravity) {
+ case Gravity.CENTER_VERTICAL:
+ final int paddedTop = getPaddingTop();
+ final int paddedBottom = getBottom() - getTop() - getPaddingBottom();
+ ypos = ((paddedBottom - paddedTop) - customView.getMeasuredHeight()) / 2;
+ break;
+ case Gravity.TOP:
+ ypos = getPaddingTop() + topMargin;
+ break;
+ case Gravity.BOTTOM:
+ ypos = getHeight() - getPaddingBottom() - customView.getMeasuredHeight()
+ - bottomMargin;
+ break;
+ }
+ final int customWidth = customView.getMeasuredWidth();
+ customView.layout(xpos, ypos, xpos + customWidth,
+ ypos + customView.getMeasuredHeight());
+ x += customWidth;
+ }
+
+ if (mProgressView != null) {
+ mProgressView.bringToFront();
+ final int halfProgressHeight = mProgressView.getMeasuredHeight() / 2;
+ mProgressView.layout(mProgressBarPadding, -halfProgressHeight,
+ mProgressBarPadding + mProgressView.getMeasuredWidth(), halfProgressHeight);
+ }
+ }
+
+ @Override
+ public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
+ return new ActionBar.LayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) {
+ if (lp == null) {
+ lp = generateDefaultLayoutParams();
+ }
+ return lp;
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState state = new SavedState(superState);
+
+ if (mExpandedMenuPresenter != null && mExpandedMenuPresenter.mCurrentExpandedItem != null) {
+ state.expandedMenuItemId = mExpandedMenuPresenter.mCurrentExpandedItem.getItemId();
+ }
+
+ state.isOverflowOpen = isOverflowMenuShowing();
+
+ return state;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable p) {
+ SavedState state = (SavedState) p;
+
+ super.onRestoreInstanceState(state.getSuperState());
+
+ if (state.expandedMenuItemId != 0 &&
+ mExpandedMenuPresenter != null && mOptionsMenu != null) {
+ final MenuItem item = mOptionsMenu.findItem(state.expandedMenuItemId);
+ if (item != null) {
+ item.expandActionView();
+ }
+ }
+
+ if (state.isOverflowOpen) {
+ postShowOverflowMenu();
+ }
+ }
+
+ static class SavedState extends BaseSavedState {
+ int expandedMenuItemId;
+ boolean isOverflowOpen;
+
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ private SavedState(Parcel in) {
+ super(in);
+ expandedMenuItemId = in.readInt();
+ isOverflowOpen = in.readInt() != 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeInt(expandedMenuItemId);
+ out.writeInt(isOverflowOpen ? 1 : 0);
+ }
+
+ public static final Parcelable.Creator<SavedState> CREATOR =
+ new Parcelable.Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ public static class HomeView extends FrameLayout {
+ private View mUpView;
+ private ImageView mIconView;
+ private int mUpWidth;
+
+ public HomeView(Context context) {
+ this(context, null);
+ }
+
+ public HomeView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public void setUp(boolean isUp) {
+ mUpView.setVisibility(isUp ? VISIBLE : GONE);
+ }
+
+ public void setIcon(Drawable icon) {
+ mIconView.setImageDrawable(icon);
+ }
+
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ onPopulateAccessibilityEvent(event);
+ return true;
+ }
+
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ super.onPopulateAccessibilityEvent(event);
+ }
+ final CharSequence cdesc = getContentDescription();
+ if (!TextUtils.isEmpty(cdesc)) {
+ event.getText().add(cdesc);
+ }
+ }
+
+ @Override
+ public boolean dispatchHoverEvent(MotionEvent event) {
+ // Don't allow children to hover; we want this to be treated as a single component.
+ return onHoverEvent(event);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ mUpView = findViewById(R.id.abs__up);
+ mIconView = (ImageView) findViewById(R.id.abs__home);
+ }
+
+ public int getLeftOffset() {
+ return mUpView.getVisibility() == GONE ? mUpWidth : 0;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ measureChildWithMargins(mUpView, widthMeasureSpec, 0, heightMeasureSpec, 0);
+ final LayoutParams upLp = (LayoutParams) mUpView.getLayoutParams();
+ mUpWidth = upLp.leftMargin + mUpView.getMeasuredWidth() + upLp.rightMargin;
+ int width = mUpView.getVisibility() == GONE ? 0 : mUpWidth;
+ int height = upLp.topMargin + mUpView.getMeasuredHeight() + upLp.bottomMargin;
+ measureChildWithMargins(mIconView, widthMeasureSpec, width, heightMeasureSpec, 0);
+ final LayoutParams iconLp = (LayoutParams) mIconView.getLayoutParams();
+ width += iconLp.leftMargin + mIconView.getMeasuredWidth() + iconLp.rightMargin;
+ height = Math.max(height,
+ iconLp.topMargin + mIconView.getMeasuredHeight() + iconLp.bottomMargin);
+
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
+
+ switch (widthMode) {
+ case MeasureSpec.AT_MOST:
+ width = Math.min(width, widthSize);
+ break;
+ case MeasureSpec.EXACTLY:
+ width = widthSize;
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ default:
+ break;
+ }
+ switch (heightMode) {
+ case MeasureSpec.AT_MOST:
+ height = Math.min(height, heightSize);
+ break;
+ case MeasureSpec.EXACTLY:
+ height = heightSize;
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ default:
+ break;
+ }
+ setMeasuredDimension(width, height);
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ final int vCenter = (b - t) / 2;
+ //UNUSED int width = r - l;
+ int upOffset = 0;
+ if (mUpView.getVisibility() != GONE) {
+ final LayoutParams upLp = (LayoutParams) mUpView.getLayoutParams();
+ final int upHeight = mUpView.getMeasuredHeight();
+ final int upWidth = mUpView.getMeasuredWidth();
+ final int upTop = vCenter - upHeight / 2;
+ mUpView.layout(0, upTop, upWidth, upTop + upHeight);
+ upOffset = upLp.leftMargin + upWidth + upLp.rightMargin;
+ //UNUSED width -= upOffset;
+ l += upOffset;
+ }
+ final LayoutParams iconLp = (LayoutParams) mIconView.getLayoutParams();
+ final int iconHeight = mIconView.getMeasuredHeight();
+ final int iconWidth = mIconView.getMeasuredWidth();
+ final int hCenter = (r - l) / 2;
+ final int iconLeft = upOffset + Math.max(iconLp.leftMargin, hCenter - iconWidth / 2);
+ final int iconTop = Math.max(iconLp.topMargin, vCenter - iconHeight / 2);
+ mIconView.layout(iconLeft, iconTop, iconLeft + iconWidth, iconTop + iconHeight);
+ }
+ }
+
+ private class ExpandedActionViewMenuPresenter implements MenuPresenter {
+ MenuBuilder mMenu;
+ MenuItemImpl mCurrentExpandedItem;
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ // Clear the expanded action view when menus change.
+ if (mMenu != null && mCurrentExpandedItem != null) {
+ mMenu.collapseItemActionView(mCurrentExpandedItem);
+ }
+ mMenu = menu;
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ return null;
+ }
+
+ @Override
+ public void updateMenuView(boolean cleared) {
+ // Make sure the expanded item we have is still there.
+ if (mCurrentExpandedItem != null) {
+ boolean found = false;
+
+ if (mMenu != null) {
+ final int count = mMenu.size();
+ for (int i = 0; i < count; i++) {
+ final MenuItem item = mMenu.getItem(i);
+ if (item == mCurrentExpandedItem) {
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ // The item we had expanded disappeared. Collapse.
+ collapseItemActionView(mMenu, mCurrentExpandedItem);
+ }
+ }
+ }
+
+ @Override
+ public void setCallback(Callback cb) {
+ }
+
+ @Override
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ return false;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ }
+
+ @Override
+ public boolean flagActionItems() {
+ return false;
+ }
+
+ @Override
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ mExpandedActionView = item.getActionView();
+ mExpandedHomeLayout.setIcon(mIcon.getConstantState().newDrawable(/* TODO getResources() */));
+ mCurrentExpandedItem = item;
+ if (mExpandedActionView.getParent() != ActionBarView.this) {
+ addView(mExpandedActionView);
+ }
+ if (mExpandedHomeLayout.getParent() != ActionBarView.this) {
+ addView(mExpandedHomeLayout);
+ }
+ mHomeLayout.setVisibility(GONE);
+ if (mTitleLayout != null) mTitleLayout.setVisibility(GONE);
+ if (mTabScrollView != null) mTabScrollView.setVisibility(GONE);
+ if (mSpinner != null) mSpinner.setVisibility(GONE);
+ if (mCustomNavView != null) mCustomNavView.setVisibility(GONE);
+ requestLayout();
+ item.setActionViewExpanded(true);
+
+ if (mExpandedActionView instanceof CollapsibleActionView) {
+ ((CollapsibleActionView) mExpandedActionView).onActionViewExpanded();
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ // Do this before detaching the actionview from the hierarchy, in case
+ // it needs to dismiss the soft keyboard, etc.
+ if (mExpandedActionView instanceof CollapsibleActionView) {
+ ((CollapsibleActionView) mExpandedActionView).onActionViewCollapsed();
+ }
+
+ removeView(mExpandedActionView);
+ removeView(mExpandedHomeLayout);
+ mExpandedActionView = null;
+ if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_HOME) != 0) {
+ mHomeLayout.setVisibility(VISIBLE);
+ }
+ if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0) {
+ if (mTitleLayout == null) {
+ initTitle();
+ } else {
+ mTitleLayout.setVisibility(VISIBLE);
+ }
+ }
+ if (mTabScrollView != null && mNavigationMode == ActionBar.NAVIGATION_MODE_TABS) {
+ mTabScrollView.setVisibility(VISIBLE);
+ }
+ if (mSpinner != null && mNavigationMode == ActionBar.NAVIGATION_MODE_LIST) {
+ mSpinner.setVisibility(VISIBLE);
+ }
+ if (mCustomNavView != null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) {
+ mCustomNavView.setVisibility(VISIBLE);
+ }
+ mExpandedHomeLayout.setIcon(null);
+ mCurrentExpandedItem = null;
+ requestLayout();
+ item.setActionViewExpanded(false);
+
+ return true;
+ }
+
+ @Override
+ public int getId() {
+ return 0;
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ return null;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingButton.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingButton.java
new file mode 100644
index 0000000000..6a134a1606
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingButton.java
@@ -0,0 +1,45 @@
+package com.actionbarsherlock.internal.widget;
+
+import java.util.Locale;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.widget.Button;
+
+public class CapitalizingButton extends Button {
+ private static final boolean SANS_ICE_CREAM = Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH;
+ private static final boolean IS_GINGERBREAD = Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
+
+ private static final int[] R_styleable_Button = new int[] {
+ android.R.attr.textAllCaps
+ };
+ private static final int R_styleable_Button_textAllCaps = 0;
+
+ private boolean mAllCaps;
+
+ public CapitalizingButton(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R_styleable_Button);
+ mAllCaps = a.getBoolean(R_styleable_Button_textAllCaps, true);
+ a.recycle();
+ }
+
+ public void setTextCompat(CharSequence text) {
+ if (SANS_ICE_CREAM && mAllCaps && text != null) {
+ if (IS_GINGERBREAD) {
+ try {
+ setText(text.toString().toUpperCase(Locale.ROOT));
+ } catch (NoSuchFieldError e) {
+ //Some manufacturer broke Locale.ROOT. See #572.
+ setText(text.toString().toUpperCase());
+ }
+ } else {
+ setText(text.toString().toUpperCase());
+ }
+ } else {
+ setText(text);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingTextView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingTextView.java
new file mode 100644
index 0000000000..cae8b8aed3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CapitalizingTextView.java
@@ -0,0 +1,50 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+import java.util.Locale;
+
+public class CapitalizingTextView extends TextView {
+ private static final boolean SANS_ICE_CREAM = Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH;
+ private static final boolean IS_GINGERBREAD = Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
+
+ private static final int[] R_styleable_TextView = new int[] {
+ android.R.attr.textAllCaps
+ };
+ private static final int R_styleable_TextView_textAllCaps = 0;
+
+ private boolean mAllCaps;
+
+ public CapitalizingTextView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public CapitalizingTextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R_styleable_TextView, defStyle, 0);
+ mAllCaps = a.getBoolean(R_styleable_TextView_textAllCaps, true);
+ a.recycle();
+ }
+
+ public void setTextCompat(CharSequence text) {
+ if (SANS_ICE_CREAM && mAllCaps && text != null) {
+ if (IS_GINGERBREAD) {
+ try {
+ setText(text.toString().toUpperCase(Locale.ROOT));
+ } catch (NoSuchFieldError e) {
+ //Some manufacturer broke Locale.ROOT. See #572.
+ setText(text.toString().toUpperCase());
+ }
+ } else {
+ setText(text.toString().toUpperCase());
+ }
+ } else {
+ setText(text);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java
new file mode 100644
index 0000000000..14f092c81f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java
@@ -0,0 +1,30 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.view.View;
+import android.widget.FrameLayout;
+import com.actionbarsherlock.view.CollapsibleActionView;
+
+/**
+ * Wraps an ABS collapsible action view in a native container that delegates the calls.
+ */
+public class CollapsibleActionViewWrapper extends FrameLayout implements android.view.CollapsibleActionView {
+ private final CollapsibleActionView child;
+
+ public CollapsibleActionViewWrapper(View child) {
+ super(child.getContext());
+ this.child = (CollapsibleActionView) child;
+ addView(child);
+ }
+
+ @Override public void onActionViewExpanded() {
+ child.onActionViewExpanded();
+ }
+
+ @Override public void onActionViewCollapsed() {
+ child.onActionViewCollapsed();
+ }
+
+ public View unwrap() {
+ return getChildAt(0);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAbsSpinner.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAbsSpinner.java
new file mode 100644
index 0000000000..ce0cb3bcaa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAbsSpinner.java
@@ -0,0 +1,479 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.os.Build;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.SpinnerAdapter;
+
+/**
+ * An abstract base class for spinner widgets. SDK users will probably not
+ * need to use this class.
+ *
+ * @attr ref android.R.styleable#AbsSpinner_entries
+ */
+public abstract class IcsAbsSpinner extends IcsAdapterView<SpinnerAdapter> {
+ private static final boolean IS_HONEYCOMB = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
+
+ SpinnerAdapter mAdapter;
+
+ int mHeightMeasureSpec;
+ int mWidthMeasureSpec;
+ boolean mBlockLayoutRequests;
+
+ int mSelectionLeftPadding = 0;
+ int mSelectionTopPadding = 0;
+ int mSelectionRightPadding = 0;
+ int mSelectionBottomPadding = 0;
+ final Rect mSpinnerPadding = new Rect();
+
+ final RecycleBin mRecycler = new RecycleBin();
+ private DataSetObserver mDataSetObserver;
+
+ /** Temporary frame to hold a child View's frame rectangle */
+ private Rect mTouchFrame;
+
+ public IcsAbsSpinner(Context context) {
+ super(context);
+ initAbsSpinner();
+ }
+
+ public IcsAbsSpinner(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public IcsAbsSpinner(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ initAbsSpinner();
+
+ /*
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ com.android.internal.R.styleable.AbsSpinner, defStyle, 0);
+
+ CharSequence[] entries = a.getTextArray(R.styleable.AbsSpinner_entries);
+ if (entries != null) {
+ ArrayAdapter<CharSequence> adapter =
+ new ArrayAdapter<CharSequence>(context,
+ R.layout.simple_spinner_item, entries);
+ adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item);
+ setAdapter(adapter);
+ }
+
+ a.recycle();
+ */
+ }
+
+ /**
+ * Common code for different constructor flavors
+ */
+ private void initAbsSpinner() {
+ setFocusable(true);
+ setWillNotDraw(false);
+ }
+
+ /**
+ * The Adapter is used to provide the data which backs this Spinner.
+ * It also provides methods to transform spinner items based on their position
+ * relative to the selected item.
+ * @param adapter The SpinnerAdapter to use for this Spinner
+ */
+ @Override
+ public void setAdapter(SpinnerAdapter adapter) {
+ if (null != mAdapter) {
+ mAdapter.unregisterDataSetObserver(mDataSetObserver);
+ resetList();
+ }
+
+ mAdapter = adapter;
+
+ mOldSelectedPosition = INVALID_POSITION;
+ mOldSelectedRowId = INVALID_ROW_ID;
+
+ if (mAdapter != null) {
+ mOldItemCount = mItemCount;
+ mItemCount = mAdapter.getCount();
+ checkFocus();
+
+ mDataSetObserver = new AdapterDataSetObserver();
+ mAdapter.registerDataSetObserver(mDataSetObserver);
+
+ int position = mItemCount > 0 ? 0 : INVALID_POSITION;
+
+ setSelectedPositionInt(position);
+ setNextSelectedPositionInt(position);
+
+ if (mItemCount == 0) {
+ // Nothing selected
+ checkSelectionChanged();
+ }
+
+ } else {
+ checkFocus();
+ resetList();
+ // Nothing selected
+ checkSelectionChanged();
+ }
+
+ requestLayout();
+ }
+
+ /**
+ * Clear out all children from the list
+ */
+ void resetList() {
+ mDataChanged = false;
+ mNeedSync = false;
+
+ removeAllViewsInLayout();
+ mOldSelectedPosition = INVALID_POSITION;
+ mOldSelectedRowId = INVALID_ROW_ID;
+
+ setSelectedPositionInt(INVALID_POSITION);
+ setNextSelectedPositionInt(INVALID_POSITION);
+ invalidate();
+ }
+
+ /**
+ * @see android.view.View#measure(int, int)
+ *
+ * Figure out the dimensions of this Spinner. The width comes from
+ * the widthMeasureSpec as Spinnners can't have their width set to
+ * UNSPECIFIED. The height is based on the height of the selected item
+ * plus padding.
+ */
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ int widthSize;
+ int heightSize;
+
+ final int mPaddingLeft = getPaddingLeft();
+ final int mPaddingTop = getPaddingTop();
+ final int mPaddingRight = getPaddingRight();
+ final int mPaddingBottom = getPaddingBottom();
+
+ mSpinnerPadding.left = mPaddingLeft > mSelectionLeftPadding ? mPaddingLeft
+ : mSelectionLeftPadding;
+ mSpinnerPadding.top = mPaddingTop > mSelectionTopPadding ? mPaddingTop
+ : mSelectionTopPadding;
+ mSpinnerPadding.right = mPaddingRight > mSelectionRightPadding ? mPaddingRight
+ : mSelectionRightPadding;
+ mSpinnerPadding.bottom = mPaddingBottom > mSelectionBottomPadding ? mPaddingBottom
+ : mSelectionBottomPadding;
+
+ if (mDataChanged) {
+ handleDataChanged();
+ }
+
+ int preferredHeight = 0;
+ int preferredWidth = 0;
+ boolean needsMeasuring = true;
+
+ int selectedPosition = getSelectedItemPosition();
+ if (selectedPosition >= 0 && mAdapter != null && selectedPosition < mAdapter.getCount()) {
+ // Try looking in the recycler. (Maybe we were measured once already)
+ View view = mRecycler.get(selectedPosition);
+ if (view == null) {
+ // Make a new one
+ view = mAdapter.getView(selectedPosition, null, this);
+ }
+
+ if (view != null) {
+ // Put in recycler for re-measuring and/or layout
+ mRecycler.put(selectedPosition, view);
+ }
+
+ if (view != null) {
+ if (view.getLayoutParams() == null) {
+ mBlockLayoutRequests = true;
+ view.setLayoutParams(generateDefaultLayoutParams());
+ mBlockLayoutRequests = false;
+ }
+ measureChild(view, widthMeasureSpec, heightMeasureSpec);
+
+ preferredHeight = getChildHeight(view) + mSpinnerPadding.top + mSpinnerPadding.bottom;
+ preferredWidth = getChildWidth(view) + mSpinnerPadding.left + mSpinnerPadding.right;
+
+ needsMeasuring = false;
+ }
+ }
+
+ if (needsMeasuring) {
+ // No views -- just use padding
+ preferredHeight = mSpinnerPadding.top + mSpinnerPadding.bottom;
+ if (widthMode == MeasureSpec.UNSPECIFIED) {
+ preferredWidth = mSpinnerPadding.left + mSpinnerPadding.right;
+ }
+ }
+
+ preferredHeight = Math.max(preferredHeight, getSuggestedMinimumHeight());
+ preferredWidth = Math.max(preferredWidth, getSuggestedMinimumWidth());
+
+ if (IS_HONEYCOMB) {
+ heightSize = resolveSizeAndState(preferredHeight, heightMeasureSpec, 0);
+ widthSize = resolveSizeAndState(preferredWidth, widthMeasureSpec, 0);
+ } else {
+ heightSize = resolveSize(preferredHeight, heightMeasureSpec);
+ widthSize = resolveSize(preferredWidth, widthMeasureSpec);
+ }
+
+ setMeasuredDimension(widthSize, heightSize);
+ mHeightMeasureSpec = heightMeasureSpec;
+ mWidthMeasureSpec = widthMeasureSpec;
+ }
+
+ int getChildHeight(View child) {
+ return child.getMeasuredHeight();
+ }
+
+ int getChildWidth(View child) {
+ return child.getMeasuredWidth();
+ }
+
+ @Override
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
+ return new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+
+ void recycleAllViews() {
+ final int childCount = getChildCount();
+ final IcsAbsSpinner.RecycleBin recycleBin = mRecycler;
+ final int position = mFirstPosition;
+
+ // All views go in recycler
+ for (int i = 0; i < childCount; i++) {
+ View v = getChildAt(i);
+ int index = position + i;
+ recycleBin.put(index, v);
+ }
+ }
+
+ /**
+ * Jump directly to a specific item in the adapter data.
+ */
+ public void setSelection(int position, boolean animate) {
+ // Animate only if requested position is already on screen somewhere
+ boolean shouldAnimate = animate && mFirstPosition <= position &&
+ position <= mFirstPosition + getChildCount() - 1;
+ setSelectionInt(position, shouldAnimate);
+ }
+
+ @Override
+ public void setSelection(int position) {
+ setNextSelectedPositionInt(position);
+ requestLayout();
+ invalidate();
+ }
+
+
+ /**
+ * Makes the item at the supplied position selected.
+ *
+ * @param position Position to select
+ * @param animate Should the transition be animated
+ *
+ */
+ void setSelectionInt(int position, boolean animate) {
+ if (position != mOldSelectedPosition) {
+ mBlockLayoutRequests = true;
+ int delta = position - mSelectedPosition;
+ setNextSelectedPositionInt(position);
+ layout(delta, animate);
+ mBlockLayoutRequests = false;
+ }
+ }
+
+ abstract void layout(int delta, boolean animate);
+
+ @Override
+ public View getSelectedView() {
+ if (mItemCount > 0 && mSelectedPosition >= 0) {
+ return getChildAt(mSelectedPosition - mFirstPosition);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Override to prevent spamming ourselves with layout requests
+ * as we place views
+ *
+ * @see android.view.View#requestLayout()
+ */
+ @Override
+ public void requestLayout() {
+ if (!mBlockLayoutRequests) {
+ super.requestLayout();
+ }
+ }
+
+ @Override
+ public SpinnerAdapter getAdapter() {
+ return mAdapter;
+ }
+
+ @Override
+ public int getCount() {
+ return mItemCount;
+ }
+
+ /**
+ * Maps a point to a position in the list.
+ *
+ * @param x X in local coordinate
+ * @param y Y in local coordinate
+ * @return The position of the item which contains the specified point, or
+ * {@link #INVALID_POSITION} if the point does not intersect an item.
+ */
+ public int pointToPosition(int x, int y) {
+ Rect frame = mTouchFrame;
+ if (frame == null) {
+ mTouchFrame = new Rect();
+ frame = mTouchFrame;
+ }
+
+ final int count = getChildCount();
+ for (int i = count - 1; i >= 0; i--) {
+ View child = getChildAt(i);
+ if (child.getVisibility() == View.VISIBLE) {
+ child.getHitRect(frame);
+ if (frame.contains(x, y)) {
+ return mFirstPosition + i;
+ }
+ }
+ }
+ return INVALID_POSITION;
+ }
+
+ static class SavedState extends BaseSavedState {
+ long selectedId;
+ int position;
+
+ /**
+ * Constructor called from {@link AbsSpinner#onSaveInstanceState()}
+ */
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ /**
+ * Constructor called from {@link #CREATOR}
+ */
+ private SavedState(Parcel in) {
+ super(in);
+ selectedId = in.readLong();
+ position = in.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeLong(selectedId);
+ out.writeInt(position);
+ }
+
+ @Override
+ public String toString() {
+ return "AbsSpinner.SavedState{"
+ + Integer.toHexString(System.identityHashCode(this))
+ + " selectedId=" + selectedId
+ + " position=" + position + "}";
+ }
+
+ public static final Parcelable.Creator<SavedState> CREATOR
+ = new Parcelable.Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState ss = new SavedState(superState);
+ ss.selectedId = getSelectedItemId();
+ if (ss.selectedId >= 0) {
+ ss.position = getSelectedItemPosition();
+ } else {
+ ss.position = INVALID_POSITION;
+ }
+ return ss;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+
+ super.onRestoreInstanceState(ss.getSuperState());
+
+ if (ss.selectedId >= 0) {
+ mDataChanged = true;
+ mNeedSync = true;
+ mSyncRowId = ss.selectedId;
+ mSyncPosition = ss.position;
+ mSyncMode = SYNC_SELECTED_POSITION;
+ requestLayout();
+ }
+ }
+
+ class RecycleBin {
+ private final SparseArray<View> mScrapHeap = new SparseArray<View>();
+
+ public void put(int position, View v) {
+ mScrapHeap.put(position, v);
+ }
+
+ View get(int position) {
+ // System.out.print("Looking for " + position);
+ View result = mScrapHeap.get(position);
+ if (result != null) {
+ // System.out.println(" HIT");
+ mScrapHeap.delete(position);
+ } else {
+ // System.out.println(" MISS");
+ }
+ return result;
+ }
+
+ void clear() {
+ final SparseArray<View> scrapHeap = mScrapHeap;
+ final int count = scrapHeap.size();
+ for (int i = 0; i < count; i++) {
+ final View view = scrapHeap.valueAt(i);
+ if (view != null) {
+ removeDetachedView(view, true);
+ }
+ }
+ scrapHeap.clear();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java
new file mode 100644
index 0000000000..c786dc5c19
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java
@@ -0,0 +1,1160 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.database.DataSetObserver;
+import android.os.Parcelable;
+import android.os.SystemClock;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.view.ContextMenu;
+import android.view.SoundEffectConstants;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.Adapter;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+
+
+/**
+ * An AdapterView is a view whose children are determined by an {@link Adapter}.
+ *
+ * <p>
+ * See {@link ListView}, {@link GridView}, {@link Spinner} and
+ * {@link Gallery} for commonly used subclasses of AdapterView.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about using AdapterView, read the
+ * <a href="{@docRoot}guide/topics/ui/binding.html">Binding to Data with AdapterView</a>
+ * developer guide.</p></div>
+ */
+public abstract class IcsAdapterView<T extends Adapter> extends ViewGroup {
+
+ /**
+ * The item view type returned by {@link Adapter#getItemViewType(int)} when
+ * the adapter does not want the item's view recycled.
+ */
+ public static final int ITEM_VIEW_TYPE_IGNORE = -1;
+
+ /**
+ * The item view type returned by {@link Adapter#getItemViewType(int)} when
+ * the item is a header or footer.
+ */
+ public static final int ITEM_VIEW_TYPE_HEADER_OR_FOOTER = -2;
+
+ /**
+ * The position of the first child displayed
+ */
+ @ViewDebug.ExportedProperty(category = "scrolling")
+ int mFirstPosition = 0;
+
+ /**
+ * The offset in pixels from the top of the AdapterView to the top
+ * of the view to select during the next layout.
+ */
+ int mSpecificTop;
+
+ /**
+ * Position from which to start looking for mSyncRowId
+ */
+ int mSyncPosition;
+
+ /**
+ * Row id to look for when data has changed
+ */
+ long mSyncRowId = INVALID_ROW_ID;
+
+ /**
+ * Height of the view when mSyncPosition and mSyncRowId where set
+ */
+ long mSyncHeight;
+
+ /**
+ * True if we need to sync to mSyncRowId
+ */
+ boolean mNeedSync = false;
+
+ /**
+ * Indicates whether to sync based on the selection or position. Possible
+ * values are {@link #SYNC_SELECTED_POSITION} or
+ * {@link #SYNC_FIRST_POSITION}.
+ */
+ int mSyncMode;
+
+ /**
+ * Our height after the last layout
+ */
+ private int mLayoutHeight;
+
+ /**
+ * Sync based on the selected child
+ */
+ static final int SYNC_SELECTED_POSITION = 0;
+
+ /**
+ * Sync based on the first child displayed
+ */
+ static final int SYNC_FIRST_POSITION = 1;
+
+ /**
+ * Maximum amount of time to spend in {@link #findSyncPosition()}
+ */
+ static final int SYNC_MAX_DURATION_MILLIS = 100;
+
+ /**
+ * Indicates that this view is currently being laid out.
+ */
+ boolean mInLayout = false;
+
+ /**
+ * The listener that receives notifications when an item is selected.
+ */
+ OnItemSelectedListener mOnItemSelectedListener;
+
+ /**
+ * The listener that receives notifications when an item is clicked.
+ */
+ OnItemClickListener mOnItemClickListener;
+
+ /**
+ * The listener that receives notifications when an item is long clicked.
+ */
+ OnItemLongClickListener mOnItemLongClickListener;
+
+ /**
+ * True if the data has changed since the last layout
+ */
+ boolean mDataChanged;
+
+ /**
+ * The position within the adapter's data set of the item to select
+ * during the next layout.
+ */
+ @ViewDebug.ExportedProperty(category = "list")
+ int mNextSelectedPosition = INVALID_POSITION;
+
+ /**
+ * The item id of the item to select during the next layout.
+ */
+ long mNextSelectedRowId = INVALID_ROW_ID;
+
+ /**
+ * The position within the adapter's data set of the currently selected item.
+ */
+ @ViewDebug.ExportedProperty(category = "list")
+ int mSelectedPosition = INVALID_POSITION;
+
+ /**
+ * The item id of the currently selected item.
+ */
+ long mSelectedRowId = INVALID_ROW_ID;
+
+ /**
+ * View to show if there are no items to show.
+ */
+ private View mEmptyView;
+
+ /**
+ * The number of items in the current adapter.
+ */
+ @ViewDebug.ExportedProperty(category = "list")
+ int mItemCount;
+
+ /**
+ * The number of items in the adapter before a data changed event occurred.
+ */
+ int mOldItemCount;
+
+ /**
+ * Represents an invalid position. All valid positions are in the range 0 to 1 less than the
+ * number of items in the current adapter.
+ */
+ public static final int INVALID_POSITION = -1;
+
+ /**
+ * Represents an empty or invalid row id
+ */
+ public static final long INVALID_ROW_ID = Long.MIN_VALUE;
+
+ /**
+ * The last selected position we used when notifying
+ */
+ int mOldSelectedPosition = INVALID_POSITION;
+
+ /**
+ * The id of the last selected position we used when notifying
+ */
+ long mOldSelectedRowId = INVALID_ROW_ID;
+
+ /**
+ * Indicates what focusable state is requested when calling setFocusable().
+ * In addition to this, this view has other criteria for actually
+ * determining the focusable state (such as whether its empty or the text
+ * filter is shown).
+ *
+ * @see #setFocusable(boolean)
+ * @see #checkFocus()
+ */
+ private boolean mDesiredFocusableState;
+ private boolean mDesiredFocusableInTouchModeState;
+
+ private SelectionNotifier mSelectionNotifier;
+ /**
+ * When set to true, calls to requestLayout() will not propagate up the parent hierarchy.
+ * This is used to layout the children during a layout pass.
+ */
+ boolean mBlockLayoutRequests = false;
+
+ public IcsAdapterView(Context context) {
+ super(context);
+ }
+
+ public IcsAdapterView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public IcsAdapterView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ /**
+ * Register a callback to be invoked when an item in this AdapterView has
+ * been clicked.
+ *
+ * @param listener The callback that will be invoked.
+ */
+ public void setOnItemClickListener(OnItemClickListener listener) {
+ mOnItemClickListener = listener;
+ }
+
+ /**
+ * @return The callback to be invoked with an item in this AdapterView has
+ * been clicked, or null id no callback has been set.
+ */
+ public final OnItemClickListener getOnItemClickListener() {
+ return mOnItemClickListener;
+ }
+
+ /**
+ * Call the OnItemClickListener, if it is defined.
+ *
+ * @param view The view within the AdapterView that was clicked.
+ * @param position The position of the view in the adapter.
+ * @param id The row id of the item that was clicked.
+ * @return True if there was an assigned OnItemClickListener that was
+ * called, false otherwise is returned.
+ */
+ public boolean performItemClick(View view, int position, long id) {
+ if (mOnItemClickListener != null) {
+ playSoundEffect(SoundEffectConstants.CLICK);
+ if (view != null) {
+ view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
+ }
+ mOnItemClickListener.onItemClick(/*this*/null, view, position, id);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Interface definition for a callback to be invoked when an item in this
+ * view has been clicked and held.
+ */
+ public interface OnItemLongClickListener {
+ /**
+ * Callback method to be invoked when an item in this view has been
+ * clicked and held.
+ *
+ * Implementers can call getItemAtPosition(position) if they need to access
+ * the data associated with the selected item.
+ *
+ * @param parent The AbsListView where the click happened
+ * @param view The view within the AbsListView that was clicked
+ * @param position The position of the view in the list
+ * @param id The row id of the item that was clicked
+ *
+ * @return true if the callback consumed the long click, false otherwise
+ */
+ boolean onItemLongClick(IcsAdapterView<?> parent, View view, int position, long id);
+ }
+
+
+ /**
+ * Register a callback to be invoked when an item in this AdapterView has
+ * been clicked and held
+ *
+ * @param listener The callback that will run
+ */
+ public void setOnItemLongClickListener(OnItemLongClickListener listener) {
+ if (!isLongClickable()) {
+ setLongClickable(true);
+ }
+ mOnItemLongClickListener = listener;
+ }
+
+ /**
+ * @return The callback to be invoked with an item in this AdapterView has
+ * been clicked and held, or null id no callback as been set.
+ */
+ public final OnItemLongClickListener getOnItemLongClickListener() {
+ return mOnItemLongClickListener;
+ }
+
+ /**
+ * Interface definition for a callback to be invoked when
+ * an item in this view has been selected.
+ */
+ public interface OnItemSelectedListener {
+ /**
+ * <p>Callback method to be invoked when an item in this view has been
+ * selected. This callback is invoked only when the newly selected
+ * position is different from the previously selected position or if
+ * there was no selected item.</p>
+ *
+ * Impelmenters can call getItemAtPosition(position) if they need to access the
+ * data associated with the selected item.
+ *
+ * @param parent The AdapterView where the selection happened
+ * @param view The view within the AdapterView that was clicked
+ * @param position The position of the view in the adapter
+ * @param id The row id of the item that is selected
+ */
+ void onItemSelected(IcsAdapterView<?> parent, View view, int position, long id);
+
+ /**
+ * Callback method to be invoked when the selection disappears from this
+ * view. The selection can disappear for instance when touch is activated
+ * or when the adapter becomes empty.
+ *
+ * @param parent The AdapterView that now contains no selected item.
+ */
+ void onNothingSelected(IcsAdapterView<?> parent);
+ }
+
+
+ /**
+ * Register a callback to be invoked when an item in this AdapterView has
+ * been selected.
+ *
+ * @param listener The callback that will run
+ */
+ public void setOnItemSelectedListener(OnItemSelectedListener listener) {
+ mOnItemSelectedListener = listener;
+ }
+
+ public final OnItemSelectedListener getOnItemSelectedListener() {
+ return mOnItemSelectedListener;
+ }
+
+ /**
+ * Extra menu information provided to the
+ * {@link android.view.View.OnCreateContextMenuListener#onCreateContextMenu(ContextMenu, View, ContextMenuInfo) }
+ * callback when a context menu is brought up for this AdapterView.
+ *
+ */
+ public static class AdapterContextMenuInfo implements ContextMenu.ContextMenuInfo {
+
+ public AdapterContextMenuInfo(View targetView, int position, long id) {
+ this.targetView = targetView;
+ this.position = position;
+ this.id = id;
+ }
+
+ /**
+ * The child view for which the context menu is being displayed. This
+ * will be one of the children of this AdapterView.
+ */
+ public View targetView;
+
+ /**
+ * The position in the adapter for which the context menu is being
+ * displayed.
+ */
+ public int position;
+
+ /**
+ * The row id of the item for which the context menu is being displayed.
+ */
+ public long id;
+ }
+
+ /**
+ * Returns the adapter currently associated with this widget.
+ *
+ * @return The adapter used to provide this view's content.
+ */
+ public abstract T getAdapter();
+
+ /**
+ * Sets the adapter that provides the data and the views to represent the data
+ * in this widget.
+ *
+ * @param adapter The adapter to use to create this view's content.
+ */
+ public abstract void setAdapter(T adapter);
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param child Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void addView(View child) {
+ throw new UnsupportedOperationException("addView(View) is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param child Ignored.
+ * @param index Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void addView(View child, int index) {
+ throw new UnsupportedOperationException("addView(View, int) is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param child Ignored.
+ * @param params Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void addView(View child, LayoutParams params) {
+ throw new UnsupportedOperationException("addView(View, LayoutParams) "
+ + "is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param child Ignored.
+ * @param index Ignored.
+ * @param params Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void addView(View child, int index, LayoutParams params) {
+ throw new UnsupportedOperationException("addView(View, int, LayoutParams) "
+ + "is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param child Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void removeView(View child) {
+ throw new UnsupportedOperationException("removeView(View) is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @param index Ignored.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void removeViewAt(int index) {
+ throw new UnsupportedOperationException("removeViewAt(int) is not supported in AdapterView");
+ }
+
+ /**
+ * This method is not supported and throws an UnsupportedOperationException when called.
+ *
+ * @throws UnsupportedOperationException Every time this method is invoked.
+ */
+ @Override
+ public void removeAllViews() {
+ throw new UnsupportedOperationException("removeAllViews() is not supported in AdapterView");
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ mLayoutHeight = getHeight();
+ }
+
+ /**
+ * Return the position of the currently selected item within the adapter's data set
+ *
+ * @return int Position (starting at 0), or {@link #INVALID_POSITION} if there is nothing selected.
+ */
+ @ViewDebug.CapturedViewProperty
+ public int getSelectedItemPosition() {
+ return mNextSelectedPosition;
+ }
+
+ /**
+ * @return The id corresponding to the currently selected item, or {@link #INVALID_ROW_ID}
+ * if nothing is selected.
+ */
+ @ViewDebug.CapturedViewProperty
+ public long getSelectedItemId() {
+ return mNextSelectedRowId;
+ }
+
+ /**
+ * @return The view corresponding to the currently selected item, or null
+ * if nothing is selected
+ */
+ public abstract View getSelectedView();
+
+ /**
+ * @return The data corresponding to the currently selected item, or
+ * null if there is nothing selected.
+ */
+ public Object getSelectedItem() {
+ T adapter = getAdapter();
+ int selection = getSelectedItemPosition();
+ if (adapter != null && adapter.getCount() > 0 && selection >= 0) {
+ return adapter.getItem(selection);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @return The number of items owned by the Adapter associated with this
+ * AdapterView. (This is the number of data items, which may be
+ * larger than the number of visible views.)
+ */
+ @ViewDebug.CapturedViewProperty
+ public int getCount() {
+ return mItemCount;
+ }
+
+ /**
+ * Get the position within the adapter's data set for the view, where view is a an adapter item
+ * or a descendant of an adapter item.
+ *
+ * @param view an adapter item, or a descendant of an adapter item. This must be visible in this
+ * AdapterView at the time of the call.
+ * @return the position within the adapter's data set of the view, or {@link #INVALID_POSITION}
+ * if the view does not correspond to a list item (or it is not currently visible).
+ */
+ public int getPositionForView(View view) {
+ View listItem = view;
+ try {
+ View v;
+ while (!(v = (View) listItem.getParent()).equals(this)) {
+ listItem = v;
+ }
+ } catch (ClassCastException e) {
+ // We made it up to the window without find this list view
+ return INVALID_POSITION;
+ }
+
+ // Search the children for the list item
+ final int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ if (getChildAt(i).equals(listItem)) {
+ return mFirstPosition + i;
+ }
+ }
+
+ // Child not found!
+ return INVALID_POSITION;
+ }
+
+ /**
+ * Returns the position within the adapter's data set for the first item
+ * displayed on screen.
+ *
+ * @return The position within the adapter's data set
+ */
+ public int getFirstVisiblePosition() {
+ return mFirstPosition;
+ }
+
+ /**
+ * Returns the position within the adapter's data set for the last item
+ * displayed on screen.
+ *
+ * @return The position within the adapter's data set
+ */
+ public int getLastVisiblePosition() {
+ return mFirstPosition + getChildCount() - 1;
+ }
+
+ /**
+ * Sets the currently selected item. To support accessibility subclasses that
+ * override this method must invoke the overriden super method first.
+ *
+ * @param position Index (starting at 0) of the data item to be selected.
+ */
+ public abstract void setSelection(int position);
+
+ /**
+ * Sets the view to show if the adapter is empty
+ */
+ public void setEmptyView(View emptyView) {
+ mEmptyView = emptyView;
+
+ final T adapter = getAdapter();
+ final boolean empty = ((adapter == null) || adapter.isEmpty());
+ updateEmptyStatus(empty);
+ }
+
+ /**
+ * When the current adapter is empty, the AdapterView can display a special view
+ * call the empty view. The empty view is used to provide feedback to the user
+ * that no data is available in this AdapterView.
+ *
+ * @return The view to show if the adapter is empty.
+ */
+ public View getEmptyView() {
+ return mEmptyView;
+ }
+
+ /**
+ * Indicates whether this view is in filter mode. Filter mode can for instance
+ * be enabled by a user when typing on the keyboard.
+ *
+ * @return True if the view is in filter mode, false otherwise.
+ */
+ boolean isInFilterMode() {
+ return false;
+ }
+
+ @Override
+ public void setFocusable(boolean focusable) {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+
+ mDesiredFocusableState = focusable;
+ if (!focusable) {
+ mDesiredFocusableInTouchModeState = false;
+ }
+
+ super.setFocusable(focusable && (!empty || isInFilterMode()));
+ }
+
+ @Override
+ public void setFocusableInTouchMode(boolean focusable) {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+
+ mDesiredFocusableInTouchModeState = focusable;
+ if (focusable) {
+ mDesiredFocusableState = true;
+ }
+
+ super.setFocusableInTouchMode(focusable && (!empty || isInFilterMode()));
+ }
+
+ void checkFocus() {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+ final boolean focusable = !empty || isInFilterMode();
+ // The order in which we set focusable in touch mode/focusable may matter
+ // for the client, see View.setFocusableInTouchMode() comments for more
+ // details
+ super.setFocusableInTouchMode(focusable && mDesiredFocusableInTouchModeState);
+ super.setFocusable(focusable && mDesiredFocusableState);
+ if (mEmptyView != null) {
+ updateEmptyStatus((adapter == null) || adapter.isEmpty());
+ }
+ }
+
+ /**
+ * Update the status of the list based on the empty parameter. If empty is true and
+ * we have an empty view, display it. In all the other cases, make sure that the listview
+ * is VISIBLE and that the empty view is GONE (if it's not null).
+ */
+ private void updateEmptyStatus(boolean empty) {
+ if (isInFilterMode()) {
+ empty = false;
+ }
+
+ if (empty) {
+ if (mEmptyView != null) {
+ mEmptyView.setVisibility(View.VISIBLE);
+ setVisibility(View.GONE);
+ } else {
+ // If the caller just removed our empty view, make sure the list view is visible
+ setVisibility(View.VISIBLE);
+ }
+
+ // We are now GONE, so pending layouts will not be dispatched.
+ // Force one here to make sure that the state of the list matches
+ // the state of the adapter.
+ if (mDataChanged) {
+ this.onLayout(false, getLeft(), getTop(), getRight(), getBottom());
+ }
+ } else {
+ if (mEmptyView != null) mEmptyView.setVisibility(View.GONE);
+ setVisibility(View.VISIBLE);
+ }
+ }
+
+ /**
+ * Gets the data associated with the specified position in the list.
+ *
+ * @param position Which data to get
+ * @return The data associated with the specified position in the list
+ */
+ public Object getItemAtPosition(int position) {
+ T adapter = getAdapter();
+ return (adapter == null || position < 0) ? null : adapter.getItem(position);
+ }
+
+ public long getItemIdAtPosition(int position) {
+ T adapter = getAdapter();
+ return (adapter == null || position < 0) ? INVALID_ROW_ID : adapter.getItemId(position);
+ }
+
+ @Override
+ public void setOnClickListener(OnClickListener l) {
+ throw new RuntimeException("Don't call setOnClickListener for an AdapterView. "
+ + "You probably want setOnItemClickListener instead");
+ }
+
+ /**
+ * Override to prevent freezing of any views created by the adapter.
+ */
+ @Override
+ protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {
+ dispatchFreezeSelfOnly(container);
+ }
+
+ /**
+ * Override to prevent thawing of any views created by the adapter.
+ */
+ @Override
+ protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
+ dispatchThawSelfOnly(container);
+ }
+
+ class AdapterDataSetObserver extends DataSetObserver {
+
+ private Parcelable mInstanceState = null;
+
+ @Override
+ public void onChanged() {
+ mDataChanged = true;
+ mOldItemCount = mItemCount;
+ mItemCount = getAdapter().getCount();
+
+ // Detect the case where a cursor that was previously invalidated has
+ // been repopulated with new data.
+ if (IcsAdapterView.this.getAdapter().hasStableIds() && mInstanceState != null
+ && mOldItemCount == 0 && mItemCount > 0) {
+ IcsAdapterView.this.onRestoreInstanceState(mInstanceState);
+ mInstanceState = null;
+ } else {
+ rememberSyncState();
+ }
+ checkFocus();
+ requestLayout();
+ }
+
+ @Override
+ public void onInvalidated() {
+ mDataChanged = true;
+
+ if (IcsAdapterView.this.getAdapter().hasStableIds()) {
+ // Remember the current state for the case where our hosting activity is being
+ // stopped and later restarted
+ mInstanceState = IcsAdapterView.this.onSaveInstanceState();
+ }
+
+ // Data is invalid so we should reset our state
+ mOldItemCount = mItemCount;
+ mItemCount = 0;
+ mSelectedPosition = INVALID_POSITION;
+ mSelectedRowId = INVALID_ROW_ID;
+ mNextSelectedPosition = INVALID_POSITION;
+ mNextSelectedRowId = INVALID_ROW_ID;
+ mNeedSync = false;
+
+ checkFocus();
+ requestLayout();
+ }
+
+ public void clearSavedState() {
+ mInstanceState = null;
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ removeCallbacks(mSelectionNotifier);
+ }
+
+ private class SelectionNotifier implements Runnable {
+ public void run() {
+ if (mDataChanged) {
+ // Data has changed between when this SelectionNotifier
+ // was posted and now. We need to wait until the AdapterView
+ // has been synched to the new data.
+ if (getAdapter() != null) {
+ post(this);
+ }
+ } else {
+ fireOnSelected();
+ }
+ }
+ }
+
+ void selectionChanged() {
+ if (mOnItemSelectedListener != null) {
+ if (mInLayout || mBlockLayoutRequests) {
+ // If we are in a layout traversal, defer notification
+ // by posting. This ensures that the view tree is
+ // in a consistent state and is able to accomodate
+ // new layout or invalidate requests.
+ if (mSelectionNotifier == null) {
+ mSelectionNotifier = new SelectionNotifier();
+ }
+ post(mSelectionNotifier);
+ } else {
+ fireOnSelected();
+ }
+ }
+
+ // we fire selection events here not in View
+ if (mSelectedPosition != ListView.INVALID_POSITION && isShown() && !isInTouchMode()) {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ }
+ }
+
+ private void fireOnSelected() {
+ if (mOnItemSelectedListener == null)
+ return;
+
+ int selection = this.getSelectedItemPosition();
+ if (selection >= 0) {
+ View v = getSelectedView();
+ mOnItemSelectedListener.onItemSelected(this, v, selection,
+ getAdapter().getItemId(selection));
+ } else {
+ mOnItemSelectedListener.onNothingSelected(this);
+ }
+ }
+
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ View selectedView = getSelectedView();
+ if (selectedView != null && selectedView.getVisibility() == VISIBLE
+ && selectedView.dispatchPopulateAccessibilityEvent(event)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
+ if (super.onRequestSendAccessibilityEvent(child, event)) {
+ // Add a record for ourselves as well.
+ AccessibilityEvent record = AccessibilityEvent.obtain();
+ onInitializeAccessibilityEvent(record);
+ // Populate with the text of the requesting child.
+ child.dispatchPopulateAccessibilityEvent(record);
+ event.appendRecord(record);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setScrollable(isScrollableForAccessibility());
+ View selectedView = getSelectedView();
+ if (selectedView != null) {
+ info.setEnabled(selectedView.isEnabled());
+ }
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setScrollable(isScrollableForAccessibility());
+ View selectedView = getSelectedView();
+ if (selectedView != null) {
+ event.setEnabled(selectedView.isEnabled());
+ }
+ event.setCurrentItemIndex(getSelectedItemPosition());
+ event.setFromIndex(getFirstVisiblePosition());
+ event.setToIndex(getLastVisiblePosition());
+ event.setItemCount(getCount());
+ }
+
+ private boolean isScrollableForAccessibility() {
+ T adapter = getAdapter();
+ if (adapter != null) {
+ final int itemCount = adapter.getCount();
+ return itemCount > 0
+ && (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean canAnimate() {
+ return super.canAnimate() && mItemCount > 0;
+ }
+
+ void handleDataChanged() {
+ final int count = mItemCount;
+ boolean found = false;
+
+ if (count > 0) {
+
+ int newPos;
+
+ // Find the row we are supposed to sync to
+ if (mNeedSync) {
+ // Update this first, since setNextSelectedPositionInt inspects
+ // it
+ mNeedSync = false;
+
+ // See if we can find a position in the new data with the same
+ // id as the old selection
+ newPos = findSyncPosition();
+ if (newPos >= 0) {
+ // Verify that new selection is selectable
+ int selectablePos = lookForSelectablePosition(newPos, true);
+ if (selectablePos == newPos) {
+ // Same row id is selected
+ setNextSelectedPositionInt(newPos);
+ found = true;
+ }
+ }
+ }
+ if (!found) {
+ // Try to use the same position if we can't find matching data
+ newPos = getSelectedItemPosition();
+
+ // Pin position to the available range
+ if (newPos >= count) {
+ newPos = count - 1;
+ }
+ if (newPos < 0) {
+ newPos = 0;
+ }
+
+ // Make sure we select something selectable -- first look down
+ int selectablePos = lookForSelectablePosition(newPos, true);
+ if (selectablePos < 0) {
+ // Looking down didn't work -- try looking up
+ selectablePos = lookForSelectablePosition(newPos, false);
+ }
+ if (selectablePos >= 0) {
+ setNextSelectedPositionInt(selectablePos);
+ checkSelectionChanged();
+ found = true;
+ }
+ }
+ }
+ if (!found) {
+ // Nothing is selected
+ mSelectedPosition = INVALID_POSITION;
+ mSelectedRowId = INVALID_ROW_ID;
+ mNextSelectedPosition = INVALID_POSITION;
+ mNextSelectedRowId = INVALID_ROW_ID;
+ mNeedSync = false;
+ checkSelectionChanged();
+ }
+ }
+
+ void checkSelectionChanged() {
+ if ((mSelectedPosition != mOldSelectedPosition) || (mSelectedRowId != mOldSelectedRowId)) {
+ selectionChanged();
+ mOldSelectedPosition = mSelectedPosition;
+ mOldSelectedRowId = mSelectedRowId;
+ }
+ }
+
+ /**
+ * Searches the adapter for a position matching mSyncRowId. The search starts at mSyncPosition
+ * and then alternates between moving up and moving down until 1) we find the right position, or
+ * 2) we run out of time, or 3) we have looked at every position
+ *
+ * @return Position of the row that matches mSyncRowId, or {@link #INVALID_POSITION} if it can't
+ * be found
+ */
+ int findSyncPosition() {
+ int count = mItemCount;
+
+ if (count == 0) {
+ return INVALID_POSITION;
+ }
+
+ long idToMatch = mSyncRowId;
+ int seed = mSyncPosition;
+
+ // If there isn't a selection don't hunt for it
+ if (idToMatch == INVALID_ROW_ID) {
+ return INVALID_POSITION;
+ }
+
+ // Pin seed to reasonable values
+ seed = Math.max(0, seed);
+ seed = Math.min(count - 1, seed);
+
+ long endTime = SystemClock.uptimeMillis() + SYNC_MAX_DURATION_MILLIS;
+
+ long rowId;
+
+ // first position scanned so far
+ int first = seed;
+
+ // last position scanned so far
+ int last = seed;
+
+ // True if we should move down on the next iteration
+ boolean next = false;
+
+ // True when we have looked at the first item in the data
+ boolean hitFirst;
+
+ // True when we have looked at the last item in the data
+ boolean hitLast;
+
+ // Get the item ID locally (instead of getItemIdAtPosition), so
+ // we need the adapter
+ T adapter = getAdapter();
+ if (adapter == null) {
+ return INVALID_POSITION;
+ }
+
+ while (SystemClock.uptimeMillis() <= endTime) {
+ rowId = adapter.getItemId(seed);
+ if (rowId == idToMatch) {
+ // Found it!
+ return seed;
+ }
+
+ hitLast = last == count - 1;
+ hitFirst = first == 0;
+
+ if (hitLast && hitFirst) {
+ // Looked at everything
+ break;
+ }
+
+ if (hitFirst || (next && !hitLast)) {
+ // Either we hit the top, or we are trying to move down
+ last++;
+ seed = last;
+ // Try going up next time
+ next = false;
+ } else if (hitLast || (!next && !hitFirst)) {
+ // Either we hit the bottom, or we are trying to move up
+ first--;
+ seed = first;
+ // Try going down next time
+ next = true;
+ }
+
+ }
+
+ return INVALID_POSITION;
+ }
+
+ /**
+ * Find a position that can be selected (i.e., is not a separator).
+ *
+ * @param position The starting position to look at.
+ * @param lookDown Whether to look down for other positions.
+ * @return The next selectable position starting at position and then searching either up or
+ * down. Returns {@link #INVALID_POSITION} if nothing can be found.
+ */
+ int lookForSelectablePosition(int position, boolean lookDown) {
+ return position;
+ }
+
+ /**
+ * Utility to keep mSelectedPosition and mSelectedRowId in sync
+ * @param position Our current position
+ */
+ void setSelectedPositionInt(int position) {
+ mSelectedPosition = position;
+ mSelectedRowId = getItemIdAtPosition(position);
+ }
+
+ /**
+ * Utility to keep mNextSelectedPosition and mNextSelectedRowId in sync
+ * @param position Intended value for mSelectedPosition the next time we go
+ * through layout
+ */
+ void setNextSelectedPositionInt(int position) {
+ mNextSelectedPosition = position;
+ mNextSelectedRowId = getItemIdAtPosition(position);
+ // If we are trying to sync to the selection, update that too
+ if (mNeedSync && mSyncMode == SYNC_SELECTED_POSITION && position >= 0) {
+ mSyncPosition = position;
+ mSyncRowId = mNextSelectedRowId;
+ }
+ }
+
+ /**
+ * Remember enough information to restore the screen state when the data has
+ * changed.
+ *
+ */
+ void rememberSyncState() {
+ if (getChildCount() > 0) {
+ mNeedSync = true;
+ mSyncHeight = mLayoutHeight;
+ if (mSelectedPosition >= 0) {
+ // Sync the selection state
+ View v = getChildAt(mSelectedPosition - mFirstPosition);
+ mSyncRowId = mNextSelectedRowId;
+ mSyncPosition = mNextSelectedPosition;
+ if (v != null) {
+ mSpecificTop = v.getTop();
+ }
+ mSyncMode = SYNC_SELECTED_POSITION;
+ } else {
+ // Sync the based on the offset of the first view
+ View v = getChildAt(0);
+ T adapter = getAdapter();
+ if (mFirstPosition >= 0 && mFirstPosition < adapter.getCount()) {
+ mSyncRowId = adapter.getItemId(mFirstPosition);
+ } else {
+ mSyncRowId = NO_ID;
+ }
+ mSyncPosition = mFirstPosition;
+ if (v != null) {
+ mSpecificTop = v.getTop();
+ }
+ mSyncMode = SYNC_FIRST_POSITION;
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsColorDrawable.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsColorDrawable.java
new file mode 100644
index 0000000000..3e022e63a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsColorDrawable.java
@@ -0,0 +1,51 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+
+/**
+ * A version of {@link android.graphics.drawable.ColorDrawable} that respects bounds.
+ */
+public class IcsColorDrawable extends Drawable {
+ private int color;
+ private final Paint paint = new Paint();
+
+ public IcsColorDrawable(ColorDrawable drawable) {
+ Bitmap bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
+ Canvas c = new Canvas(bitmap);
+ drawable.draw(c);
+ this.color = bitmap.getPixel(0, 0);
+ bitmap.recycle();
+ }
+
+ public IcsColorDrawable(int color) {
+ this.color = color;
+ }
+
+ @Override public void draw(Canvas canvas) {
+ if ((color >>> 24) != 0) {
+ paint.setColor(color);
+ canvas.drawRect(getBounds(), paint);
+ }
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ if (alpha != (color >>> 24)) {
+ color = (color & 0x00FFFFFF) | (alpha << 24);
+ invalidateSelf();
+ }
+ }
+
+ @Override public void setColorFilter(ColorFilter colorFilter) {
+ //Ignored
+ }
+
+ @Override public int getOpacity() {
+ return color >>> 24;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java
new file mode 100644
index 0000000000..b7c6ff3183
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java
@@ -0,0 +1,280 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.View;
+
+import com.actionbarsherlock.internal.nineoldandroids.widget.NineLinearLayout;
+
+/**
+ * A simple extension of a regular linear layout that supports the divider API
+ * of Android 4.0+. The dividers are added adjacent to the children by changing
+ * their layout params. If you need to rely on the margins which fall in the
+ * same orientation as the layout you should wrap the child in a simple
+ * {@link android.widget.FrameLayout} so it can receive the margin.
+ */
+public class IcsLinearLayout extends NineLinearLayout {
+ private static final int[] R_styleable_LinearLayout = new int[] {
+ /* 0 */ android.R.attr.divider,
+ /* 2 */ android.R.attr.showDividers,
+ /* 3 */ android.R.attr.dividerPadding,
+ };
+ private static final int LinearLayout_divider = 0;
+ private static final int LinearLayout_showDividers = 1;
+ private static final int LinearLayout_dividerPadding = 2;
+
+ /**
+ * Don't show any dividers.
+ */
+ public static final int SHOW_DIVIDER_NONE = 0;
+ /**
+ * Show a divider at the beginning of the group.
+ */
+ public static final int SHOW_DIVIDER_BEGINNING = 1;
+ /**
+ * Show dividers between each item in the group.
+ */
+ public static final int SHOW_DIVIDER_MIDDLE = 2;
+ /**
+ * Show a divider at the end of the group.
+ */
+ public static final int SHOW_DIVIDER_END = 4;
+
+
+ private Drawable mDivider;
+ private int mDividerWidth;
+ private int mDividerHeight;
+ private int mShowDividers;
+ private int mDividerPadding;
+
+ public IcsLinearLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, /*com.android.internal.R.styleable.*/R_styleable_LinearLayout);
+
+ setDividerDrawable(a.getDrawable(/*com.android.internal.R.styleable.*/LinearLayout_divider));
+ mShowDividers = a.getInt(/*com.android.internal.R.styleable.*/LinearLayout_showDividers, SHOW_DIVIDER_NONE);
+ mDividerPadding = a.getDimensionPixelSize(/*com.android.internal.R.styleable.*/LinearLayout_dividerPadding, 0);
+
+ a.recycle();
+ }
+
+ /**
+ * Set how dividers should be shown between items in this layout
+ *
+ * @param showDividers One or more of {@link #SHOW_DIVIDER_BEGINNING},
+ * {@link #SHOW_DIVIDER_MIDDLE}, or {@link #SHOW_DIVIDER_END},
+ * or {@link #SHOW_DIVIDER_NONE} to show no dividers.
+ */
+ public void setShowDividers(int showDividers) {
+ if (showDividers != mShowDividers) {
+ requestLayout();
+ invalidate(); //XXX This is required if you are toggling a divider off
+ }
+ mShowDividers = showDividers;
+ }
+
+ /**
+ * @return A flag set indicating how dividers should be shown around items.
+ * @see #setShowDividers(int)
+ */
+ public int getShowDividers() {
+ return mShowDividers;
+ }
+
+ /**
+ * Set a drawable to be used as a divider between items.
+ * @param divider Drawable that will divide each item.
+ * @see #setShowDividers(int)
+ */
+ public void setDividerDrawable(Drawable divider) {
+ if (divider == mDivider) {
+ return;
+ }
+
+ //Fix for issue #379
+ if (divider instanceof ColorDrawable && Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ divider = new IcsColorDrawable((ColorDrawable) divider);
+ }
+
+ mDivider = divider;
+ if (divider != null) {
+ mDividerWidth = divider.getIntrinsicWidth();
+ mDividerHeight = divider.getIntrinsicHeight();
+ } else {
+ mDividerWidth = 0;
+ mDividerHeight = 0;
+ }
+ setWillNotDraw(divider == null);
+ requestLayout();
+ }
+
+ /**
+ * Set padding displayed on both ends of dividers.
+ *
+ * @param padding Padding value in pixels that will be applied to each end
+ *
+ * @see #setShowDividers(int)
+ * @see #setDividerDrawable(Drawable)
+ * @see #getDividerPadding()
+ */
+ public void setDividerPadding(int padding) {
+ mDividerPadding = padding;
+ }
+
+ /**
+ * Get the padding size used to inset dividers in pixels
+ *
+ * @see #setShowDividers(int)
+ * @see #setDividerDrawable(Drawable)
+ * @see #setDividerPadding(int)
+ */
+ public int getDividerPadding() {
+ return mDividerPadding;
+ }
+
+ /**
+ * Get the width of the current divider drawable.
+ *
+ * @hide Used internally by framework.
+ */
+ public int getDividerWidth() {
+ return mDividerWidth;
+ }
+
+ @Override
+ protected void measureChildWithMargins(View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed) {
+ final int index = indexOfChild(child);
+ final int orientation = getOrientation();
+ final LayoutParams params = (LayoutParams) child.getLayoutParams();
+ if (hasDividerBeforeChildAt(index)) {
+ if (orientation == VERTICAL) {
+ //Account for the divider by pushing everything up
+ params.topMargin = mDividerHeight;
+ } else {
+ //Account for the divider by pushing everything left
+ params.leftMargin = mDividerWidth;
+ }
+ }
+
+ final int count = getChildCount();
+ if (index == count - 1) {
+ if (hasDividerBeforeChildAt(count)) {
+ if (orientation == VERTICAL) {
+ params.bottomMargin = mDividerHeight;
+ } else {
+ params.rightMargin = mDividerWidth;
+ }
+ }
+ }
+ super.measureChildWithMargins(child, parentWidthMeasureSpec, widthUsed, parentHeightMeasureSpec, heightUsed);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ if (mDivider != null) {
+ if (getOrientation() == VERTICAL) {
+ drawDividersVertical(canvas);
+ } else {
+ drawDividersHorizontal(canvas);
+ }
+ }
+ super.onDraw(canvas);
+ }
+
+ void drawDividersVertical(Canvas canvas) {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getChildAt(i);
+
+ if (child != null && child.getVisibility() != GONE) {
+ if (hasDividerBeforeChildAt(i)) {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final int top = child.getTop() - lp.topMargin/* - mDividerHeight*/;
+ drawHorizontalDivider(canvas, top);
+ }
+ }
+ }
+
+ if (hasDividerBeforeChildAt(count)) {
+ final View child = getChildAt(count - 1);
+ int bottom = 0;
+ if (child == null) {
+ bottom = getHeight() - getPaddingBottom() - mDividerHeight;
+ } else {
+ //final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ bottom = child.getBottom()/* + lp.bottomMargin*/;
+ }
+ drawHorizontalDivider(canvas, bottom);
+ }
+ }
+
+ void drawDividersHorizontal(Canvas canvas) {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getChildAt(i);
+
+ if (child != null && child.getVisibility() != GONE) {
+ if (hasDividerBeforeChildAt(i)) {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final int left = child.getLeft() - lp.leftMargin/* - mDividerWidth*/;
+ drawVerticalDivider(canvas, left);
+ }
+ }
+ }
+
+ if (hasDividerBeforeChildAt(count)) {
+ final View child = getChildAt(count - 1);
+ int right = 0;
+ if (child == null) {
+ right = getWidth() - getPaddingRight() - mDividerWidth;
+ } else {
+ //final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ right = child.getRight()/* + lp.rightMargin*/;
+ }
+ drawVerticalDivider(canvas, right);
+ }
+ }
+
+ void drawHorizontalDivider(Canvas canvas, int top) {
+ mDivider.setBounds(getPaddingLeft() + mDividerPadding, top,
+ getWidth() - getPaddingRight() - mDividerPadding, top + mDividerHeight);
+ mDivider.draw(canvas);
+ }
+
+ void drawVerticalDivider(Canvas canvas, int left) {
+ mDivider.setBounds(left, getPaddingTop() + mDividerPadding,
+ left + mDividerWidth, getHeight() - getPaddingBottom() - mDividerPadding);
+ mDivider.draw(canvas);
+ }
+
+ /**
+ * Determines where to position dividers between children.
+ *
+ * @param childIndex Index of child to check for preceding divider
+ * @return true if there should be a divider before the child at childIndex
+ * @hide Pending API consideration. Currently only used internally by the system.
+ */
+ protected boolean hasDividerBeforeChildAt(int childIndex) {
+ if (childIndex == 0) {
+ return (mShowDividers & SHOW_DIVIDER_BEGINNING) != 0;
+ } else if (childIndex == getChildCount()) {
+ return (mShowDividers & SHOW_DIVIDER_END) != 0;
+ } else if ((mShowDividers & SHOW_DIVIDER_MIDDLE) != 0) {
+ boolean hasVisibleViewBefore = false;
+ for (int i = childIndex - 1; i >= 0; i--) {
+ if (getChildAt(i).getVisibility() != GONE) {
+ hasVisibleViewBefore = true;
+ break;
+ }
+ }
+ return hasVisibleViewBefore;
+ }
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsListPopupWindow.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsListPopupWindow.java
new file mode 100644
index 0000000000..5da831898a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsListPopupWindow.java
@@ -0,0 +1,661 @@
+package com.actionbarsherlock.internal.widget;
+
+import com.actionbarsherlock.R;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.os.Handler;
+import android.util.AttributeSet;
+import android.view.ContextThemeWrapper;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.MeasureSpec;
+import android.view.View.OnTouchListener;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.LinearLayout;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+
+/**
+ * A proxy between pre- and post-Honeycomb implementations of this class.
+ */
+public class IcsListPopupWindow {
+ /**
+ * This value controls the length of time that the user
+ * must leave a pointer down without scrolling to expand
+ * the autocomplete dropdown list to cover the IME.
+ */
+ private static final int EXPAND_LIST_TIMEOUT = 250;
+
+ private Context mContext;
+ private PopupWindow mPopup;
+ private ListAdapter mAdapter;
+ private DropDownListView mDropDownList;
+
+ private int mDropDownHeight = ViewGroup.LayoutParams.WRAP_CONTENT;
+ private int mDropDownWidth = ViewGroup.LayoutParams.WRAP_CONTENT;
+ private int mDropDownHorizontalOffset;
+ private int mDropDownVerticalOffset;
+ private boolean mDropDownVerticalOffsetSet;
+
+ private int mListItemExpandMaximum = Integer.MAX_VALUE;
+
+ private View mPromptView;
+ private int mPromptPosition = POSITION_PROMPT_ABOVE;
+
+ private DataSetObserver mObserver;
+
+ private View mDropDownAnchorView;
+
+ private Drawable mDropDownListHighlight;
+
+ private AdapterView.OnItemClickListener mItemClickListener;
+ private AdapterView.OnItemSelectedListener mItemSelectedListener;
+
+ private final ResizePopupRunnable mResizePopupRunnable = new ResizePopupRunnable();
+ private final PopupTouchInterceptor mTouchInterceptor = new PopupTouchInterceptor();
+ private final PopupScrollListener mScrollListener = new PopupScrollListener();
+ private final ListSelectorHider mHideSelector = new ListSelectorHider();
+
+ private Handler mHandler = new Handler();
+
+ private Rect mTempRect = new Rect();
+
+ private boolean mModal;
+
+ public static final int POSITION_PROMPT_ABOVE = 0;
+ public static final int POSITION_PROMPT_BELOW = 1;
+
+ public IcsListPopupWindow(Context context) {
+ this(context, null, R.attr.listPopupWindowStyle);
+ }
+
+ public IcsListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr) {
+ mContext = context;
+ mPopup = new PopupWindow(context, attrs, defStyleAttr);
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+ }
+
+ public IcsListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ mContext = context;
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ Context wrapped = new ContextThemeWrapper(context, defStyleRes);
+ mPopup = new PopupWindow(wrapped, attrs, defStyleAttr);
+ } else {
+ mPopup = new PopupWindow(context, attrs, defStyleAttr, defStyleRes);
+ }
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+ }
+
+ public void setAdapter(ListAdapter adapter) {
+ if (mObserver == null) {
+ mObserver = new PopupDataSetObserver();
+ } else if (mAdapter != null) {
+ mAdapter.unregisterDataSetObserver(mObserver);
+ }
+ mAdapter = adapter;
+ if (mAdapter != null) {
+ adapter.registerDataSetObserver(mObserver);
+ }
+
+ if (mDropDownList != null) {
+ mDropDownList.setAdapter(mAdapter);
+ }
+ }
+
+ public void setPromptPosition(int position) {
+ mPromptPosition = position;
+ }
+
+ public void setModal(boolean modal) {
+ mModal = true;
+ mPopup.setFocusable(modal);
+ }
+
+ public void setBackgroundDrawable(Drawable d) {
+ mPopup.setBackgroundDrawable(d);
+ }
+
+ public void setAnchorView(View anchor) {
+ mDropDownAnchorView = anchor;
+ }
+
+ public void setHorizontalOffset(int offset) {
+ mDropDownHorizontalOffset = offset;
+ }
+
+ public void setVerticalOffset(int offset) {
+ mDropDownVerticalOffset = offset;
+ mDropDownVerticalOffsetSet = true;
+ }
+
+ public void setContentWidth(int width) {
+ Drawable popupBackground = mPopup.getBackground();
+ if (popupBackground != null) {
+ popupBackground.getPadding(mTempRect);
+ mDropDownWidth = mTempRect.left + mTempRect.right + width;
+ } else {
+ mDropDownWidth = width;
+ }
+ }
+
+ public void setOnItemClickListener(AdapterView.OnItemClickListener clickListener) {
+ mItemClickListener = clickListener;
+ }
+
+ public void show() {
+ int height = buildDropDown();
+
+ int widthSpec = 0;
+ int heightSpec = 0;
+
+ boolean noInputMethod = isInputMethodNotNeeded();
+ //XXX mPopup.setAllowScrollingAnchorParent(!noInputMethod);
+
+ if (mPopup.isShowing()) {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ // The call to PopupWindow's update method below can accept -1 for any
+ // value you do not want to update.
+ widthSpec = -1;
+ } else if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ widthSpec = mDropDownAnchorView.getWidth();
+ } else {
+ widthSpec = mDropDownWidth;
+ }
+
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ // The call to PopupWindow's update method below can accept -1 for any
+ // value you do not want to update.
+ heightSpec = noInputMethod ? height : ViewGroup.LayoutParams.MATCH_PARENT;
+ if (noInputMethod) {
+ mPopup.setWindowLayoutMode(
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0, 0);
+ } else {
+ mPopup.setWindowLayoutMode(
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0,
+ ViewGroup.LayoutParams.MATCH_PARENT);
+ }
+ } else if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ heightSpec = height;
+ } else {
+ heightSpec = mDropDownHeight;
+ }
+
+ mPopup.setOutsideTouchable(true);
+
+ mPopup.update(mDropDownAnchorView, mDropDownHorizontalOffset,
+ mDropDownVerticalOffset, widthSpec, heightSpec);
+ } else {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ widthSpec = ViewGroup.LayoutParams.MATCH_PARENT;
+ } else {
+ if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ mPopup.setWidth(mDropDownAnchorView.getWidth());
+ } else {
+ mPopup.setWidth(mDropDownWidth);
+ }
+ }
+
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ heightSpec = ViewGroup.LayoutParams.MATCH_PARENT;
+ } else {
+ if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ mPopup.setHeight(height);
+ } else {
+ mPopup.setHeight(mDropDownHeight);
+ }
+ }
+
+ mPopup.setWindowLayoutMode(widthSpec, heightSpec);
+ //XXX mPopup.setClipToScreenEnabled(true);
+
+ // use outside touchable to dismiss drop down when touching outside of it, so
+ // only set this if the dropdown is not always visible
+ mPopup.setOutsideTouchable(true);
+ mPopup.setTouchInterceptor(mTouchInterceptor);
+ mPopup.showAsDropDown(mDropDownAnchorView,
+ mDropDownHorizontalOffset, mDropDownVerticalOffset);
+ mDropDownList.setSelection(ListView.INVALID_POSITION);
+
+ if (!mModal || mDropDownList.isInTouchMode()) {
+ clearListSelection();
+ }
+ if (!mModal) {
+ mHandler.post(mHideSelector);
+ }
+ }
+ }
+
+ public void dismiss() {
+ mPopup.dismiss();
+ if (mPromptView != null) {
+ final ViewParent parent = mPromptView.getParent();
+ if (parent instanceof ViewGroup) {
+ final ViewGroup group = (ViewGroup) parent;
+ group.removeView(mPromptView);
+ }
+ }
+ mPopup.setContentView(null);
+ mDropDownList = null;
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ }
+
+ public void setOnDismissListener(PopupWindow.OnDismissListener listener) {
+ mPopup.setOnDismissListener(listener);
+ }
+
+ public void setInputMethodMode(int mode) {
+ mPopup.setInputMethodMode(mode);
+ }
+
+ /**
+ * Set the selected position of the list.
+ * Only valid when {@link #isShowing()} == {@code true}.
+ *
+ * @param position List position to set as selected.
+ */
+ public void setSelection(int position) {
+ DropDownListView list = mDropDownList;
+ if (isShowing() && list != null) {
+ list.mListSelectionHidden = false;
+ list.setSelection(position);
+ if (list.getChoiceMode() != ListView.CHOICE_MODE_NONE) {
+ list.setItemChecked(position, true);
+ }
+ }
+ }
+
+ public void clearListSelection() {
+ final DropDownListView list = mDropDownList;
+ if (list != null) {
+ // WARNING: Please read the comment where mListSelectionHidden is declared
+ list.mListSelectionHidden = true;
+ //XXX list.hideSelector();
+ list.requestLayout();
+ }
+ }
+
+ public boolean isShowing() {
+ return mPopup.isShowing();
+ }
+
+ private boolean isInputMethodNotNeeded() {
+ return mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ }
+
+ public ListView getListView() {
+ return mDropDownList;
+ }
+
+ private int buildDropDown() {
+ ViewGroup dropDownView;
+ int otherHeights = 0;
+
+ if (mDropDownList == null) {
+ Context context = mContext;
+
+ mDropDownList = new DropDownListView(context, !mModal);
+ if (mDropDownListHighlight != null) {
+ mDropDownList.setSelector(mDropDownListHighlight);
+ }
+ mDropDownList.setAdapter(mAdapter);
+ mDropDownList.setOnItemClickListener(mItemClickListener);
+ mDropDownList.setFocusable(true);
+ mDropDownList.setFocusableInTouchMode(true);
+ mDropDownList.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ public void onItemSelected(AdapterView<?> parent, View view,
+ int position, long id) {
+
+ if (position != -1) {
+ DropDownListView dropDownList = mDropDownList;
+
+ if (dropDownList != null) {
+ dropDownList.mListSelectionHidden = false;
+ }
+ }
+ }
+
+ public void onNothingSelected(AdapterView<?> parent) {
+ }
+ });
+ mDropDownList.setOnScrollListener(mScrollListener);
+
+ if (mItemSelectedListener != null) {
+ mDropDownList.setOnItemSelectedListener(mItemSelectedListener);
+ }
+
+ dropDownView = mDropDownList;
+
+ View hintView = mPromptView;
+ if (hintView != null) {
+ // if an hint has been specified, we accomodate more space for it and
+ // add a text view in the drop down menu, at the bottom of the list
+ LinearLayout hintContainer = new LinearLayout(context);
+ hintContainer.setOrientation(LinearLayout.VERTICAL);
+
+ LinearLayout.LayoutParams hintParams = new LinearLayout.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f
+ );
+
+ switch (mPromptPosition) {
+ case POSITION_PROMPT_BELOW:
+ hintContainer.addView(dropDownView, hintParams);
+ hintContainer.addView(hintView);
+ break;
+
+ case POSITION_PROMPT_ABOVE:
+ hintContainer.addView(hintView);
+ hintContainer.addView(dropDownView, hintParams);
+ break;
+
+ default:
+ break;
+ }
+
+ // measure the hint's height to find how much more vertical space
+ // we need to add to the drop down's height
+ int widthSpec = MeasureSpec.makeMeasureSpec(mDropDownWidth, MeasureSpec.AT_MOST);
+ int heightSpec = MeasureSpec.UNSPECIFIED;
+ hintView.measure(widthSpec, heightSpec);
+
+ hintParams = (LinearLayout.LayoutParams) hintView.getLayoutParams();
+ otherHeights = hintView.getMeasuredHeight() + hintParams.topMargin
+ + hintParams.bottomMargin;
+
+ dropDownView = hintContainer;
+ }
+
+ mPopup.setContentView(dropDownView);
+ } else {
+ dropDownView = (ViewGroup) mPopup.getContentView();
+ final View view = mPromptView;
+ if (view != null) {
+ LinearLayout.LayoutParams hintParams =
+ (LinearLayout.LayoutParams) view.getLayoutParams();
+ otherHeights = view.getMeasuredHeight() + hintParams.topMargin
+ + hintParams.bottomMargin;
+ }
+ }
+
+ // getMaxAvailableHeight() subtracts the padding, so we put it back
+ // to get the available height for the whole window
+ int padding = 0;
+ Drawable background = mPopup.getBackground();
+ if (background != null) {
+ background.getPadding(mTempRect);
+ padding = mTempRect.top + mTempRect.bottom;
+
+ // If we don't have an explicit vertical offset, determine one from the window
+ // background so that content will line up.
+ if (!mDropDownVerticalOffsetSet) {
+ mDropDownVerticalOffset = -mTempRect.top;
+ }
+ }
+
+ // Max height available on the screen for a popup.
+ boolean ignoreBottomDecorations =
+ mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ final int maxHeight = /*mPopup.*/getMaxAvailableHeight(
+ mDropDownAnchorView, mDropDownVerticalOffset, ignoreBottomDecorations);
+
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ return maxHeight + padding;
+ }
+
+ final int listContent = /*mDropDownList.*/measureHeightOfChildren(MeasureSpec.UNSPECIFIED,
+ 0, -1/*ListView.NO_POSITION*/, maxHeight - otherHeights, -1);
+ // add padding only if the list has items in it, that way we don't show
+ // the popup if it is not needed
+ if (listContent > 0) otherHeights += padding;
+
+ return listContent + otherHeights;
+ }
+
+ private int getMaxAvailableHeight(View anchor, int yOffset, boolean ignoreBottomDecorations) {
+ final Rect displayFrame = new Rect();
+ anchor.getWindowVisibleDisplayFrame(displayFrame);
+
+ final int[] anchorPos = new int[2];
+ anchor.getLocationOnScreen(anchorPos);
+
+ int bottomEdge = displayFrame.bottom;
+ if (ignoreBottomDecorations) {
+ Resources res = anchor.getContext().getResources();
+ bottomEdge = res.getDisplayMetrics().heightPixels;
+ }
+ final int distanceToBottom = bottomEdge - (anchorPos[1] + anchor.getHeight()) - yOffset;
+ final int distanceToTop = anchorPos[1] - displayFrame.top + yOffset;
+
+ // anchorPos[1] is distance from anchor to top of screen
+ int returnedHeight = Math.max(distanceToBottom, distanceToTop);
+ if (mPopup.getBackground() != null) {
+ mPopup.getBackground().getPadding(mTempRect);
+ returnedHeight -= mTempRect.top + mTempRect.bottom;
+ }
+
+ return returnedHeight;
+ }
+
+ private int measureHeightOfChildren(int widthMeasureSpec, int startPosition, int endPosition,
+ final int maxHeight, int disallowPartialChildPosition) {
+
+ final ListAdapter adapter = mAdapter;
+ if (adapter == null) {
+ return mDropDownList.getListPaddingTop() + mDropDownList.getListPaddingBottom();
+ }
+
+ // Include the padding of the list
+ int returnedHeight = mDropDownList.getListPaddingTop() + mDropDownList.getListPaddingBottom();
+ final int dividerHeight = ((mDropDownList.getDividerHeight() > 0) && mDropDownList.getDivider() != null) ? mDropDownList.getDividerHeight() : 0;
+ // The previous height value that was less than maxHeight and contained
+ // no partial children
+ int prevHeightWithoutPartialChild = 0;
+ int i;
+ View child;
+
+ // mItemCount - 1 since endPosition parameter is inclusive
+ endPosition = (endPosition == -1/*NO_POSITION*/) ? adapter.getCount() - 1 : endPosition;
+
+ for (i = startPosition; i <= endPosition; ++i) {
+ child = mAdapter.getView(i, null, mDropDownList);
+ if (mDropDownList.getCacheColorHint() != 0) {
+ child.setDrawingCacheBackgroundColor(mDropDownList.getCacheColorHint());
+ }
+
+ measureScrapChild(child, i, widthMeasureSpec);
+
+ if (i > 0) {
+ // Count the divider for all but one child
+ returnedHeight += dividerHeight;
+ }
+
+ returnedHeight += child.getMeasuredHeight();
+
+ if (returnedHeight >= maxHeight) {
+ // We went over, figure out which height to return. If returnedHeight > maxHeight,
+ // then the i'th position did not fit completely.
+ return (disallowPartialChildPosition >= 0) // Disallowing is enabled (> -1)
+ && (i > disallowPartialChildPosition) // We've past the min pos
+ && (prevHeightWithoutPartialChild > 0) // We have a prev height
+ && (returnedHeight != maxHeight) // i'th child did not fit completely
+ ? prevHeightWithoutPartialChild
+ : maxHeight;
+ }
+
+ if ((disallowPartialChildPosition >= 0) && (i >= disallowPartialChildPosition)) {
+ prevHeightWithoutPartialChild = returnedHeight;
+ }
+ }
+
+ // At this point, we went through the range of children, and they each
+ // completely fit, so return the returnedHeight
+ return returnedHeight;
+ }
+ private void measureScrapChild(View child, int position, int widthMeasureSpec) {
+ ListView.LayoutParams p = (ListView.LayoutParams) child.getLayoutParams();
+ if (p == null) {
+ p = new ListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT, 0);
+ child.setLayoutParams(p);
+ }
+ //XXX p.viewType = mAdapter.getItemViewType(position);
+ //XXX p.forceAdd = true;
+
+ int childWidthSpec = ViewGroup.getChildMeasureSpec(widthMeasureSpec,
+ mDropDownList.getPaddingLeft() + mDropDownList.getPaddingRight(), p.width);
+ int lpHeight = p.height;
+ int childHeightSpec;
+ if (lpHeight > 0) {
+ childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight, MeasureSpec.EXACTLY);
+ } else {
+ childHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ }
+ child.measure(childWidthSpec, childHeightSpec);
+ }
+
+ private static class DropDownListView extends ListView {
+ /*
+ * WARNING: This is a workaround for a touch mode issue.
+ *
+ * Touch mode is propagated lazily to windows. This causes problems in
+ * the following scenario:
+ * - Type something in the AutoCompleteTextView and get some results
+ * - Move down with the d-pad to select an item in the list
+ * - Move up with the d-pad until the selection disappears
+ * - Type more text in the AutoCompleteTextView *using the soft keyboard*
+ * and get new results; you are now in touch mode
+ * - The selection comes back on the first item in the list, even though
+ * the list is supposed to be in touch mode
+ *
+ * Using the soft keyboard triggers the touch mode change but that change
+ * is propagated to our window only after the first list layout, therefore
+ * after the list attempts to resurrect the selection.
+ *
+ * The trick to work around this issue is to pretend the list is in touch
+ * mode when we know that the selection should not appear, that is when
+ * we know the user moved the selection away from the list.
+ *
+ * This boolean is set to true whenever we explicitly hide the list's
+ * selection and reset to false whenever we know the user moved the
+ * selection back to the list.
+ *
+ * When this boolean is true, isInTouchMode() returns true, otherwise it
+ * returns super.isInTouchMode().
+ */
+ private boolean mListSelectionHidden;
+
+ private boolean mHijackFocus;
+
+ public DropDownListView(Context context, boolean hijackFocus) {
+ super(context, null, /*com.android.internal.*/R.attr.dropDownListViewStyle);
+ mHijackFocus = hijackFocus;
+ // TODO: Add an API to control this
+ setCacheColorHint(0); // Transparent, since the background drawable could be anything.
+ }
+
+ //XXX @Override
+ //View obtainView(int position, boolean[] isScrap) {
+ // View view = super.obtainView(position, isScrap);
+
+ // if (view instanceof TextView) {
+ // ((TextView) view).setHorizontallyScrolling(true);
+ // }
+
+ // return view;
+ //}
+
+ @Override
+ public boolean isInTouchMode() {
+ // WARNING: Please read the comment where mListSelectionHidden is declared
+ return (mHijackFocus && mListSelectionHidden) || super.isInTouchMode();
+ }
+
+ @Override
+ public boolean hasWindowFocus() {
+ return mHijackFocus || super.hasWindowFocus();
+ }
+
+ @Override
+ public boolean isFocused() {
+ return mHijackFocus || super.isFocused();
+ }
+
+ @Override
+ public boolean hasFocus() {
+ return mHijackFocus || super.hasFocus();
+ }
+ }
+
+ private class PopupDataSetObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ if (isShowing()) {
+ // Resize the popup to fit new content
+ show();
+ }
+ }
+
+ @Override
+ public void onInvalidated() {
+ dismiss();
+ }
+ }
+
+ private class ListSelectorHider implements Runnable {
+ public void run() {
+ clearListSelection();
+ }
+ }
+
+ private class ResizePopupRunnable implements Runnable {
+ public void run() {
+ if (mDropDownList != null && mDropDownList.getCount() > mDropDownList.getChildCount() &&
+ mDropDownList.getChildCount() <= mListItemExpandMaximum) {
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ show();
+ }
+ }
+ }
+
+ private class PopupTouchInterceptor implements OnTouchListener {
+ public boolean onTouch(View v, MotionEvent event) {
+ final int action = event.getAction();
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+
+ if (action == MotionEvent.ACTION_DOWN &&
+ mPopup != null && mPopup.isShowing() &&
+ (x >= 0 && x < mPopup.getWidth() && y >= 0 && y < mPopup.getHeight())) {
+ mHandler.postDelayed(mResizePopupRunnable, EXPAND_LIST_TIMEOUT);
+ } else if (action == MotionEvent.ACTION_UP) {
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ }
+ return false;
+ }
+ }
+
+ private class PopupScrollListener implements ListView.OnScrollListener {
+ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
+ int totalItemCount) {
+
+ }
+
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ if (scrollState == SCROLL_STATE_TOUCH_SCROLL &&
+ !isInputMethodNotNeeded() && mPopup.getContentView() != null) {
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ mResizePopupRunnable.run();
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsProgressBar.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsProgressBar.java
new file mode 100644
index 0000000000..1c02d4acad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsProgressBar.java
@@ -0,0 +1,1193 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Bitmap;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.Shader;
+import android.graphics.drawable.Animatable;
+import android.graphics.drawable.AnimationDrawable;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ClipDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.shapes.RoundRectShape;
+import android.graphics.drawable.shapes.Shape;
+import android.os.Build;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.SystemClock;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.animation.AlphaAnimation;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
+import android.view.animation.Transformation;
+import android.widget.RemoteViews.RemoteView;
+
+
+/**
+ * <p>
+ * Visual indicator of progress in some operation. Displays a bar to the user
+ * representing how far the operation has progressed; the application can
+ * change the amount of progress (modifying the length of the bar) as it moves
+ * forward. There is also a secondary progress displayable on a progress bar
+ * which is useful for displaying intermediate progress, such as the buffer
+ * level during a streaming playback progress bar.
+ * </p>
+ *
+ * <p>
+ * A progress bar can also be made indeterminate. In indeterminate mode, the
+ * progress bar shows a cyclic animation without an indication of progress. This mode is used by
+ * applications when the length of the task is unknown. The indeterminate progress bar can be either
+ * a spinning wheel or a horizontal bar.
+ * </p>
+ *
+ * <p>The following code example shows how a progress bar can be used from
+ * a worker thread to update the user interface to notify the user of progress:
+ * </p>
+ *
+ * <pre>
+ * public class MyActivity extends Activity {
+ * private static final int PROGRESS = 0x1;
+ *
+ * private ProgressBar mProgress;
+ * private int mProgressStatus = 0;
+ *
+ * private Handler mHandler = new Handler();
+ *
+ * protected void onCreate(Bundle icicle) {
+ * super.onCreate(icicle);
+ *
+ * setContentView(R.layout.progressbar_activity);
+ *
+ * mProgress = (ProgressBar) findViewById(R.id.progress_bar);
+ *
+ * // Start lengthy operation in a background thread
+ * new Thread(new Runnable() {
+ * public void run() {
+ * while (mProgressStatus &lt; 100) {
+ * mProgressStatus = doWork();
+ *
+ * // Update the progress bar
+ * mHandler.post(new Runnable() {
+ * public void run() {
+ * mProgress.setProgress(mProgressStatus);
+ * }
+ * });
+ * }
+ * }
+ * }).start();
+ * }
+ * }</pre>
+ *
+ * <p>To add a progress bar to a layout file, you can use the {@code &lt;ProgressBar&gt;} element.
+ * By default, the progress bar is a spinning wheel (an indeterminate indicator). To change to a
+ * horizontal progress bar, apply the {@link android.R.style#Widget_ProgressBar_Horizontal
+ * Widget.ProgressBar.Horizontal} style, like so:</p>
+ *
+ * <pre>
+ * &lt;ProgressBar
+ * style="@android:style/Widget.ProgressBar.Horizontal"
+ * ... /&gt;</pre>
+ *
+ * <p>If you will use the progress bar to show real progress, you must use the horizontal bar. You
+ * can then increment the progress with {@link #incrementProgressBy incrementProgressBy()} or
+ * {@link #setProgress setProgress()}. By default, the progress bar is full when it reaches 100. If
+ * necessary, you can adjust the maximum value (the value for a full bar) using the {@link
+ * android.R.styleable#ProgressBar_max android:max} attribute. Other attributes available are listed
+ * below.</p>
+ *
+ * <p>Another common style to apply to the progress bar is {@link
+ * android.R.style#Widget_ProgressBar_Small Widget.ProgressBar.Small}, which shows a smaller
+ * version of the spinning wheel&mdash;useful when waiting for content to load.
+ * For example, you can insert this kind of progress bar into your default layout for
+ * a view that will be populated by some content fetched from the Internet&mdash;the spinning wheel
+ * appears immediately and when your application receives the content, it replaces the progress bar
+ * with the loaded content. For example:</p>
+ *
+ * <pre>
+ * &lt;LinearLayout
+ * android:orientation="horizontal"
+ * ... &gt;
+ * &lt;ProgressBar
+ * android:layout_width="wrap_content"
+ * android:layout_height="wrap_content"
+ * style="@android:style/Widget.ProgressBar.Small"
+ * android:layout_marginRight="5dp" /&gt;
+ * &lt;TextView
+ * android:layout_width="wrap_content"
+ * android:layout_height="wrap_content"
+ * android:text="@string/loading" /&gt;
+ * &lt;/LinearLayout&gt;</pre>
+ *
+ * <p>Other progress bar styles provided by the system include:</p>
+ * <ul>
+ * <li>{@link android.R.style#Widget_ProgressBar_Horizontal Widget.ProgressBar.Horizontal}</li>
+ * <li>{@link android.R.style#Widget_ProgressBar_Small Widget.ProgressBar.Small}</li>
+ * <li>{@link android.R.style#Widget_ProgressBar_Large Widget.ProgressBar.Large}</li>
+ * <li>{@link android.R.style#Widget_ProgressBar_Inverse Widget.ProgressBar.Inverse}</li>
+ * <li>{@link android.R.style#Widget_ProgressBar_Small_Inverse
+ * Widget.ProgressBar.Small.Inverse}</li>
+ * <li>{@link android.R.style#Widget_ProgressBar_Large_Inverse
+ * Widget.ProgressBar.Large.Inverse}</li>
+ * </ul>
+ * <p>The "inverse" styles provide an inverse color scheme for the spinner, which may be necessary
+ * if your application uses a light colored theme (a white background).</p>
+ *
+ * <p><strong>XML attributes</b></strong>
+ * <p>
+ * See {@link android.R.styleable#ProgressBar ProgressBar Attributes},
+ * {@link android.R.styleable#View View Attributes}
+ * </p>
+ *
+ * @attr ref android.R.styleable#ProgressBar_animationResolution
+ * @attr ref android.R.styleable#ProgressBar_indeterminate
+ * @attr ref android.R.styleable#ProgressBar_indeterminateBehavior
+ * @attr ref android.R.styleable#ProgressBar_indeterminateDrawable
+ * @attr ref android.R.styleable#ProgressBar_indeterminateDuration
+ * @attr ref android.R.styleable#ProgressBar_indeterminateOnly
+ * @attr ref android.R.styleable#ProgressBar_interpolator
+ * @attr ref android.R.styleable#ProgressBar_max
+ * @attr ref android.R.styleable#ProgressBar_maxHeight
+ * @attr ref android.R.styleable#ProgressBar_maxWidth
+ * @attr ref android.R.styleable#ProgressBar_minHeight
+ * @attr ref android.R.styleable#ProgressBar_minWidth
+ * @attr ref android.R.styleable#ProgressBar_progress
+ * @attr ref android.R.styleable#ProgressBar_progressDrawable
+ * @attr ref android.R.styleable#ProgressBar_secondaryProgress
+ */
+@RemoteView
+public class IcsProgressBar extends View {
+ private static final boolean IS_HONEYCOMB = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
+ private static final int MAX_LEVEL = 10000;
+ private static final int ANIMATION_RESOLUTION = 200;
+ private static final int TIMEOUT_SEND_ACCESSIBILITY_EVENT = 200;
+
+ private static final int[] ProgressBar = new int[] {
+ android.R.attr.maxWidth,
+ android.R.attr.maxHeight,
+ android.R.attr.max,
+ android.R.attr.progress,
+ android.R.attr.secondaryProgress,
+ android.R.attr.indeterminate,
+ android.R.attr.indeterminateOnly,
+ android.R.attr.indeterminateDrawable,
+ android.R.attr.progressDrawable,
+ android.R.attr.indeterminateDuration,
+ android.R.attr.indeterminateBehavior,
+ android.R.attr.minWidth,
+ android.R.attr.minHeight,
+ android.R.attr.interpolator,
+ android.R.attr.animationResolution,
+ };
+ private static final int ProgressBar_maxWidth = 0;
+ private static final int ProgressBar_maxHeight = 1;
+ private static final int ProgressBar_max = 2;
+ private static final int ProgressBar_progress = 3;
+ private static final int ProgressBar_secondaryProgress = 4;
+ private static final int ProgressBar_indeterminate = 5;
+ private static final int ProgressBar_indeterminateOnly = 6;
+ private static final int ProgressBar_indeterminateDrawable = 7;
+ private static final int ProgressBar_progressDrawable = 8;
+ private static final int ProgressBar_indeterminateDuration = 9;
+ private static final int ProgressBar_indeterminateBehavior = 10;
+ private static final int ProgressBar_minWidth = 11;
+ private static final int ProgressBar_minHeight = 12;
+ private static final int ProgressBar_interpolator = 13;
+ private static final int ProgressBar_animationResolution = 14;
+
+ int mMinWidth;
+ int mMaxWidth;
+ int mMinHeight;
+ int mMaxHeight;
+
+ private int mProgress;
+ private int mSecondaryProgress;
+ private int mMax;
+
+ private int mBehavior;
+ private int mDuration;
+ private boolean mIndeterminate;
+ private boolean mOnlyIndeterminate;
+ private Transformation mTransformation;
+ private AlphaAnimation mAnimation;
+ private Drawable mIndeterminateDrawable;
+ private int mIndeterminateRealLeft;
+ private int mIndeterminateRealTop;
+ private Drawable mProgressDrawable;
+ private Drawable mCurrentDrawable;
+ Bitmap mSampleTile;
+ private boolean mNoInvalidate;
+ private Interpolator mInterpolator;
+ private RefreshProgressRunnable mRefreshProgressRunnable;
+ private long mUiThreadId;
+ private boolean mShouldStartAnimationDrawable;
+ private long mLastDrawTime;
+
+ private boolean mInDrawing;
+
+ private int mAnimationResolution;
+
+ private AccessibilityManager mAccessibilityManager;
+ private AccessibilityEventSender mAccessibilityEventSender;
+
+ /**
+ * Create a new progress bar with range 0...100 and initial progress of 0.
+ * @param context the application environment
+ */
+ public IcsProgressBar(Context context) {
+ this(context, null);
+ }
+
+ public IcsProgressBar(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.progressBarStyle);
+ }
+
+ public IcsProgressBar(Context context, AttributeSet attrs, int defStyle) {
+ this(context, attrs, defStyle, 0);
+ }
+
+ /**
+ * @hide
+ */
+ public IcsProgressBar(Context context, AttributeSet attrs, int defStyle, int styleRes) {
+ super(context, attrs, defStyle);
+ mUiThreadId = Thread.currentThread().getId();
+ initProgressBar();
+
+ TypedArray a =
+ context.obtainStyledAttributes(attrs, /*R.styleable.*/ProgressBar, defStyle, styleRes);
+
+ mNoInvalidate = true;
+
+ Drawable drawable = a.getDrawable(/*R.styleable.*/ProgressBar_progressDrawable);
+ if (drawable != null) {
+ drawable = tileify(drawable, false);
+ // Calling this method can set mMaxHeight, make sure the corresponding
+ // XML attribute for mMaxHeight is read after calling this method
+ setProgressDrawable(drawable);
+ }
+
+
+ mDuration = a.getInt(/*R.styleable.*/ProgressBar_indeterminateDuration, mDuration);
+
+ mMinWidth = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_minWidth, mMinWidth);
+ mMaxWidth = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_maxWidth, mMaxWidth);
+ mMinHeight = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_minHeight, mMinHeight);
+ mMaxHeight = a.getDimensionPixelSize(/*R.styleable.*/ProgressBar_maxHeight, mMaxHeight);
+
+ mBehavior = a.getInt(/*R.styleable.*/ProgressBar_indeterminateBehavior, mBehavior);
+
+ final int resID = a.getResourceId(
+ /*com.android.internal.R.styleable.*/ProgressBar_interpolator,
+ android.R.anim.linear_interpolator); // default to linear interpolator
+ if (resID > 0) {
+ setInterpolator(context, resID);
+ }
+
+ setMax(a.getInt(/*R.styleable.*/ProgressBar_max, mMax));
+
+ setProgress(a.getInt(/*R.styleable.*/ProgressBar_progress, mProgress));
+
+ setSecondaryProgress(
+ a.getInt(/*R.styleable.*/ProgressBar_secondaryProgress, mSecondaryProgress));
+
+ drawable = a.getDrawable(/*R.styleable.*/ProgressBar_indeterminateDrawable);
+ if (drawable != null) {
+ drawable = tileifyIndeterminate(drawable);
+ setIndeterminateDrawable(drawable);
+ }
+
+ mOnlyIndeterminate = a.getBoolean(
+ /*R.styleable.*/ProgressBar_indeterminateOnly, mOnlyIndeterminate);
+
+ mNoInvalidate = false;
+
+ setIndeterminate(mOnlyIndeterminate || a.getBoolean(
+ /*R.styleable.*/ProgressBar_indeterminate, mIndeterminate));
+
+ mAnimationResolution = a.getInteger(/*R.styleable.*/ProgressBar_animationResolution,
+ ANIMATION_RESOLUTION);
+
+ a.recycle();
+
+ mAccessibilityManager = (AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
+ }
+
+ /**
+ * Converts a drawable to a tiled version of itself. It will recursively
+ * traverse layer and state list drawables.
+ */
+ private Drawable tileify(Drawable drawable, boolean clip) {
+
+ if (drawable instanceof LayerDrawable) {
+ LayerDrawable background = (LayerDrawable) drawable;
+ final int N = background.getNumberOfLayers();
+ Drawable[] outDrawables = new Drawable[N];
+
+ for (int i = 0; i < N; i++) {
+ int id = background.getId(i);
+ outDrawables[i] = tileify(background.getDrawable(i),
+ (id == android.R.id.progress || id == android.R.id.secondaryProgress));
+ }
+
+ LayerDrawable newBg = new LayerDrawable(outDrawables);
+
+ for (int i = 0; i < N; i++) {
+ newBg.setId(i, background.getId(i));
+ }
+
+ return newBg;
+
+ }/* else if (drawable instanceof StateListDrawable) {
+ StateListDrawable in = (StateListDrawable) drawable;
+ StateListDrawable out = new StateListDrawable();
+ int numStates = in.getStateCount();
+ for (int i = 0; i < numStates; i++) {
+ out.addState(in.getStateSet(i), tileify(in.getStateDrawable(i), clip));
+ }
+ return out;
+
+ }*/ else if (drawable instanceof BitmapDrawable) {
+ final Bitmap tileBitmap = ((BitmapDrawable) drawable).getBitmap();
+ if (mSampleTile == null) {
+ mSampleTile = tileBitmap;
+ }
+
+ final ShapeDrawable shapeDrawable = new ShapeDrawable(getDrawableShape());
+
+ final BitmapShader bitmapShader = new BitmapShader(tileBitmap,
+ Shader.TileMode.REPEAT, Shader.TileMode.CLAMP);
+ shapeDrawable.getPaint().setShader(bitmapShader);
+
+ return (clip) ? new ClipDrawable(shapeDrawable, Gravity.LEFT,
+ ClipDrawable.HORIZONTAL) : shapeDrawable;
+ }
+
+ return drawable;
+ }
+
+ Shape getDrawableShape() {
+ final float[] roundedCorners = new float[] { 5, 5, 5, 5, 5, 5, 5, 5 };
+ return new RoundRectShape(roundedCorners, null, null);
+ }
+
+ /**
+ * Convert a AnimationDrawable for use as a barberpole animation.
+ * Each frame of the animation is wrapped in a ClipDrawable and
+ * given a tiling BitmapShader.
+ */
+ private Drawable tileifyIndeterminate(Drawable drawable) {
+ if (drawable instanceof AnimationDrawable) {
+ AnimationDrawable background = (AnimationDrawable) drawable;
+ final int N = background.getNumberOfFrames();
+ AnimationDrawable newBg = new AnimationDrawable();
+ newBg.setOneShot(background.isOneShot());
+
+ for (int i = 0; i < N; i++) {
+ Drawable frame = tileify(background.getFrame(i), true);
+ frame.setLevel(10000);
+ newBg.addFrame(frame, background.getDuration(i));
+ }
+ newBg.setLevel(10000);
+ drawable = newBg;
+ }
+ return drawable;
+ }
+
+ /**
+ * <p>
+ * Initialize the progress bar's default values:
+ * </p>
+ * <ul>
+ * <li>progress = 0</li>
+ * <li>max = 100</li>
+ * <li>animation duration = 4000 ms</li>
+ * <li>indeterminate = false</li>
+ * <li>behavior = repeat</li>
+ * </ul>
+ */
+ private void initProgressBar() {
+ mMax = 100;
+ mProgress = 0;
+ mSecondaryProgress = 0;
+ mIndeterminate = false;
+ mOnlyIndeterminate = false;
+ mDuration = 4000;
+ mBehavior = AlphaAnimation.RESTART;
+ mMinWidth = 24;
+ mMaxWidth = 48;
+ mMinHeight = 24;
+ mMaxHeight = 48;
+ }
+
+ /**
+ * <p>Indicate whether this progress bar is in indeterminate mode.</p>
+ *
+ * @return true if the progress bar is in indeterminate mode
+ */
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized boolean isIndeterminate() {
+ return mIndeterminate;
+ }
+
+ /**
+ * <p>Change the indeterminate mode for this progress bar. In indeterminate
+ * mode, the progress is ignored and the progress bar shows an infinite
+ * animation instead.</p>
+ *
+ * If this progress bar's style only supports indeterminate mode (such as the circular
+ * progress bars), then this will be ignored.
+ *
+ * @param indeterminate true to enable the indeterminate mode
+ */
+ public synchronized void setIndeterminate(boolean indeterminate) {
+ if ((!mOnlyIndeterminate || !mIndeterminate) && indeterminate != mIndeterminate) {
+ mIndeterminate = indeterminate;
+
+ if (indeterminate) {
+ // swap between indeterminate and regular backgrounds
+ mCurrentDrawable = mIndeterminateDrawable;
+ startAnimation();
+ } else {
+ mCurrentDrawable = mProgressDrawable;
+ stopAnimation();
+ }
+ }
+ }
+
+ /**
+ * <p>Get the drawable used to draw the progress bar in
+ * indeterminate mode.</p>
+ *
+ * @return a {@link android.graphics.drawable.Drawable} instance
+ *
+ * @see #setIndeterminateDrawable(android.graphics.drawable.Drawable)
+ * @see #setIndeterminate(boolean)
+ */
+ public Drawable getIndeterminateDrawable() {
+ return mIndeterminateDrawable;
+ }
+
+ /**
+ * <p>Define the drawable used to draw the progress bar in
+ * indeterminate mode.</p>
+ *
+ * @param d the new drawable
+ *
+ * @see #getIndeterminateDrawable()
+ * @see #setIndeterminate(boolean)
+ */
+ public void setIndeterminateDrawable(Drawable d) {
+ if (d != null) {
+ d.setCallback(this);
+ }
+ mIndeterminateDrawable = d;
+ if (mIndeterminate) {
+ mCurrentDrawable = d;
+ postInvalidate();
+ }
+ }
+
+ /**
+ * <p>Get the drawable used to draw the progress bar in
+ * progress mode.</p>
+ *
+ * @return a {@link android.graphics.drawable.Drawable} instance
+ *
+ * @see #setProgressDrawable(android.graphics.drawable.Drawable)
+ * @see #setIndeterminate(boolean)
+ */
+ public Drawable getProgressDrawable() {
+ return mProgressDrawable;
+ }
+
+ /**
+ * <p>Define the drawable used to draw the progress bar in
+ * progress mode.</p>
+ *
+ * @param d the new drawable
+ *
+ * @see #getProgressDrawable()
+ * @see #setIndeterminate(boolean)
+ */
+ public void setProgressDrawable(Drawable d) {
+ boolean needUpdate;
+ if (mProgressDrawable != null && d != mProgressDrawable) {
+ mProgressDrawable.setCallback(null);
+ needUpdate = true;
+ } else {
+ needUpdate = false;
+ }
+
+ if (d != null) {
+ d.setCallback(this);
+
+ // Make sure the ProgressBar is always tall enough
+ int drawableHeight = d.getMinimumHeight();
+ if (mMaxHeight < drawableHeight) {
+ mMaxHeight = drawableHeight;
+ requestLayout();
+ }
+ }
+ mProgressDrawable = d;
+ if (!mIndeterminate) {
+ mCurrentDrawable = d;
+ postInvalidate();
+ }
+
+ if (needUpdate) {
+ updateDrawableBounds(getWidth(), getHeight());
+ updateDrawableState();
+ doRefreshProgress(android.R.id.progress, mProgress, false, false);
+ doRefreshProgress(android.R.id.secondaryProgress, mSecondaryProgress, false, false);
+ }
+ }
+
+ /**
+ * @return The drawable currently used to draw the progress bar
+ */
+ Drawable getCurrentDrawable() {
+ return mCurrentDrawable;
+ }
+
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ return who == mProgressDrawable || who == mIndeterminateDrawable
+ || super.verifyDrawable(who);
+ }
+
+ @Override
+ public void jumpDrawablesToCurrentState() {
+ super.jumpDrawablesToCurrentState();
+ if (mProgressDrawable != null) mProgressDrawable.jumpToCurrentState();
+ if (mIndeterminateDrawable != null) mIndeterminateDrawable.jumpToCurrentState();
+ }
+
+ @Override
+ public void postInvalidate() {
+ if (!mNoInvalidate) {
+ super.postInvalidate();
+ }
+ }
+
+ private class RefreshProgressRunnable implements Runnable {
+
+ private int mId;
+ private int mProgress;
+ private boolean mFromUser;
+
+ RefreshProgressRunnable(int id, int progress, boolean fromUser) {
+ mId = id;
+ mProgress = progress;
+ mFromUser = fromUser;
+ }
+
+ public void run() {
+ doRefreshProgress(mId, mProgress, mFromUser, true);
+ // Put ourselves back in the cache when we are done
+ mRefreshProgressRunnable = this;
+ }
+
+ public void setup(int id, int progress, boolean fromUser) {
+ mId = id;
+ mProgress = progress;
+ mFromUser = fromUser;
+ }
+
+ }
+
+ private synchronized void doRefreshProgress(int id, int progress, boolean fromUser,
+ boolean callBackToApp) {
+ float scale = mMax > 0 ? (float) progress / (float) mMax : 0;
+ final Drawable d = mCurrentDrawable;
+ if (d != null) {
+ Drawable progressDrawable = null;
+
+ if (d instanceof LayerDrawable) {
+ progressDrawable = ((LayerDrawable) d).findDrawableByLayerId(id);
+ }
+
+ final int level = (int) (scale * MAX_LEVEL);
+ (progressDrawable != null ? progressDrawable : d).setLevel(level);
+ } else {
+ invalidate();
+ }
+
+ if (callBackToApp && id == android.R.id.progress) {
+ onProgressRefresh(scale, fromUser);
+ }
+ }
+
+ void onProgressRefresh(float scale, boolean fromUser) {
+ if (mAccessibilityManager.isEnabled()) {
+ scheduleAccessibilityEventSender();
+ }
+ }
+
+ private synchronized void refreshProgress(int id, int progress, boolean fromUser) {
+ if (mUiThreadId == Thread.currentThread().getId()) {
+ doRefreshProgress(id, progress, fromUser, true);
+ } else {
+ RefreshProgressRunnable r;
+ if (mRefreshProgressRunnable != null) {
+ // Use cached RefreshProgressRunnable if available
+ r = mRefreshProgressRunnable;
+ // Uncache it
+ mRefreshProgressRunnable = null;
+ r.setup(id, progress, fromUser);
+ } else {
+ // Make a new one
+ r = new RefreshProgressRunnable(id, progress, fromUser);
+ }
+ post(r);
+ }
+ }
+
+ /**
+ * <p>Set the current progress to the specified value. Does not do anything
+ * if the progress bar is in indeterminate mode.</p>
+ *
+ * @param progress the new progress, between 0 and {@link #getMax()}
+ *
+ * @see #setIndeterminate(boolean)
+ * @see #isIndeterminate()
+ * @see #getProgress()
+ * @see #incrementProgressBy(int)
+ */
+ public synchronized void setProgress(int progress) {
+ setProgress(progress, false);
+ }
+
+ synchronized void setProgress(int progress, boolean fromUser) {
+ if (mIndeterminate) {
+ return;
+ }
+
+ if (progress < 0) {
+ progress = 0;
+ }
+
+ if (progress > mMax) {
+ progress = mMax;
+ }
+
+ if (progress != mProgress) {
+ mProgress = progress;
+ refreshProgress(android.R.id.progress, mProgress, fromUser);
+ }
+ }
+
+ /**
+ * <p>
+ * Set the current secondary progress to the specified value. Does not do
+ * anything if the progress bar is in indeterminate mode.
+ * </p>
+ *
+ * @param secondaryProgress the new secondary progress, between 0 and {@link #getMax()}
+ * @see #setIndeterminate(boolean)
+ * @see #isIndeterminate()
+ * @see #getSecondaryProgress()
+ * @see #incrementSecondaryProgressBy(int)
+ */
+ public synchronized void setSecondaryProgress(int secondaryProgress) {
+ if (mIndeterminate) {
+ return;
+ }
+
+ if (secondaryProgress < 0) {
+ secondaryProgress = 0;
+ }
+
+ if (secondaryProgress > mMax) {
+ secondaryProgress = mMax;
+ }
+
+ if (secondaryProgress != mSecondaryProgress) {
+ mSecondaryProgress = secondaryProgress;
+ refreshProgress(android.R.id.secondaryProgress, mSecondaryProgress, false);
+ }
+ }
+
+ /**
+ * <p>Get the progress bar's current level of progress. Return 0 when the
+ * progress bar is in indeterminate mode.</p>
+ *
+ * @return the current progress, between 0 and {@link #getMax()}
+ *
+ * @see #setIndeterminate(boolean)
+ * @see #isIndeterminate()
+ * @see #setProgress(int)
+ * @see #setMax(int)
+ * @see #getMax()
+ */
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getProgress() {
+ return mIndeterminate ? 0 : mProgress;
+ }
+
+ /**
+ * <p>Get the progress bar's current level of secondary progress. Return 0 when the
+ * progress bar is in indeterminate mode.</p>
+ *
+ * @return the current secondary progress, between 0 and {@link #getMax()}
+ *
+ * @see #setIndeterminate(boolean)
+ * @see #isIndeterminate()
+ * @see #setSecondaryProgress(int)
+ * @see #setMax(int)
+ * @see #getMax()
+ */
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getSecondaryProgress() {
+ return mIndeterminate ? 0 : mSecondaryProgress;
+ }
+
+ /**
+ * <p>Return the upper limit of this progress bar's range.</p>
+ *
+ * @return a positive integer
+ *
+ * @see #setMax(int)
+ * @see #getProgress()
+ * @see #getSecondaryProgress()
+ */
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getMax() {
+ return mMax;
+ }
+
+ /**
+ * <p>Set the range of the progress bar to 0...<tt>max</tt>.</p>
+ *
+ * @param max the upper range of this progress bar
+ *
+ * @see #getMax()
+ * @see #setProgress(int)
+ * @see #setSecondaryProgress(int)
+ */
+ public synchronized void setMax(int max) {
+ if (max < 0) {
+ max = 0;
+ }
+ if (max != mMax) {
+ mMax = max;
+ postInvalidate();
+
+ if (mProgress > max) {
+ mProgress = max;
+ }
+ refreshProgress(android.R.id.progress, mProgress, false);
+ }
+ }
+
+ /**
+ * <p>Increase the progress bar's progress by the specified amount.</p>
+ *
+ * @param diff the amount by which the progress must be increased
+ *
+ * @see #setProgress(int)
+ */
+ public synchronized final void incrementProgressBy(int diff) {
+ setProgress(mProgress + diff);
+ }
+
+ /**
+ * <p>Increase the progress bar's secondary progress by the specified amount.</p>
+ *
+ * @param diff the amount by which the secondary progress must be increased
+ *
+ * @see #setSecondaryProgress(int)
+ */
+ public synchronized final void incrementSecondaryProgressBy(int diff) {
+ setSecondaryProgress(mSecondaryProgress + diff);
+ }
+
+ /**
+ * <p>Start the indeterminate progress animation.</p>
+ */
+ void startAnimation() {
+ if (getVisibility() != VISIBLE) {
+ return;
+ }
+
+ if (mIndeterminateDrawable instanceof Animatable) {
+ mShouldStartAnimationDrawable = true;
+ mAnimation = null;
+ } else {
+ if (mInterpolator == null) {
+ mInterpolator = new LinearInterpolator();
+ }
+
+ mTransformation = new Transformation();
+ mAnimation = new AlphaAnimation(0.0f, 1.0f);
+ mAnimation.setRepeatMode(mBehavior);
+ mAnimation.setRepeatCount(Animation.INFINITE);
+ mAnimation.setDuration(mDuration);
+ mAnimation.setInterpolator(mInterpolator);
+ mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
+ }
+ postInvalidate();
+ }
+
+ /**
+ * <p>Stop the indeterminate progress animation.</p>
+ */
+ void stopAnimation() {
+ mAnimation = null;
+ mTransformation = null;
+ if (mIndeterminateDrawable instanceof Animatable) {
+ ((Animatable) mIndeterminateDrawable).stop();
+ mShouldStartAnimationDrawable = false;
+ }
+ postInvalidate();
+ }
+
+ /**
+ * Sets the acceleration curve for the indeterminate animation.
+ * The interpolator is loaded as a resource from the specified context.
+ *
+ * @param context The application environment
+ * @param resID The resource identifier of the interpolator to load
+ */
+ public void setInterpolator(Context context, int resID) {
+ setInterpolator(AnimationUtils.loadInterpolator(context, resID));
+ }
+
+ /**
+ * Sets the acceleration curve for the indeterminate animation.
+ * Defaults to a linear interpolation.
+ *
+ * @param interpolator The interpolator which defines the acceleration curve
+ */
+ public void setInterpolator(Interpolator interpolator) {
+ mInterpolator = interpolator;
+ }
+
+ /**
+ * Gets the acceleration curve type for the indeterminate animation.
+ *
+ * @return the {@link Interpolator} associated to this animation
+ */
+ public Interpolator getInterpolator() {
+ return mInterpolator;
+ }
+
+ @Override
+ public void setVisibility(int v) {
+ if (getVisibility() != v) {
+ super.setVisibility(v);
+
+ if (mIndeterminate) {
+ // let's be nice with the UI thread
+ if (v == GONE || v == INVISIBLE) {
+ stopAnimation();
+ } else {
+ startAnimation();
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void onVisibilityChanged(View changedView, int visibility) {
+ super.onVisibilityChanged(changedView, visibility);
+
+ if (mIndeterminate) {
+ // let's be nice with the UI thread
+ if (visibility == GONE || visibility == INVISIBLE) {
+ stopAnimation();
+ } else {
+ startAnimation();
+ }
+ }
+ }
+
+ @Override
+ public void invalidateDrawable(Drawable dr) {
+ if (!mInDrawing) {
+ if (verifyDrawable(dr)) {
+ final Rect dirty = dr.getBounds();
+ final int scrollX = getScrollX() + getPaddingLeft();
+ final int scrollY = getScrollY() + getPaddingTop();
+
+ invalidate(dirty.left + scrollX, dirty.top + scrollY,
+ dirty.right + scrollX, dirty.bottom + scrollY);
+ } else {
+ super.invalidateDrawable(dr);
+ }
+ }
+ }
+
+ /**
+ * @hide
+ *
+ @Override
+ public int getResolvedLayoutDirection(Drawable who) {
+ return (who == mProgressDrawable || who == mIndeterminateDrawable) ?
+ getResolvedLayoutDirection() : super.getResolvedLayoutDirection(who);
+ }
+ */
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ updateDrawableBounds(w, h);
+ }
+
+ private void updateDrawableBounds(int w, int h) {
+ // onDraw will translate the canvas so we draw starting at 0,0
+ int right = w - getPaddingRight() - getPaddingLeft();
+ int bottom = h - getPaddingBottom() - getPaddingTop();
+ int top = 0;
+ int left = 0;
+
+ if (mIndeterminateDrawable != null) {
+ // Aspect ratio logic does not apply to AnimationDrawables
+ if (mOnlyIndeterminate && !(mIndeterminateDrawable instanceof AnimationDrawable)) {
+ // Maintain aspect ratio. Certain kinds of animated drawables
+ // get very confused otherwise.
+ final int intrinsicWidth = mIndeterminateDrawable.getIntrinsicWidth();
+ final int intrinsicHeight = mIndeterminateDrawable.getIntrinsicHeight();
+ final float intrinsicAspect = (float) intrinsicWidth / intrinsicHeight;
+ final float boundAspect = (float) w / h;
+ if (intrinsicAspect != boundAspect) {
+ if (boundAspect > intrinsicAspect) {
+ // New width is larger. Make it smaller to match height.
+ final int width = (int) (h * intrinsicAspect);
+ left = (w - width) / 2;
+ right = left + width;
+ } else {
+ // New height is larger. Make it smaller to match width.
+ final int height = (int) (w * (1 / intrinsicAspect));
+ top = (h - height) / 2;
+ bottom = top + height;
+ }
+ }
+ }
+ mIndeterminateDrawable.setBounds(0, 0, right - left, bottom - top);
+ mIndeterminateRealLeft = left;
+ mIndeterminateRealTop = top;
+ }
+
+ if (mProgressDrawable != null) {
+ mProgressDrawable.setBounds(0, 0, right, bottom);
+ }
+ }
+
+ @Override
+ protected synchronized void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ Drawable d = mCurrentDrawable;
+ if (d != null) {
+ // Translate canvas so a indeterminate circular progress bar with padding
+ // rotates properly in its animation
+ canvas.save();
+ canvas.translate(getPaddingLeft() + mIndeterminateRealLeft, getPaddingTop() + mIndeterminateRealTop);
+ long time = getDrawingTime();
+ if (mAnimation != null) {
+ mAnimation.getTransformation(time, mTransformation);
+ float scale = mTransformation.getAlpha();
+ try {
+ mInDrawing = true;
+ d.setLevel((int) (scale * MAX_LEVEL));
+ } finally {
+ mInDrawing = false;
+ }
+ if (SystemClock.uptimeMillis() - mLastDrawTime >= mAnimationResolution) {
+ mLastDrawTime = SystemClock.uptimeMillis();
+ postInvalidateDelayed(mAnimationResolution);
+ }
+ }
+ d.draw(canvas);
+ canvas.restore();
+ if (mShouldStartAnimationDrawable && d instanceof Animatable) {
+ ((Animatable) d).start();
+ mShouldStartAnimationDrawable = false;
+ }
+ }
+ }
+
+ @Override
+ protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ Drawable d = mCurrentDrawable;
+
+ int dw = 0;
+ int dh = 0;
+ if (d != null) {
+ dw = Math.max(mMinWidth, Math.min(mMaxWidth, d.getIntrinsicWidth()));
+ dh = Math.max(mMinHeight, Math.min(mMaxHeight, d.getIntrinsicHeight()));
+ }
+ updateDrawableState();
+ dw += getPaddingLeft() + getPaddingRight();
+ dh += getPaddingTop() + getPaddingBottom();
+
+ if (IS_HONEYCOMB) {
+ setMeasuredDimension(View.resolveSizeAndState(dw, widthMeasureSpec, 0),
+ View.resolveSizeAndState(dh, heightMeasureSpec, 0));
+ } else {
+ setMeasuredDimension(View.resolveSize(dw, widthMeasureSpec),
+ View.resolveSize(dh, heightMeasureSpec));
+ }
+ }
+
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ updateDrawableState();
+ }
+
+ private void updateDrawableState() {
+ int[] state = getDrawableState();
+
+ if (mProgressDrawable != null && mProgressDrawable.isStateful()) {
+ mProgressDrawable.setState(state);
+ }
+
+ if (mIndeterminateDrawable != null && mIndeterminateDrawable.isStateful()) {
+ mIndeterminateDrawable.setState(state);
+ }
+ }
+
+ static class SavedState extends BaseSavedState {
+ int progress;
+ int secondaryProgress;
+
+ /**
+ * Constructor called from {@link IcsProgressBar#onSaveInstanceState()}
+ */
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ /**
+ * Constructor called from {@link #CREATOR}
+ */
+ private SavedState(Parcel in) {
+ super(in);
+ progress = in.readInt();
+ secondaryProgress = in.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeInt(progress);
+ out.writeInt(secondaryProgress);
+ }
+
+ public static final Parcelable.Creator<SavedState> CREATOR
+ = new Parcelable.Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ // Force our ancestor class to save its state
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState ss = new SavedState(superState);
+
+ ss.progress = mProgress;
+ ss.secondaryProgress = mSecondaryProgress;
+
+ return ss;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+
+ setProgress(ss.progress);
+ setSecondaryProgress(ss.secondaryProgress);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ if (mIndeterminate) {
+ startAnimation();
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ if (mIndeterminate) {
+ stopAnimation();
+ }
+ if(mRefreshProgressRunnable != null) {
+ removeCallbacks(mRefreshProgressRunnable);
+ }
+ if (mAccessibilityEventSender != null) {
+ removeCallbacks(mAccessibilityEventSender);
+ }
+ // This should come after stopAnimation(), otherwise an invalidate message remains in the
+ // queue, which can prevent the entire view hierarchy from being GC'ed during a rotation
+ super.onDetachedFromWindow();
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setItemCount(mMax);
+ event.setCurrentItemIndex(mProgress);
+ }
+
+ /**
+ * Schedule a command for sending an accessibility event.
+ * </br>
+ * Note: A command is used to ensure that accessibility events
+ * are sent at most one in a given time frame to save
+ * system resources while the progress changes quickly.
+ */
+ private void scheduleAccessibilityEventSender() {
+ if (mAccessibilityEventSender == null) {
+ mAccessibilityEventSender = new AccessibilityEventSender();
+ } else {
+ removeCallbacks(mAccessibilityEventSender);
+ }
+ postDelayed(mAccessibilityEventSender, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
+ }
+
+ /**
+ * Command for sending an accessibility event.
+ */
+ private class AccessibilityEventSender implements Runnable {
+ public void run() {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
new file mode 100644
index 0000000000..038d1e0318
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
@@ -0,0 +1,703 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.actionbarsherlock.internal.widget;
+
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+import com.actionbarsherlock.R;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.SpinnerAdapter;
+
+
+/**
+ * A view that displays one child at a time and lets the user pick among them.
+ * The items in the Spinner come from the {@link Adapter} associated with
+ * this view.
+ *
+ * <p>See the <a href="{@docRoot}resources/tutorials/views/hello-spinner.html">Spinner
+ * tutorial</a>.</p>
+ *
+ * @attr ref android.R.styleable#Spinner_prompt
+ */
+public class IcsSpinner extends IcsAbsSpinner implements OnClickListener {
+ //private static final String TAG = "Spinner";
+
+ // Only measure this many items to get a decent max width.
+ private static final int MAX_ITEMS_MEASURED = 15;
+
+ /**
+ * Use a dialog window for selecting spinner options.
+ */
+ //public static final int MODE_DIALOG = 0;
+
+ /**
+ * Use a dropdown anchored to the Spinner for selecting spinner options.
+ */
+ public static final int MODE_DROPDOWN = 1;
+
+ /**
+ * Use the theme-supplied value to select the dropdown mode.
+ */
+ //private static final int MODE_THEME = -1;
+
+ private SpinnerPopup mPopup;
+ private DropDownAdapter mTempAdapter;
+ int mDropDownWidth;
+
+ private int mGravity;
+ private boolean mDisableChildrenWhenDisabled;
+
+ private Rect mTempRect = new Rect();
+
+ public IcsSpinner(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.actionDropDownStyle);
+ }
+
+ /**
+ * Construct a new spinner with the given context's theme, the supplied attribute set,
+ * and default style.
+ *
+ * @param context The Context the view is running in, through which it can
+ * access the current theme, resources, etc.
+ * @param attrs The attributes of the XML tag that is inflating the view.
+ * @param defStyle The default style to apply to this view. If 0, no style
+ * will be applied (beyond what is included in the theme). This may
+ * either be an attribute resource, whose value will be retrieved
+ * from the current theme, or an explicit style resource.
+ */
+ public IcsSpinner(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.SherlockSpinner, defStyle, 0);
+
+
+ DropdownPopup popup = new DropdownPopup(context, attrs, defStyle);
+
+ mDropDownWidth = a.getLayoutDimension(
+ R.styleable.SherlockSpinner_android_dropDownWidth,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+ popup.setBackgroundDrawable(a.getDrawable(
+ R.styleable.SherlockSpinner_android_popupBackground));
+ final int verticalOffset = a.getDimensionPixelOffset(
+ R.styleable.SherlockSpinner_android_dropDownVerticalOffset, 0);
+ if (verticalOffset != 0) {
+ popup.setVerticalOffset(verticalOffset);
+ }
+
+ final int horizontalOffset = a.getDimensionPixelOffset(
+ R.styleable.SherlockSpinner_android_dropDownHorizontalOffset, 0);
+ if (horizontalOffset != 0) {
+ popup.setHorizontalOffset(horizontalOffset);
+ }
+
+ mPopup = popup;
+
+ mGravity = a.getInt(R.styleable.SherlockSpinner_android_gravity, Gravity.CENTER);
+
+ mPopup.setPromptText(a.getString(R.styleable.SherlockSpinner_android_prompt));
+
+ mDisableChildrenWhenDisabled = true;
+
+ a.recycle();
+
+ // Base constructor can call setAdapter before we initialize mPopup.
+ // Finish setting things up if this happened.
+ if (mTempAdapter != null) {
+ mPopup.setAdapter(mTempAdapter);
+ mTempAdapter = null;
+ }
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if (mDisableChildrenWhenDisabled) {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ getChildAt(i).setEnabled(enabled);
+ }
+ }
+ }
+
+ /**
+ * Describes how the selected item view is positioned. Currently only the horizontal component
+ * is used. The default is determined by the current theme.
+ *
+ * @param gravity See {@link android.view.Gravity}
+ *
+ * @attr ref android.R.styleable#Spinner_gravity
+ */
+ public void setGravity(int gravity) {
+ if (mGravity != gravity) {
+ if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == 0) {
+ gravity |= Gravity.LEFT;
+ }
+ mGravity = gravity;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setAdapter(SpinnerAdapter adapter) {
+ super.setAdapter(adapter);
+
+ if (mPopup != null) {
+ mPopup.setAdapter(new DropDownAdapter(adapter));
+ } else {
+ mTempAdapter = new DropDownAdapter(adapter);
+ }
+ }
+
+ @Override
+ public int getBaseline() {
+ View child = null;
+
+ if (getChildCount() > 0) {
+ child = getChildAt(0);
+ } else if (mAdapter != null && mAdapter.getCount() > 0) {
+ child = makeAndAddView(0);
+ mRecycler.put(0, child);
+ removeAllViewsInLayout();
+ }
+
+ if (child != null) {
+ final int childBaseline = child.getBaseline();
+ return childBaseline >= 0 ? child.getTop() + childBaseline : -1;
+ } else {
+ return -1;
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+
+ if (mPopup != null && mPopup.isShowing()) {
+ mPopup.dismiss();
+ }
+ }
+
+ /**
+ * <p>A spinner does not support item click events. Calling this method
+ * will raise an exception.</p>
+ *
+ * @param l this listener will be ignored
+ */
+ @Override
+ public void setOnItemClickListener(OnItemClickListener l) {
+ throw new RuntimeException("setOnItemClickListener cannot be used with a spinner.");
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ if (mPopup != null && MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.AT_MOST) {
+ final int measuredWidth = getMeasuredWidth();
+ setMeasuredDimension(Math.min(Math.max(measuredWidth,
+ measureContentWidth(getAdapter(), getBackground())),
+ MeasureSpec.getSize(widthMeasureSpec)),
+ getMeasuredHeight());
+ }
+ }
+
+ /**
+ * @see android.view.View#onLayout(boolean,int,int,int,int)
+ *
+ * Creates and positions all views
+ *
+ */
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ mInLayout = true;
+ layout(0, false);
+ mInLayout = false;
+ }
+
+ /**
+ * Creates and positions all views for this Spinner.
+ *
+ * @param delta Change in the selected position. +1 moves selection is moving to the right,
+ * so views are scrolling to the left. -1 means selection is moving to the left.
+ */
+ @Override
+ void layout(int delta, boolean animate) {
+ int childrenLeft = mSpinnerPadding.left;
+ int childrenWidth = getRight() - getLeft() - mSpinnerPadding.left - mSpinnerPadding.right;
+
+ if (mDataChanged) {
+ handleDataChanged();
+ }
+
+ // Handle the empty set by removing all views
+ if (mItemCount == 0) {
+ resetList();
+ return;
+ }
+
+ if (mNextSelectedPosition >= 0) {
+ setSelectedPositionInt(mNextSelectedPosition);
+ }
+
+ recycleAllViews();
+
+ // Clear out old views
+ removeAllViewsInLayout();
+
+ // Make selected view and position it
+ mFirstPosition = mSelectedPosition;
+ View sel = makeAndAddView(mSelectedPosition);
+ int width = sel.getMeasuredWidth();
+ int selectedOffset = childrenLeft;
+ switch (mGravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
+ case Gravity.CENTER_HORIZONTAL:
+ selectedOffset = childrenLeft + (childrenWidth / 2) - (width / 2);
+ break;
+ case Gravity.RIGHT:
+ selectedOffset = childrenLeft + childrenWidth - width;
+ break;
+ }
+ sel.offsetLeftAndRight(selectedOffset);
+
+ // Flush any cached views that did not get reused above
+ mRecycler.clear();
+
+ invalidate();
+
+ checkSelectionChanged();
+
+ mDataChanged = false;
+ mNeedSync = false;
+ setNextSelectedPositionInt(mSelectedPosition);
+ }
+
+ /**
+ * Obtain a view, either by pulling an existing view from the recycler or
+ * by getting a new one from the adapter. If we are animating, make sure
+ * there is enough information in the view's layout parameters to animate
+ * from the old to new positions.
+ *
+ * @param position Position in the spinner for the view to obtain
+ * @return A view that has been added to the spinner
+ */
+ private View makeAndAddView(int position) {
+
+ View child;
+
+ if (!mDataChanged) {
+ child = mRecycler.get(position);
+ if (child != null) {
+ // Position the view
+ setUpChild(child);
+
+ return child;
+ }
+ }
+
+ // Nothing found in the recycler -- ask the adapter for a view
+ child = mAdapter.getView(position, null, this);
+
+ // Position the view
+ setUpChild(child);
+
+ return child;
+ }
+
+ /**
+ * Helper for makeAndAddView to set the position of a view
+ * and fill out its layout paramters.
+ *
+ * @param child The view to position
+ */
+ private void setUpChild(View child) {
+
+ // Respect layout params that are already in the view. Otherwise
+ // make some up...
+ ViewGroup.LayoutParams lp = child.getLayoutParams();
+ if (lp == null) {
+ lp = generateDefaultLayoutParams();
+ }
+
+ addViewInLayout(child, 0, lp);
+
+ child.setSelected(hasFocus());
+ if (mDisableChildrenWhenDisabled) {
+ child.setEnabled(isEnabled());
+ }
+
+ // Get measure specs
+ int childHeightSpec = ViewGroup.getChildMeasureSpec(mHeightMeasureSpec,
+ mSpinnerPadding.top + mSpinnerPadding.bottom, lp.height);
+ int childWidthSpec = ViewGroup.getChildMeasureSpec(mWidthMeasureSpec,
+ mSpinnerPadding.left + mSpinnerPadding.right, lp.width);
+
+ // Measure child
+ child.measure(childWidthSpec, childHeightSpec);
+
+ int childLeft;
+ int childRight;
+
+ // Position vertically based on gravity setting
+ int childTop = mSpinnerPadding.top
+ + ((getMeasuredHeight() - mSpinnerPadding.bottom -
+ mSpinnerPadding.top - child.getMeasuredHeight()) / 2);
+ int childBottom = childTop + child.getMeasuredHeight();
+
+ int width = child.getMeasuredWidth();
+ childLeft = 0;
+ childRight = childLeft + width;
+
+ child.layout(childLeft, childTop, childRight, childBottom);
+ }
+
+ @Override
+ public boolean performClick() {
+ boolean handled = super.performClick();
+
+ if (!handled) {
+ handled = true;
+
+ if (!mPopup.isShowing()) {
+ mPopup.show();
+ }
+ }
+
+ return handled;
+ }
+
+ public void onClick(DialogInterface dialog, int which) {
+ setSelection(which);
+ dialog.dismiss();
+ }
+
+ /**
+ * Sets the prompt to display when the dialog is shown.
+ * @param prompt the prompt to set
+ */
+ public void setPrompt(CharSequence prompt) {
+ mPopup.setPromptText(prompt);
+ }
+
+ /**
+ * Sets the prompt to display when the dialog is shown.
+ * @param promptId the resource ID of the prompt to display when the dialog is shown
+ */
+ public void setPromptId(int promptId) {
+ setPrompt(getContext().getText(promptId));
+ }
+
+ /**
+ * @return The prompt to display when the dialog is shown
+ */
+ public CharSequence getPrompt() {
+ return mPopup.getHintText();
+ }
+
+ int measureContentWidth(SpinnerAdapter adapter, Drawable background) {
+ if (adapter == null) {
+ return 0;
+ }
+
+ int width = 0;
+ View itemView = null;
+ int itemType = 0;
+ final int widthMeasureSpec =
+ MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final int heightMeasureSpec =
+ MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+
+ // Make sure the number of items we'll measure is capped. If it's a huge data set
+ // with wildly varying sizes, oh well.
+ int start = Math.max(0, getSelectedItemPosition());
+ final int end = Math.min(adapter.getCount(), start + MAX_ITEMS_MEASURED);
+ final int count = end - start;
+ start = Math.max(0, start - (MAX_ITEMS_MEASURED - count));
+ for (int i = start; i < end; i++) {
+ final int positionType = adapter.getItemViewType(i);
+ if (positionType != itemType) {
+ itemType = positionType;
+ itemView = null;
+ }
+ itemView = adapter.getView(i, itemView, this);
+ if (itemView.getLayoutParams() == null) {
+ itemView.setLayoutParams(new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ }
+ itemView.measure(widthMeasureSpec, heightMeasureSpec);
+ width = Math.max(width, itemView.getMeasuredWidth());
+ }
+
+ // Add background padding to measured width
+ if (background != null) {
+ background.getPadding(mTempRect);
+ width += mTempRect.left + mTempRect.right;
+ }
+
+ return width;
+ }
+
+ /**
+ * <p>Wrapper class for an Adapter. Transforms the embedded Adapter instance
+ * into a ListAdapter.</p>
+ */
+ private static class DropDownAdapter implements ListAdapter, SpinnerAdapter {
+ private SpinnerAdapter mAdapter;
+ private ListAdapter mListAdapter;
+
+ /**
+ * <p>Creates a new ListAdapter wrapper for the specified adapter.</p>
+ *
+ * @param adapter the Adapter to transform into a ListAdapter
+ */
+ public DropDownAdapter(SpinnerAdapter adapter) {
+ this.mAdapter = adapter;
+ if (adapter instanceof ListAdapter) {
+ this.mListAdapter = (ListAdapter) adapter;
+ }
+ }
+
+ public int getCount() {
+ return mAdapter == null ? 0 : mAdapter.getCount();
+ }
+
+ public Object getItem(int position) {
+ return mAdapter == null ? null : mAdapter.getItem(position);
+ }
+
+ public long getItemId(int position) {
+ return mAdapter == null ? -1 : mAdapter.getItemId(position);
+ }
+
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return getDropDownView(position, convertView, parent);
+ }
+
+ public View getDropDownView(int position, View convertView, ViewGroup parent) {
+ return mAdapter == null ? null :
+ mAdapter.getDropDownView(position, convertView, parent);
+ }
+
+ public boolean hasStableIds() {
+ return mAdapter != null && mAdapter.hasStableIds();
+ }
+
+ public void registerDataSetObserver(DataSetObserver observer) {
+ if (mAdapter != null) {
+ mAdapter.registerDataSetObserver(observer);
+ }
+ }
+
+ public void unregisterDataSetObserver(DataSetObserver observer) {
+ if (mAdapter != null) {
+ mAdapter.unregisterDataSetObserver(observer);
+ }
+ }
+
+ /**
+ * If the wrapped SpinnerAdapter is also a ListAdapter, delegate this call.
+ * Otherwise, return true.
+ */
+ public boolean areAllItemsEnabled() {
+ final ListAdapter adapter = mListAdapter;
+ if (adapter != null) {
+ return adapter.areAllItemsEnabled();
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * If the wrapped SpinnerAdapter is also a ListAdapter, delegate this call.
+ * Otherwise, return true.
+ */
+ public boolean isEnabled(int position) {
+ final ListAdapter adapter = mListAdapter;
+ if (adapter != null) {
+ return adapter.isEnabled(position);
+ } else {
+ return true;
+ }
+ }
+
+ public int getItemViewType(int position) {
+ return 0;
+ }
+
+ public int getViewTypeCount() {
+ return 1;
+ }
+
+ public boolean isEmpty() {
+ return getCount() == 0;
+ }
+ }
+
+ /**
+ * Implements some sort of popup selection interface for selecting a spinner option.
+ * Allows for different spinner modes.
+ */
+ private interface SpinnerPopup {
+ public void setAdapter(ListAdapter adapter);
+
+ /**
+ * Show the popup
+ */
+ public void show();
+
+ /**
+ * Dismiss the popup
+ */
+ public void dismiss();
+
+ /**
+ * @return true if the popup is showing, false otherwise.
+ */
+ public boolean isShowing();
+
+ /**
+ * Set hint text to be displayed to the user. This should provide
+ * a description of the choice being made.
+ * @param hintText Hint text to set.
+ */
+ public void setPromptText(CharSequence hintText);
+ public CharSequence getHintText();
+ }
+
+ /*
+ private class DialogPopup implements SpinnerPopup, DialogInterface.OnClickListener {
+ private AlertDialog mPopup;
+ private ListAdapter mListAdapter;
+ private CharSequence mPrompt;
+
+ public void dismiss() {
+ mPopup.dismiss();
+ mPopup = null;
+ }
+
+ public boolean isShowing() {
+ return mPopup != null ? mPopup.isShowing() : false;
+ }
+
+ public void setAdapter(ListAdapter adapter) {
+ mListAdapter = adapter;
+ }
+
+ public void setPromptText(CharSequence hintText) {
+ mPrompt = hintText;
+ }
+
+ public CharSequence getHintText() {
+ return mPrompt;
+ }
+
+ public void show() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
+ if (mPrompt != null) {
+ builder.setTitle(mPrompt);
+ }
+ mPopup = builder.setSingleChoiceItems(mListAdapter,
+ getSelectedItemPosition(), this).show();
+ }
+
+ public void onClick(DialogInterface dialog, int which) {
+ setSelection(which);
+ dismiss();
+ }
+ }
+ */
+
+ private class DropdownPopup extends IcsListPopupWindow implements SpinnerPopup {
+ private CharSequence mHintText;
+ private ListAdapter mAdapter;
+
+ public DropdownPopup(Context context, AttributeSet attrs, int defStyleRes) {
+ super(context, attrs, 0, defStyleRes);
+
+ setAnchorView(IcsSpinner.this);
+ setModal(true);
+ setPromptPosition(POSITION_PROMPT_ABOVE);
+ setOnItemClickListener(new OnItemClickListener() {
+ @SuppressWarnings("rawtypes")
+ public void onItemClick(AdapterView parent, View v, int position, long id) {
+ IcsSpinner.this.setSelection(position);
+ dismiss();
+ }
+ });
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ super.setAdapter(adapter);
+ mAdapter = adapter;
+ }
+
+ public CharSequence getHintText() {
+ return mHintText;
+ }
+
+ public void setPromptText(CharSequence hintText) {
+ // Hint text is ignored for dropdowns, but maintain it here.
+ mHintText = hintText;
+ }
+
+ @Override
+ public void show() {
+ final int spinnerPaddingLeft = IcsSpinner.this.getPaddingLeft();
+ if (mDropDownWidth == WRAP_CONTENT) {
+ final int spinnerWidth = IcsSpinner.this.getWidth();
+ final int spinnerPaddingRight = IcsSpinner.this.getPaddingRight();
+ setContentWidth(Math.max(
+ measureContentWidth((SpinnerAdapter) mAdapter, getBackground()),
+ spinnerWidth - spinnerPaddingLeft - spinnerPaddingRight));
+ } else if (mDropDownWidth == MATCH_PARENT) {
+ final int spinnerWidth = IcsSpinner.this.getWidth();
+ final int spinnerPaddingRight = IcsSpinner.this.getPaddingRight();
+ setContentWidth(spinnerWidth - spinnerPaddingLeft - spinnerPaddingRight);
+ } else {
+ setContentWidth(mDropDownWidth);
+ }
+ final Drawable background = getBackground();
+ int bgOffset = 0;
+ if (background != null) {
+ background.getPadding(mTempRect);
+ bgOffset = -mTempRect.left;
+ }
+ setHorizontalOffset(bgOffset + spinnerPaddingLeft);
+ setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ super.show();
+ getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+ setSelection(IcsSpinner.this.getSelectedItemPosition());
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsToast.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsToast.java
new file mode 100644
index 0000000000..042648b244
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsToast.java
@@ -0,0 +1,60 @@
+
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.Gravity;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.actionbarsherlock.R;
+
+public class IcsToast extends Toast {
+ public static final int LENGTH_LONG = Toast.LENGTH_LONG;
+ public static final int LENGTH_SHORT = Toast.LENGTH_SHORT;
+ private static final String TAG = "Toast";
+
+ public static Toast makeText(Context context, CharSequence s, int duration) {
+ if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+ return Toast.makeText(context, s, duration);
+ }
+ IcsToast toast = new IcsToast(context);
+ toast.setDuration(duration);
+ TextView view = new TextView(context);
+ view.setText(s);
+ // Original AOSP using reference on @android:color/bright_foreground_dark
+ // bright_foreground_dark - reference on @android:color/background_light
+ // background_light - 0xffffffff
+ view.setTextColor(0xffffffff);
+ view.setGravity(Gravity.CENTER);
+ view.setBackgroundResource(R.drawable.abs__toast_frame);
+ toast.setView(view);
+ return toast;
+ }
+
+ public static Toast makeText(Context context, int resId, int duration) {
+ return makeText(context, context.getResources().getString(resId), duration);
+ }
+
+ public IcsToast(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void setText(CharSequence s) {
+ if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+ super.setText(s);
+ return;
+ }
+ if (getView() == null) {
+ return;
+ }
+ try {
+ ((TextView) getView()).setText(s);
+ } catch (ClassCastException e) {
+ Log.e(TAG, "This Toast was not created with IcsToast.makeText", e);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsView.java
new file mode 100644
index 0000000000..a7185d082c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsView.java
@@ -0,0 +1,21 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.view.View;
+
+final class IcsView {
+ //No instances
+ private IcsView() {}
+
+ /**
+ * Return only the state bits of {@link #getMeasuredWidthAndState()}
+ * and {@link #getMeasuredHeightAndState()}, combined into one integer.
+ * The width component is in the regular bits {@link #MEASURED_STATE_MASK}
+ * and the height component is at the shifted bits
+ * {@link #MEASURED_HEIGHT_STATE_SHIFT}>>{@link #MEASURED_STATE_MASK}.
+ */
+ public static int getMeasuredStateInt(View child) {
+ return (child.getMeasuredWidth()&View.MEASURED_STATE_MASK)
+ | ((child.getMeasuredHeight()>>View.MEASURED_HEIGHT_STATE_SHIFT)
+ & (View.MEASURED_STATE_MASK>>View.MEASURED_HEIGHT_STATE_SHIFT));
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ScrollingTabContainerView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ScrollingTabContainerView.java
new file mode 100644
index 0000000000..eb178e0de7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/ScrollingTabContainerView.java
@@ -0,0 +1,546 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.text.TextUtils.TruncateAt;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.Interpolator;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.nineoldandroids.animation.Animator;
+import com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator;
+import com.actionbarsherlock.internal.nineoldandroids.widget.NineHorizontalScrollView;
+
+/**
+ * This widget implements the dynamic action bar tab behavior that can change
+ * across different configurations or circumstances.
+ */
+public class ScrollingTabContainerView extends NineHorizontalScrollView
+ implements IcsAdapterView.OnItemSelectedListener {
+ //UNUSED private static final String TAG = "ScrollingTabContainerView";
+ Runnable mTabSelector;
+ private TabClickListener mTabClickListener;
+
+ private IcsLinearLayout mTabLayout;
+ private IcsSpinner mTabSpinner;
+ private boolean mAllowCollapse;
+
+ private LayoutInflater mInflater;
+
+ int mMaxTabWidth;
+ private int mContentHeight;
+ private int mSelectedTabIndex;
+
+ protected Animator mVisibilityAnim;
+ protected final VisibilityAnimListener mVisAnimListener = new VisibilityAnimListener();
+
+ private static final /*Time*/Interpolator sAlphaInterpolator = new DecelerateInterpolator();
+
+ private static final int FADE_DURATION = 200;
+
+ public ScrollingTabContainerView(Context context) {
+ super(context);
+ setHorizontalScrollBarEnabled(false);
+
+ TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.SherlockActionBar,
+ R.attr.actionBarStyle, 0);
+ setContentHeight(a.getLayoutDimension(R.styleable.SherlockActionBar_height, 0));
+ a.recycle();
+
+ mInflater = LayoutInflater.from(context);
+
+ mTabLayout = createTabLayout();
+ addView(mTabLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ }
+
+ @Override
+ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final boolean lockedExpanded = widthMode == MeasureSpec.EXACTLY;
+ setFillViewport(lockedExpanded);
+
+ final int childCount = mTabLayout.getChildCount();
+ if (childCount > 1 &&
+ (widthMode == MeasureSpec.EXACTLY || widthMode == MeasureSpec.AT_MOST)) {
+ if (childCount > 2) {
+ mMaxTabWidth = (int) (MeasureSpec.getSize(widthMeasureSpec) * 0.4f);
+ } else {
+ mMaxTabWidth = MeasureSpec.getSize(widthMeasureSpec) / 2;
+ }
+ } else {
+ mMaxTabWidth = -1;
+ }
+
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY);
+
+ final boolean canCollapse = !lockedExpanded && mAllowCollapse;
+
+ if (canCollapse) {
+ // See if we should expand
+ mTabLayout.measure(MeasureSpec.UNSPECIFIED, heightMeasureSpec);
+ if (mTabLayout.getMeasuredWidth() > MeasureSpec.getSize(widthMeasureSpec)) {
+ performCollapse();
+ } else {
+ performExpand();
+ }
+ } else {
+ performExpand();
+ }
+
+ final int oldWidth = getMeasuredWidth();
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ final int newWidth = getMeasuredWidth();
+
+ if (lockedExpanded && oldWidth != newWidth) {
+ // Recenter the tab display if we're at a new (scrollable) size.
+ setTabSelected(mSelectedTabIndex);
+ }
+ }
+
+ /**
+ * Indicates whether this view is collapsed into a dropdown menu instead
+ * of traditional tabs.
+ * @return true if showing as a spinner
+ */
+ private boolean isCollapsed() {
+ return mTabSpinner != null && mTabSpinner.getParent() == this;
+ }
+
+ public void setAllowCollapse(boolean allowCollapse) {
+ mAllowCollapse = allowCollapse;
+ }
+
+ private void performCollapse() {
+ if (isCollapsed()) return;
+
+ if (mTabSpinner == null) {
+ mTabSpinner = createSpinner();
+ }
+ removeView(mTabLayout);
+ addView(mTabSpinner, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ if (mTabSpinner.getAdapter() == null) {
+ mTabSpinner.setAdapter(new TabAdapter());
+ }
+ if (mTabSelector != null) {
+ removeCallbacks(mTabSelector);
+ mTabSelector = null;
+ }
+ mTabSpinner.setSelection(mSelectedTabIndex);
+ }
+
+ private boolean performExpand() {
+ if (!isCollapsed()) return false;
+
+ removeView(mTabSpinner);
+ addView(mTabLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ setTabSelected(mTabSpinner.getSelectedItemPosition());
+ return false;
+ }
+
+ public void setTabSelected(int position) {
+ mSelectedTabIndex = position;
+ final int tabCount = mTabLayout.getChildCount();
+ for (int i = 0; i < tabCount; i++) {
+ final View child = mTabLayout.getChildAt(i);
+ final boolean isSelected = i == position;
+ child.setSelected(isSelected);
+ if (isSelected) {
+ animateToTab(position);
+ }
+ }
+ }
+
+ public void setContentHeight(int contentHeight) {
+ mContentHeight = contentHeight;
+ requestLayout();
+ }
+
+ private IcsLinearLayout createTabLayout() {
+ final TabsLinearLayout tabLayout = (TabsLinearLayout) LayoutInflater.from(getContext())
+ .inflate(R.layout.abs__action_bar_tab_bar_view, null);
+ tabLayout.setMeasureWithLargestChildEnabled(true);
+ tabLayout.setLayoutParams(new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT));
+ return tabLayout;
+ }
+
+ private IcsSpinner createSpinner() {
+ final IcsSpinner spinner = new IcsSpinner(getContext(), null,
+ R.attr.actionDropDownStyle);
+ spinner.setLayoutParams(new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT));
+ spinner.setOnItemSelectedListener(this);
+ return spinner;
+ }
+
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ // Action bar can change size on configuration changes.
+ // Reread the desired height from the theme-specified style.
+ TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.SherlockActionBar,
+ R.attr.actionBarStyle, 0);
+ setContentHeight(a.getLayoutDimension(R.styleable.SherlockActionBar_height, 0));
+ a.recycle();
+ }
+
+ public void animateToVisibility(int visibility) {
+ if (mVisibilityAnim != null) {
+ mVisibilityAnim.cancel();
+ }
+ if (visibility == VISIBLE) {
+ if (getVisibility() != VISIBLE) {
+ setAlpha(0);
+ }
+ ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
+ anim.setDuration(FADE_DURATION);
+ anim.setInterpolator(sAlphaInterpolator);
+
+ anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ anim.start();
+ } else {
+ ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
+ anim.setDuration(FADE_DURATION);
+ anim.setInterpolator(sAlphaInterpolator);
+
+ anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
+ anim.start();
+ }
+ }
+
+ public void animateToTab(final int position) {
+ final View tabView = mTabLayout.getChildAt(position);
+ if (mTabSelector != null) {
+ removeCallbacks(mTabSelector);
+ }
+ mTabSelector = new Runnable() {
+ public void run() {
+ final int scrollPos = tabView.getLeft() - (getWidth() - tabView.getWidth()) / 2;
+ smoothScrollTo(scrollPos, 0);
+ mTabSelector = null;
+ }
+ };
+ post(mTabSelector);
+ }
+
+ @Override
+ public void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ if (mTabSelector != null) {
+ // Re-post the selector we saved
+ post(mTabSelector);
+ }
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ if (mTabSelector != null) {
+ removeCallbacks(mTabSelector);
+ }
+ }
+
+ private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) {
+ //Workaround for not being able to pass a defStyle on pre-3.0
+ final TabView tabView = (TabView)mInflater.inflate(R.layout.abs__action_bar_tab, null);
+ tabView.init(this, tab, forAdapter);
+
+ if (forAdapter) {
+ tabView.setBackgroundDrawable(null);
+ tabView.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT,
+ mContentHeight));
+ } else {
+ tabView.setFocusable(true);
+
+ if (mTabClickListener == null) {
+ mTabClickListener = new TabClickListener();
+ }
+ tabView.setOnClickListener(mTabClickListener);
+ }
+ return tabView;
+ }
+
+ public void addTab(ActionBar.Tab tab, boolean setSelected) {
+ TabView tabView = createTabView(tab, false);
+ mTabLayout.addView(tabView, new IcsLinearLayout.LayoutParams(0,
+ LayoutParams.MATCH_PARENT, 1));
+ if (mTabSpinner != null) {
+ ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();
+ }
+ if (setSelected) {
+ tabView.setSelected(true);
+ }
+ if (mAllowCollapse) {
+ requestLayout();
+ }
+ }
+
+ public void addTab(ActionBar.Tab tab, int position, boolean setSelected) {
+ final TabView tabView = createTabView(tab, false);
+ mTabLayout.addView(tabView, position, new IcsLinearLayout.LayoutParams(
+ 0, LayoutParams.MATCH_PARENT, 1));
+ if (mTabSpinner != null) {
+ ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();
+ }
+ if (setSelected) {
+ tabView.setSelected(true);
+ }
+ if (mAllowCollapse) {
+ requestLayout();
+ }
+ }
+
+ public void updateTab(int position) {
+ ((TabView) mTabLayout.getChildAt(position)).update();
+ if (mTabSpinner != null) {
+ ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();
+ }
+ if (mAllowCollapse) {
+ requestLayout();
+ }
+ }
+
+ public void removeTabAt(int position) {
+ mTabLayout.removeViewAt(position);
+ if (mTabSpinner != null) {
+ ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();
+ }
+ if (mAllowCollapse) {
+ requestLayout();
+ }
+ }
+
+ public void removeAllTabs() {
+ mTabLayout.removeAllViews();
+ if (mTabSpinner != null) {
+ ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();
+ }
+ if (mAllowCollapse) {
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void onItemSelected(IcsAdapterView<?> parent, View view, int position, long id) {
+ TabView tabView = (TabView) view;
+ tabView.getTab().select();
+ }
+
+ @Override
+ public void onNothingSelected(IcsAdapterView<?> parent) {
+ }
+
+ public static class TabView extends LinearLayout {
+ private ScrollingTabContainerView mParent;
+ private ActionBar.Tab mTab;
+ private CapitalizingTextView mTextView;
+ private ImageView mIconView;
+ private View mCustomView;
+
+ public TabView(Context context, AttributeSet attrs) {
+ //TODO super(context, null, R.attr.actionBarTabStyle);
+ super(context, attrs);
+ }
+
+ public void init(ScrollingTabContainerView parent, ActionBar.Tab tab, boolean forList) {
+ mParent = parent;
+ mTab = tab;
+
+ if (forList) {
+ setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
+ }
+
+ update();
+ }
+
+ public void bindTab(ActionBar.Tab tab) {
+ mTab = tab;
+ update();
+ }
+
+ @Override
+ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+ // Re-measure if we went beyond our maximum size.
+ if (mParent.mMaxTabWidth > 0 && getMeasuredWidth() > mParent.mMaxTabWidth) {
+ super.onMeasure(MeasureSpec.makeMeasureSpec(mParent.mMaxTabWidth, MeasureSpec.EXACTLY),
+ heightMeasureSpec);
+ }
+ }
+
+ public void update() {
+ final ActionBar.Tab tab = mTab;
+ final View custom = tab.getCustomView();
+ if (custom != null) {
+ final ViewParent customParent = custom.getParent();
+ if (customParent != this) {
+ if (customParent != null) ((ViewGroup) customParent).removeView(custom);
+ addView(custom);
+ }
+ mCustomView = custom;
+ if (mTextView != null) mTextView.setVisibility(GONE);
+ if (mIconView != null) {
+ mIconView.setVisibility(GONE);
+ mIconView.setImageDrawable(null);
+ }
+ } else {
+ if (mCustomView != null) {
+ removeView(mCustomView);
+ mCustomView = null;
+ }
+
+ final Drawable icon = tab.getIcon();
+ final CharSequence text = tab.getText();
+
+ if (icon != null) {
+ if (mIconView == null) {
+ ImageView iconView = new ImageView(getContext());
+ LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT);
+ lp.gravity = Gravity.CENTER_VERTICAL;
+ iconView.setLayoutParams(lp);
+ addView(iconView, 0);
+ mIconView = iconView;
+ }
+ mIconView.setImageDrawable(icon);
+ mIconView.setVisibility(VISIBLE);
+ } else if (mIconView != null) {
+ mIconView.setVisibility(GONE);
+ mIconView.setImageDrawable(null);
+ }
+
+ if (text != null) {
+ if (mTextView == null) {
+ CapitalizingTextView textView = new CapitalizingTextView(getContext(), null,
+ R.attr.actionBarTabTextStyle);
+ textView.setEllipsize(TruncateAt.END);
+ LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT);
+ lp.gravity = Gravity.CENTER_VERTICAL;
+ textView.setLayoutParams(lp);
+ addView(textView);
+ mTextView = textView;
+ }
+ mTextView.setTextCompat(text);
+ mTextView.setVisibility(VISIBLE);
+ } else if (mTextView != null) {
+ mTextView.setVisibility(GONE);
+ mTextView.setText(null);
+ }
+
+ if (mIconView != null) {
+ mIconView.setContentDescription(tab.getContentDescription());
+ }
+ }
+ }
+
+ public ActionBar.Tab getTab() {
+ return mTab;
+ }
+ }
+
+ private class TabAdapter extends BaseAdapter {
+ @Override
+ public int getCount() {
+ return mTabLayout.getChildCount();
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return ((TabView) mTabLayout.getChildAt(position)).getTab();
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ if (convertView == null) {
+ convertView = createTabView((ActionBar.Tab) getItem(position), true);
+ } else {
+ ((TabView) convertView).bindTab((ActionBar.Tab) getItem(position));
+ }
+ return convertView;
+ }
+ }
+
+ private class TabClickListener implements OnClickListener {
+ public void onClick(View view) {
+ TabView tabView = (TabView) view;
+ tabView.getTab().select();
+ final int tabCount = mTabLayout.getChildCount();
+ for (int i = 0; i < tabCount; i++) {
+ final View child = mTabLayout.getChildAt(i);
+ child.setSelected(child == view);
+ }
+ }
+ }
+
+ protected class VisibilityAnimListener implements Animator.AnimatorListener {
+ private boolean mCanceled = false;
+ private int mFinalVisibility;
+
+ public VisibilityAnimListener withFinalVisibility(int visibility) {
+ mFinalVisibility = visibility;
+ return this;
+ }
+
+ @Override
+ public void onAnimationStart(Animator animation) {
+ setVisibility(VISIBLE);
+ mVisibilityAnim = animation;
+ mCanceled = false;
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mCanceled) return;
+
+ mVisibilityAnim = null;
+ setVisibility(mFinalVisibility);
+ }
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ mCanceled = true;
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/TabsLinearLayout.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/TabsLinearLayout.java
new file mode 100644
index 0000000000..03d09b1f67
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/internal/widget/TabsLinearLayout.java
@@ -0,0 +1,113 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.LinearLayout;
+
+public class TabsLinearLayout extends IcsLinearLayout {
+ private static final int[] R_styleable_LinearLayout = new int[] {
+ /* 0 */ android.R.attr.measureWithLargestChild,
+ };
+ private static final int LinearLayout_measureWithLargestChild = 0;
+
+ private boolean mUseLargestChild;
+
+ public TabsLinearLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, /*com.android.internal.R.styleable.*/R_styleable_LinearLayout);
+ mUseLargestChild = a.getBoolean(/*com.android.internal.R.styleable.*/LinearLayout_measureWithLargestChild, false);
+
+ a.recycle();
+ }
+
+ /**
+ * When true, all children with a weight will be considered having
+ * the minimum size of the largest child. If false, all children are
+ * measured normally.
+ *
+ * @return True to measure children with a weight using the minimum
+ * size of the largest child, false otherwise.
+ *
+ * @attr ref android.R.styleable#LinearLayout_measureWithLargestChild
+ */
+ public boolean isMeasureWithLargestChildEnabled() {
+ return mUseLargestChild;
+ }
+
+ /**
+ * When set to true, all children with a weight will be considered having
+ * the minimum size of the largest child. If false, all children are
+ * measured normally.
+ *
+ * Disabled by default.
+ *
+ * @param enabled True to measure children with a weight using the
+ * minimum size of the largest child, false otherwise.
+ *
+ * @attr ref android.R.styleable#LinearLayout_measureWithLargestChild
+ */
+ public void setMeasureWithLargestChildEnabled(boolean enabled) {
+ mUseLargestChild = enabled;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+ final int childCount = getChildCount();
+ if (childCount <= 2) return;
+
+ final int mode = MeasureSpec.getMode(widthMeasureSpec);
+ if (mUseLargestChild && mode == MeasureSpec.UNSPECIFIED) {
+ final int orientation = getOrientation();
+ if (orientation == HORIZONTAL) {
+ useLargestChildHorizontal();
+ }
+ }
+ }
+
+ private void useLargestChildHorizontal() {
+ final int childCount = getChildCount();
+
+ // Find largest child width
+ int largestChildWidth = 0;
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ largestChildWidth = Math.max(child.getMeasuredWidth(), largestChildWidth);
+ }
+
+ int totalWidth = 0;
+ // Re-measure childs
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+
+ if (child == null || child.getVisibility() == View.GONE) {
+ continue;
+ }
+
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+
+ float childExtra = lp.weight;
+ if (childExtra > 0) {
+ child.measure(
+ MeasureSpec.makeMeasureSpec(largestChildWidth,
+ MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(child.getMeasuredHeight(),
+ MeasureSpec.EXACTLY));
+ totalWidth += largestChildWidth;
+
+ } else {
+ totalWidth += child.getMeasuredWidth();
+ }
+
+ totalWidth += lp.leftMargin + lp.rightMargin;
+ }
+
+ totalWidth += getPaddingLeft() + getPaddingRight();
+ setMeasuredDimension(totalWidth, getMeasuredHeight());
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionMode.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionMode.java
new file mode 100644
index 0000000000..7551dbf6c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionMode.java
@@ -0,0 +1,224 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.view.View;
+
+
+/**
+ * Represents a contextual mode of the user interface. Action modes can be used for
+ * modal interactions with content and replace parts of the normal UI until finished.
+ * Examples of good action modes include selection modes, search, content editing, etc.
+ */
+public abstract class ActionMode {
+ private Object mTag;
+
+ /**
+ * Set a tag object associated with this ActionMode.
+ *
+ * <p>Like the tag available to views, this allows applications to associate arbitrary
+ * data with an ActionMode for later reference.
+ *
+ * @param tag Tag to associate with this ActionMode
+ *
+ * @see #getTag()
+ */
+ public void setTag(Object tag) {
+ mTag = tag;
+ }
+
+ /**
+ * Retrieve the tag object associated with this ActionMode.
+ *
+ * <p>Like the tag available to views, this allows applications to associate arbitrary
+ * data with an ActionMode for later reference.
+ *
+ * @return Tag associated with this ActionMode
+ *
+ * @see #setTag(Object)
+ */
+ public Object getTag() {
+ return mTag;
+ }
+
+ /**
+ * Set the title of the action mode. This method will have no visible effect if
+ * a custom view has been set.
+ *
+ * @param title Title string to set
+ *
+ * @see #setTitle(int)
+ * @see #setCustomView(View)
+ */
+ public abstract void setTitle(CharSequence title);
+
+ /**
+ * Set the title of the action mode. This method will have no visible effect if
+ * a custom view has been set.
+ *
+ * @param resId Resource ID of a string to set as the title
+ *
+ * @see #setTitle(CharSequence)
+ * @see #setCustomView(View)
+ */
+ public abstract void setTitle(int resId);
+
+ /**
+ * Set the subtitle of the action mode. This method will have no visible effect if
+ * a custom view has been set.
+ *
+ * @param subtitle Subtitle string to set
+ *
+ * @see #setSubtitle(int)
+ * @see #setCustomView(View)
+ */
+ public abstract void setSubtitle(CharSequence subtitle);
+
+ /**
+ * Set the subtitle of the action mode. This method will have no visible effect if
+ * a custom view has been set.
+ *
+ * @param resId Resource ID of a string to set as the subtitle
+ *
+ * @see #setSubtitle(CharSequence)
+ * @see #setCustomView(View)
+ */
+ public abstract void setSubtitle(int resId);
+
+ /**
+ * Set a custom view for this action mode. The custom view will take the place of
+ * the title and subtitle. Useful for things like search boxes.
+ *
+ * @param view Custom view to use in place of the title/subtitle.
+ *
+ * @see #setTitle(CharSequence)
+ * @see #setSubtitle(CharSequence)
+ */
+ public abstract void setCustomView(View view);
+
+ /**
+ * Invalidate the action mode and refresh menu content. The mode's
+ * {@link ActionMode.Callback} will have its
+ * {@link Callback#onPrepareActionMode(ActionMode, Menu)} method called.
+ * If it returns true the menu will be scanned for updated content and any relevant changes
+ * will be reflected to the user.
+ */
+ public abstract void invalidate();
+
+ /**
+ * Finish and close this action mode. The action mode's {@link ActionMode.Callback} will
+ * have its {@link Callback#onDestroyActionMode(ActionMode)} method called.
+ */
+ public abstract void finish();
+
+ /**
+ * Returns the menu of actions that this action mode presents.
+ * @return The action mode's menu.
+ */
+ public abstract Menu getMenu();
+
+ /**
+ * Returns the current title of this action mode.
+ * @return Title text
+ */
+ public abstract CharSequence getTitle();
+
+ /**
+ * Returns the current subtitle of this action mode.
+ * @return Subtitle text
+ */
+ public abstract CharSequence getSubtitle();
+
+ /**
+ * Returns the current custom view for this action mode.
+ * @return The current custom view
+ */
+ public abstract View getCustomView();
+
+ /**
+ * Returns a {@link MenuInflater} with the ActionMode's context.
+ */
+ public abstract MenuInflater getMenuInflater();
+
+ /**
+ * Returns whether the UI presenting this action mode can take focus or not.
+ * This is used by internal components within the framework that would otherwise
+ * present an action mode UI that requires focus, such as an EditText as a custom view.
+ *
+ * @return true if the UI used to show this action mode can take focus
+ * @hide Internal use only
+ */
+ public boolean isUiFocusable() {
+ return true;
+ }
+
+ /**
+ * Callback interface for action modes. Supplied to
+ * {@link View#startActionMode(Callback)}, a Callback
+ * configures and handles events raised by a user's interaction with an action mode.
+ *
+ * <p>An action mode's lifecycle is as follows:
+ * <ul>
+ * <li>{@link Callback#onCreateActionMode(ActionMode, Menu)} once on initial
+ * creation</li>
+ * <li>{@link Callback#onPrepareActionMode(ActionMode, Menu)} after creation
+ * and any time the {@link ActionMode} is invalidated</li>
+ * <li>{@link Callback#onActionItemClicked(ActionMode, MenuItem)} any time a
+ * contextual action button is clicked</li>
+ * <li>{@link Callback#onDestroyActionMode(ActionMode)} when the action mode
+ * is closed</li>
+ * </ul>
+ */
+ public interface Callback {
+ /**
+ * Called when action mode is first created. The menu supplied will be used to
+ * generate action buttons for the action mode.
+ *
+ * @param mode ActionMode being created
+ * @param menu Menu used to populate action buttons
+ * @return true if the action mode should be created, false if entering this
+ * mode should be aborted.
+ */
+ public boolean onCreateActionMode(ActionMode mode, Menu menu);
+
+ /**
+ * Called to refresh an action mode's action menu whenever it is invalidated.
+ *
+ * @param mode ActionMode being prepared
+ * @param menu Menu used to populate action buttons
+ * @return true if the menu or action mode was updated, false otherwise.
+ */
+ public boolean onPrepareActionMode(ActionMode mode, Menu menu);
+
+ /**
+ * Called to report a user click on an action button.
+ *
+ * @param mode The current ActionMode
+ * @param item The item that was clicked
+ * @return true if this callback handled the event, false if the standard MenuItem
+ * invocation should continue.
+ */
+ public boolean onActionItemClicked(ActionMode mode, MenuItem item);
+
+ /**
+ * Called when an action mode is about to be exited and destroyed.
+ *
+ * @param mode The current ActionMode being destroyed
+ */
+ public void onDestroyActionMode(ActionMode mode);
+ }
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionProvider.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionProvider.java
new file mode 100644
index 0000000000..ae7cb1fe03
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/ActionProvider.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.content.Context;
+import android.view.View;
+
+/**
+ * This class is a mediator for accomplishing a given task, for example sharing a file.
+ * It is responsible for creating a view that performs an action that accomplishes the task.
+ * This class also implements other functions such a performing a default action.
+ * <p>
+ * An ActionProvider can be optionally specified for a {@link MenuItem} and in such a
+ * case it will be responsible for creating the action view that appears in the
+ * {@link android.app.ActionBar} as a substitute for the menu item when the item is
+ * displayed as an action item. Also the provider is responsible for performing a
+ * default action if a menu item placed on the overflow menu of the ActionBar is
+ * selected and none of the menu item callbacks has handled the selection. For this
+ * case the provider can also optionally provide a sub-menu for accomplishing the
+ * task at hand.
+ * </p>
+ * <p>
+ * There are two ways for using an action provider for creating and handling of action views:
+ * <ul>
+ * <li>
+ * Setting the action provider on a {@link MenuItem} directly by calling
+ * {@link MenuItem#setActionProvider(ActionProvider)}.
+ * </li>
+ * <li>
+ * Declaring the action provider in the menu XML resource. For example:
+ * <pre>
+ * <code>
+ * &lt;item android:id="@+id/my_menu_item"
+ * android:title="Title"
+ * android:icon="@drawable/my_menu_item_icon"
+ * android:showAsAction="ifRoom"
+ * android:actionProviderClass="foo.bar.SomeActionProvider" /&gt;
+ * </code>
+ * </pre>
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @see MenuItem#setActionProvider(ActionProvider)
+ * @see MenuItem#getActionProvider()
+ */
+public abstract class ActionProvider {
+ private SubUiVisibilityListener mSubUiVisibilityListener;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param context Context for accessing resources.
+ */
+ public ActionProvider(Context context) {
+ }
+
+ /**
+ * Factory method for creating new action views.
+ *
+ * @return A new action view.
+ */
+ public abstract View onCreateActionView();
+
+ /**
+ * Performs an optional default action.
+ * <p>
+ * For the case of an action provider placed in a menu item not shown as an action this
+ * method is invoked if previous callbacks for processing menu selection has handled
+ * the event.
+ * </p>
+ * <p>
+ * A menu item selection is processed in the following order:
+ * <ul>
+ * <li>
+ * Receiving a call to {@link MenuItem.OnMenuItemClickListener#onMenuItemClick
+ * MenuItem.OnMenuItemClickListener.onMenuItemClick}.
+ * </li>
+ * <li>
+ * Receiving a call to {@link android.app.Activity#onOptionsItemSelected(MenuItem)
+ * Activity.onOptionsItemSelected(MenuItem)}
+ * </li>
+ * <li>
+ * Receiving a call to {@link android.app.Fragment#onOptionsItemSelected(MenuItem)
+ * Fragment.onOptionsItemSelected(MenuItem)}
+ * </li>
+ * <li>
+ * Launching the {@link android.content.Intent} set via
+ * {@link MenuItem#setIntent(android.content.Intent) MenuItem.setIntent(android.content.Intent)}
+ * </li>
+ * <li>
+ * Invoking this method.
+ * </li>
+ * </ul>
+ * </p>
+ * <p>
+ * The default implementation does not perform any action and returns false.
+ * </p>
+ */
+ public boolean onPerformDefaultAction() {
+ return false;
+ }
+
+ /**
+ * Determines if this ActionProvider has a submenu associated with it.
+ *
+ * <p>Associated submenus will be shown when an action view is not. This
+ * provider instance will receive a call to {@link #onPrepareSubMenu(SubMenu)}
+ * after the call to {@link #onPerformDefaultAction()} and before a submenu is
+ * displayed to the user.
+ *
+ * @return true if the item backed by this provider should have an associated submenu
+ */
+ public boolean hasSubMenu() {
+ return false;
+ }
+
+ /**
+ * Called to prepare an associated submenu for the menu item backed by this ActionProvider.
+ *
+ * <p>if {@link #hasSubMenu()} returns true, this method will be called when the
+ * menu item is selected to prepare the submenu for presentation to the user. Apps
+ * may use this to create or alter submenu content right before display.
+ *
+ * @param subMenu Submenu that will be displayed
+ */
+ public void onPrepareSubMenu(SubMenu subMenu) {
+ }
+
+ /**
+ * Notify the system that the visibility of an action view's sub-UI such as
+ * an anchored popup has changed. This will affect how other system
+ * visibility notifications occur.
+ *
+ * @hide Pending future API approval
+ */
+ public void subUiVisibilityChanged(boolean isVisible) {
+ if (mSubUiVisibilityListener != null) {
+ mSubUiVisibilityListener.onSubUiVisibilityChanged(isVisible);
+ }
+ }
+
+ /**
+ * @hide Internal use only
+ */
+ public void setSubUiVisibilityListener(SubUiVisibilityListener listener) {
+ mSubUiVisibilityListener = listener;
+ }
+
+ /**
+ * @hide Internal use only
+ */
+ public interface SubUiVisibilityListener {
+ public void onSubUiVisibilityChanged(boolean isVisible);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/CollapsibleActionView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/CollapsibleActionView.java
new file mode 100644
index 0000000000..43281b013c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/CollapsibleActionView.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.view;
+
+/**
+ * When a {@link View} implements this interface it will receive callbacks
+ * when expanded or collapsed as an action view alongside the optional,
+ * app-specified callbacks to {@link OnActionExpandListener}.
+ *
+ * <p>See {@link MenuItem} for more information about action views.
+ * See {@link android.app.ActionBar} for more information about the action bar.
+ */
+public interface CollapsibleActionView {
+ /**
+ * Called when this view is expanded as an action view.
+ * See {@link MenuItem#expandActionView()}.
+ */
+ public void onActionViewExpanded();
+
+ /**
+ * Called when this view is collapsed as an action view.
+ * See {@link MenuItem#collapseActionView()}.
+ */
+ public void onActionViewCollapsed();
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Menu.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Menu.java
new file mode 100644
index 0000000000..f461cc8145
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Menu.java
@@ -0,0 +1,446 @@
+/*
+ * Copyright (C) 2006 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.view.KeyEvent;
+
+/**
+ * Interface for managing the items in a menu.
+ * <p>
+ * By default, every Activity supports an options menu of actions or options.
+ * You can add items to this menu and handle clicks on your additions. The
+ * easiest way of adding menu items is inflating an XML file into the
+ * {@link Menu} via {@link MenuInflater}. The easiest way of attaching code to
+ * clicks is via {@link Activity#onOptionsItemSelected(MenuItem)} and
+ * {@link Activity#onContextItemSelected(MenuItem)}.
+ * <p>
+ * Different menu types support different features:
+ * <ol>
+ * <li><b>Context menus</b>: Do not support item shortcuts and item icons.
+ * <li><b>Options menus</b>: The <b>icon menus</b> do not support item check
+ * marks and only show the item's
+ * {@link MenuItem#setTitleCondensed(CharSequence) condensed title}. The
+ * <b>expanded menus</b> (only available if six or more menu items are visible,
+ * reached via the 'More' item in the icon menu) do not show item icons, and
+ * item check marks are discouraged.
+ * <li><b>Sub menus</b>: Do not support item icons, or nested sub menus.
+ * </ol>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
+ */
+public interface Menu {
+
+ /**
+ * This is the part of an order integer that the user can provide.
+ * @hide
+ */
+ static final int USER_MASK = 0x0000ffff;
+ /**
+ * Bit shift of the user portion of the order integer.
+ * @hide
+ */
+ static final int USER_SHIFT = 0;
+
+ /**
+ * This is the part of an order integer that supplies the category of the
+ * item.
+ * @hide
+ */
+ static final int CATEGORY_MASK = 0xffff0000;
+ /**
+ * Bit shift of the category portion of the order integer.
+ * @hide
+ */
+ static final int CATEGORY_SHIFT = 16;
+
+ /**
+ * Value to use for group and item identifier integers when you don't care
+ * about them.
+ */
+ static final int NONE = 0;
+
+ /**
+ * First value for group and item identifier integers.
+ */
+ static final int FIRST = 1;
+
+ // Implementation note: Keep these CATEGORY_* in sync with the category enum
+ // in attrs.xml
+
+ /**
+ * Category code for the order integer for items/groups that are part of a
+ * container -- or/add this with your base value.
+ */
+ static final int CATEGORY_CONTAINER = 0x00010000;
+
+ /**
+ * Category code for the order integer for items/groups that are provided by
+ * the system -- or/add this with your base value.
+ */
+ static final int CATEGORY_SYSTEM = 0x00020000;
+
+ /**
+ * Category code for the order integer for items/groups that are
+ * user-supplied secondary (infrequently used) options -- or/add this with
+ * your base value.
+ */
+ static final int CATEGORY_SECONDARY = 0x00030000;
+
+ /**
+ * Category code for the order integer for items/groups that are
+ * alternative actions on the data that is currently displayed -- or/add
+ * this with your base value.
+ */
+ static final int CATEGORY_ALTERNATIVE = 0x00040000;
+
+ /**
+ * Flag for {@link #addIntentOptions}: if set, do not automatically remove
+ * any existing menu items in the same group.
+ */
+ static final int FLAG_APPEND_TO_GROUP = 0x0001;
+
+ /**
+ * Flag for {@link #performShortcut}: if set, do not close the menu after
+ * executing the shortcut.
+ */
+ static final int FLAG_PERFORM_NO_CLOSE = 0x0001;
+
+ /**
+ * Flag for {@link #performShortcut(int, KeyEvent, int)}: if set, always
+ * close the menu after executing the shortcut. Closing the menu also resets
+ * the prepared state.
+ */
+ static final int FLAG_ALWAYS_PERFORM_CLOSE = 0x0002;
+
+ /**
+ * Add a new item to the menu. This item displays the given title for its
+ * label.
+ *
+ * @param title The text to display for the item.
+ * @return The newly added menu item.
+ */
+ public MenuItem add(CharSequence title);
+
+ /**
+ * Add a new item to the menu. This item displays the given title for its
+ * label.
+ *
+ * @param titleRes Resource identifier of title string.
+ * @return The newly added menu item.
+ */
+ public MenuItem add(int titleRes);
+
+ /**
+ * Add a new item to the menu. This item displays the given title for its
+ * label.
+ *
+ * @param groupId The group identifier that this item should be part of.
+ * This can be used to define groups of items for batch state
+ * changes. Normally use {@link #NONE} if an item should not be in a
+ * group.
+ * @param itemId Unique item ID. Use {@link #NONE} if you do not need a
+ * unique ID.
+ * @param order The order for the item. Use {@link #NONE} if you do not care
+ * about the order. See {@link MenuItem#getOrder()}.
+ * @param title The text to display for the item.
+ * @return The newly added menu item.
+ */
+ public MenuItem add(int groupId, int itemId, int order, CharSequence title);
+
+ /**
+ * Variation on {@link #add(int, int, int, CharSequence)} that takes a
+ * string resource identifier instead of the string itself.
+ *
+ * @param groupId The group identifier that this item should be part of.
+ * This can also be used to define groups of items for batch state
+ * changes. Normally use {@link #NONE} if an item should not be in a
+ * group.
+ * @param itemId Unique item ID. Use {@link #NONE} if you do not need a
+ * unique ID.
+ * @param order The order for the item. Use {@link #NONE} if you do not care
+ * about the order. See {@link MenuItem#getOrder()}.
+ * @param titleRes Resource identifier of title string.
+ * @return The newly added menu item.
+ */
+ public MenuItem add(int groupId, int itemId, int order, int titleRes);
+
+ /**
+ * Add a new sub-menu to the menu. This item displays the given title for
+ * its label. To modify other attributes on the submenu's menu item, use
+ * {@link SubMenu#getItem()}.
+ *
+ * @param title The text to display for the item.
+ * @return The newly added sub-menu
+ */
+ SubMenu addSubMenu(final CharSequence title);
+
+ /**
+ * Add a new sub-menu to the menu. This item displays the given title for
+ * its label. To modify other attributes on the submenu's menu item, use
+ * {@link SubMenu#getItem()}.
+ *
+ * @param titleRes Resource identifier of title string.
+ * @return The newly added sub-menu
+ */
+ SubMenu addSubMenu(final int titleRes);
+
+ /**
+ * Add a new sub-menu to the menu. This item displays the given
+ * <var>title</var> for its label. To modify other attributes on the
+ * submenu's menu item, use {@link SubMenu#getItem()}.
+ *<p>
+ * Note that you can only have one level of sub-menus, i.e. you cannnot add
+ * a subMenu to a subMenu: An {@link UnsupportedOperationException} will be
+ * thrown if you try.
+ *
+ * @param groupId The group identifier that this item should be part of.
+ * This can also be used to define groups of items for batch state
+ * changes. Normally use {@link #NONE} if an item should not be in a
+ * group.
+ * @param itemId Unique item ID. Use {@link #NONE} if you do not need a
+ * unique ID.
+ * @param order The order for the item. Use {@link #NONE} if you do not care
+ * about the order. See {@link MenuItem#getOrder()}.
+ * @param title The text to display for the item.
+ * @return The newly added sub-menu
+ */
+ SubMenu addSubMenu(final int groupId, final int itemId, int order, final CharSequence title);
+
+ /**
+ * Variation on {@link #addSubMenu(int, int, int, CharSequence)} that takes
+ * a string resource identifier for the title instead of the string itself.
+ *
+ * @param groupId The group identifier that this item should be part of.
+ * This can also be used to define groups of items for batch state
+ * changes. Normally use {@link #NONE} if an item should not be in a group.
+ * @param itemId Unique item ID. Use {@link #NONE} if you do not need a unique ID.
+ * @param order The order for the item. Use {@link #NONE} if you do not care about the
+ * order. See {@link MenuItem#getOrder()}.
+ * @param titleRes Resource identifier of title string.
+ * @return The newly added sub-menu
+ */
+ SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes);
+
+ /**
+ * Add a group of menu items corresponding to actions that can be performed
+ * for a particular Intent. The Intent is most often configured with a null
+ * action, the data that the current activity is working with, and includes
+ * either the {@link Intent#CATEGORY_ALTERNATIVE} or
+ * {@link Intent#CATEGORY_SELECTED_ALTERNATIVE} to find activities that have
+ * said they would like to be included as optional action. You can, however,
+ * use any Intent you want.
+ *
+ * <p>
+ * See {@link android.content.pm.PackageManager#queryIntentActivityOptions}
+ * for more * details on the <var>caller</var>, <var>specifics</var>, and
+ * <var>intent</var> arguments. The list returned by that function is used
+ * to populate the resulting menu items.
+ *
+ * <p>
+ * All of the menu items of possible options for the intent will be added
+ * with the given group and id. You can use the group to control ordering of
+ * the items in relation to other items in the menu. Normally this function
+ * will automatically remove any existing items in the menu in the same
+ * group and place a divider above and below the added items; this behavior
+ * can be modified with the <var>flags</var> parameter. For each of the
+ * generated items {@link MenuItem#setIntent} is called to associate the
+ * appropriate Intent with the item; this means the activity will
+ * automatically be started for you without having to do anything else.
+ *
+ * @param groupId The group identifier that the items should be part of.
+ * This can also be used to define groups of items for batch state
+ * changes. Normally use {@link #NONE} if the items should not be in
+ * a group.
+ * @param itemId Unique item ID. Use {@link #NONE} if you do not need a
+ * unique ID.
+ * @param order The order for the items. Use {@link #NONE} if you do not
+ * care about the order. See {@link MenuItem#getOrder()}.
+ * @param caller The current activity component name as defined by
+ * queryIntentActivityOptions().
+ * @param specifics Specific items to place first as defined by
+ * queryIntentActivityOptions().
+ * @param intent Intent describing the kinds of items to populate in the
+ * list as defined by queryIntentActivityOptions().
+ * @param flags Additional options controlling how the items are added.
+ * @param outSpecificItems Optional array in which to place the menu items
+ * that were generated for each of the <var>specifics</var> that were
+ * requested. Entries may be null if no activity was found for that
+ * specific action.
+ * @return The number of menu items that were added.
+ *
+ * @see #FLAG_APPEND_TO_GROUP
+ * @see MenuItem#setIntent
+ * @see android.content.pm.PackageManager#queryIntentActivityOptions
+ */
+ public int addIntentOptions(int groupId, int itemId, int order,
+ ComponentName caller, Intent[] specifics,
+ Intent intent, int flags, MenuItem[] outSpecificItems);
+
+ /**
+ * Remove the item with the given identifier.
+ *
+ * @param id The item to be removed. If there is no item with this
+ * identifier, nothing happens.
+ */
+ public void removeItem(int id);
+
+ /**
+ * Remove all items in the given group.
+ *
+ * @param groupId The group to be removed. If there are no items in this
+ * group, nothing happens.
+ */
+ public void removeGroup(int groupId);
+
+ /**
+ * Remove all existing items from the menu, leaving it empty as if it had
+ * just been created.
+ */
+ public void clear();
+
+ /**
+ * Control whether a particular group of items can show a check mark. This
+ * is similar to calling {@link MenuItem#setCheckable} on all of the menu items
+ * with the given group identifier, but in addition you can control whether
+ * this group contains a mutually-exclusive set items. This should be called
+ * after the items of the group have been added to the menu.
+ *
+ * @param group The group of items to operate on.
+ * @param checkable Set to true to allow a check mark, false to
+ * disallow. The default is false.
+ * @param exclusive If set to true, only one item in this group can be
+ * checked at a time; checking an item will automatically
+ * uncheck all others in the group. If set to false, each
+ * item can be checked independently of the others.
+ *
+ * @see MenuItem#setCheckable
+ * @see MenuItem#setChecked
+ */
+ public void setGroupCheckable(int group, boolean checkable, boolean exclusive);
+
+ /**
+ * Show or hide all menu items that are in the given group.
+ *
+ * @param group The group of items to operate on.
+ * @param visible If true the items are visible, else they are hidden.
+ *
+ * @see MenuItem#setVisible
+ */
+ public void setGroupVisible(int group, boolean visible);
+
+ /**
+ * Enable or disable all menu items that are in the given group.
+ *
+ * @param group The group of items to operate on.
+ * @param enabled If true the items will be enabled, else they will be disabled.
+ *
+ * @see MenuItem#setEnabled
+ */
+ public void setGroupEnabled(int group, boolean enabled);
+
+ /**
+ * Return whether the menu currently has item items that are visible.
+ *
+ * @return True if there is one or more item visible,
+ * else false.
+ */
+ public boolean hasVisibleItems();
+
+ /**
+ * Return the menu item with a particular identifier.
+ *
+ * @param id The identifier to find.
+ *
+ * @return The menu item object, or null if there is no item with
+ * this identifier.
+ */
+ public MenuItem findItem(int id);
+
+ /**
+ * Get the number of items in the menu. Note that this will change any
+ * times items are added or removed from the menu.
+ *
+ * @return The item count.
+ */
+ public int size();
+
+ /**
+ * Gets the menu item at the given index.
+ *
+ * @param index The index of the menu item to return.
+ * @return The menu item.
+ * @exception IndexOutOfBoundsException
+ * when {@code index < 0 || >= size()}
+ */
+ public MenuItem getItem(int index);
+
+ /**
+ * Closes the menu, if open.
+ */
+ public void close();
+
+ /**
+ * Execute the menu item action associated with the given shortcut
+ * character.
+ *
+ * @param keyCode The keycode of the shortcut key.
+ * @param event Key event message.
+ * @param flags Additional option flags or 0.
+ *
+ * @return If the given shortcut exists and is shown, returns
+ * true; else returns false.
+ *
+ * @see #FLAG_PERFORM_NO_CLOSE
+ */
+ public boolean performShortcut(int keyCode, KeyEvent event, int flags);
+
+ /**
+ * Is a keypress one of the defined shortcut keys for this window.
+ * @param keyCode the key code from {@link KeyEvent} to check.
+ * @param event the {@link KeyEvent} to use to help check.
+ */
+ boolean isShortcutKey(int keyCode, KeyEvent event);
+
+ /**
+ * Execute the menu item action associated with the given menu identifier.
+ *
+ * @param id Identifier associated with the menu item.
+ * @param flags Additional option flags or 0.
+ *
+ * @return If the given identifier exists and is shown, returns
+ * true; else returns false.
+ *
+ * @see #FLAG_PERFORM_NO_CLOSE
+ */
+ public boolean performIdentifierAction(int id, int flags);
+
+
+ /**
+ * Control whether the menu should be running in qwerty mode (alphabetic
+ * shortcuts) or 12-key mode (numeric shortcuts).
+ *
+ * @param isQwerty If true the menu will use alphabetic shortcuts; else it
+ * will use numeric shortcuts.
+ */
+ public void setQwertyMode(boolean isQwerty);
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuInflater.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuInflater.java
new file mode 100644
index 0000000000..afe9f7361c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuInflater.java
@@ -0,0 +1,495 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ * 2011 Jake Wharton
+ *
+ * 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.TypedValue;
+import android.util.Xml;
+import android.view.InflateException;
+import android.view.View;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.view.menu.MenuItemImpl;
+
+/**
+ * This class is used to instantiate menu XML files into Menu objects.
+ * <p>
+ * For performance reasons, menu inflation relies heavily on pre-processing of
+ * XML files that is done at build time. Therefore, it is not currently possible
+ * to use MenuInflater with an XmlPullParser over a plain XML file at runtime;
+ * it only works with an XmlPullParser returned from a compiled resource (R.
+ * <em>something</em> file.)
+ */
+public class MenuInflater {
+ private static final String LOG_TAG = "MenuInflater";
+
+ /** Menu tag name in XML. */
+ private static final String XML_MENU = "menu";
+
+ /** Group tag name in XML. */
+ private static final String XML_GROUP = "group";
+
+ /** Item tag name in XML. */
+ private static final String XML_ITEM = "item";
+
+ private static final int NO_ID = 0;
+
+ private static final Class<?>[] ACTION_VIEW_CONSTRUCTOR_SIGNATURE = new Class[] {Context.class};
+
+ private static final Class<?>[] ACTION_PROVIDER_CONSTRUCTOR_SIGNATURE = ACTION_VIEW_CONSTRUCTOR_SIGNATURE;
+
+ private final Object[] mActionViewConstructorArguments;
+
+ private final Object[] mActionProviderConstructorArguments;
+
+ private Context mContext;
+ private Object mRealOwner;
+
+ /**
+ * Constructs a menu inflater.
+ *
+ * @see Activity#getMenuInflater()
+ */
+ public MenuInflater(Context context) {
+ mContext = context;
+ mRealOwner = context;
+ mActionViewConstructorArguments = new Object[] {context};
+ mActionProviderConstructorArguments = mActionViewConstructorArguments;
+ }
+
+ /**
+ * Constructs a menu inflater.
+ *
+ * @see Activity#getMenuInflater()
+ * @hide
+ */
+ public MenuInflater(Context context, Object realOwner) {
+ mContext = context;
+ mRealOwner = realOwner;
+ mActionViewConstructorArguments = new Object[] {context};
+ mActionProviderConstructorArguments = mActionViewConstructorArguments;
+ }
+
+ /**
+ * Inflate a menu hierarchy from the specified XML resource. Throws
+ * {@link InflateException} if there is an error.
+ *
+ * @param menuRes Resource ID for an XML layout resource to load (e.g.,
+ * <code>R.menu.main_activity</code>)
+ * @param menu The Menu to inflate into. The items and submenus will be
+ * added to this Menu.
+ */
+ public void inflate(int menuRes, Menu menu) {
+ XmlResourceParser parser = null;
+ try {
+ parser = mContext.getResources().getLayout(menuRes);
+ AttributeSet attrs = Xml.asAttributeSet(parser);
+
+ parseMenu(parser, attrs, menu);
+ } catch (XmlPullParserException e) {
+ throw new InflateException("Error inflating menu XML", e);
+ } catch (IOException e) {
+ throw new InflateException("Error inflating menu XML", e);
+ } finally {
+ if (parser != null) parser.close();
+ }
+ }
+
+ /**
+ * Called internally to fill the given menu. If a sub menu is seen, it will
+ * call this recursively.
+ */
+ private void parseMenu(XmlPullParser parser, AttributeSet attrs, Menu menu)
+ throws XmlPullParserException, IOException {
+ MenuState menuState = new MenuState(menu);
+
+ int eventType = parser.getEventType();
+ String tagName;
+ boolean lookingForEndOfUnknownTag = false;
+ String unknownTagName = null;
+
+ // This loop will skip to the menu start tag
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ tagName = parser.getName();
+ if (tagName.equals(XML_MENU)) {
+ // Go to next tag
+ eventType = parser.next();
+ break;
+ }
+
+ throw new RuntimeException("Expecting menu, got " + tagName);
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ boolean reachedEndOfMenu = false;
+ while (!reachedEndOfMenu) {
+ switch (eventType) {
+ case XmlPullParser.START_TAG:
+ if (lookingForEndOfUnknownTag) {
+ break;
+ }
+
+ tagName = parser.getName();
+ if (tagName.equals(XML_GROUP)) {
+ menuState.readGroup(attrs);
+ } else if (tagName.equals(XML_ITEM)) {
+ menuState.readItem(attrs);
+ } else if (tagName.equals(XML_MENU)) {
+ // A menu start tag denotes a submenu for an item
+ SubMenu subMenu = menuState.addSubMenuItem();
+
+ // Parse the submenu into returned SubMenu
+ parseMenu(parser, attrs, subMenu);
+ } else {
+ lookingForEndOfUnknownTag = true;
+ unknownTagName = tagName;
+ }
+ break;
+
+ case XmlPullParser.END_TAG:
+ tagName = parser.getName();
+ if (lookingForEndOfUnknownTag && tagName.equals(unknownTagName)) {
+ lookingForEndOfUnknownTag = false;
+ unknownTagName = null;
+ } else if (tagName.equals(XML_GROUP)) {
+ menuState.resetGroup();
+ } else if (tagName.equals(XML_ITEM)) {
+ // Add the item if it hasn't been added (if the item was
+ // a submenu, it would have been added already)
+ if (!menuState.hasAddedItem()) {
+ if (menuState.itemActionProvider != null &&
+ menuState.itemActionProvider.hasSubMenu()) {
+ menuState.addSubMenuItem();
+ } else {
+ menuState.addItem();
+ }
+ }
+ } else if (tagName.equals(XML_MENU)) {
+ reachedEndOfMenu = true;
+ }
+ break;
+
+ case XmlPullParser.END_DOCUMENT:
+ throw new RuntimeException("Unexpected end of document");
+ }
+
+ eventType = parser.next();
+ }
+ }
+
+ private static class InflatedOnMenuItemClickListener
+ implements MenuItem.OnMenuItemClickListener {
+ private static final Class<?>[] PARAM_TYPES = new Class[] { MenuItem.class };
+
+ private Object mRealOwner;
+ private Method mMethod;
+
+ public InflatedOnMenuItemClickListener(Object realOwner, String methodName) {
+ mRealOwner = realOwner;
+ Class<?> c = realOwner.getClass();
+ try {
+ mMethod = c.getMethod(methodName, PARAM_TYPES);
+ } catch (Exception e) {
+ InflateException ex = new InflateException(
+ "Couldn't resolve menu item onClick handler " + methodName +
+ " in class " + c.getName());
+ ex.initCause(e);
+ throw ex;
+ }
+ }
+
+ public boolean onMenuItemClick(MenuItem item) {
+ try {
+ if (mMethod.getReturnType() == Boolean.TYPE) {
+ return (Boolean) mMethod.invoke(mRealOwner, item);
+ } else {
+ mMethod.invoke(mRealOwner, item);
+ return true;
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ * State for the current menu.
+ * <p>
+ * Groups can not be nested unless there is another menu (which will have
+ * its state class).
+ */
+ private class MenuState {
+ private Menu menu;
+
+ /*
+ * Group state is set on items as they are added, allowing an item to
+ * override its group state. (As opposed to set on items at the group end tag.)
+ */
+ private int groupId;
+ private int groupCategory;
+ private int groupOrder;
+ private int groupCheckable;
+ private boolean groupVisible;
+ private boolean groupEnabled;
+
+ private boolean itemAdded;
+ private int itemId;
+ private int itemCategoryOrder;
+ private CharSequence itemTitle;
+ private CharSequence itemTitleCondensed;
+ private int itemIconResId;
+ private char itemAlphabeticShortcut;
+ private char itemNumericShortcut;
+ /**
+ * Sync to attrs.xml enum:
+ * - 0: none
+ * - 1: all
+ * - 2: exclusive
+ */
+ private int itemCheckable;
+ private boolean itemChecked;
+ private boolean itemVisible;
+ private boolean itemEnabled;
+
+ /**
+ * Sync to attrs.xml enum, values in MenuItem:
+ * - 0: never
+ * - 1: ifRoom
+ * - 2: always
+ * - -1: Safe sentinel for "no value".
+ */
+ private int itemShowAsAction;
+
+ private int itemActionViewLayout;
+ private String itemActionViewClassName;
+ private String itemActionProviderClassName;
+
+ private String itemListenerMethodName;
+
+ private ActionProvider itemActionProvider;
+
+ private static final int defaultGroupId = NO_ID;
+ private static final int defaultItemId = NO_ID;
+ private static final int defaultItemCategory = 0;
+ private static final int defaultItemOrder = 0;
+ private static final int defaultItemCheckable = 0;
+ private static final boolean defaultItemChecked = false;
+ private static final boolean defaultItemVisible = true;
+ private static final boolean defaultItemEnabled = true;
+
+ public MenuState(final Menu menu) {
+ this.menu = menu;
+
+ resetGroup();
+ }
+
+ public void resetGroup() {
+ groupId = defaultGroupId;
+ groupCategory = defaultItemCategory;
+ groupOrder = defaultItemOrder;
+ groupCheckable = defaultItemCheckable;
+ groupVisible = defaultItemVisible;
+ groupEnabled = defaultItemEnabled;
+ }
+
+ /**
+ * Called when the parser is pointing to a group tag.
+ */
+ public void readGroup(AttributeSet attrs) {
+ TypedArray a = mContext.obtainStyledAttributes(attrs,
+ R.styleable.SherlockMenuGroup);
+
+ groupId = a.getResourceId(R.styleable.SherlockMenuGroup_android_id, defaultGroupId);
+ groupCategory = a.getInt(R.styleable.SherlockMenuGroup_android_menuCategory, defaultItemCategory);
+ groupOrder = a.getInt(R.styleable.SherlockMenuGroup_android_orderInCategory, defaultItemOrder);
+ groupCheckable = a.getInt(R.styleable.SherlockMenuGroup_android_checkableBehavior, defaultItemCheckable);
+ groupVisible = a.getBoolean(R.styleable.SherlockMenuGroup_android_visible, defaultItemVisible);
+ groupEnabled = a.getBoolean(R.styleable.SherlockMenuGroup_android_enabled, defaultItemEnabled);
+
+ a.recycle();
+ }
+
+ /**
+ * Called when the parser is pointing to an item tag.
+ */
+ public void readItem(AttributeSet attrs) {
+ TypedArray a = mContext.obtainStyledAttributes(attrs,
+ R.styleable.SherlockMenuItem);
+
+ // Inherit attributes from the group as default value
+ itemId = a.getResourceId(R.styleable.SherlockMenuItem_android_id, defaultItemId);
+ final int category = a.getInt(R.styleable.SherlockMenuItem_android_menuCategory, groupCategory);
+ final int order = a.getInt(R.styleable.SherlockMenuItem_android_orderInCategory, groupOrder);
+ itemCategoryOrder = (category & Menu.CATEGORY_MASK) | (order & Menu.USER_MASK);
+ itemTitle = a.getText(R.styleable.SherlockMenuItem_android_title);
+ itemTitleCondensed = a.getText(R.styleable.SherlockMenuItem_android_titleCondensed);
+ itemIconResId = a.getResourceId(R.styleable.SherlockMenuItem_android_icon, 0);
+ itemAlphabeticShortcut =
+ getShortcut(a.getString(R.styleable.SherlockMenuItem_android_alphabeticShortcut));
+ itemNumericShortcut =
+ getShortcut(a.getString(R.styleable.SherlockMenuItem_android_numericShortcut));
+ if (a.hasValue(R.styleable.SherlockMenuItem_android_checkable)) {
+ // Item has attribute checkable, use it
+ itemCheckable = a.getBoolean(R.styleable.SherlockMenuItem_android_checkable, false) ? 1 : 0;
+ } else {
+ // Item does not have attribute, use the group's (group can have one more state
+ // for checkable that represents the exclusive checkable)
+ itemCheckable = groupCheckable;
+ }
+
+ itemChecked = a.getBoolean(R.styleable.SherlockMenuItem_android_checked, defaultItemChecked);
+ itemVisible = a.getBoolean(R.styleable.SherlockMenuItem_android_visible, groupVisible);
+ itemEnabled = a.getBoolean(R.styleable.SherlockMenuItem_android_enabled, groupEnabled);
+
+ TypedValue value = new TypedValue();
+ a.getValue(R.styleable.SherlockMenuItem_android_showAsAction, value);
+ itemShowAsAction = value.type == TypedValue.TYPE_INT_HEX ? value.data : -1;
+
+ itemListenerMethodName = a.getString(R.styleable.SherlockMenuItem_android_onClick);
+ itemActionViewLayout = a.getResourceId(R.styleable.SherlockMenuItem_android_actionLayout, 0);
+
+ // itemActionViewClassName = a.getString(R.styleable.SherlockMenuItem_android_actionViewClass);
+ value = new TypedValue();
+ a.getValue(R.styleable.SherlockMenuItem_android_actionViewClass, value);
+ itemActionViewClassName = value.type == TypedValue.TYPE_STRING ? value.string.toString() : null;
+
+ // itemActionProviderClassName = a.getString(R.styleable.SherlockMenuItem_android_actionProviderClass);
+ value = new TypedValue();
+ a.getValue(R.styleable.SherlockMenuItem_android_actionProviderClass, value);
+ itemActionProviderClassName = value.type == TypedValue.TYPE_STRING ? value.string.toString() : null;
+
+ final boolean hasActionProvider = itemActionProviderClassName != null;
+ if (hasActionProvider && itemActionViewLayout == 0 && itemActionViewClassName == null) {
+ itemActionProvider = newInstance(itemActionProviderClassName,
+ ACTION_PROVIDER_CONSTRUCTOR_SIGNATURE,
+ mActionProviderConstructorArguments);
+ } else {
+ if (hasActionProvider) {
+ Log.w(LOG_TAG, "Ignoring attribute 'actionProviderClass'."
+ + " Action view already specified.");
+ }
+ itemActionProvider = null;
+ }
+
+ a.recycle();
+
+ itemAdded = false;
+ }
+
+ private char getShortcut(String shortcutString) {
+ if (shortcutString == null) {
+ return 0;
+ } else {
+ return shortcutString.charAt(0);
+ }
+ }
+
+ private void setItem(MenuItem item) {
+ item.setChecked(itemChecked)
+ .setVisible(itemVisible)
+ .setEnabled(itemEnabled)
+ .setCheckable(itemCheckable >= 1)
+ .setTitleCondensed(itemTitleCondensed)
+ .setIcon(itemIconResId)
+ .setAlphabeticShortcut(itemAlphabeticShortcut)
+ .setNumericShortcut(itemNumericShortcut);
+
+ if (itemShowAsAction >= 0) {
+ item.setShowAsAction(itemShowAsAction);
+ }
+
+ if (itemListenerMethodName != null) {
+ if (mContext.isRestricted()) {
+ throw new IllegalStateException("The android:onClick attribute cannot "
+ + "be used within a restricted context");
+ }
+ item.setOnMenuItemClickListener(
+ new InflatedOnMenuItemClickListener(mRealOwner, itemListenerMethodName));
+ }
+
+ if (itemCheckable >= 2) {
+ if (item instanceof MenuItemImpl) {
+ MenuItemImpl impl = (MenuItemImpl) item;
+ impl.setExclusiveCheckable(true);
+ } else {
+ menu.setGroupCheckable(groupId, true, true);
+ }
+ }
+
+ boolean actionViewSpecified = false;
+ if (itemActionViewClassName != null) {
+ View actionView = (View) newInstance(itemActionViewClassName,
+ ACTION_VIEW_CONSTRUCTOR_SIGNATURE, mActionViewConstructorArguments);
+ item.setActionView(actionView);
+ actionViewSpecified = true;
+ }
+ if (itemActionViewLayout > 0) {
+ if (!actionViewSpecified) {
+ item.setActionView(itemActionViewLayout);
+ actionViewSpecified = true;
+ } else {
+ Log.w(LOG_TAG, "Ignoring attribute 'itemActionViewLayout'."
+ + " Action view already specified.");
+ }
+ }
+ if (itemActionProvider != null) {
+ item.setActionProvider(itemActionProvider);
+ }
+ }
+
+ public void addItem() {
+ itemAdded = true;
+ setItem(menu.add(groupId, itemId, itemCategoryOrder, itemTitle));
+ }
+
+ public SubMenu addSubMenuItem() {
+ itemAdded = true;
+ SubMenu subMenu = menu.addSubMenu(groupId, itemId, itemCategoryOrder, itemTitle);
+ setItem(subMenu.getItem());
+ return subMenu;
+ }
+
+ public boolean hasAddedItem() {
+ return itemAdded;
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> T newInstance(String className, Class<?>[] constructorSignature,
+ Object[] arguments) {
+ try {
+ Class<?> clazz = mContext.getClassLoader().loadClass(className);
+ Constructor<?> constructor = clazz.getConstructor(constructorSignature);
+ return (T) constructor.newInstance(arguments);
+ } catch (Exception e) {
+ Log.w(LOG_TAG, "Cannot instantiate class: " + className, e);
+ }
+ return null;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuItem.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuItem.java
new file mode 100644
index 0000000000..7fc3aa4306
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/MenuItem.java
@@ -0,0 +1,598 @@
+/*
+ * Copyright (C) 2008 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+/**
+ * Interface for direct access to a previously created menu item.
+ * <p>
+ * An Item is returned by calling one of the {@link android.view.Menu#add}
+ * methods.
+ * <p>
+ * For a feature set of specific menu types, see {@link Menu}.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
+ */
+public interface MenuItem {
+ /*
+ * These should be kept in sync with attrs.xml enum constants for showAsAction
+ */
+ /** Never show this item as a button in an Action Bar. */
+ public static final int SHOW_AS_ACTION_NEVER = android.view.MenuItem.SHOW_AS_ACTION_NEVER;
+ /** Show this item as a button in an Action Bar if the system decides there is room for it. */
+ public static final int SHOW_AS_ACTION_IF_ROOM = android.view.MenuItem.SHOW_AS_ACTION_IF_ROOM;
+ /**
+ * Always show this item as a button in an Action Bar.
+ * Use sparingly! If too many items are set to always show in the Action Bar it can
+ * crowd the Action Bar and degrade the user experience on devices with smaller screens.
+ * A good rule of thumb is to have no more than 2 items set to always show at a time.
+ */
+ public static final int SHOW_AS_ACTION_ALWAYS = android.view.MenuItem.SHOW_AS_ACTION_ALWAYS;
+
+ /**
+ * When this item is in the action bar, always show it with a text label even if
+ * it also has an icon specified.
+ */
+ public static final int SHOW_AS_ACTION_WITH_TEXT = android.view.MenuItem.SHOW_AS_ACTION_WITH_TEXT;
+
+ /**
+ * This item's action view collapses to a normal menu item.
+ * When expanded, the action view temporarily takes over
+ * a larger segment of its container.
+ */
+ public static final int SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW = android.view.MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW;
+
+ /**
+ * Interface definition for a callback to be invoked when a menu item is
+ * clicked.
+ *
+ * @see Activity#onContextItemSelected(MenuItem)
+ * @see Activity#onOptionsItemSelected(MenuItem)
+ */
+ public interface OnMenuItemClickListener {
+ /**
+ * Called when a menu item has been invoked. This is the first code
+ * that is executed; if it returns true, no other callbacks will be
+ * executed.
+ *
+ * @param item The menu item that was invoked.
+ *
+ * @return Return true to consume this click and prevent others from
+ * executing.
+ */
+ public boolean onMenuItemClick(MenuItem item);
+ }
+
+ /**
+ * Interface definition for a callback to be invoked when a menu item
+ * marked with {@link MenuItem#SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW} is
+ * expanded or collapsed.
+ *
+ * @see MenuItem#expandActionView()
+ * @see MenuItem#collapseActionView()
+ * @see MenuItem#setShowAsActionFlags(int)
+ */
+ public interface OnActionExpandListener {
+ /**
+ * Called when a menu item with {@link MenuItem#SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}
+ * is expanded.
+ * @param item Item that was expanded
+ * @return true if the item should expand, false if expansion should be suppressed.
+ */
+ public boolean onMenuItemActionExpand(MenuItem item);
+
+ /**
+ * Called when a menu item with {@link MenuItem#SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}
+ * is collapsed.
+ * @param item Item that was collapsed
+ * @return true if the item should collapse, false if collapsing should be suppressed.
+ */
+ public boolean onMenuItemActionCollapse(MenuItem item);
+ }
+
+ /**
+ * Return the identifier for this menu item. The identifier can not
+ * be changed after the menu is created.
+ *
+ * @return The menu item's identifier.
+ */
+ public int getItemId();
+
+ /**
+ * Return the group identifier that this menu item is part of. The group
+ * identifier can not be changed after the menu is created.
+ *
+ * @return The menu item's group identifier.
+ */
+ public int getGroupId();
+
+ /**
+ * Return the category and order within the category of this item. This
+ * item will be shown before all items (within its category) that have
+ * order greater than this value.
+ * <p>
+ * An order integer contains the item's category (the upper bits of the
+ * integer; set by or/add the category with the order within the
+ * category) and the ordering of the item within that category (the
+ * lower bits). Example categories are {@link Menu#CATEGORY_SYSTEM},
+ * {@link Menu#CATEGORY_SECONDARY}, {@link Menu#CATEGORY_ALTERNATIVE},
+ * {@link Menu#CATEGORY_CONTAINER}. See {@link Menu} for a full list.
+ *
+ * @return The order of this item.
+ */
+ public int getOrder();
+
+ /**
+ * Change the title associated with this item.
+ *
+ * @param title The new text to be displayed.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setTitle(CharSequence title);
+
+ /**
+ * Change the title associated with this item.
+ * <p>
+ * Some menu types do not sufficient space to show the full title, and
+ * instead a condensed title is preferred. See {@link Menu} for more
+ * information.
+ *
+ * @param title The resource id of the new text to be displayed.
+ * @return This Item so additional setters can be called.
+ * @see #setTitleCondensed(CharSequence)
+ */
+
+ public MenuItem setTitle(int title);
+
+ /**
+ * Retrieve the current title of the item.
+ *
+ * @return The title.
+ */
+ public CharSequence getTitle();
+
+ /**
+ * Change the condensed title associated with this item. The condensed
+ * title is used in situations where the normal title may be too long to
+ * be displayed.
+ *
+ * @param title The new text to be displayed as the condensed title.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setTitleCondensed(CharSequence title);
+
+ /**
+ * Retrieve the current condensed title of the item. If a condensed
+ * title was never set, it will return the normal title.
+ *
+ * @return The condensed title, if it exists.
+ * Otherwise the normal title.
+ */
+ public CharSequence getTitleCondensed();
+
+ /**
+ * Change the icon associated with this item. This icon will not always be
+ * shown, so the title should be sufficient in describing this item. See
+ * {@link Menu} for the menu types that support icons.
+ *
+ * @param icon The new icon (as a Drawable) to be displayed.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setIcon(Drawable icon);
+
+ /**
+ * Change the icon associated with this item. This icon will not always be
+ * shown, so the title should be sufficient in describing this item. See
+ * {@link Menu} for the menu types that support icons.
+ * <p>
+ * This method will set the resource ID of the icon which will be used to
+ * lazily get the Drawable when this item is being shown.
+ *
+ * @param iconRes The new icon (as a resource ID) to be displayed.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setIcon(int iconRes);
+
+ /**
+ * Returns the icon for this item as a Drawable (getting it from resources if it hasn't been
+ * loaded before).
+ *
+ * @return The icon as a Drawable.
+ */
+ public Drawable getIcon();
+
+ /**
+ * Change the Intent associated with this item. By default there is no
+ * Intent associated with a menu item. If you set one, and nothing
+ * else handles the item, then the default behavior will be to call
+ * {@link android.content.Context#startActivity} with the given Intent.
+ *
+ * <p>Note that setIntent() can not be used with the versions of
+ * {@link Menu#add} that take a Runnable, because {@link Runnable#run}
+ * does not return a value so there is no way to tell if it handled the
+ * item. In this case it is assumed that the Runnable always handles
+ * the item, and the intent will never be started.
+ *
+ * @see #getIntent
+ * @param intent The Intent to associated with the item. This Intent
+ * object is <em>not</em> copied, so be careful not to
+ * modify it later.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setIntent(Intent intent);
+
+ /**
+ * Return the Intent associated with this item. This returns a
+ * reference to the Intent which you can change as desired to modify
+ * what the Item is holding.
+ *
+ * @see #setIntent
+ * @return Returns the last value supplied to {@link #setIntent}, or
+ * null.
+ */
+ public Intent getIntent();
+
+ /**
+ * Change both the numeric and alphabetic shortcut associated with this
+ * item. Note that the shortcut will be triggered when the key that
+ * generates the given character is pressed alone or along with with the alt
+ * key. Also note that case is not significant and that alphabetic shortcut
+ * characters will be displayed in lower case.
+ * <p>
+ * See {@link Menu} for the menu types that support shortcuts.
+ *
+ * @param numericChar The numeric shortcut key. This is the shortcut when
+ * using a numeric (e.g., 12-key) keyboard.
+ * @param alphaChar The alphabetic shortcut key. This is the shortcut when
+ * using a keyboard with alphabetic keys.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setShortcut(char numericChar, char alphaChar);
+
+ /**
+ * Change the numeric shortcut associated with this item.
+ * <p>
+ * See {@link Menu} for the menu types that support shortcuts.
+ *
+ * @param numericChar The numeric shortcut key. This is the shortcut when
+ * using a 12-key (numeric) keyboard.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setNumericShortcut(char numericChar);
+
+ /**
+ * Return the char for this menu item's numeric (12-key) shortcut.
+ *
+ * @return Numeric character to use as a shortcut.
+ */
+ public char getNumericShortcut();
+
+ /**
+ * Change the alphabetic shortcut associated with this item. The shortcut
+ * will be triggered when the key that generates the given character is
+ * pressed alone or along with with the alt key. Case is not significant and
+ * shortcut characters will be displayed in lower case. Note that menu items
+ * with the characters '\b' or '\n' as shortcuts will get triggered by the
+ * Delete key or Carriage Return key, respectively.
+ * <p>
+ * See {@link Menu} for the menu types that support shortcuts.
+ *
+ * @param alphaChar The alphabetic shortcut key. This is the shortcut when
+ * using a keyboard with alphabetic keys.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setAlphabeticShortcut(char alphaChar);
+
+ /**
+ * Return the char for this menu item's alphabetic shortcut.
+ *
+ * @return Alphabetic character to use as a shortcut.
+ */
+ public char getAlphabeticShortcut();
+
+ /**
+ * Control whether this item can display a check mark. Setting this does
+ * not actually display a check mark (see {@link #setChecked} for that);
+ * rather, it ensures there is room in the item in which to display a
+ * check mark.
+ * <p>
+ * See {@link Menu} for the menu types that support check marks.
+ *
+ * @param checkable Set to true to allow a check mark, false to
+ * disallow. The default is false.
+ * @see #setChecked
+ * @see #isCheckable
+ * @see Menu#setGroupCheckable
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setCheckable(boolean checkable);
+
+ /**
+ * Return whether the item can currently display a check mark.
+ *
+ * @return If a check mark can be displayed, returns true.
+ *
+ * @see #setCheckable
+ */
+ public boolean isCheckable();
+
+ /**
+ * Control whether this item is shown with a check mark. Note that you
+ * must first have enabled checking with {@link #setCheckable} or else
+ * the check mark will not appear. If this item is a member of a group that contains
+ * mutually-exclusive items (set via {@link Menu#setGroupCheckable(int, boolean, boolean)},
+ * the other items in the group will be unchecked.
+ * <p>
+ * See {@link Menu} for the menu types that support check marks.
+ *
+ * @see #setCheckable
+ * @see #isChecked
+ * @see Menu#setGroupCheckable
+ * @param checked Set to true to display a check mark, false to hide
+ * it. The default value is false.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setChecked(boolean checked);
+
+ /**
+ * Return whether the item is currently displaying a check mark.
+ *
+ * @return If a check mark is displayed, returns true.
+ *
+ * @see #setChecked
+ */
+ public boolean isChecked();
+
+ /**
+ * Sets the visibility of the menu item. Even if a menu item is not visible,
+ * it may still be invoked via its shortcut (to completely disable an item,
+ * set it to invisible and {@link #setEnabled(boolean) disabled}).
+ *
+ * @param visible If true then the item will be visible; if false it is
+ * hidden.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setVisible(boolean visible);
+
+ /**
+ * Return the visibility of the menu item.
+ *
+ * @return If true the item is visible; else it is hidden.
+ */
+ public boolean isVisible();
+
+ /**
+ * Sets whether the menu item is enabled. Disabling a menu item will not
+ * allow it to be invoked via its shortcut. The menu item will still be
+ * visible.
+ *
+ * @param enabled If true then the item will be invokable; if false it is
+ * won't be invokable.
+ * @return This Item so additional setters can be called.
+ */
+ public MenuItem setEnabled(boolean enabled);
+
+ /**
+ * Return the enabled state of the menu item.
+ *
+ * @return If true the item is enabled and hence invokable; else it is not.
+ */
+ public boolean isEnabled();
+
+ /**
+ * Check whether this item has an associated sub-menu. I.e. it is a
+ * sub-menu of another menu.
+ *
+ * @return If true this item has a menu; else it is a
+ * normal item.
+ */
+ public boolean hasSubMenu();
+
+ /**
+ * Get the sub-menu to be invoked when this item is selected, if it has
+ * one. See {@link #hasSubMenu()}.
+ *
+ * @return The associated menu if there is one, else null
+ */
+ public SubMenu getSubMenu();
+
+ /**
+ * Set a custom listener for invocation of this menu item. In most
+ * situations, it is more efficient and easier to use
+ * {@link Activity#onOptionsItemSelected(MenuItem)} or
+ * {@link Activity#onContextItemSelected(MenuItem)}.
+ *
+ * @param menuItemClickListener The object to receive invokations.
+ * @return This Item so additional setters can be called.
+ * @see Activity#onOptionsItemSelected(MenuItem)
+ * @see Activity#onContextItemSelected(MenuItem)
+ */
+ public MenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener menuItemClickListener);
+
+ /**
+ * Gets the extra information linked to this menu item. This extra
+ * information is set by the View that added this menu item to the
+ * menu.
+ *
+ * @see OnCreateContextMenuListener
+ * @return The extra information linked to the View that added this
+ * menu item to the menu. This can be null.
+ */
+ public ContextMenuInfo getMenuInfo();
+
+ /**
+ * Sets how this item should display in the presence of an Action Bar.
+ * The parameter actionEnum is a flag set. One of {@link #SHOW_AS_ACTION_ALWAYS},
+ * {@link #SHOW_AS_ACTION_IF_ROOM}, or {@link #SHOW_AS_ACTION_NEVER} should
+ * be used, and you may optionally OR the value with {@link #SHOW_AS_ACTION_WITH_TEXT}.
+ * SHOW_AS_ACTION_WITH_TEXT requests that when the item is shown as an action,
+ * it should be shown with a text label.
+ *
+ * @param actionEnum How the item should display. One of
+ * {@link #SHOW_AS_ACTION_ALWAYS}, {@link #SHOW_AS_ACTION_IF_ROOM}, or
+ * {@link #SHOW_AS_ACTION_NEVER}. SHOW_AS_ACTION_NEVER is the default.
+ *
+ * @see android.app.ActionBar
+ * @see #setActionView(View)
+ */
+ public void setShowAsAction(int actionEnum);
+
+ /**
+ * Sets how this item should display in the presence of an Action Bar.
+ * The parameter actionEnum is a flag set. One of {@link #SHOW_AS_ACTION_ALWAYS},
+ * {@link #SHOW_AS_ACTION_IF_ROOM}, or {@link #SHOW_AS_ACTION_NEVER} should
+ * be used, and you may optionally OR the value with {@link #SHOW_AS_ACTION_WITH_TEXT}.
+ * SHOW_AS_ACTION_WITH_TEXT requests that when the item is shown as an action,
+ * it should be shown with a text label.
+ *
+ * <p>Note: This method differs from {@link #setShowAsAction(int)} only in that it
+ * returns the current MenuItem instance for call chaining.
+ *
+ * @param actionEnum How the item should display. One of
+ * {@link #SHOW_AS_ACTION_ALWAYS}, {@link #SHOW_AS_ACTION_IF_ROOM}, or
+ * {@link #SHOW_AS_ACTION_NEVER}. SHOW_AS_ACTION_NEVER is the default.
+ *
+ * @see android.app.ActionBar
+ * @see #setActionView(View)
+ * @return This MenuItem instance for call chaining.
+ */
+ public MenuItem setShowAsActionFlags(int actionEnum);
+
+ /**
+ * Set an action view for this menu item. An action view will be displayed in place
+ * of an automatically generated menu item element in the UI when this item is shown
+ * as an action within a parent.
+ * <p>
+ * <strong>Note:</strong> Setting an action view overrides the action provider
+ * set via {@link #setActionProvider(ActionProvider)}.
+ * </p>
+ *
+ * @param view View to use for presenting this item to the user.
+ * @return This Item so additional setters can be called.
+ *
+ * @see #setShowAsAction(int)
+ */
+ public MenuItem setActionView(View view);
+
+ /**
+ * Set an action view for this menu item. An action view will be displayed in place
+ * of an automatically generated menu item element in the UI when this item is shown
+ * as an action within a parent.
+ * <p>
+ * <strong>Note:</strong> Setting an action view overrides the action provider
+ * set via {@link #setActionProvider(ActionProvider)}.
+ * </p>
+ *
+ * @param resId Layout resource to use for presenting this item to the user.
+ * @return This Item so additional setters can be called.
+ *
+ * @see #setShowAsAction(int)
+ */
+ public MenuItem setActionView(int resId);
+
+ /**
+ * Returns the currently set action view for this menu item.
+ *
+ * @return This item's action view
+ *
+ * @see #setActionView(View)
+ * @see #setShowAsAction(int)
+ */
+ public View getActionView();
+
+ /**
+ * Sets the {@link ActionProvider} responsible for creating an action view if
+ * the item is placed on the action bar. The provider also provides a default
+ * action invoked if the item is placed in the overflow menu.
+ * <p>
+ * <strong>Note:</strong> Setting an action provider overrides the action view
+ * set via {@link #setActionView(int)} or {@link #setActionView(View)}.
+ * </p>
+ *
+ * @param actionProvider The action provider.
+ * @return This Item so additional setters can be called.
+ *
+ * @see ActionProvider
+ */
+ public MenuItem setActionProvider(ActionProvider actionProvider);
+
+ /**
+ * Gets the {@link ActionProvider}.
+ *
+ * @return The action provider.
+ *
+ * @see ActionProvider
+ * @see #setActionProvider(ActionProvider)
+ */
+ public ActionProvider getActionProvider();
+
+ /**
+ * Expand the action view associated with this menu item.
+ * The menu item must have an action view set, as well as
+ * the showAsAction flag {@link #SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}.
+ * If a listener has been set using {@link #setOnActionExpandListener(OnActionExpandListener)}
+ * it will have its {@link OnActionExpandListener#onMenuItemActionExpand(MenuItem)}
+ * method invoked. The listener may return false from this method to prevent expanding
+ * the action view.
+ *
+ * @return true if the action view was expanded, false otherwise.
+ */
+ public boolean expandActionView();
+
+ /**
+ * Collapse the action view associated with this menu item.
+ * The menu item must have an action view set, as well as the showAsAction flag
+ * {@link #SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}. If a listener has been set using
+ * {@link #setOnActionExpandListener(OnActionExpandListener)} it will have its
+ * {@link OnActionExpandListener#onMenuItemActionCollapse(MenuItem)} method invoked.
+ * The listener may return false from this method to prevent collapsing the action view.
+ *
+ * @return true if the action view was collapsed, false otherwise.
+ */
+ public boolean collapseActionView();
+
+ /**
+ * Returns true if this menu item's action view has been expanded.
+ *
+ * @return true if the item's action view is expanded, false otherwise.
+ *
+ * @see #expandActionView()
+ * @see #collapseActionView()
+ * @see #SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
+ * @see OnActionExpandListener
+ */
+ public boolean isActionViewExpanded();
+
+ /**
+ * Set an {@link OnActionExpandListener} on this menu item to be notified when
+ * the associated action view is expanded or collapsed. The menu item must
+ * be configured to expand or collapse its action view using the flag
+ * {@link #SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}.
+ *
+ * @param listener Listener that will respond to expand/collapse events
+ * @return This menu item instance for call chaining
+ */
+ public MenuItem setOnActionExpandListener(OnActionExpandListener listener);
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/SubMenu.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/SubMenu.java
new file mode 100644
index 0000000000..397fd1c2d7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/SubMenu.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+/**
+ * Subclass of {@link Menu} for sub menus.
+ * <p>
+ * Sub menus do not support item icons, or nested sub menus.
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about creating menus, read the
+ * <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide.</p>
+ * </div>
+ */
+
+public interface SubMenu extends Menu {
+ /**
+ * Sets the submenu header's title to the title given in <var>titleRes</var>
+ * resource identifier.
+ *
+ * @param titleRes The string resource identifier used for the title.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setHeaderTitle(int titleRes);
+
+ /**
+ * Sets the submenu header's title to the title given in <var>title</var>.
+ *
+ * @param title The character sequence used for the title.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setHeaderTitle(CharSequence title);
+
+ /**
+ * Sets the submenu header's icon to the icon given in <var>iconRes</var>
+ * resource id.
+ *
+ * @param iconRes The resource identifier used for the icon.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setHeaderIcon(int iconRes);
+
+ /**
+ * Sets the submenu header's icon to the icon given in <var>icon</var>
+ * {@link Drawable}.
+ *
+ * @param icon The {@link Drawable} used for the icon.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setHeaderIcon(Drawable icon);
+
+ /**
+ * Sets the header of the submenu to the {@link View} given in
+ * <var>view</var>. This replaces the header title and icon (and those
+ * replace this).
+ *
+ * @param view The {@link View} used for the header.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setHeaderView(View view);
+
+ /**
+ * Clears the header of the submenu.
+ */
+ public void clearHeader();
+
+ /**
+ * Change the icon associated with this submenu's item in its parent menu.
+ *
+ * @see MenuItem#setIcon(int)
+ * @param iconRes The new icon (as a resource ID) to be displayed.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setIcon(int iconRes);
+
+ /**
+ * Change the icon associated with this submenu's item in its parent menu.
+ *
+ * @see MenuItem#setIcon(Drawable)
+ * @param icon The new icon (as a Drawable) to be displayed.
+ * @return This SubMenu so additional setters can be called.
+ */
+ public SubMenu setIcon(Drawable icon);
+
+ /**
+ * Gets the {@link MenuItem} that represents this submenu in the parent
+ * menu. Use this for setting additional item attributes.
+ *
+ * @return The {@link MenuItem} that launches the submenu when invoked.
+ */
+ public MenuItem getItem();
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Window.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Window.java
new file mode 100644
index 0000000000..1d2828c581
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/view/Window.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ * Copyright (C) 2011 Jake Wharton
+ *
+ * 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.
+ */
+
+package com.actionbarsherlock.view;
+
+import android.content.Context;
+
+/**
+ * <p>Abstract base class for a top-level window look and behavior policy. An
+ * instance of this class should be used as the top-level view added to the
+ * window manager. It provides standard UI policies such as a background, title
+ * area, default key processing, etc.</p>
+ *
+ * <p>The only existing implementation of this abstract class is
+ * android.policy.PhoneWindow, which you should instantiate when needing a
+ * Window. Eventually that class will be refactored and a factory method added
+ * for creating Window instances without knowing about a particular
+ * implementation.</p>
+ */
+public abstract class Window extends android.view.Window {
+ public static final long FEATURE_ACTION_BAR = android.view.Window.FEATURE_ACTION_BAR;
+ public static final long FEATURE_ACTION_BAR_OVERLAY = android.view.Window.FEATURE_ACTION_BAR_OVERLAY;
+ public static final long FEATURE_ACTION_MODE_OVERLAY = android.view.Window.FEATURE_ACTION_MODE_OVERLAY;
+ public static final long FEATURE_NO_TITLE = android.view.Window.FEATURE_NO_TITLE;
+ public static final long FEATURE_PROGRESS = android.view.Window.FEATURE_PROGRESS;
+ public static final long FEATURE_INDETERMINATE_PROGRESS = android.view.Window.FEATURE_INDETERMINATE_PROGRESS;
+
+ /**
+ * Create a new instance for a context.
+ *
+ * @param context Context.
+ */
+ private Window(Context context) {
+ super(context);
+ }
+
+
+ public interface Callback {
+ /**
+ * Called when a panel's menu item has been selected by the user.
+ *
+ * @param featureId The panel that the menu is in.
+ * @param item The menu item that was selected.
+ *
+ * @return boolean Return true to finish processing of selection, or
+ * false to perform the normal menu handling (calling its
+ * Runnable or sending a Message to its target Handler).
+ */
+ public boolean onMenuItemSelected(int featureId, MenuItem item);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java
new file mode 100644
index 0000000000..d7f110fc62
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java
@@ -0,0 +1,1104 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.widget;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ResolveInfo;
+import android.database.DataSetObservable;
+import android.os.Handler;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.Xml;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+/**
+ * <p>
+ * This class represents a data model for choosing a component for handing a
+ * given {@link Intent}. The model is responsible for querying the system for
+ * activities that can handle the given intent and order found activities
+ * based on historical data of previous choices. The historical data is stored
+ * in an application private file. If a client does not want to have persistent
+ * choice history the file can be omitted, thus the activities will be ordered
+ * based on historical usage for the current session.
+ * <p>
+ * </p>
+ * For each backing history file there is a singleton instance of this class. Thus,
+ * several clients that specify the same history file will share the same model. Note
+ * that if multiple clients are sharing the same model they should implement semantically
+ * equivalent functionality since setting the model intent will change the found
+ * activities and they may be inconsistent with the functionality of some of the clients.
+ * For example, choosing a share activity can be implemented by a single backing
+ * model and two different views for performing the selection. If however, one of the
+ * views is used for sharing but the other for importing, for example, then each
+ * view should be backed by a separate model.
+ * </p>
+ * <p>
+ * The way clients interact with this class is as follows:
+ * </p>
+ * <p>
+ * <pre>
+ * <code>
+ * // Get a model and set it to a couple of clients with semantically similar function.
+ * ActivityChooserModel dataModel =
+ * ActivityChooserModel.get(context, "task_specific_history_file_name.xml");
+ *
+ * ActivityChooserModelClient modelClient1 = getActivityChooserModelClient1();
+ * modelClient1.setActivityChooserModel(dataModel);
+ *
+ * ActivityChooserModelClient modelClient2 = getActivityChooserModelClient2();
+ * modelClient2.setActivityChooserModel(dataModel);
+ *
+ * // Set an intent to choose a an activity for.
+ * dataModel.setIntent(intent);
+ * <pre>
+ * <code>
+ * </p>
+ * <p>
+ * <strong>Note:</strong> This class is thread safe.
+ * </p>
+ *
+ * @hide
+ */
+class ActivityChooserModel extends DataSetObservable {
+
+ /**
+ * Client that utilizes an {@link ActivityChooserModel}.
+ */
+ public interface ActivityChooserModelClient {
+
+ /**
+ * Sets the {@link ActivityChooserModel}.
+ *
+ * @param dataModel The model.
+ */
+ public void setActivityChooserModel(ActivityChooserModel dataModel);
+ }
+
+ /**
+ * Defines a sorter that is responsible for sorting the activities
+ * based on the provided historical choices and an intent.
+ */
+ public interface ActivitySorter {
+
+ /**
+ * Sorts the <code>activities</code> in descending order of relevance
+ * based on previous history and an intent.
+ *
+ * @param intent The {@link Intent}.
+ * @param activities Activities to be sorted.
+ * @param historicalRecords Historical records.
+ */
+ // This cannot be done by a simple comparator since an Activity weight
+ // is computed from history. Note that Activity implements Comparable.
+ public void sort(Intent intent, List<ActivityResolveInfo> activities,
+ List<HistoricalRecord> historicalRecords);
+ }
+
+ /**
+ * Listener for choosing an activity.
+ */
+ public interface OnChooseActivityListener {
+
+ /**
+ * Called when an activity has been chosen. The client can decide whether
+ * an activity can be chosen and if so the caller of
+ * {@link ActivityChooserModel#chooseActivity(int)} will receive and {@link Intent}
+ * for launching it.
+ * <p>
+ * <strong>Note:</strong> Modifying the intent is not permitted and
+ * any changes to the latter will be ignored.
+ * </p>
+ *
+ * @param host The listener's host model.
+ * @param intent The intent for launching the chosen activity.
+ * @return Whether the intent is handled and should not be delivered to clients.
+ *
+ * @see ActivityChooserModel#chooseActivity(int)
+ */
+ public boolean onChooseActivity(ActivityChooserModel host, Intent intent);
+ }
+
+ /**
+ * Flag for selecting debug mode.
+ */
+ private static final boolean DEBUG = false;
+
+ /**
+ * Tag used for logging.
+ */
+ private static final String LOG_TAG = ActivityChooserModel.class.getSimpleName();
+
+ /**
+ * The root tag in the history file.
+ */
+ private static final String TAG_HISTORICAL_RECORDS = "historical-records";
+
+ /**
+ * The tag for a record in the history file.
+ */
+ private static final String TAG_HISTORICAL_RECORD = "historical-record";
+
+ /**
+ * Attribute for the activity.
+ */
+ private static final String ATTRIBUTE_ACTIVITY = "activity";
+
+ /**
+ * Attribute for the choice time.
+ */
+ private static final String ATTRIBUTE_TIME = "time";
+
+ /**
+ * Attribute for the choice weight.
+ */
+ private static final String ATTRIBUTE_WEIGHT = "weight";
+
+ /**
+ * The default name of the choice history file.
+ */
+ public static final String DEFAULT_HISTORY_FILE_NAME =
+ "activity_choser_model_history.xml";
+
+ /**
+ * The default maximal length of the choice history.
+ */
+ public static final int DEFAULT_HISTORY_MAX_LENGTH = 50;
+
+ /**
+ * The amount with which to inflate a chosen activity when set as default.
+ */
+ private static final int DEFAULT_ACTIVITY_INFLATION = 5;
+
+ /**
+ * Default weight for a choice record.
+ */
+ private static final float DEFAULT_HISTORICAL_RECORD_WEIGHT = 1.0f;
+
+ /**
+ * The extension of the history file.
+ */
+ private static final String HISTORY_FILE_EXTENSION = ".xml";
+
+ /**
+ * An invalid item index.
+ */
+ private static final int INVALID_INDEX = -1;
+
+ /**
+ * Lock to guard the model registry.
+ */
+ private static final Object sRegistryLock = new Object();
+
+ /**
+ * This the registry for data models.
+ */
+ private static final Map<String, ActivityChooserModel> sDataModelRegistry =
+ new HashMap<String, ActivityChooserModel>();
+
+ /**
+ * Lock for synchronizing on this instance.
+ */
+ private final Object mInstanceLock = new Object();
+
+ /**
+ * List of activities that can handle the current intent.
+ */
+ private final List<ActivityResolveInfo> mActivites = new ArrayList<ActivityResolveInfo>();
+
+ /**
+ * List with historical choice records.
+ */
+ private final List<HistoricalRecord> mHistoricalRecords = new ArrayList<HistoricalRecord>();
+
+ /**
+ * Context for accessing resources.
+ */
+ private final Context mContext;
+
+ /**
+ * The name of the history file that backs this model.
+ */
+ private final String mHistoryFileName;
+
+ /**
+ * The intent for which a activity is being chosen.
+ */
+ private Intent mIntent;
+
+ /**
+ * The sorter for ordering activities based on intent and past choices.
+ */
+ private ActivitySorter mActivitySorter = new DefaultSorter();
+
+ /**
+ * The maximal length of the choice history.
+ */
+ private int mHistoryMaxSize = DEFAULT_HISTORY_MAX_LENGTH;
+
+ /**
+ * Flag whether choice history can be read. In general many clients can
+ * share the same data model and {@link #readHistoricalData()} may be called
+ * by arbitrary of them any number of times. Therefore, this class guarantees
+ * that the very first read succeeds and subsequent reads can be performed
+ * only after a call to {@link #persistHistoricalData()} followed by change
+ * of the share records.
+ */
+ private boolean mCanReadHistoricalData = true;
+
+ /**
+ * Flag whether the choice history was read. This is used to enforce that
+ * before calling {@link #persistHistoricalData()} a call to
+ * {@link #persistHistoricalData()} has been made. This aims to avoid a
+ * scenario in which a choice history file exits, it is not read yet and
+ * it is overwritten. Note that always all historical records are read in
+ * full and the file is rewritten. This is necessary since we need to
+ * purge old records that are outside of the sliding window of past choices.
+ */
+ private boolean mReadShareHistoryCalled = false;
+
+ /**
+ * Flag whether the choice records have changed. In general many clients can
+ * share the same data model and {@link #persistHistoricalData()} may be called
+ * by arbitrary of them any number of times. Therefore, this class guarantees
+ * that choice history will be persisted only if it has changed.
+ */
+ private boolean mHistoricalRecordsChanged = true;
+
+ /**
+ * Hander for scheduling work on client tread.
+ */
+ private final Handler mHandler = new Handler();
+
+ /**
+ * Policy for controlling how the model handles chosen activities.
+ */
+ private OnChooseActivityListener mActivityChoserModelPolicy;
+
+ /**
+ * Gets the data model backed by the contents of the provided file with historical data.
+ * Note that only one data model is backed by a given file, thus multiple calls with
+ * the same file name will return the same model instance. If no such instance is present
+ * it is created.
+ * <p>
+ * <strong>Note:</strong> To use the default historical data file clients should explicitly
+ * pass as file name {@link #DEFAULT_HISTORY_FILE_NAME}. If no persistence of the choice
+ * history is desired clients should pass <code>null</code> for the file name. In such
+ * case a new model is returned for each invocation.
+ * </p>
+ *
+ * <p>
+ * <strong>Always use difference historical data files for semantically different actions.
+ * For example, sharing is different from importing.</strong>
+ * </p>
+ *
+ * @param context Context for loading resources.
+ * @param historyFileName File name with choice history, <code>null</code>
+ * if the model should not be backed by a file. In this case the activities
+ * will be ordered only by data from the current session.
+ *
+ * @return The model.
+ */
+ public static ActivityChooserModel get(Context context, String historyFileName) {
+ synchronized (sRegistryLock) {
+ ActivityChooserModel dataModel = sDataModelRegistry.get(historyFileName);
+ if (dataModel == null) {
+ dataModel = new ActivityChooserModel(context, historyFileName);
+ sDataModelRegistry.put(historyFileName, dataModel);
+ }
+ dataModel.readHistoricalData();
+ return dataModel;
+ }
+ }
+
+ /**
+ * Creates a new instance.
+ *
+ * @param context Context for loading resources.
+ * @param historyFileName The history XML file.
+ */
+ private ActivityChooserModel(Context context, String historyFileName) {
+ mContext = context.getApplicationContext();
+ if (!TextUtils.isEmpty(historyFileName)
+ && !historyFileName.endsWith(HISTORY_FILE_EXTENSION)) {
+ mHistoryFileName = historyFileName + HISTORY_FILE_EXTENSION;
+ } else {
+ mHistoryFileName = historyFileName;
+ }
+ }
+
+ /**
+ * Sets an intent for which to choose a activity.
+ * <p>
+ * <strong>Note:</strong> Clients must set only semantically similar
+ * intents for each data model.
+ * <p>
+ *
+ * @param intent The intent.
+ */
+ public void setIntent(Intent intent) {
+ synchronized (mInstanceLock) {
+ if (mIntent == intent) {
+ return;
+ }
+ mIntent = intent;
+ loadActivitiesLocked();
+ }
+ }
+
+ /**
+ * Gets the intent for which a activity is being chosen.
+ *
+ * @return The intent.
+ */
+ public Intent getIntent() {
+ synchronized (mInstanceLock) {
+ return mIntent;
+ }
+ }
+
+ /**
+ * Gets the number of activities that can handle the intent.
+ *
+ * @return The activity count.
+ *
+ * @see #setIntent(Intent)
+ */
+ public int getActivityCount() {
+ synchronized (mInstanceLock) {
+ return mActivites.size();
+ }
+ }
+
+ /**
+ * Gets an activity at a given index.
+ *
+ * @return The activity.
+ *
+ * @see ActivityResolveInfo
+ * @see #setIntent(Intent)
+ */
+ public ResolveInfo getActivity(int index) {
+ synchronized (mInstanceLock) {
+ return mActivites.get(index).resolveInfo;
+ }
+ }
+
+ /**
+ * Gets the index of a the given activity.
+ *
+ * @param activity The activity index.
+ *
+ * @return The index if found, -1 otherwise.
+ */
+ public int getActivityIndex(ResolveInfo activity) {
+ List<ActivityResolveInfo> activities = mActivites;
+ final int activityCount = activities.size();
+ for (int i = 0; i < activityCount; i++) {
+ ActivityResolveInfo currentActivity = activities.get(i);
+ if (currentActivity.resolveInfo == activity) {
+ return i;
+ }
+ }
+ return INVALID_INDEX;
+ }
+
+ /**
+ * Chooses a activity to handle the current intent. This will result in
+ * adding a historical record for that action and construct intent with
+ * its component name set such that it can be immediately started by the
+ * client.
+ * <p>
+ * <strong>Note:</strong> By calling this method the client guarantees
+ * that the returned intent will be started. This intent is returned to
+ * the client solely to let additional customization before the start.
+ * </p>
+ *
+ * @return An {@link Intent} for launching the activity or null if the
+ * policy has consumed the intent.
+ *
+ * @see HistoricalRecord
+ * @see OnChooseActivityListener
+ */
+ public Intent chooseActivity(int index) {
+ ActivityResolveInfo chosenActivity = mActivites.get(index);
+
+ ComponentName chosenName = new ComponentName(
+ chosenActivity.resolveInfo.activityInfo.packageName,
+ chosenActivity.resolveInfo.activityInfo.name);
+
+ Intent choiceIntent = new Intent(mIntent);
+ choiceIntent.setComponent(chosenName);
+
+ if (mActivityChoserModelPolicy != null) {
+ // Do not allow the policy to change the intent.
+ Intent choiceIntentCopy = new Intent(choiceIntent);
+ final boolean handled = mActivityChoserModelPolicy.onChooseActivity(this,
+ choiceIntentCopy);
+ if (handled) {
+ return null;
+ }
+ }
+
+ HistoricalRecord historicalRecord = new HistoricalRecord(chosenName,
+ System.currentTimeMillis(), DEFAULT_HISTORICAL_RECORD_WEIGHT);
+ addHisoricalRecord(historicalRecord);
+
+ return choiceIntent;
+ }
+
+ /**
+ * Sets the listener for choosing an activity.
+ *
+ * @param listener The listener.
+ */
+ public void setOnChooseActivityListener(OnChooseActivityListener listener) {
+ mActivityChoserModelPolicy = listener;
+ }
+
+ /**
+ * Gets the default activity, The default activity is defined as the one
+ * with highest rank i.e. the first one in the list of activities that can
+ * handle the intent.
+ *
+ * @return The default activity, <code>null</code> id not activities.
+ *
+ * @see #getActivity(int)
+ */
+ public ResolveInfo getDefaultActivity() {
+ synchronized (mInstanceLock) {
+ if (!mActivites.isEmpty()) {
+ return mActivites.get(0).resolveInfo;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the default activity. The default activity is set by adding a
+ * historical record with weight high enough that this activity will
+ * become the highest ranked. Such a strategy guarantees that the default
+ * will eventually change if not used. Also the weight of the record for
+ * setting a default is inflated with a constant amount to guarantee that
+ * it will stay as default for awhile.
+ *
+ * @param index The index of the activity to set as default.
+ */
+ public void setDefaultActivity(int index) {
+ ActivityResolveInfo newDefaultActivity = mActivites.get(index);
+ ActivityResolveInfo oldDefaultActivity = mActivites.get(0);
+
+ final float weight;
+ if (oldDefaultActivity != null) {
+ // Add a record with weight enough to boost the chosen at the top.
+ weight = oldDefaultActivity.weight - newDefaultActivity.weight
+ + DEFAULT_ACTIVITY_INFLATION;
+ } else {
+ weight = DEFAULT_HISTORICAL_RECORD_WEIGHT;
+ }
+
+ ComponentName defaultName = new ComponentName(
+ newDefaultActivity.resolveInfo.activityInfo.packageName,
+ newDefaultActivity.resolveInfo.activityInfo.name);
+ HistoricalRecord historicalRecord = new HistoricalRecord(defaultName,
+ System.currentTimeMillis(), weight);
+ addHisoricalRecord(historicalRecord);
+ }
+
+ /**
+ * Reads the history data from the backing file if the latter
+ * was provided. Calling this method more than once before a call
+ * to {@link #persistHistoricalData()} has been made has no effect.
+ * <p>
+ * <strong>Note:</strong> Historical data is read asynchronously and
+ * as soon as the reading is completed any registered
+ * {@link DataSetObserver}s will be notified. Also no historical
+ * data is read until this method is invoked.
+ * <p>
+ */
+ private void readHistoricalData() {
+ synchronized (mInstanceLock) {
+ if (!mCanReadHistoricalData || !mHistoricalRecordsChanged) {
+ return;
+ }
+ mCanReadHistoricalData = false;
+ mReadShareHistoryCalled = true;
+ if (!TextUtils.isEmpty(mHistoryFileName)) {
+ /*AsyncTask.*/SERIAL_EXECUTOR.execute(new HistoryLoader());
+ }
+ }
+ }
+
+ private static final Executor SERIAL_EXECUTOR = Executors.newSingleThreadExecutor();
+
+ /**
+ * Persists the history data to the backing file if the latter
+ * was provided. Calling this method before a call to {@link #readHistoricalData()}
+ * throws an exception. Calling this method more than one without choosing an
+ * activity has not effect.
+ *
+ * @throws IllegalStateException If this method is called before a call to
+ * {@link #readHistoricalData()}.
+ */
+ private void persistHistoricalData() {
+ synchronized (mInstanceLock) {
+ if (!mReadShareHistoryCalled) {
+ throw new IllegalStateException("No preceding call to #readHistoricalData");
+ }
+ if (!mHistoricalRecordsChanged) {
+ return;
+ }
+ mHistoricalRecordsChanged = false;
+ mCanReadHistoricalData = true;
+ if (!TextUtils.isEmpty(mHistoryFileName)) {
+ /*AsyncTask.*/SERIAL_EXECUTOR.execute(new HistoryPersister());
+ }
+ }
+ }
+
+ /**
+ * Sets the sorter for ordering activities based on historical data and an intent.
+ *
+ * @param activitySorter The sorter.
+ *
+ * @see ActivitySorter
+ */
+ public void setActivitySorter(ActivitySorter activitySorter) {
+ synchronized (mInstanceLock) {
+ if (mActivitySorter == activitySorter) {
+ return;
+ }
+ mActivitySorter = activitySorter;
+ sortActivities();
+ }
+ }
+
+ /**
+ * Sorts the activities based on history and an intent. If
+ * a sorter is not specified this a default implementation is used.
+ *
+ * @see #setActivitySorter(ActivitySorter)
+ */
+ private void sortActivities() {
+ synchronized (mInstanceLock) {
+ if (mActivitySorter != null && !mActivites.isEmpty()) {
+ mActivitySorter.sort(mIntent, mActivites,
+ Collections.unmodifiableList(mHistoricalRecords));
+ notifyChanged();
+ }
+ }
+ }
+
+ /**
+ * Sets the maximal size of the historical data. Defaults to
+ * {@link #DEFAULT_HISTORY_MAX_LENGTH}
+ * <p>
+ * <strong>Note:</strong> Setting this property will immediately
+ * enforce the specified max history size by dropping enough old
+ * historical records to enforce the desired size. Thus, any
+ * records that exceed the history size will be discarded and
+ * irreversibly lost.
+ * </p>
+ *
+ * @param historyMaxSize The max history size.
+ */
+ public void setHistoryMaxSize(int historyMaxSize) {
+ synchronized (mInstanceLock) {
+ if (mHistoryMaxSize == historyMaxSize) {
+ return;
+ }
+ mHistoryMaxSize = historyMaxSize;
+ pruneExcessiveHistoricalRecordsLocked();
+ sortActivities();
+ }
+ }
+
+ /**
+ * Gets the history max size.
+ *
+ * @return The history max size.
+ */
+ public int getHistoryMaxSize() {
+ synchronized (mInstanceLock) {
+ return mHistoryMaxSize;
+ }
+ }
+
+ /**
+ * Gets the history size.
+ *
+ * @return The history size.
+ */
+ public int getHistorySize() {
+ synchronized (mInstanceLock) {
+ return mHistoricalRecords.size();
+ }
+ }
+
+ /**
+ * Adds a historical record.
+ *
+ * @param historicalRecord The record to add.
+ * @return True if the record was added.
+ */
+ private boolean addHisoricalRecord(HistoricalRecord historicalRecord) {
+ synchronized (mInstanceLock) {
+ final boolean added = mHistoricalRecords.add(historicalRecord);
+ if (added) {
+ mHistoricalRecordsChanged = true;
+ pruneExcessiveHistoricalRecordsLocked();
+ persistHistoricalData();
+ sortActivities();
+ }
+ return added;
+ }
+ }
+
+ /**
+ * Prunes older excessive records to guarantee {@link #mHistoryMaxSize}.
+ */
+ private void pruneExcessiveHistoricalRecordsLocked() {
+ List<HistoricalRecord> choiceRecords = mHistoricalRecords;
+ final int pruneCount = choiceRecords.size() - mHistoryMaxSize;
+ if (pruneCount <= 0) {
+ return;
+ }
+ mHistoricalRecordsChanged = true;
+ for (int i = 0; i < pruneCount; i++) {
+ HistoricalRecord prunedRecord = choiceRecords.remove(0);
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Pruned: " + prunedRecord);
+ }
+ }
+ }
+
+ /**
+ * Loads the activities.
+ */
+ private void loadActivitiesLocked() {
+ mActivites.clear();
+ if (mIntent != null) {
+ List<ResolveInfo> resolveInfos =
+ mContext.getPackageManager().queryIntentActivities(mIntent, 0);
+ final int resolveInfoCount = resolveInfos.size();
+ for (int i = 0; i < resolveInfoCount; i++) {
+ ResolveInfo resolveInfo = resolveInfos.get(i);
+ mActivites.add(new ActivityResolveInfo(resolveInfo));
+ }
+ sortActivities();
+ } else {
+ notifyChanged();
+ }
+ }
+
+ /**
+ * Represents a record in the history.
+ */
+ public final static class HistoricalRecord {
+
+ /**
+ * The activity name.
+ */
+ public final ComponentName activity;
+
+ /**
+ * The choice time.
+ */
+ public final long time;
+
+ /**
+ * The record weight.
+ */
+ public final float weight;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param activityName The activity component name flattened to string.
+ * @param time The time the activity was chosen.
+ * @param weight The weight of the record.
+ */
+ public HistoricalRecord(String activityName, long time, float weight) {
+ this(ComponentName.unflattenFromString(activityName), time, weight);
+ }
+
+ /**
+ * Creates a new instance.
+ *
+ * @param activityName The activity name.
+ * @param time The time the activity was chosen.
+ * @param weight The weight of the record.
+ */
+ public HistoricalRecord(ComponentName activityName, long time, float weight) {
+ this.activity = activityName;
+ this.time = time;
+ this.weight = weight;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((activity == null) ? 0 : activity.hashCode());
+ result = prime * result + (int) (time ^ (time >>> 32));
+ result = prime * result + Float.floatToIntBits(weight);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ HistoricalRecord other = (HistoricalRecord) obj;
+ if (activity == null) {
+ if (other.activity != null) {
+ return false;
+ }
+ } else if (!activity.equals(other.activity)) {
+ return false;
+ }
+ if (time != other.time) {
+ return false;
+ }
+ if (Float.floatToIntBits(weight) != Float.floatToIntBits(other.weight)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("[");
+ builder.append("; activity:").append(activity);
+ builder.append("; time:").append(time);
+ builder.append("; weight:").append(new BigDecimal(weight));
+ builder.append("]");
+ return builder.toString();
+ }
+ }
+
+ /**
+ * Represents an activity.
+ */
+ public final class ActivityResolveInfo implements Comparable<ActivityResolveInfo> {
+
+ /**
+ * The {@link ResolveInfo} of the activity.
+ */
+ public final ResolveInfo resolveInfo;
+
+ /**
+ * Weight of the activity. Useful for sorting.
+ */
+ public float weight;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param resolveInfo activity {@link ResolveInfo}.
+ */
+ public ActivityResolveInfo(ResolveInfo resolveInfo) {
+ this.resolveInfo = resolveInfo;
+ }
+
+ @Override
+ public int hashCode() {
+ return 31 + Float.floatToIntBits(weight);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ActivityResolveInfo other = (ActivityResolveInfo) obj;
+ if (Float.floatToIntBits(weight) != Float.floatToIntBits(other.weight)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int compareTo(ActivityResolveInfo another) {
+ return Float.floatToIntBits(another.weight) - Float.floatToIntBits(weight);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("[");
+ builder.append("resolveInfo:").append(resolveInfo.toString());
+ builder.append("; weight:").append(new BigDecimal(weight));
+ builder.append("]");
+ return builder.toString();
+ }
+ }
+
+ /**
+ * Default activity sorter implementation.
+ */
+ private final class DefaultSorter implements ActivitySorter {
+ private static final float WEIGHT_DECAY_COEFFICIENT = 0.95f;
+
+ private final Map<String, ActivityResolveInfo> mPackageNameToActivityMap =
+ new HashMap<String, ActivityResolveInfo>();
+
+ public void sort(Intent intent, List<ActivityResolveInfo> activities,
+ List<HistoricalRecord> historicalRecords) {
+ Map<String, ActivityResolveInfo> packageNameToActivityMap =
+ mPackageNameToActivityMap;
+ packageNameToActivityMap.clear();
+
+ final int activityCount = activities.size();
+ for (int i = 0; i < activityCount; i++) {
+ ActivityResolveInfo activity = activities.get(i);
+ activity.weight = 0.0f;
+ String packageName = activity.resolveInfo.activityInfo.packageName;
+ packageNameToActivityMap.put(packageName, activity);
+ }
+
+ final int lastShareIndex = historicalRecords.size() - 1;
+ float nextRecordWeight = 1;
+ for (int i = lastShareIndex; i >= 0; i--) {
+ HistoricalRecord historicalRecord = historicalRecords.get(i);
+ String packageName = historicalRecord.activity.getPackageName();
+ ActivityResolveInfo activity = packageNameToActivityMap.get(packageName);
+ if (activity != null) {
+ activity.weight += historicalRecord.weight * nextRecordWeight;
+ nextRecordWeight = nextRecordWeight * WEIGHT_DECAY_COEFFICIENT;
+ }
+ }
+
+ Collections.sort(activities);
+
+ if (DEBUG) {
+ for (int i = 0; i < activityCount; i++) {
+ Log.i(LOG_TAG, "Sorted: " + activities.get(i));
+ }
+ }
+ }
+ }
+
+ /**
+ * Command for reading the historical records from a file off the UI thread.
+ */
+ private final class HistoryLoader implements Runnable {
+
+ public void run() {
+ FileInputStream fis = null;
+ try {
+ fis = mContext.openFileInput(mHistoryFileName);
+ } catch (FileNotFoundException fnfe) {
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Could not open historical records file: " + mHistoryFileName);
+ }
+ return;
+ }
+ try {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(fis, null);
+
+ int type = XmlPullParser.START_DOCUMENT;
+ while (type != XmlPullParser.END_DOCUMENT && type != XmlPullParser.START_TAG) {
+ type = parser.next();
+ }
+
+ if (!TAG_HISTORICAL_RECORDS.equals(parser.getName())) {
+ throw new XmlPullParserException("Share records file does not start with "
+ + TAG_HISTORICAL_RECORDS + " tag.");
+ }
+
+ List<HistoricalRecord> readRecords = new ArrayList<HistoricalRecord>();
+
+ while (true) {
+ type = parser.next();
+ if (type == XmlPullParser.END_DOCUMENT) {
+ break;
+ }
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ String nodeName = parser.getName();
+ if (!TAG_HISTORICAL_RECORD.equals(nodeName)) {
+ throw new XmlPullParserException("Share records file not well-formed.");
+ }
+
+ String activity = parser.getAttributeValue(null, ATTRIBUTE_ACTIVITY);
+ final long time =
+ Long.parseLong(parser.getAttributeValue(null, ATTRIBUTE_TIME));
+ final float weight =
+ Float.parseFloat(parser.getAttributeValue(null, ATTRIBUTE_WEIGHT));
+
+ HistoricalRecord readRecord = new HistoricalRecord(activity, time,
+ weight);
+ readRecords.add(readRecord);
+
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Read " + readRecord.toString());
+ }
+ }
+
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Read " + readRecords.size() + " historical records.");
+ }
+
+ synchronized (mInstanceLock) {
+ Set<HistoricalRecord> uniqueShareRecords =
+ new LinkedHashSet<HistoricalRecord>(readRecords);
+
+ // Make sure no duplicates. Example: Read a file with
+ // one record, add one record, persist the two records,
+ // add a record, read the persisted records - the
+ // read two records should not be added again.
+ List<HistoricalRecord> historicalRecords = mHistoricalRecords;
+ final int historicalRecordsCount = historicalRecords.size();
+ for (int i = historicalRecordsCount - 1; i >= 0; i--) {
+ HistoricalRecord historicalRecord = historicalRecords.get(i);
+ uniqueShareRecords.add(historicalRecord);
+ }
+
+ if (historicalRecords.size() == uniqueShareRecords.size()) {
+ return;
+ }
+
+ // Make sure the oldest records go to the end.
+ historicalRecords.clear();
+ historicalRecords.addAll(uniqueShareRecords);
+
+ mHistoricalRecordsChanged = true;
+
+ // Do this on the client thread since the client may be on the UI
+ // thread, wait for data changes which happen during sorting, and
+ // perform UI modification based on the data change.
+ mHandler.post(new Runnable() {
+ public void run() {
+ pruneExcessiveHistoricalRecordsLocked();
+ sortActivities();
+ }
+ });
+ }
+ } catch (XmlPullParserException xppe) {
+ Log.e(LOG_TAG, "Error reading historical recrod file: " + mHistoryFileName, xppe);
+ } catch (IOException ioe) {
+ Log.e(LOG_TAG, "Error reading historical recrod file: " + mHistoryFileName, ioe);
+ } finally {
+ if (fis != null) {
+ try {
+ fis.close();
+ } catch (IOException ioe) {
+ /* ignore */
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Command for persisting the historical records to a file off the UI thread.
+ */
+ private final class HistoryPersister implements Runnable {
+
+ public void run() {
+ FileOutputStream fos = null;
+ List<HistoricalRecord> records = null;
+
+ synchronized (mInstanceLock) {
+ records = new ArrayList<HistoricalRecord>(mHistoricalRecords);
+ }
+
+ try {
+ fos = mContext.openFileOutput(mHistoryFileName, Context.MODE_PRIVATE);
+ } catch (FileNotFoundException fnfe) {
+ Log.e(LOG_TAG, "Error writing historical recrod file: " + mHistoryFileName, fnfe);
+ return;
+ }
+
+ XmlSerializer serializer = Xml.newSerializer();
+
+ try {
+ serializer.setOutput(fos, null);
+ serializer.startDocument("UTF-8", true);
+ serializer.startTag(null, TAG_HISTORICAL_RECORDS);
+
+ final int recordCount = records.size();
+ for (int i = 0; i < recordCount; i++) {
+ HistoricalRecord record = records.remove(0);
+ serializer.startTag(null, TAG_HISTORICAL_RECORD);
+ serializer.attribute(null, ATTRIBUTE_ACTIVITY, record.activity.flattenToString());
+ serializer.attribute(null, ATTRIBUTE_TIME, String.valueOf(record.time));
+ serializer.attribute(null, ATTRIBUTE_WEIGHT, String.valueOf(record.weight));
+ serializer.endTag(null, TAG_HISTORICAL_RECORD);
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Wrote " + record.toString());
+ }
+ }
+
+ serializer.endTag(null, TAG_HISTORICAL_RECORDS);
+ serializer.endDocument();
+
+ if (DEBUG) {
+ Log.i(LOG_TAG, "Wrote " + recordCount + " historical records.");
+ }
+ } catch (IllegalArgumentException iae) {
+ Log.e(LOG_TAG, "Error writing historical recrod file: " + mHistoryFileName, iae);
+ } catch (IllegalStateException ise) {
+ Log.e(LOG_TAG, "Error writing historical recrod file: " + mHistoryFileName, ise);
+ } catch (IOException ioe) {
+ Log.e(LOG_TAG, "Error writing historical recrod file: " + mHistoryFileName, ioe);
+ } finally {
+ if (fos != null) {
+ try {
+ fos.close();
+ } catch (IOException e) {
+ /* ignore */
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserView.java
new file mode 100644
index 0000000000..7eb7330e48
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ActivityChooserView.java
@@ -0,0 +1,839 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.widget;
+
+import android.os.Build;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.internal.widget.IcsLinearLayout;
+import com.actionbarsherlock.internal.widget.IcsListPopupWindow;
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.widget.ActivityChooserModel.ActivityChooserModelClient;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+/**
+ * This class is a view for choosing an activity for handling a given {@link Intent}.
+ * <p>
+ * The view is composed of two adjacent buttons:
+ * <ul>
+ * <li>
+ * The left button is an immediate action and allows one click activity choosing.
+ * Tapping this button immediately executes the intent without requiring any further
+ * user input. Long press on this button shows a popup for changing the default
+ * activity.
+ * </li>
+ * <li>
+ * The right button is an overflow action and provides an optimized menu
+ * of additional activities. Tapping this button shows a popup anchored to this
+ * view, listing the most frequently used activities. This list is initially
+ * limited to a small number of items in frequency used order. The last item,
+ * "Show all..." serves as an affordance to display all available activities.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @hide
+ */
+class ActivityChooserView extends ViewGroup implements ActivityChooserModelClient {
+
+ /**
+ * An adapter for displaying the activities in an {@link AdapterView}.
+ */
+ private final ActivityChooserViewAdapter mAdapter;
+
+ /**
+ * Implementation of various interfaces to avoid publishing them in the APIs.
+ */
+ private final Callbacks mCallbacks;
+
+ /**
+ * The content of this view.
+ */
+ private final IcsLinearLayout mActivityChooserContent;
+
+ /**
+ * Stores the background drawable to allow hiding and latter showing.
+ */
+ private final Drawable mActivityChooserContentBackground;
+
+ /**
+ * The expand activities action button;
+ */
+ private final FrameLayout mExpandActivityOverflowButton;
+
+ /**
+ * The image for the expand activities action button;
+ */
+ private final ImageView mExpandActivityOverflowButtonImage;
+
+ /**
+ * The default activities action button;
+ */
+ private final FrameLayout mDefaultActivityButton;
+
+ /**
+ * The image for the default activities action button;
+ */
+ private final ImageView mDefaultActivityButtonImage;
+
+ /**
+ * The maximal width of the list popup.
+ */
+ private final int mListPopupMaxWidth;
+
+ /**
+ * The ActionProvider hosting this view, if applicable.
+ */
+ ActionProvider mProvider;
+
+ /**
+ * Observer for the model data.
+ */
+ private final DataSetObserver mModelDataSetOberver = new DataSetObserver() {
+
+ @Override
+ public void onChanged() {
+ super.onChanged();
+ mAdapter.notifyDataSetChanged();
+ }
+ @Override
+ public void onInvalidated() {
+ super.onInvalidated();
+ mAdapter.notifyDataSetInvalidated();
+ }
+ };
+
+ private final OnGlobalLayoutListener mOnGlobalLayoutListener = new OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ if (isShowingPopup()) {
+ if (!isShown()) {
+ getListPopupWindow().dismiss();
+ } else {
+ getListPopupWindow().show();
+ if (mProvider != null) {
+ mProvider.subUiVisibilityChanged(true);
+ }
+ }
+ }
+ }
+ };
+
+ /**
+ * Popup window for showing the activity overflow list.
+ */
+ private IcsListPopupWindow mListPopupWindow;
+
+ /**
+ * Listener for the dismissal of the popup/alert.
+ */
+ private PopupWindow.OnDismissListener mOnDismissListener;
+
+ /**
+ * Flag whether a default activity currently being selected.
+ */
+ private boolean mIsSelectingDefaultActivity;
+
+ /**
+ * The count of activities in the popup.
+ */
+ private int mInitialActivityCount = ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT;
+
+ /**
+ * Flag whether this view is attached to a window.
+ */
+ private boolean mIsAttachedToWindow;
+
+ /**
+ * String resource for formatting content description of the default target.
+ */
+ private int mDefaultActionButtonContentDescription;
+
+ private final Context mContext;
+
+ /**
+ * Create a new instance.
+ *
+ * @param context The application environment.
+ */
+ public ActivityChooserView(Context context) {
+ this(context, null);
+ }
+
+ /**
+ * Create a new instance.
+ *
+ * @param context The application environment.
+ * @param attrs A collection of attributes.
+ */
+ public ActivityChooserView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ /**
+ * Create a new instance.
+ *
+ * @param context The application environment.
+ * @param attrs A collection of attributes.
+ * @param defStyle The default style to apply to this view.
+ */
+ public ActivityChooserView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mContext = context;
+
+ TypedArray attributesArray = context.obtainStyledAttributes(attrs,
+ R.styleable.SherlockActivityChooserView, defStyle, 0);
+
+ mInitialActivityCount = attributesArray.getInt(
+ R.styleable.SherlockActivityChooserView_initialActivityCount,
+ ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT);
+
+ Drawable expandActivityOverflowButtonDrawable = attributesArray.getDrawable(
+ R.styleable.SherlockActivityChooserView_expandActivityOverflowButtonDrawable);
+
+ attributesArray.recycle();
+
+ LayoutInflater inflater = LayoutInflater.from(mContext);
+ inflater.inflate(R.layout.abs__activity_chooser_view, this, true);
+
+ mCallbacks = new Callbacks();
+
+ mActivityChooserContent = (IcsLinearLayout) findViewById(R.id.abs__activity_chooser_view_content);
+ mActivityChooserContentBackground = mActivityChooserContent.getBackground();
+
+ mDefaultActivityButton = (FrameLayout) findViewById(R.id.abs__default_activity_button);
+ mDefaultActivityButton.setOnClickListener(mCallbacks);
+ mDefaultActivityButton.setOnLongClickListener(mCallbacks);
+ mDefaultActivityButtonImage = (ImageView) mDefaultActivityButton.findViewById(R.id.abs__image);
+
+ mExpandActivityOverflowButton = (FrameLayout) findViewById(R.id.abs__expand_activities_button);
+ mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
+ mExpandActivityOverflowButtonImage =
+ (ImageView) mExpandActivityOverflowButton.findViewById(R.id.abs__image);
+ mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);
+
+ mAdapter = new ActivityChooserViewAdapter();
+ mAdapter.registerDataSetObserver(new DataSetObserver() {
+ @Override
+ public void onChanged() {
+ super.onChanged();
+ updateAppearance();
+ }
+ });
+
+ Resources resources = context.getResources();
+ mListPopupMaxWidth = Math.max(resources.getDisplayMetrics().widthPixels / 2,
+ resources.getDimensionPixelSize(R.dimen.abs__config_prefDialogWidth));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setActivityChooserModel(ActivityChooserModel dataModel) {
+ mAdapter.setDataModel(dataModel);
+ if (isShowingPopup()) {
+ dismissPopup();
+ showPopup();
+ }
+ }
+
+ /**
+ * Sets the background for the button that expands the activity
+ * overflow list.
+ *
+ * <strong>Note:</strong> Clients would like to set this drawable
+ * as a clue about the action the chosen activity will perform. For
+ * example, if a share activity is to be chosen the drawable should
+ * give a clue that sharing is to be performed.
+ *
+ * @param drawable The drawable.
+ */
+ public void setExpandActivityOverflowButtonDrawable(Drawable drawable) {
+ mExpandActivityOverflowButtonImage.setImageDrawable(drawable);
+ }
+
+ /**
+ * Sets the content description for the button that expands the activity
+ * overflow list.
+ *
+ * description as a clue about the action performed by the button.
+ * For example, if a share activity is to be chosen the content
+ * description should be something like "Share with".
+ *
+ * @param resourceId The content description resource id.
+ */
+ public void setExpandActivityOverflowButtonContentDescription(int resourceId) {
+ CharSequence contentDescription = mContext.getString(resourceId);
+ mExpandActivityOverflowButtonImage.setContentDescription(contentDescription);
+ }
+
+ /**
+ * Set the provider hosting this view, if applicable.
+ * @hide Internal use only
+ */
+ public void setProvider(ActionProvider provider) {
+ mProvider = provider;
+ }
+
+ /**
+ * Shows the popup window with activities.
+ *
+ * @return True if the popup was shown, false if already showing.
+ */
+ public boolean showPopup() {
+ if (isShowingPopup() || !mIsAttachedToWindow) {
+ return false;
+ }
+ mIsSelectingDefaultActivity = false;
+ showPopupUnchecked(mInitialActivityCount);
+ return true;
+ }
+
+ /**
+ * Shows the popup no matter if it was already showing.
+ *
+ * @param maxActivityCount The max number of activities to display.
+ */
+ private void showPopupUnchecked(int maxActivityCount) {
+ if (mAdapter.getDataModel() == null) {
+ throw new IllegalStateException("No data model. Did you call #setDataModel?");
+ }
+
+ getViewTreeObserver().addOnGlobalLayoutListener(mOnGlobalLayoutListener);
+
+ final boolean defaultActivityButtonShown =
+ mDefaultActivityButton.getVisibility() == VISIBLE;
+
+ final int activityCount = mAdapter.getActivityCount();
+ final int maxActivityCountOffset = defaultActivityButtonShown ? 1 : 0;
+ if (maxActivityCount != ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED
+ && activityCount > maxActivityCount + maxActivityCountOffset) {
+ mAdapter.setShowFooterView(true);
+ mAdapter.setMaxActivityCount(maxActivityCount - 1);
+ } else {
+ mAdapter.setShowFooterView(false);
+ mAdapter.setMaxActivityCount(maxActivityCount);
+ }
+
+ IcsListPopupWindow popupWindow = getListPopupWindow();
+ if (!popupWindow.isShowing()) {
+ if (mIsSelectingDefaultActivity || !defaultActivityButtonShown) {
+ mAdapter.setShowDefaultActivity(true, defaultActivityButtonShown);
+ } else {
+ mAdapter.setShowDefaultActivity(false, false);
+ }
+ final int contentWidth = Math.min(mAdapter.measureContentWidth(), mListPopupMaxWidth);
+ popupWindow.setContentWidth(contentWidth);
+ popupWindow.show();
+ if (mProvider != null) {
+ mProvider.subUiVisibilityChanged(true);
+ }
+ popupWindow.getListView().setContentDescription(mContext.getString(
+ R.string.abs__activitychooserview_choose_application));
+ }
+ }
+
+ /**
+ * Dismisses the popup window with activities.
+ *
+ * @return True if dismissed, false if already dismissed.
+ */
+ public boolean dismissPopup() {
+ if (isShowingPopup()) {
+ getListPopupWindow().dismiss();
+ ViewTreeObserver viewTreeObserver = getViewTreeObserver();
+ if (viewTreeObserver.isAlive()) {
+ viewTreeObserver.removeGlobalOnLayoutListener(mOnGlobalLayoutListener);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Gets whether the popup window with activities is shown.
+ *
+ * @return True if the popup is shown.
+ */
+ public boolean isShowingPopup() {
+ return getListPopupWindow().isShowing();
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ ActivityChooserModel dataModel = mAdapter.getDataModel();
+ if (dataModel != null) {
+ try {
+ dataModel.registerObserver(mModelDataSetOberver);
+ } catch (IllegalStateException e) {
+ // Related to #557.
+ }
+ }
+ mIsAttachedToWindow = true;
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ ActivityChooserModel dataModel = mAdapter.getDataModel();
+ if (dataModel != null) {
+ try {
+ dataModel.unregisterObserver(mModelDataSetOberver);
+ } catch (IllegalStateException e) {
+ //Oh, well... fixes issue #557
+ }
+ }
+ ViewTreeObserver viewTreeObserver = getViewTreeObserver();
+ if (viewTreeObserver.isAlive()) {
+ viewTreeObserver.removeGlobalOnLayoutListener(mOnGlobalLayoutListener);
+ }
+ mIsAttachedToWindow = false;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ View child = mActivityChooserContent;
+ // If the default action is not visible we want to be as tall as the
+ // ActionBar so if this widget is used in the latter it will look as
+ // a normal action button.
+ if (mDefaultActivityButton.getVisibility() != VISIBLE) {
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(heightMeasureSpec),
+ MeasureSpec.EXACTLY);
+ }
+ measureChild(child, widthMeasureSpec, heightMeasureSpec);
+ setMeasuredDimension(child.getMeasuredWidth(), child.getMeasuredHeight());
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ mActivityChooserContent.layout(0, 0, right - left, bottom - top);
+ if (getListPopupWindow().isShowing()) {
+ showPopupUnchecked(mAdapter.getMaxActivityCount());
+ } else {
+ dismissPopup();
+ }
+ }
+
+ public ActivityChooserModel getDataModel() {
+ return mAdapter.getDataModel();
+ }
+
+ /**
+ * Sets a listener to receive a callback when the popup is dismissed.
+ *
+ * @param listener The listener to be notified.
+ */
+ public void setOnDismissListener(PopupWindow.OnDismissListener listener) {
+ mOnDismissListener = listener;
+ }
+
+ /**
+ * Sets the initial count of items shown in the activities popup
+ * i.e. the items before the popup is expanded. This is an upper
+ * bound since it is not guaranteed that such number of intent
+ * handlers exist.
+ *
+ * @param itemCount The initial popup item count.
+ */
+ public void setInitialActivityCount(int itemCount) {
+ mInitialActivityCount = itemCount;
+ }
+
+ /**
+ * Sets a content description of the default action button. This
+ * resource should be a string taking one formatting argument and
+ * will be used for formatting the content description of the button
+ * dynamically as the default target changes. For example, a resource
+ * pointing to the string "share with %1$s" will result in a content
+ * description "share with Bluetooth" for the Bluetooth activity.
+ *
+ * @param resourceId The resource id.
+ */
+ public void setDefaultActionButtonContentDescription(int resourceId) {
+ mDefaultActionButtonContentDescription = resourceId;
+ }
+
+ /**
+ * Gets the list popup window which is lazily initialized.
+ *
+ * @return The popup.
+ */
+ private IcsListPopupWindow getListPopupWindow() {
+ if (mListPopupWindow == null) {
+ mListPopupWindow = new IcsListPopupWindow(getContext());
+ mListPopupWindow.setAdapter(mAdapter);
+ mListPopupWindow.setAnchorView(ActivityChooserView.this);
+ mListPopupWindow.setModal(true);
+ mListPopupWindow.setOnItemClickListener(mCallbacks);
+ mListPopupWindow.setOnDismissListener(mCallbacks);
+ }
+ return mListPopupWindow;
+ }
+
+ /**
+ * Updates the buttons state.
+ */
+ private void updateAppearance() {
+ // Expand overflow button.
+ if (mAdapter.getCount() > 0) {
+ mExpandActivityOverflowButton.setEnabled(true);
+ } else {
+ mExpandActivityOverflowButton.setEnabled(false);
+ }
+ // Default activity button.
+ final int activityCount = mAdapter.getActivityCount();
+ final int historySize = mAdapter.getHistorySize();
+ if (activityCount > 0 && historySize > 0) {
+ mDefaultActivityButton.setVisibility(VISIBLE);
+ ResolveInfo activity = mAdapter.getDefaultActivity();
+ PackageManager packageManager = mContext.getPackageManager();
+ mDefaultActivityButtonImage.setImageDrawable(activity.loadIcon(packageManager));
+ if (mDefaultActionButtonContentDescription != 0) {
+ CharSequence label = activity.loadLabel(packageManager);
+ String contentDescription = mContext.getString(
+ mDefaultActionButtonContentDescription, label);
+ mDefaultActivityButton.setContentDescription(contentDescription);
+ }
+
+ // Work-around for #415.
+ mAdapter.setShowDefaultActivity(false, false);
+ } else {
+ mDefaultActivityButton.setVisibility(View.GONE);
+ }
+ // Activity chooser content.
+ if (mDefaultActivityButton.getVisibility() == VISIBLE) {
+ mActivityChooserContent.setBackgroundDrawable(mActivityChooserContentBackground);
+ } else {
+ mActivityChooserContent.setBackgroundDrawable(null);
+ mActivityChooserContent.setPadding(0, 0, 0, 0);
+ }
+ }
+
+ /**
+ * Interface implementation to avoid publishing them in the APIs.
+ */
+ private class Callbacks implements AdapterView.OnItemClickListener,
+ View.OnClickListener, View.OnLongClickListener, PopupWindow.OnDismissListener {
+
+ // AdapterView#OnItemClickListener
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ ActivityChooserViewAdapter adapter = (ActivityChooserViewAdapter) parent.getAdapter();
+ final int itemViewType = adapter.getItemViewType(position);
+ switch (itemViewType) {
+ case ActivityChooserViewAdapter.ITEM_VIEW_TYPE_FOOTER: {
+ showPopupUnchecked(ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED);
+ } break;
+ case ActivityChooserViewAdapter.ITEM_VIEW_TYPE_ACTIVITY: {
+ dismissPopup();
+ if (mIsSelectingDefaultActivity) {
+ // The item at position zero is the default already.
+ if (position > 0) {
+ mAdapter.getDataModel().setDefaultActivity(position);
+ }
+ } else {
+ // If the default target is not shown in the list, the first
+ // item in the model is default action => adjust index
+ position = mAdapter.getShowDefaultActivity() ? position : position + 1;
+ Intent launchIntent = mAdapter.getDataModel().chooseActivity(position);
+ if (launchIntent != null) {
+ mContext.startActivity(launchIntent);
+ }
+ }
+ } break;
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+
+ // View.OnClickListener
+ public void onClick(View view) {
+ if (view == mDefaultActivityButton) {
+ dismissPopup();
+ ResolveInfo defaultActivity = mAdapter.getDefaultActivity();
+ final int index = mAdapter.getDataModel().getActivityIndex(defaultActivity);
+ Intent launchIntent = mAdapter.getDataModel().chooseActivity(index);
+ if (launchIntent != null) {
+ mContext.startActivity(launchIntent);
+ }
+ } else if (view == mExpandActivityOverflowButton) {
+ mIsSelectingDefaultActivity = false;
+ showPopupUnchecked(mInitialActivityCount);
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ // OnLongClickListener#onLongClick
+ @Override
+ public boolean onLongClick(View view) {
+ if (view == mDefaultActivityButton) {
+ if (mAdapter.getCount() > 0) {
+ mIsSelectingDefaultActivity = true;
+ showPopupUnchecked(mInitialActivityCount);
+ }
+ } else {
+ throw new IllegalArgumentException();
+ }
+ return true;
+ }
+
+ // PopUpWindow.OnDismissListener#onDismiss
+ public void onDismiss() {
+ notifyOnDismissListener();
+ if (mProvider != null) {
+ mProvider.subUiVisibilityChanged(false);
+ }
+ }
+
+ private void notifyOnDismissListener() {
+ if (mOnDismissListener != null) {
+ mOnDismissListener.onDismiss();
+ }
+ }
+ }
+
+ private static class SetActivated {
+ public static void invoke(View view, boolean activated) {
+ view.setActivated(activated);
+ }
+ }
+
+ private static final boolean IS_HONEYCOMB = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
+
+ /**
+ * Adapter for backing the list of activities shown in the popup.
+ */
+ private class ActivityChooserViewAdapter extends BaseAdapter {
+
+ public static final int MAX_ACTIVITY_COUNT_UNLIMITED = Integer.MAX_VALUE;
+
+ public static final int MAX_ACTIVITY_COUNT_DEFAULT = 4;
+
+ private static final int ITEM_VIEW_TYPE_ACTIVITY = 0;
+
+ private static final int ITEM_VIEW_TYPE_FOOTER = 1;
+
+ private static final int ITEM_VIEW_TYPE_COUNT = 3;
+
+ private ActivityChooserModel mDataModel;
+
+ private int mMaxActivityCount = MAX_ACTIVITY_COUNT_DEFAULT;
+
+ // Work-around for #415.
+ private boolean mShowDefaultActivity = true;
+
+ private boolean mHighlightDefaultActivity;
+
+ private boolean mShowFooterView;
+
+ public void setDataModel(ActivityChooserModel dataModel) {
+ ActivityChooserModel oldDataModel = mAdapter.getDataModel();
+ if (oldDataModel != null && isShown()) {
+ try {
+ oldDataModel.unregisterObserver(mModelDataSetOberver);
+ } catch (IllegalStateException e) {
+ //Oh, well... fixes issue #557
+ }
+ }
+ mDataModel = dataModel;
+ if (dataModel != null && isShown()) {
+ try {
+ dataModel.registerObserver(mModelDataSetOberver);
+ } catch (IllegalStateException e) {
+ // Related to #557.
+ }
+ }
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ if (mShowFooterView && position == getCount() - 1) {
+ return ITEM_VIEW_TYPE_FOOTER;
+ } else {
+ return ITEM_VIEW_TYPE_ACTIVITY;
+ }
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ return ITEM_VIEW_TYPE_COUNT;
+ }
+
+ public int getCount() {
+ int count = 0;
+ int activityCount = mDataModel.getActivityCount();
+ if (!mShowDefaultActivity && mDataModel.getDefaultActivity() != null) {
+ activityCount--;
+ }
+ count = Math.min(activityCount, mMaxActivityCount);
+ if (mShowFooterView) {
+ count++;
+ }
+ return count;
+ }
+
+ public Object getItem(int position) {
+ final int itemViewType = getItemViewType(position);
+ switch (itemViewType) {
+ case ITEM_VIEW_TYPE_FOOTER:
+ return null;
+ case ITEM_VIEW_TYPE_ACTIVITY:
+ if (!mShowDefaultActivity && mDataModel.getDefaultActivity() != null) {
+ position++;
+ }
+ return mDataModel.getActivity(position);
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public long getItemId(int position) {
+ return position;
+ }
+
+ public View getView(int position, View convertView, ViewGroup parent) {
+ final int itemViewType = getItemViewType(position);
+ switch (itemViewType) {
+ case ITEM_VIEW_TYPE_FOOTER:
+ if (convertView == null || convertView.getId() != ITEM_VIEW_TYPE_FOOTER) {
+ convertView = LayoutInflater.from(getContext()).inflate(
+ R.layout.abs__activity_chooser_view_list_item, parent, false);
+ convertView.setId(ITEM_VIEW_TYPE_FOOTER);
+ TextView titleView = (TextView) convertView.findViewById(R.id.abs__title);
+ titleView.setText(mContext.getString(
+ R.string.abs__activity_chooser_view_see_all));
+ }
+ return convertView;
+ case ITEM_VIEW_TYPE_ACTIVITY:
+ if (convertView == null || convertView.getId() != R.id.abs__list_item) {
+ convertView = LayoutInflater.from(getContext()).inflate(
+ R.layout.abs__activity_chooser_view_list_item, parent, false);
+ }
+ PackageManager packageManager = mContext.getPackageManager();
+ // Set the icon
+ ImageView iconView = (ImageView) convertView.findViewById(R.id.abs__icon);
+ ResolveInfo activity = (ResolveInfo) getItem(position);
+ iconView.setImageDrawable(activity.loadIcon(packageManager));
+ // Set the title.
+ TextView titleView = (TextView) convertView.findViewById(R.id.abs__title);
+ titleView.setText(activity.loadLabel(packageManager));
+ if (IS_HONEYCOMB) {
+ // Highlight the default.
+ if (mShowDefaultActivity && position == 0 && mHighlightDefaultActivity) {
+ SetActivated.invoke(convertView, true);
+ } else {
+ SetActivated.invoke(convertView, false);
+ }
+ }
+ return convertView;
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public int measureContentWidth() {
+ // The user may have specified some of the target not to be shown but we
+ // want to measure all of them since after expansion they should fit.
+ final int oldMaxActivityCount = mMaxActivityCount;
+ mMaxActivityCount = MAX_ACTIVITY_COUNT_UNLIMITED;
+
+ int contentWidth = 0;
+ View itemView = null;
+
+ final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ final int count = getCount();
+
+ for (int i = 0; i < count; i++) {
+ itemView = getView(i, itemView, null);
+ itemView.measure(widthMeasureSpec, heightMeasureSpec);
+ contentWidth = Math.max(contentWidth, itemView.getMeasuredWidth());
+ }
+
+ mMaxActivityCount = oldMaxActivityCount;
+
+ return contentWidth;
+ }
+
+ public void setMaxActivityCount(int maxActivityCount) {
+ if (mMaxActivityCount != maxActivityCount) {
+ mMaxActivityCount = maxActivityCount;
+ notifyDataSetChanged();
+ }
+ }
+
+ public ResolveInfo getDefaultActivity() {
+ return mDataModel.getDefaultActivity();
+ }
+
+ public void setShowFooterView(boolean showFooterView) {
+ if (mShowFooterView != showFooterView) {
+ mShowFooterView = showFooterView;
+ notifyDataSetChanged();
+ }
+ }
+
+ public int getActivityCount() {
+ return mDataModel.getActivityCount();
+ }
+
+ public int getHistorySize() {
+ return mDataModel.getHistorySize();
+ }
+
+ public int getMaxActivityCount() {
+ return mMaxActivityCount;
+ }
+
+ public ActivityChooserModel getDataModel() {
+ return mDataModel;
+ }
+
+ public void setShowDefaultActivity(boolean showDefaultActivity,
+ boolean highlightDefaultActivity) {
+ if (mShowDefaultActivity != showDefaultActivity
+ || mHighlightDefaultActivity != highlightDefaultActivity) {
+ mShowDefaultActivity = showDefaultActivity;
+ mHighlightDefaultActivity = highlightDefaultActivity;
+ notifyDataSetChanged();
+ }
+ }
+
+ public boolean getShowDefaultActivity() {
+ return mShowDefaultActivity;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SearchView.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SearchView.java
new file mode 100644
index 0000000000..fb8319645b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SearchView.java
@@ -0,0 +1,1811 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package com.actionbarsherlock.widget;
+
+import android.app.PendingIntent;
+import android.app.SearchManager;
+import android.app.SearchableInfo;
+import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.database.Cursor;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.ResultReceiver;
+import android.speech.RecognizerIntent;
+import android.support.v4.view.KeyEventCompat;
+import android.support.v4.widget.CursorAdapter;
+import android.text.Editable;
+import android.text.InputType;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.text.style.ImageSpan;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewTreeObserver;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.AutoCompleteTextView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.view.CollapsibleActionView;
+
+import java.lang.reflect.Method;
+import java.util.WeakHashMap;
+
+import static com.actionbarsherlock.widget.SuggestionsAdapter.getColumnString;
+
+/**
+ * A widget that provides a user interface for the user to enter a search query and submit a request
+ * to a search provider. Shows a list of query suggestions or results, if available, and allows the
+ * user to pick a suggestion or result to launch into.
+ *
+ * <p>
+ * When the SearchView is used in an ActionBar as an action view for a collapsible menu item, it
+ * needs to be set to iconified by default using {@link #setIconifiedByDefault(boolean)
+ * setIconifiedByDefault(true)}. This is the default, so nothing needs to be done.
+ * </p>
+ * <p>
+ * If you want the search field to always be visible, then call setIconifiedByDefault(false).
+ * </p>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For information about using {@code SearchView}, read the
+ * <a href="{@docRoot}guide/topics/search/index.html">Search</a> developer guide.</p>
+ * </div>
+ *
+ * @see android.view.MenuItem#SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
+ * @attr ref android.R.styleable#SearchView_iconifiedByDefault
+ * @attr ref android.R.styleable#SearchView_imeOptions
+ * @attr ref android.R.styleable#SearchView_inputType
+ * @attr ref android.R.styleable#SearchView_maxWidth
+ * @attr ref android.R.styleable#SearchView_queryHint
+ */
+public class SearchView extends LinearLayout implements CollapsibleActionView {
+
+ private static final boolean DBG = false;
+ private static final String LOG_TAG = "SearchView";
+
+ /**
+ * Private constant for removing the microphone in the keyboard.
+ */
+ private static final String IME_OPTION_NO_MICROPHONE = "nm";
+
+ private OnQueryTextListener mOnQueryChangeListener;
+ private OnCloseListener mOnCloseListener;
+ private OnFocusChangeListener mOnQueryTextFocusChangeListener;
+ private OnSuggestionListener mOnSuggestionListener;
+ private OnClickListener mOnSearchClickListener;
+
+ private boolean mIconifiedByDefault;
+ private boolean mIconified;
+ private CursorAdapter mSuggestionsAdapter;
+ private View mSearchButton;
+ private View mSubmitButton;
+ private View mSearchPlate;
+ private View mSubmitArea;
+ private ImageView mCloseButton;
+ private View mSearchEditFrame;
+ private View mVoiceButton;
+ private SearchAutoComplete mQueryTextView;
+ private View mDropDownAnchor;
+ private ImageView mSearchHintIcon;
+ private boolean mSubmitButtonEnabled;
+ private CharSequence mQueryHint;
+ private boolean mQueryRefinement;
+ private boolean mClearingFocus;
+ private int mMaxWidth;
+ private boolean mVoiceButtonEnabled;
+ private CharSequence mOldQueryText;
+ private CharSequence mUserQuery;
+ private boolean mExpandedInActionView;
+ private int mCollapsedImeOptions;
+
+ private SearchableInfo mSearchable;
+ private Bundle mAppSearchData;
+
+ /*
+ * SearchView can be set expanded before the IME is ready to be shown during
+ * initial UI setup. The show operation is asynchronous to account for this.
+ */
+ private Runnable mShowImeRunnable = new Runnable() {
+ public void run() {
+ InputMethodManager imm = (InputMethodManager)
+ getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+
+ if (imm != null) {
+ showSoftInputUnchecked(SearchView.this, imm, 0);
+ }
+ }
+ };
+
+ private Runnable mUpdateDrawableStateRunnable = new Runnable() {
+ public void run() {
+ updateFocusedState();
+ }
+ };
+
+ private Runnable mReleaseCursorRunnable = new Runnable() {
+ public void run() {
+ if (mSuggestionsAdapter != null && mSuggestionsAdapter instanceof SuggestionsAdapter) {
+ mSuggestionsAdapter.changeCursor(null);
+ }
+ }
+ };
+
+ // For voice searching
+ private final Intent mVoiceWebSearchIntent;
+ private final Intent mVoiceAppSearchIntent;
+
+ // A weak map of drawables we've gotten from other packages, so we don't load them
+ // more than once.
+ private final WeakHashMap<String, Drawable.ConstantState> mOutsideDrawablesCache =
+ new WeakHashMap<String, Drawable.ConstantState>();
+
+ /**
+ * Callbacks for changes to the query text.
+ */
+ public interface OnQueryTextListener {
+
+ /**
+ * Called when the user submits the query. This could be due to a key press on the
+ * keyboard or due to pressing a submit button.
+ * The listener can override the standard behavior by returning true
+ * to indicate that it has handled the submit request. Otherwise return false to
+ * let the SearchView handle the submission by launching any associated intent.
+ *
+ * @param query the query text that is to be submitted
+ *
+ * @return true if the query has been handled by the listener, false to let the
+ * SearchView perform the default action.
+ */
+ boolean onQueryTextSubmit(String query);
+
+ /**
+ * Called when the query text is changed by the user.
+ *
+ * @param newText the new content of the query text field.
+ *
+ * @return false if the SearchView should perform the default action of showing any
+ * suggestions if available, true if the action was handled by the listener.
+ */
+ boolean onQueryTextChange(String newText);
+ }
+
+ public interface OnCloseListener {
+
+ /**
+ * The user is attempting to close the SearchView.
+ *
+ * @return true if the listener wants to override the default behavior of clearing the
+ * text field and dismissing it, false otherwise.
+ */
+ boolean onClose();
+ }
+
+ /**
+ * Callback interface for selection events on suggestions. These callbacks
+ * are only relevant when a SearchableInfo has been specified by {@link #setSearchableInfo}.
+ */
+ public interface OnSuggestionListener {
+
+ /**
+ * Called when a suggestion was selected by navigating to it.
+ * @param position the absolute position in the list of suggestions.
+ *
+ * @return true if the listener handles the event and wants to override the default
+ * behavior of possibly rewriting the query based on the selected item, false otherwise.
+ */
+ boolean onSuggestionSelect(int position);
+
+ /**
+ * Called when a suggestion was clicked.
+ * @param position the absolute position of the clicked item in the list of suggestions.
+ *
+ * @return true if the listener handles the event and wants to override the default
+ * behavior of launching any intent or submitting a search query specified on that item.
+ * Return false otherwise.
+ */
+ boolean onSuggestionClick(int position);
+ }
+
+ public SearchView(Context context) {
+ this(context, null);
+ }
+
+ public SearchView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {
+ throw new IllegalStateException("SearchView is API 8+ only.");
+ }
+
+ LayoutInflater inflater = (LayoutInflater) context
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ inflater.inflate(R.layout.abs__search_view, this, true);
+
+ mSearchButton = findViewById(R.id.abs__search_button);
+ mQueryTextView = (SearchAutoComplete) findViewById(R.id.abs__search_src_text);
+ mQueryTextView.setSearchView(this);
+
+ mSearchEditFrame = findViewById(R.id.abs__search_edit_frame);
+ mSearchPlate = findViewById(R.id.abs__search_plate);
+ mSubmitArea = findViewById(R.id.abs__submit_area);
+ mSubmitButton = findViewById(R.id.abs__search_go_btn);
+ mCloseButton = (ImageView) findViewById(R.id.abs__search_close_btn);
+ mVoiceButton = findViewById(R.id.abs__search_voice_btn);
+ mSearchHintIcon = (ImageView) findViewById(R.id.abs__search_mag_icon);
+
+ mSearchButton.setOnClickListener(mOnClickListener);
+ mCloseButton.setOnClickListener(mOnClickListener);
+ mSubmitButton.setOnClickListener(mOnClickListener);
+ mVoiceButton.setOnClickListener(mOnClickListener);
+ mQueryTextView.setOnClickListener(mOnClickListener);
+
+ mQueryTextView.addTextChangedListener(mTextWatcher);
+ mQueryTextView.setOnEditorActionListener(mOnEditorActionListener);
+ mQueryTextView.setOnItemClickListener(mOnItemClickListener);
+ mQueryTextView.setOnItemSelectedListener(mOnItemSelectedListener);
+ mQueryTextView.setOnKeyListener(mTextKeyListener);
+ // Inform any listener of focus changes
+ mQueryTextView.setOnFocusChangeListener(new OnFocusChangeListener() {
+
+ public void onFocusChange(View v, boolean hasFocus) {
+ if (mOnQueryTextFocusChangeListener != null) {
+ mOnQueryTextFocusChangeListener.onFocusChange(SearchView.this, hasFocus);
+ }
+ }
+ });
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SherlockSearchView, 0, 0);
+ setIconifiedByDefault(a.getBoolean(R.styleable.SherlockSearchView_iconifiedByDefault, true));
+ int maxWidth = a.getDimensionPixelSize(R.styleable.SherlockSearchView_android_maxWidth, -1);
+ if (maxWidth != -1) {
+ setMaxWidth(maxWidth);
+ }
+ CharSequence queryHint = a.getText(R.styleable.SherlockSearchView_queryHint);
+ if (!TextUtils.isEmpty(queryHint)) {
+ setQueryHint(queryHint);
+ }
+ int imeOptions = a.getInt(R.styleable.SherlockSearchView_android_imeOptions, -1);
+ if (imeOptions != -1) {
+ setImeOptions(imeOptions);
+ }
+ int inputType = a.getInt(R.styleable.SherlockSearchView_android_inputType, -1);
+ if (inputType != -1) {
+ setInputType(inputType);
+ }
+
+ a.recycle();
+
+ boolean focusable = true;
+
+ a = context.obtainStyledAttributes(attrs, R.styleable.SherlockView, 0, 0);
+ focusable = a.getBoolean(R.styleable.SherlockView_android_focusable, focusable);
+ a.recycle();
+ setFocusable(focusable);
+
+ // Save voice intent for later queries/launching
+ mVoiceWebSearchIntent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ mVoiceWebSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mVoiceWebSearchIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
+ RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);
+
+ mVoiceAppSearchIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
+ mVoiceAppSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+ mDropDownAnchor = findViewById(mQueryTextView.getDropDownAnchor());
+ if (mDropDownAnchor != null) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ mDropDownAnchor.addOnLayoutChangeListener(new OnLayoutChangeListener() {
+ @Override
+ public void onLayoutChange(View v, int left, int top, int right, int bottom,
+ int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ adjustDropDownSizeAndPosition();
+ }
+ });
+ } else {
+ mDropDownAnchor.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+ @Override public void onGlobalLayout() {
+ adjustDropDownSizeAndPosition();
+ }
+ });
+ }
+ }
+
+ updateViewsVisibility(mIconifiedByDefault);
+ updateQueryHint();
+ }
+
+ /**
+ * Sets the SearchableInfo for this SearchView. Properties in the SearchableInfo are used
+ * to display labels, hints, suggestions, create intents for launching search results screens
+ * and controlling other affordances such as a voice button.
+ *
+ * @param searchable a SearchableInfo can be retrieved from the SearchManager, for a specific
+ * activity or a global search provider.
+ */
+ public void setSearchableInfo(SearchableInfo searchable) {
+ mSearchable = searchable;
+ if (mSearchable != null) {
+ updateSearchAutoComplete();
+ updateQueryHint();
+ }
+ // Cache the voice search capability
+ mVoiceButtonEnabled = hasVoiceSearch();
+
+ if (mVoiceButtonEnabled) {
+ // Disable the microphone on the keyboard, as a mic is displayed near the text box
+ // TODO: use imeOptions to disable voice input when the new API will be available
+ mQueryTextView.setPrivateImeOptions(IME_OPTION_NO_MICROPHONE);
+ }
+ updateViewsVisibility(isIconified());
+ }
+
+ /**
+ * Sets the APP_DATA for legacy SearchDialog use.
+ * @param appSearchData bundle provided by the app when launching the search dialog
+ * @hide
+ */
+ public void setAppSearchData(Bundle appSearchData) {
+ mAppSearchData = appSearchData;
+ }
+
+ /**
+ * Sets the IME options on the query text field.
+ *
+ * @see TextView#setImeOptions(int)
+ * @param imeOptions the options to set on the query text field
+ *
+ * @attr ref android.R.styleable#SearchView_imeOptions
+ */
+ public void setImeOptions(int imeOptions) {
+ mQueryTextView.setImeOptions(imeOptions);
+ }
+
+ /**
+ * Returns the IME options set on the query text field.
+ * @return the ime options
+ * @see TextView#setImeOptions(int)
+ *
+ * @attr ref android.R.styleable#SearchView_imeOptions
+ */
+ public int getImeOptions() {
+ return mQueryTextView.getImeOptions();
+ }
+
+ /**
+ * Sets the input type on the query text field.
+ *
+ * @see TextView#setInputType(int)
+ * @param inputType the input type to set on the query text field
+ *
+ * @attr ref android.R.styleable#SearchView_inputType
+ */
+ public void setInputType(int inputType) {
+ mQueryTextView.setInputType(inputType);
+ }
+
+ /**
+ * Returns the input type set on the query text field.
+ * @return the input type
+ *
+ * @attr ref android.R.styleable#SearchView_inputType
+ */
+ public int getInputType() {
+ return mQueryTextView.getInputType();
+ }
+
+ /** @hide */
+ @Override
+ public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
+ // Don't accept focus if in the middle of clearing focus
+ if (mClearingFocus) return false;
+ // Check if SearchView is focusable.
+ if (!isFocusable()) return false;
+ // If it is not iconified, then give the focus to the text field
+ if (!isIconified()) {
+ boolean result = mQueryTextView.requestFocus(direction, previouslyFocusedRect);
+ if (result) {
+ updateViewsVisibility(false);
+ }
+ return result;
+ } else {
+ return super.requestFocus(direction, previouslyFocusedRect);
+ }
+ }
+
+ /** @hide */
+ @Override
+ public void clearFocus() {
+ mClearingFocus = true;
+ setImeVisibility(false);
+ super.clearFocus();
+ mQueryTextView.clearFocus();
+ mClearingFocus = false;
+ }
+
+ /**
+ * Sets a listener for user actions within the SearchView.
+ *
+ * @param listener the listener object that receives callbacks when the user performs
+ * actions in the SearchView such as clicking on buttons or typing a query.
+ */
+ public void setOnQueryTextListener(OnQueryTextListener listener) {
+ mOnQueryChangeListener = listener;
+ }
+
+ /**
+ * Sets a listener to inform when the user closes the SearchView.
+ *
+ * @param listener the listener to call when the user closes the SearchView.
+ */
+ public void setOnCloseListener(OnCloseListener listener) {
+ mOnCloseListener = listener;
+ }
+
+ /**
+ * Sets a listener to inform when the focus of the query text field changes.
+ *
+ * @param listener the listener to inform of focus changes.
+ */
+ public void setOnQueryTextFocusChangeListener(OnFocusChangeListener listener) {
+ mOnQueryTextFocusChangeListener = listener;
+ }
+
+ /**
+ * Sets a listener to inform when a suggestion is focused or clicked.
+ *
+ * @param listener the listener to inform of suggestion selection events.
+ */
+ public void setOnSuggestionListener(OnSuggestionListener listener) {
+ mOnSuggestionListener = listener;
+ }
+
+ /**
+ * Sets a listener to inform when the search button is pressed. This is only
+ * relevant when the text field is not visible by default. Calling {@link #setIconified
+ * setIconified(false)} can also cause this listener to be informed.
+ *
+ * @param listener the listener to inform when the search button is clicked or
+ * the text field is programmatically de-iconified.
+ */
+ public void setOnSearchClickListener(OnClickListener listener) {
+ mOnSearchClickListener = listener;
+ }
+
+ /**
+ * Returns the query string currently in the text field.
+ *
+ * @return the query string
+ */
+ public CharSequence getQuery() {
+ return mQueryTextView.getText();
+ }
+
+ /**
+ * Sets a query string in the text field and optionally submits the query as well.
+ *
+ * @param query the query string. This replaces any query text already present in the
+ * text field.
+ * @param submit whether to submit the query right now or only update the contents of
+ * text field.
+ */
+ public void setQuery(CharSequence query, boolean submit) {
+ mQueryTextView.setText(query);
+ if (query != null) {
+ mQueryTextView.setSelection(mQueryTextView.length());
+ mUserQuery = query;
+ }
+
+ // If the query is not empty and submit is requested, submit the query
+ if (submit && !TextUtils.isEmpty(query)) {
+ onSubmitQuery();
+ }
+ }
+
+ /**
+ * Sets the hint text to display in the query text field. This overrides any hint specified
+ * in the SearchableInfo.
+ *
+ * @param hint the hint text to display
+ *
+ * @attr ref android.R.styleable#SearchView_queryHint
+ */
+ public void setQueryHint(CharSequence hint) {
+ mQueryHint = hint;
+ updateQueryHint();
+ }
+
+ /**
+ * Gets the hint text to display in the query text field.
+ * @return the query hint text, if specified, null otherwise.
+ *
+ * @attr ref android.R.styleable#SearchView_queryHint
+ */
+ public CharSequence getQueryHint() {
+ if (mQueryHint != null) {
+ return mQueryHint;
+ } else if (mSearchable != null) {
+ CharSequence hint = null;
+ int hintId = mSearchable.getHintId();
+ if (hintId != 0) {
+ hint = getContext().getString(hintId);
+ }
+ return hint;
+ }
+ return null;
+ }
+
+ /**
+ * Sets the default or resting state of the search field. If true, a single search icon is
+ * shown by default and expands to show the text field and other buttons when pressed. Also,
+ * if the default state is iconified, then it collapses to that state when the close button
+ * is pressed. Changes to this property will take effect immediately.
+ *
+ * <p>The default value is true.</p>
+ *
+ * @param iconified whether the search field should be iconified by default
+ *
+ * @attr ref android.R.styleable#SearchView_iconifiedByDefault
+ */
+ public void setIconifiedByDefault(boolean iconified) {
+ if (mIconifiedByDefault == iconified) return;
+ mIconifiedByDefault = iconified;
+ updateViewsVisibility(iconified);
+ updateQueryHint();
+ }
+
+ /**
+ * Returns the default iconified state of the search field.
+ * @return
+ *
+ * @attr ref android.R.styleable#SearchView_iconifiedByDefault
+ */
+ public boolean isIconfiedByDefault() {
+ return mIconifiedByDefault;
+ }
+
+ /**
+ * Iconifies or expands the SearchView. Any query text is cleared when iconified. This is
+ * a temporary state and does not override the default iconified state set by
+ * {@link #setIconifiedByDefault(boolean)}. If the default state is iconified, then
+ * a false here will only be valid until the user closes the field. And if the default
+ * state is expanded, then a true here will only clear the text field and not close it.
+ *
+ * @param iconify a true value will collapse the SearchView to an icon, while a false will
+ * expand it.
+ */
+ public void setIconified(boolean iconify) {
+ if (iconify) {
+ onCloseClicked();
+ } else {
+ onSearchClicked();
+ }
+ }
+
+ /**
+ * Returns the current iconified state of the SearchView.
+ *
+ * @return true if the SearchView is currently iconified, false if the search field is
+ * fully visible.
+ */
+ public boolean isIconified() {
+ return mIconified;
+ }
+
+ /**
+ * Enables showing a submit button when the query is non-empty. In cases where the SearchView
+ * is being used to filter the contents of the current activity and doesn't launch a separate
+ * results activity, then the submit button should be disabled.
+ *
+ * @param enabled true to show a submit button for submitting queries, false if a submit
+ * button is not required.
+ */
+ public void setSubmitButtonEnabled(boolean enabled) {
+ mSubmitButtonEnabled = enabled;
+ updateViewsVisibility(isIconified());
+ }
+
+ /**
+ * Returns whether the submit button is enabled when necessary or never displayed.
+ *
+ * @return whether the submit button is enabled automatically when necessary
+ */
+ public boolean isSubmitButtonEnabled() {
+ return mSubmitButtonEnabled;
+ }
+
+ /**
+ * Specifies if a query refinement button should be displayed alongside each suggestion
+ * or if it should depend on the flags set in the individual items retrieved from the
+ * suggestions provider. Clicking on the query refinement button will replace the text
+ * in the query text field with the text from the suggestion. This flag only takes effect
+ * if a SearchableInfo has been specified with {@link #setSearchableInfo(SearchableInfo)}
+ * and not when using a custom adapter.
+ *
+ * @param enable true if all items should have a query refinement button, false if only
+ * those items that have a query refinement flag set should have the button.
+ *
+ * @see SearchManager#SUGGEST_COLUMN_FLAGS
+ * @see SearchManager#FLAG_QUERY_REFINEMENT
+ */
+ public void setQueryRefinementEnabled(boolean enable) {
+ mQueryRefinement = enable;
+ if (mSuggestionsAdapter instanceof SuggestionsAdapter) {
+ ((SuggestionsAdapter) mSuggestionsAdapter).setQueryRefinement(
+ enable ? SuggestionsAdapter.REFINE_ALL : SuggestionsAdapter.REFINE_BY_ENTRY);
+ }
+ }
+
+ /**
+ * Returns whether query refinement is enabled for all items or only specific ones.
+ * @return true if enabled for all items, false otherwise.
+ */
+ public boolean isQueryRefinementEnabled() {
+ return mQueryRefinement;
+ }
+
+ /**
+ * You can set a custom adapter if you wish. Otherwise the default adapter is used to
+ * display the suggestions from the suggestions provider associated with the SearchableInfo.
+ *
+ * @see #setSearchableInfo(SearchableInfo)
+ */
+ public void setSuggestionsAdapter(CursorAdapter adapter) {
+ mSuggestionsAdapter = adapter;
+
+ mQueryTextView.setAdapter(mSuggestionsAdapter);
+ }
+
+ /**
+ * Returns the adapter used for suggestions, if any.
+ * @return the suggestions adapter
+ */
+ public CursorAdapter getSuggestionsAdapter() {
+ return mSuggestionsAdapter;
+ }
+
+ /**
+ * Makes the view at most this many pixels wide
+ *
+ * @attr ref android.R.styleable#SearchView_maxWidth
+ */
+ public void setMaxWidth(int maxpixels) {
+ mMaxWidth = maxpixels;
+
+ requestLayout();
+ }
+
+ /**
+ * Gets the specified maximum width in pixels, if set. Returns zero if
+ * no maximum width was specified.
+ * @return the maximum width of the view
+ *
+ * @attr ref android.R.styleable#SearchView_maxWidth
+ */
+ public int getMaxWidth() {
+ return mMaxWidth;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // Let the standard measurements take effect in iconified state.
+ if (isIconified()) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ return;
+ }
+
+ int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ int width = MeasureSpec.getSize(widthMeasureSpec);
+
+ switch (widthMode) {
+ case MeasureSpec.AT_MOST:
+ // If there is an upper limit, don't exceed maximum width (explicit or implicit)
+ if (mMaxWidth > 0) {
+ width = Math.min(mMaxWidth, width);
+ } else {
+ width = Math.min(getPreferredWidth(), width);
+ }
+ break;
+ case MeasureSpec.EXACTLY:
+ // If an exact width is specified, still don't exceed any specified maximum width
+ if (mMaxWidth > 0) {
+ width = Math.min(mMaxWidth, width);
+ }
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ // Use maximum width, if specified, else preferred width
+ width = mMaxWidth > 0 ? mMaxWidth : getPreferredWidth();
+ break;
+ }
+ widthMode = MeasureSpec.EXACTLY;
+ super.onMeasure(MeasureSpec.makeMeasureSpec(width, widthMode), heightMeasureSpec);
+ }
+
+ private int getPreferredWidth() {
+ return getContext().getResources()
+ .getDimensionPixelSize(R.dimen.abs__search_view_preferred_width);
+ }
+
+ private void updateViewsVisibility(final boolean collapsed) {
+ mIconified = collapsed;
+ // Visibility of views that are visible when collapsed
+ final int visCollapsed = collapsed ? VISIBLE : GONE;
+ // Is there text in the query
+ final boolean hasText = !TextUtils.isEmpty(mQueryTextView.getText());
+
+ mSearchButton.setVisibility(visCollapsed);
+ updateSubmitButton(hasText);
+ mSearchEditFrame.setVisibility(collapsed ? GONE : VISIBLE);
+ mSearchHintIcon.setVisibility(mIconifiedByDefault ? GONE : VISIBLE);
+ updateCloseButton();
+ updateVoiceButton(!hasText);
+ updateSubmitArea();
+ }
+
+ private boolean hasVoiceSearch() {
+ if (mSearchable != null && mSearchable.getVoiceSearchEnabled()) {
+ Intent testIntent = null;
+ if (mSearchable.getVoiceSearchLaunchWebSearch()) {
+ testIntent = mVoiceWebSearchIntent;
+ } else if (mSearchable.getVoiceSearchLaunchRecognizer()) {
+ testIntent = mVoiceAppSearchIntent;
+ }
+ if (testIntent != null) {
+ ResolveInfo ri = getContext().getPackageManager().resolveActivity(testIntent,
+ PackageManager.MATCH_DEFAULT_ONLY);
+ return ri != null;
+ }
+ }
+ return false;
+ }
+
+ private boolean isSubmitAreaEnabled() {
+ return (mSubmitButtonEnabled || mVoiceButtonEnabled) && !isIconified();
+ }
+
+ private void updateSubmitButton(boolean hasText) {
+ int visibility = GONE;
+ if (mSubmitButtonEnabled && isSubmitAreaEnabled() && hasFocus()
+ && (hasText || !mVoiceButtonEnabled)) {
+ visibility = VISIBLE;
+ }
+ mSubmitButton.setVisibility(visibility);
+ }
+
+ private void updateSubmitArea() {
+ int visibility = GONE;
+ if (isSubmitAreaEnabled()
+ && (mSubmitButton.getVisibility() == VISIBLE
+ || mVoiceButton.getVisibility() == VISIBLE)) {
+ visibility = VISIBLE;
+ }
+ mSubmitArea.setVisibility(visibility);
+ }
+
+ private void updateCloseButton() {
+ final boolean hasText = !TextUtils.isEmpty(mQueryTextView.getText());
+ // Should we show the close button? It is not shown if there's no focus,
+ // field is not iconified by default and there is no text in it.
+ final boolean showClose = hasText || (mIconifiedByDefault && !mExpandedInActionView);
+ mCloseButton.setVisibility(showClose ? VISIBLE : GONE);
+ mCloseButton.getDrawable().setState(hasText ? ENABLED_STATE_SET : EMPTY_STATE_SET);
+ }
+
+ private void postUpdateFocusedState() {
+ post(mUpdateDrawableStateRunnable);
+ }
+
+ private void updateFocusedState() {
+ boolean focused = mQueryTextView.hasFocus();
+ mSearchPlate.getBackground().setState(focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET);
+ mSubmitArea.getBackground().setState(focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET);
+ invalidate();
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ removeCallbacks(mUpdateDrawableStateRunnable);
+ post(mReleaseCursorRunnable);
+ super.onDetachedFromWindow();
+ }
+
+ private void setImeVisibility(final boolean visible) {
+ if (visible) {
+ post(mShowImeRunnable);
+ } else {
+ removeCallbacks(mShowImeRunnable);
+ InputMethodManager imm = (InputMethodManager)
+ getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+
+ if (imm != null) {
+ imm.hideSoftInputFromWindow(getWindowToken(), 0);
+ }
+ }
+ }
+
+ /**
+ * Called by the SuggestionsAdapter
+ * @hide
+ */
+ /* package */void onQueryRefine(CharSequence queryText) {
+ setQuery(queryText);
+ }
+
+ private final OnClickListener mOnClickListener = new OnClickListener() {
+
+ public void onClick(View v) {
+ if (v == mSearchButton) {
+ onSearchClicked();
+ } else if (v == mCloseButton) {
+ onCloseClicked();
+ } else if (v == mSubmitButton) {
+ onSubmitQuery();
+ } else if (v == mVoiceButton) {
+ onVoiceClicked();
+ } else if (v == mQueryTextView) {
+ forceSuggestionQuery();
+ }
+ }
+ };
+
+ /**
+ * Handles the key down event for dealing with action keys.
+ *
+ * @param keyCode This is the keycode of the typed key, and is the same value as
+ * found in the KeyEvent parameter.
+ * @param event The complete event record for the typed key
+ *
+ * @return true if the event was handled here, or false if not.
+ */
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (mSearchable == null) {
+ return false;
+ }
+
+ // if it's an action specified by the searchable activity, launch the
+ // entered query with the action key
+ // TODO SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
+ // TODO if ((actionKey != null) && (actionKey.getQueryActionMsg() != null)) {
+ // TODO launchQuerySearch(keyCode, actionKey.getQueryActionMsg(), mQueryTextView.getText()
+ // TODO .toString());
+ // TODO return true;
+ // TODO }
+
+ return super.onKeyDown(keyCode, event);
+ }
+
+ /**
+ * React to the user typing "enter" or other hardwired keys while typing in
+ * the search box. This handles these special keys while the edit box has
+ * focus.
+ */
+ View.OnKeyListener mTextKeyListener = new View.OnKeyListener() {
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
+ // guard against possible race conditions
+ if (mSearchable == null) {
+ return false;
+ }
+
+ if (DBG) {
+ Log.d(LOG_TAG, "mTextListener.onKey(" + keyCode + "," + event + "), selection: "
+ + mQueryTextView.getListSelection());
+ }
+
+ // If a suggestion is selected, handle enter, search key, and action keys
+ // as presses on the selected suggestion
+ if (mQueryTextView.isPopupShowing()
+ && mQueryTextView.getListSelection() != ListView.INVALID_POSITION) {
+ return onSuggestionsKey(v, keyCode, event);
+ }
+
+ // If there is text in the query box, handle enter, and action keys
+ // The search key is handled by the dialog's onKeyDown().
+ if (!mQueryTextView.isEmpty() && KeyEventCompat.hasNoModifiers(event)) {
+ if (event.getAction() == KeyEvent.ACTION_UP) {
+ if (keyCode == KeyEvent.KEYCODE_ENTER) {
+ v.cancelLongPress();
+
+ // Launch as a regular search.
+ launchQuerySearch(KeyEvent.KEYCODE_UNKNOWN, null, mQueryTextView.getText()
+ .toString());
+ return true;
+ }
+ }
+ if (event.getAction() == KeyEvent.ACTION_DOWN) {
+ // TODO SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
+ // TODO if ((actionKey != null) && (actionKey.getQueryActionMsg() != null)) {
+ // TODO launchQuerySearch(keyCode, actionKey.getQueryActionMsg(), mQueryTextView
+ // TODO .getText().toString());
+ // TODO return true;
+ // TODO }
+ }
+ }
+ return false;
+ }
+ };
+
+ /**
+ * React to the user typing while in the suggestions list. First, check for
+ * action keys. If not handled, try refocusing regular characters into the
+ * EditText.
+ */
+ private boolean onSuggestionsKey(View v, int keyCode, KeyEvent event) {
+ // guard against possible race conditions (late arrival after dismiss)
+ if (mSearchable == null) {
+ return false;
+ }
+ if (mSuggestionsAdapter == null) {
+ return false;
+ }
+ if (event.getAction() == KeyEvent.ACTION_DOWN && KeyEventCompat.hasNoModifiers(event)) {
+ // First, check for enter or search (both of which we'll treat as a
+ // "click")
+ if (keyCode == KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.KEYCODE_SEARCH
+ || keyCode == KeyEvent.KEYCODE_TAB) {
+ int position = mQueryTextView.getListSelection();
+ return onItemClicked(position, KeyEvent.KEYCODE_UNKNOWN, null);
+ }
+
+ // Next, check for left/right moves, which we use to "return" the
+ // user to the edit view
+ if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
+ // give "focus" to text editor, with cursor at the beginning if
+ // left key, at end if right key
+ // TODO: Reverse left/right for right-to-left languages, e.g.
+ // Arabic
+ int selPoint = (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) ? 0 : mQueryTextView
+ .length();
+ mQueryTextView.setSelection(selPoint);
+ mQueryTextView.setListSelection(0);
+ mQueryTextView.clearListSelection();
+ ensureImeVisible(mQueryTextView, true);
+
+ return true;
+ }
+
+ // Next, check for an "up and out" move
+ if (keyCode == KeyEvent.KEYCODE_DPAD_UP && 0 == mQueryTextView.getListSelection()) {
+ // TODO: restoreUserQuery();
+ // let ACTV complete the move
+ return false;
+ }
+
+ // Next, check for an "action key"
+ // TODO SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
+ // TODO if ((actionKey != null)
+ // TODO && ((actionKey.getSuggestActionMsg() != null) || (actionKey
+ // TODO .getSuggestActionMsgColumn() != null))) {
+ // TODO // launch suggestion using action key column
+ // TODO int position = mQueryTextView.getListSelection();
+ // TODO if (position != ListView.INVALID_POSITION) {
+ // TODO Cursor c = mSuggestionsAdapter.getCursor();
+ // TODO if (c.moveToPosition(position)) {
+ // TODO final String actionMsg = getActionKeyMessage(c, actionKey);
+ // TODO if (actionMsg != null && (actionMsg.length() > 0)) {
+ // TODO return onItemClicked(position, keyCode, actionMsg);
+ // TODO }
+ // TODO }
+ // TODO }
+ // TODO }
+ }
+ return false;
+ }
+
+ /**
+ * For a given suggestion and a given cursor row, get the action message. If
+ * not provided by the specific row/column, also check for a single
+ * definition (for the action key).
+ *
+ * @param c The cursor providing suggestions
+ * @param actionKey The actionkey record being examined
+ *
+ * @return Returns a string, or null if no action key message for this
+ * suggestion
+ */
+ // TODO private static String getActionKeyMessage(Cursor c, SearchableInfo.ActionKeyInfo actionKey) {
+ // TODO String result = null;
+ // TODO // check first in the cursor data, for a suggestion-specific message
+ // TODO final String column = actionKey.getSuggestActionMsgColumn();
+ // TODO if (column != null) {
+ // TODO result = SuggestionsAdapter.getColumnString(c, column);
+ // TODO }
+ // TODO // If the cursor didn't give us a message, see if there's a single
+ // TODO // message defined
+ // TODO // for the actionkey (for all suggestions)
+ // TODO if (result == null) {
+ // TODO result = actionKey.getSuggestActionMsg();
+ // TODO }
+ // TODO return result;
+ // TODO }
+
+ private int getSearchIconId() {
+ TypedValue outValue = new TypedValue();
+ getContext().getTheme().resolveAttribute(R.attr.searchViewSearchIcon,
+ outValue, true);
+ return outValue.resourceId;
+ }
+
+ private CharSequence getDecoratedHint(CharSequence hintText) {
+ // If the field is always expanded, then don't add the search icon to the hint
+ if (!mIconifiedByDefault) return hintText;
+
+ SpannableStringBuilder ssb = new SpannableStringBuilder(" "); // for the icon
+ ssb.append(hintText);
+ Drawable searchIcon = getContext().getResources().getDrawable(getSearchIconId());
+ int textSize = (int) (mQueryTextView.getTextSize() * 1.25);
+ searchIcon.setBounds(0, 0, textSize, textSize);
+ ssb.setSpan(new ImageSpan(searchIcon), 1, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ return ssb;
+ }
+
+ private void updateQueryHint() {
+ if (mQueryHint != null) {
+ mQueryTextView.setHint(getDecoratedHint(mQueryHint));
+ } else if (mSearchable != null) {
+ CharSequence hint = null;
+ int hintId = mSearchable.getHintId();
+ if (hintId != 0) {
+ hint = getContext().getString(hintId);
+ }
+ if (hint != null) {
+ mQueryTextView.setHint(getDecoratedHint(hint));
+ }
+ } else {
+ mQueryTextView.setHint(getDecoratedHint(""));
+ }
+ }
+
+ /**
+ * Updates the auto-complete text view.
+ */
+ private void updateSearchAutoComplete() {
+ // TODO mQueryTextView.setDropDownAnimationStyle(0); // no animation
+ mQueryTextView.setThreshold(mSearchable.getSuggestThreshold());
+ mQueryTextView.setImeOptions(mSearchable.getImeOptions());
+ int inputType = mSearchable.getInputType();
+ // We only touch this if the input type is set up for text (which it almost certainly
+ // should be, in the case of search!)
+ if ((inputType & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_TEXT) {
+ // The existence of a suggestions authority is the proxy for "suggestions
+ // are available here"
+ inputType &= ~InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE;
+ if (mSearchable.getSuggestAuthority() != null) {
+ inputType |= InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE;
+ // TYPE_TEXT_FLAG_AUTO_COMPLETE means that the text editor is performing
+ // auto-completion based on its own semantics, which it will present to the user
+ // as they type. This generally means that the input method should not show its
+ // own candidates, and the spell checker should not be in action. The text editor
+ // supplies its candidates by calling InputMethodManager.displayCompletions(),
+ // which in turn will call InputMethodSession.displayCompletions().
+ inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
+ }
+ }
+ mQueryTextView.setInputType(inputType);
+ if (mSuggestionsAdapter != null) {
+ mSuggestionsAdapter.changeCursor(null);
+ }
+ // attach the suggestions adapter, if suggestions are available
+ // The existence of a suggestions authority is the proxy for "suggestions available here"
+ if (mSearchable.getSuggestAuthority() != null) {
+ mSuggestionsAdapter = new SuggestionsAdapter(getContext(),
+ this, mSearchable, mOutsideDrawablesCache);
+ mQueryTextView.setAdapter(mSuggestionsAdapter);
+ ((SuggestionsAdapter) mSuggestionsAdapter).setQueryRefinement(
+ mQueryRefinement ? SuggestionsAdapter.REFINE_ALL
+ : SuggestionsAdapter.REFINE_BY_ENTRY);
+ }
+ }
+
+ /**
+ * Update the visibility of the voice button. There are actually two voice search modes,
+ * either of which will activate the button.
+ * @param empty whether the search query text field is empty. If it is, then the other
+ * criteria apply to make the voice button visible.
+ */
+ private void updateVoiceButton(boolean empty) {
+ int visibility = GONE;
+ if (mVoiceButtonEnabled && !isIconified() && empty) {
+ visibility = VISIBLE;
+ mSubmitButton.setVisibility(GONE);
+ }
+ mVoiceButton.setVisibility(visibility);
+ }
+
+ private final OnEditorActionListener mOnEditorActionListener = new OnEditorActionListener() {
+
+ /**
+ * Called when the input method default action key is pressed.
+ */
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+ onSubmitQuery();
+ return true;
+ }
+ };
+
+ private void onTextChanged(CharSequence newText) {
+ CharSequence text = mQueryTextView.getText();
+ mUserQuery = text;
+ boolean hasText = !TextUtils.isEmpty(text);
+ updateSubmitButton(hasText);
+ updateVoiceButton(!hasText);
+ updateCloseButton();
+ updateSubmitArea();
+ if (mOnQueryChangeListener != null && !TextUtils.equals(newText, mOldQueryText)) {
+ mOnQueryChangeListener.onQueryTextChange(newText.toString());
+ }
+ mOldQueryText = newText.toString();
+ }
+
+ private void onSubmitQuery() {
+ CharSequence query = mQueryTextView.getText();
+ if (query != null && TextUtils.getTrimmedLength(query) > 0) {
+ if (mOnQueryChangeListener == null
+ || !mOnQueryChangeListener.onQueryTextSubmit(query.toString())) {
+ if (mSearchable != null) {
+ launchQuerySearch(KeyEvent.KEYCODE_UNKNOWN, null, query.toString());
+ setImeVisibility(false);
+ }
+ dismissSuggestions();
+ }
+ }
+ }
+
+ private void dismissSuggestions() {
+ mQueryTextView.dismissDropDown();
+ }
+
+ private void onCloseClicked() {
+ CharSequence text = mQueryTextView.getText();
+ if (TextUtils.isEmpty(text)) {
+ if (mIconifiedByDefault) {
+ // If the app doesn't override the close behavior
+ if (mOnCloseListener == null || !mOnCloseListener.onClose()) {
+ // hide the keyboard and remove focus
+ clearFocus();
+ // collapse the search field
+ updateViewsVisibility(true);
+ }
+ }
+ } else {
+ mQueryTextView.setText("");
+ mQueryTextView.requestFocus();
+ setImeVisibility(true);
+ }
+
+ }
+
+ private void onSearchClicked() {
+ updateViewsVisibility(false);
+ mQueryTextView.requestFocus();
+ setImeVisibility(true);
+ if (mOnSearchClickListener != null) {
+ mOnSearchClickListener.onClick(this);
+ }
+ }
+
+ private void onVoiceClicked() {
+ // guard against possible race conditions
+ if (mSearchable == null) {
+ return;
+ }
+ SearchableInfo searchable = mSearchable;
+ try {
+ if (searchable.getVoiceSearchLaunchWebSearch()) {
+ Intent webSearchIntent = createVoiceWebSearchIntent(mVoiceWebSearchIntent,
+ searchable);
+ getContext().startActivity(webSearchIntent);
+ } else if (searchable.getVoiceSearchLaunchRecognizer()) {
+ Intent appSearchIntent = createVoiceAppSearchIntent(mVoiceAppSearchIntent,
+ searchable);
+ getContext().startActivity(appSearchIntent);
+ }
+ } catch (ActivityNotFoundException e) {
+ // Should not happen, since we check the availability of
+ // voice search before showing the button. But just in case...
+ Log.w(LOG_TAG, "Could not find voice search activity");
+ }
+ }
+
+ void onTextFocusChanged() {
+ updateViewsVisibility(isIconified());
+ // Delayed update to make sure that the focus has settled down and window focus changes
+ // don't affect it. A synchronous update was not working.
+ postUpdateFocusedState();
+ if (mQueryTextView.hasFocus()) {
+ forceSuggestionQuery();
+ }
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+
+ postUpdateFocusedState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onActionViewCollapsed() {
+ clearFocus();
+ updateViewsVisibility(true);
+ mQueryTextView.setImeOptions(mCollapsedImeOptions);
+ mExpandedInActionView = false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onActionViewExpanded() {
+ if (mExpandedInActionView) return;
+
+ mExpandedInActionView = true;
+ mCollapsedImeOptions = mQueryTextView.getImeOptions();
+ mQueryTextView.setImeOptions(mCollapsedImeOptions | EditorInfo.IME_FLAG_NO_FULLSCREEN);
+ mQueryTextView.setText("");
+ setIconified(false);
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(SearchView.class.getName());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(SearchView.class.getName());
+ }
+
+ private void adjustDropDownSizeAndPosition() {
+ if (mDropDownAnchor.getWidth() > 1) {
+ Resources res = getContext().getResources();
+ int anchorPadding = mSearchPlate.getPaddingLeft();
+ Rect dropDownPadding = new Rect();
+ int iconOffset = mIconifiedByDefault
+ ? res.getDimensionPixelSize(R.dimen.abs__dropdownitem_icon_width)
+ + res.getDimensionPixelSize(R.dimen.abs__dropdownitem_text_padding_left)
+ : 0;
+ mQueryTextView.getDropDownBackground().getPadding(dropDownPadding);
+ mQueryTextView.setDropDownHorizontalOffset(-(dropDownPadding.left + iconOffset)
+ + anchorPadding);
+ mQueryTextView.setDropDownWidth(mDropDownAnchor.getWidth() + dropDownPadding.left
+ + dropDownPadding.right + iconOffset - (anchorPadding));
+ }
+ }
+
+ private boolean onItemClicked(int position, int actionKey, String actionMsg) {
+ if (mOnSuggestionListener == null
+ || !mOnSuggestionListener.onSuggestionClick(position)) {
+ launchSuggestion(position, KeyEvent.KEYCODE_UNKNOWN, null);
+ setImeVisibility(false);
+ dismissSuggestions();
+ return true;
+ }
+ return false;
+ }
+
+ private boolean onItemSelected(int position) {
+ if (mOnSuggestionListener == null
+ || !mOnSuggestionListener.onSuggestionSelect(position)) {
+ rewriteQueryFromSuggestion(position);
+ return true;
+ }
+ return false;
+ }
+
+ private final OnItemClickListener mOnItemClickListener = new OnItemClickListener() {
+
+ /**
+ * Implements OnItemClickListener
+ */
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ if (DBG) Log.d(LOG_TAG, "onItemClick() position " + position);
+ onItemClicked(position, KeyEvent.KEYCODE_UNKNOWN, null);
+ }
+ };
+
+ private final OnItemSelectedListener mOnItemSelectedListener = new OnItemSelectedListener() {
+
+ /**
+ * Implements OnItemSelectedListener
+ */
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+ if (DBG) Log.d(LOG_TAG, "onItemSelected() position " + position);
+ SearchView.this.onItemSelected(position);
+ }
+
+ /**
+ * Implements OnItemSelectedListener
+ */
+ public void onNothingSelected(AdapterView<?> parent) {
+ if (DBG)
+ Log.d(LOG_TAG, "onNothingSelected()");
+ }
+ };
+
+ /**
+ * Query rewriting.
+ */
+ private void rewriteQueryFromSuggestion(int position) {
+ CharSequence oldQuery = mQueryTextView.getText();
+ Cursor c = mSuggestionsAdapter.getCursor();
+ if (c == null) {
+ return;
+ }
+ if (c.moveToPosition(position)) {
+ // Get the new query from the suggestion.
+ CharSequence newQuery = mSuggestionsAdapter.convertToString(c);
+ if (newQuery != null) {
+ // The suggestion rewrites the query.
+ // Update the text field, without getting new suggestions.
+ setQuery(newQuery);
+ } else {
+ // The suggestion does not rewrite the query, restore the user's query.
+ setQuery(oldQuery);
+ }
+ } else {
+ // We got a bad position, restore the user's query.
+ setQuery(oldQuery);
+ }
+ }
+
+ /**
+ * Launches an intent based on a suggestion.
+ *
+ * @param position The index of the suggestion to create the intent from.
+ * @param actionKey The key code of the action key that was pressed,
+ * or {@link KeyEvent#KEYCODE_UNKNOWN} if none.
+ * @param actionMsg The message for the action key that was pressed,
+ * or <code>null</code> if none.
+ * @return true if a successful launch, false if could not (e.g. bad position).
+ */
+ private boolean launchSuggestion(int position, int actionKey, String actionMsg) {
+ Cursor c = mSuggestionsAdapter.getCursor();
+ if ((c != null) && c.moveToPosition(position)) {
+
+ Intent intent = createIntentFromSuggestion(c, actionKey, actionMsg);
+
+ // launch the intent
+ launchIntent(intent);
+
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Launches an intent, including any special intent handling.
+ */
+ private void launchIntent(Intent intent) {
+ if (intent == null) {
+ return;
+ }
+ try {
+ // If the intent was created from a suggestion, it will always have an explicit
+ // component here.
+ getContext().startActivity(intent);
+ } catch (RuntimeException ex) {
+ Log.e(LOG_TAG, "Failed launch activity: " + intent, ex);
+ }
+ }
+
+ /**
+ * Sets the text in the query box, without updating the suggestions.
+ */
+ private void setQuery(CharSequence query) {
+ setText(mQueryTextView, query, true);
+ // Move the cursor to the end
+ mQueryTextView.setSelection(TextUtils.isEmpty(query) ? 0 : query.length());
+ }
+
+ private void launchQuerySearch(int actionKey, String actionMsg, String query) {
+ String action = Intent.ACTION_SEARCH;
+ Intent intent = createIntent(action, null, null, query, actionKey, actionMsg);
+ getContext().startActivity(intent);
+ }
+
+ /**
+ * Constructs an intent from the given information and the search dialog state.
+ *
+ * @param action Intent action.
+ * @param data Intent data, or <code>null</code>.
+ * @param extraData Data for {@link SearchManager#EXTRA_DATA_KEY} or <code>null</code>.
+ * @param query Intent query, or <code>null</code>.
+ * @param actionKey The key code of the action key that was pressed,
+ * or {@link KeyEvent#KEYCODE_UNKNOWN} if none.
+ * @param actionMsg The message for the action key that was pressed,
+ * or <code>null</code> if none.
+ * @return The intent.
+ */
+ private Intent createIntent(String action, Uri data, String extraData, String query,
+ int actionKey, String actionMsg) {
+ // Now build the Intent
+ Intent intent = new Intent(action);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ // We need CLEAR_TOP to avoid reusing an old task that has other activities
+ // on top of the one we want. We don't want to do this in in-app search though,
+ // as it can be destructive to the activity stack.
+ if (data != null) {
+ intent.setData(data);
+ }
+ intent.putExtra(SearchManager.USER_QUERY, mUserQuery);
+ if (query != null) {
+ intent.putExtra(SearchManager.QUERY, query);
+ }
+ if (extraData != null) {
+ intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData);
+ }
+ if (mAppSearchData != null) {
+ intent.putExtra(SearchManager.APP_DATA, mAppSearchData);
+ }
+ if (actionKey != KeyEvent.KEYCODE_UNKNOWN) {
+ intent.putExtra(SearchManager.ACTION_KEY, actionKey);
+ intent.putExtra(SearchManager.ACTION_MSG, actionMsg);
+ }
+ intent.setComponent(mSearchable.getSearchActivity());
+ return intent;
+ }
+
+ /**
+ * Create and return an Intent that can launch the voice search activity for web search.
+ */
+ private Intent createVoiceWebSearchIntent(Intent baseIntent, SearchableInfo searchable) {
+ Intent voiceIntent = new Intent(baseIntent);
+ ComponentName searchActivity = searchable.getSearchActivity();
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, searchActivity == null ? null
+ : searchActivity.flattenToShortString());
+ return voiceIntent;
+ }
+
+ /**
+ * Create and return an Intent that can launch the voice search activity, perform a specific
+ * voice transcription, and forward the results to the searchable activity.
+ *
+ * @param baseIntent The voice app search intent to start from
+ * @return A completely-configured intent ready to send to the voice search activity
+ */
+ private Intent createVoiceAppSearchIntent(Intent baseIntent, SearchableInfo searchable) {
+ ComponentName searchActivity = searchable.getSearchActivity();
+
+ // create the necessary intent to set up a search-and-forward operation
+ // in the voice search system. We have to keep the bundle separate,
+ // because it becomes immutable once it enters the PendingIntent
+ Intent queryIntent = new Intent(Intent.ACTION_SEARCH);
+ queryIntent.setComponent(searchActivity);
+ PendingIntent pending = PendingIntent.getActivity(getContext(), 0, queryIntent,
+ PendingIntent.FLAG_ONE_SHOT);
+
+ // Now set up the bundle that will be inserted into the pending intent
+ // when it's time to do the search. We always build it here (even if empty)
+ // because the voice search activity will always need to insert "QUERY" into
+ // it anyway.
+ Bundle queryExtras = new Bundle();
+
+ // Now build the intent to launch the voice search. Add all necessary
+ // extras to launch the voice recognizer, and then all the necessary extras
+ // to forward the results to the searchable activity
+ Intent voiceIntent = new Intent(baseIntent);
+
+ // Add all of the configuration options supplied by the searchable's metadata
+ String languageModel = RecognizerIntent.LANGUAGE_MODEL_FREE_FORM;
+ String prompt = null;
+ String language = null;
+ int maxResults = 1;
+
+ Resources resources = getResources();
+ if (searchable.getVoiceLanguageModeId() != 0) {
+ languageModel = resources.getString(searchable.getVoiceLanguageModeId());
+ }
+ if (searchable.getVoicePromptTextId() != 0) {
+ prompt = resources.getString(searchable.getVoicePromptTextId());
+ }
+ if (searchable.getVoiceLanguageId() != 0) {
+ language = resources.getString(searchable.getVoiceLanguageId());
+ }
+ if (searchable.getVoiceMaxResults() != 0) {
+ maxResults = searchable.getVoiceMaxResults();
+ }
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, languageModel);
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, prompt);
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, searchActivity == null ? null
+ : searchActivity.flattenToShortString());
+
+ // Add the values that configure forwarding the results
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT, pending);
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT_BUNDLE, queryExtras);
+
+ return voiceIntent;
+ }
+
+ /**
+ * When a particular suggestion has been selected, perform the various lookups required
+ * to use the suggestion. This includes checking the cursor for suggestion-specific data,
+ * and/or falling back to the XML for defaults; It also creates REST style Uri data when
+ * the suggestion includes a data id.
+ *
+ * @param c The suggestions cursor, moved to the row of the user's selection
+ * @param actionKey The key code of the action key that was pressed,
+ * or {@link KeyEvent#KEYCODE_UNKNOWN} if none.
+ * @param actionMsg The message for the action key that was pressed,
+ * or <code>null</code> if none.
+ * @return An intent for the suggestion at the cursor's position.
+ */
+ private Intent createIntentFromSuggestion(Cursor c, int actionKey, String actionMsg) {
+ try {
+ // use specific action if supplied, or default action if supplied, or fixed default
+ String action = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_ACTION);
+
+ if (action == null) {
+ action = mSearchable.getSuggestIntentAction();
+ }
+ if (action == null) {
+ action = Intent.ACTION_SEARCH;
+ }
+
+ // use specific data if supplied, or default data if supplied
+ String data = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_DATA);
+ if (data == null) {
+ data = mSearchable.getSuggestIntentData();
+ }
+ // then, if an ID was provided, append it.
+ if (data != null) {
+ String id = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID);
+ if (id != null) {
+ data = data + "/" + Uri.encode(id);
+ }
+ }
+ Uri dataUri = (data == null) ? null : Uri.parse(data);
+
+ String query = getColumnString(c, SearchManager.SUGGEST_COLUMN_QUERY);
+ String extraData = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA);
+
+ return createIntent(action, dataUri, extraData, query, actionKey, actionMsg);
+ } catch (RuntimeException e ) {
+ int rowNum;
+ try { // be really paranoid now
+ rowNum = c.getPosition();
+ } catch (RuntimeException e2 ) {
+ rowNum = -1;
+ }
+ Log.w(LOG_TAG, "Search suggestions cursor at row " + rowNum +
+ " returned exception.", e);
+ return null;
+ }
+ }
+
+ private void forceSuggestionQuery() {
+ try {
+ Method before = AutoCompleteTextView.class.getDeclaredMethod("doBeforeTextChanged");
+ Method after = AutoCompleteTextView.class.getDeclaredMethod("doAfterTextChanged");
+ before.setAccessible(true);
+ after.setAccessible(true);
+ before.invoke(mQueryTextView);
+ after.invoke(mQueryTextView);
+ } catch (Exception e) {
+ // Oh well...
+ }
+ }
+
+ static boolean isLandscapeMode(Context context) {
+ return context.getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_LANDSCAPE;
+ }
+
+ /**
+ * Callback to watch the text field for empty/non-empty
+ */
+ private TextWatcher mTextWatcher = new TextWatcher() {
+
+ public void beforeTextChanged(CharSequence s, int start, int before, int after) { }
+
+ public void onTextChanged(CharSequence s, int start,
+ int before, int after) {
+ SearchView.this.onTextChanged(s);
+ }
+
+ public void afterTextChanged(Editable s) {
+ }
+ };
+
+ /**
+ * Local subclass for AutoCompleteTextView.
+ * @hide
+ */
+ public static class SearchAutoComplete extends AutoCompleteTextView {
+
+ private int mThreshold;
+ private SearchView mSearchView;
+
+ public SearchAutoComplete(Context context) {
+ super(context);
+ mThreshold = getThreshold();
+ }
+
+ public SearchAutoComplete(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mThreshold = getThreshold();
+ }
+
+ public SearchAutoComplete(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mThreshold = getThreshold();
+ }
+
+ void setSearchView(SearchView searchView) {
+ mSearchView = searchView;
+ }
+
+ @Override
+ public void setThreshold(int threshold) {
+ super.setThreshold(threshold);
+ mThreshold = threshold;
+ }
+
+ /**
+ * Returns true if the text field is empty, or contains only whitespace.
+ */
+ private boolean isEmpty() {
+ return TextUtils.getTrimmedLength(getText()) == 0;
+ }
+
+ /**
+ * We override this method to avoid replacing the query box text when a
+ * suggestion is clicked.
+ */
+ @Override
+ protected void replaceText(CharSequence text) {
+ }
+
+ /**
+ * We override this method to avoid an extra onItemClick being called on
+ * the drop-down's OnItemClickListener by
+ * {@link AutoCompleteTextView#onKeyUp(int, KeyEvent)} when an item is
+ * clicked with the trackball.
+ */
+ @Override
+ public void performCompletion() {
+ }
+
+ /**
+ * We override this method to be sure and show the soft keyboard if
+ * appropriate when the TextView has focus.
+ */
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+
+ if (hasWindowFocus && mSearchView.hasFocus() && getVisibility() == VISIBLE) {
+ InputMethodManager inputManager = (InputMethodManager) getContext()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ inputManager.showSoftInput(this, 0);
+ // If in landscape mode, then make sure that
+ // the ime is in front of the dropdown.
+ if (isLandscapeMode(getContext())) {
+ ensureImeVisible(this, true);
+ }
+ }
+ }
+
+ @Override
+ protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
+ super.onFocusChanged(focused, direction, previouslyFocusedRect);
+ mSearchView.onTextFocusChanged();
+ }
+
+ /**
+ * We override this method so that we can allow a threshold of zero,
+ * which ACTV does not.
+ */
+ @Override
+ public boolean enoughToFilter() {
+ return mThreshold <= 0 || super.enoughToFilter();
+ }
+
+ @Override
+ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ // special case for the back key, we do not even try to send it
+ // to the drop down list but instead, consume it immediately
+ if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null) {
+ state.startTracking(event, this);
+ }
+ return true;
+ } else if (event.getAction() == KeyEvent.ACTION_UP) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null) {
+ state.handleUpEvent(event);
+ }
+ if (event.isTracking() && !event.isCanceled()) {
+ mSearchView.clearFocus();
+ mSearchView.setImeVisibility(false);
+ return true;
+ }
+ }
+ }
+ return super.onKeyPreIme(keyCode, event);
+ }
+
+ }
+
+ private static void ensureImeVisible(AutoCompleteTextView view, boolean visible) {
+ try {
+ Method method = AutoCompleteTextView.class.getMethod("ensureImeVisible", boolean.class);
+ method.setAccessible(true);
+ method.invoke(view, visible);
+ } catch (Exception e) {
+ //Oh well...
+ }
+ }
+
+ private static void showSoftInputUnchecked(View view, InputMethodManager imm, int flags) {
+ try {
+ Method method = imm.getClass().getMethod("showSoftInputUnchecked", int.class, ResultReceiver.class);
+ method.setAccessible(true);
+ method.invoke(imm, flags, null);
+ } catch (Exception e) {
+ //Fallback to public API which hopefully does mostly the same thing
+ imm.showSoftInput(view, flags);
+ }
+ }
+
+ private static void setText(AutoCompleteTextView view, CharSequence text, boolean filter) {
+ try {
+ Method method = AutoCompleteTextView.class.getMethod("setText", CharSequence.class, boolean.class);
+ method.setAccessible(true);
+ method.invoke(view, text, filter);
+ } catch (Exception e) {
+ //Fallback to public API which hopefully does mostly the same thing
+ view.setText(text);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ShareActionProvider.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ShareActionProvider.java
new file mode 100644
index 0000000000..83e9f0ca9f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/ShareActionProvider.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+package com.actionbarsherlock.widget;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.util.TypedValue;
+import android.view.View;
+
+import com.actionbarsherlock.R;
+import com.actionbarsherlock.view.ActionProvider;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.MenuItem.OnMenuItemClickListener;
+import com.actionbarsherlock.view.SubMenu;
+import com.actionbarsherlock.widget.ActivityChooserModel.OnChooseActivityListener;
+
+/**
+ * This is a provider for a share action. It is responsible for creating views
+ * that enable data sharing and also to show a sub menu with sharing activities
+ * if the hosting item is placed on the overflow menu.
+ * <p>
+ * Here is how to use the action provider with custom backing file in a {@link MenuItem}:
+ * </p>
+ * <p>
+ * <pre>
+ * <code>
+ * // In Activity#onCreateOptionsMenu
+ * public boolean onCreateOptionsMenu(Menu menu) {
+ * // Get the menu item.
+ * MenuItem menuItem = menu.findItem(R.id.my_menu_item);
+ * // Get the provider and hold onto it to set/change the share intent.
+ * mShareActionProvider = (ShareActionProvider) menuItem.getActionProvider();
+ * // Set history different from the default before getting the action
+ * // view since a call to {@link MenuItem#getActionView() MenuItem.getActionView()} calls
+ * // {@link ActionProvider#onCreateActionView()} which uses the backing file name. Omit this
+ * // line if using the default share history file is desired.
+ * mShareActionProvider.setShareHistoryFileName("custom_share_history.xml");
+ * . . .
+ * }
+ *
+ * // Somewhere in the application.
+ * public void doShare(Intent shareIntent) {
+ * // When you want to share set the share intent.
+ * mShareActionProvider.setShareIntent(shareIntent);
+ * }
+ * </pre>
+ * </code>
+ * </p>
+ * <p>
+ * <strong>Note:</strong> While the sample snippet demonstrates how to use this provider
+ * in the context of a menu item, the use of the provider is not limited to menu items.
+ * </p>
+ *
+ * @see ActionProvider
+ */
+public class ShareActionProvider extends ActionProvider {
+
+ /**
+ * Listener for the event of selecting a share target.
+ */
+ public interface OnShareTargetSelectedListener {
+
+ /**
+ * Called when a share target has been selected. The client can
+ * decide whether to handle the intent or rely on the default
+ * behavior which is launching it.
+ * <p>
+ * <strong>Note:</strong> Modifying the intent is not permitted and
+ * any changes to the latter will be ignored.
+ * </p>
+ *
+ * @param source The source of the notification.
+ * @param intent The intent for launching the chosen share target.
+ * @return Whether the client has handled the intent.
+ */
+ public boolean onShareTargetSelected(ShareActionProvider source, Intent intent);
+ }
+
+ /**
+ * The default for the maximal number of activities shown in the sub-menu.
+ */
+ private static final int DEFAULT_INITIAL_ACTIVITY_COUNT = 4;
+
+ /**
+ * The the maximum number activities shown in the sub-menu.
+ */
+ private int mMaxShownActivityCount = DEFAULT_INITIAL_ACTIVITY_COUNT;
+
+ /**
+ * Listener for handling menu item clicks.
+ */
+ private final ShareMenuItemOnMenuItemClickListener mOnMenuItemClickListener =
+ new ShareMenuItemOnMenuItemClickListener();
+
+ /**
+ * The default name for storing share history.
+ */
+ public static final String DEFAULT_SHARE_HISTORY_FILE_NAME = "share_history.xml";
+
+ /**
+ * Context for accessing resources.
+ */
+ private final Context mContext;
+
+ /**
+ * The name of the file with share history data.
+ */
+ private String mShareHistoryFileName = DEFAULT_SHARE_HISTORY_FILE_NAME;
+
+ private OnShareTargetSelectedListener mOnShareTargetSelectedListener;
+
+ private OnChooseActivityListener mOnChooseActivityListener;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param context Context for accessing resources.
+ */
+ public ShareActionProvider(Context context) {
+ super(context);
+ mContext = context;
+ }
+
+ /**
+ * Sets a listener to be notified when a share target has been selected.
+ * The listener can optionally decide to handle the selection and
+ * not rely on the default behavior which is to launch the activity.
+ * <p>
+ * <strong>Note:</strong> If you choose the backing share history file
+ * you will still be notified in this callback.
+ * </p>
+ * @param listener The listener.
+ */
+ public void setOnShareTargetSelectedListener(OnShareTargetSelectedListener listener) {
+ mOnShareTargetSelectedListener = listener;
+ setActivityChooserPolicyIfNeeded();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public View onCreateActionView() {
+ // Create the view and set its data model.
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
+ ActivityChooserView activityChooserView = new ActivityChooserView(mContext);
+ activityChooserView.setActivityChooserModel(dataModel);
+
+ // Lookup and set the expand action icon.
+ TypedValue outTypedValue = new TypedValue();
+ mContext.getTheme().resolveAttribute(R.attr.actionModeShareDrawable, outTypedValue, true);
+ Drawable drawable = mContext.getResources().getDrawable(outTypedValue.resourceId);
+ activityChooserView.setExpandActivityOverflowButtonDrawable(drawable);
+ activityChooserView.setProvider(this);
+
+ // Set content description.
+ activityChooserView.setDefaultActionButtonContentDescription(
+ R.string.abs__shareactionprovider_share_with_application);
+ activityChooserView.setExpandActivityOverflowButtonContentDescription(
+ R.string.abs__shareactionprovider_share_with);
+
+ return activityChooserView;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasSubMenu() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onPrepareSubMenu(SubMenu subMenu) {
+ // Clear since the order of items may change.
+ subMenu.clear();
+
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
+ PackageManager packageManager = mContext.getPackageManager();
+
+ final int expandedActivityCount = dataModel.getActivityCount();
+ final int collapsedActivityCount = Math.min(expandedActivityCount, mMaxShownActivityCount);
+
+ // Populate the sub-menu with a sub set of the activities.
+ for (int i = 0; i < collapsedActivityCount; i++) {
+ ResolveInfo activity = dataModel.getActivity(i);
+ subMenu.add(0, i, i, activity.loadLabel(packageManager))
+ .setIcon(activity.loadIcon(packageManager))
+ .setOnMenuItemClickListener(mOnMenuItemClickListener);
+ }
+
+ if (collapsedActivityCount < expandedActivityCount) {
+ // Add a sub-menu for showing all activities as a list item.
+ SubMenu expandedSubMenu = subMenu.addSubMenu(Menu.NONE, collapsedActivityCount,
+ collapsedActivityCount,
+ mContext.getString(R.string.abs__activity_chooser_view_see_all));
+ for (int i = 0; i < expandedActivityCount; i++) {
+ ResolveInfo activity = dataModel.getActivity(i);
+ expandedSubMenu.add(0, i, i, activity.loadLabel(packageManager))
+ .setIcon(activity.loadIcon(packageManager))
+ .setOnMenuItemClickListener(mOnMenuItemClickListener);
+ }
+ }
+ }
+
+ /**
+ * Sets the file name of a file for persisting the share history which
+ * history will be used for ordering share targets. This file will be used
+ * for all view created by {@link #onCreateActionView()}. Defaults to
+ * {@link #DEFAULT_SHARE_HISTORY_FILE_NAME}. Set to <code>null</code>
+ * if share history should not be persisted between sessions.
+ * <p>
+ * <strong>Note:</strong> The history file name can be set any time, however
+ * only the action views created by {@link #onCreateActionView()} after setting
+ * the file name will be backed by the provided file.
+ * <p>
+ *
+ * @param shareHistoryFile The share history file name.
+ */
+ public void setShareHistoryFileName(String shareHistoryFile) {
+ mShareHistoryFileName = shareHistoryFile;
+ setActivityChooserPolicyIfNeeded();
+ }
+
+ /**
+ * Sets an intent with information about the share action. Here is a
+ * sample for constructing a share intent:
+ * <p>
+ * <pre>
+ * <code>
+ * Intent shareIntent = new Intent(Intent.ACTION_SEND);
+ * shareIntent.setType("image/*");
+ * Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg"));
+ * shareIntent.putExtra(Intent.EXTRA_STREAM, uri.toString());
+ * </pre>
+ * </code>
+ * </p>
+ *
+ * @param shareIntent The share intent.
+ *
+ * @see Intent#ACTION_SEND
+ * @see Intent#ACTION_SEND_MULTIPLE
+ */
+ public void setShareIntent(Intent shareIntent) {
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext,
+ mShareHistoryFileName);
+ dataModel.setIntent(shareIntent);
+ }
+
+ /**
+ * Reusable listener for handling share item clicks.
+ */
+ private class ShareMenuItemOnMenuItemClickListener implements OnMenuItemClickListener {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext,
+ mShareHistoryFileName);
+ final int itemId = item.getItemId();
+ Intent launchIntent = dataModel.chooseActivity(itemId);
+ if (launchIntent != null) {
+ mContext.startActivity(launchIntent);
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Set the activity chooser policy of the model backed by the current
+ * share history file if needed which is if there is a registered callback.
+ */
+ private void setActivityChooserPolicyIfNeeded() {
+ if (mOnShareTargetSelectedListener == null) {
+ return;
+ }
+ if (mOnChooseActivityListener == null) {
+ mOnChooseActivityListener = new ShareAcitivityChooserModelPolicy();
+ }
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
+ dataModel.setOnChooseActivityListener(mOnChooseActivityListener);
+ }
+
+ /**
+ * Policy that delegates to the {@link OnShareTargetSelectedListener}, if such.
+ */
+ private class ShareAcitivityChooserModelPolicy implements OnChooseActivityListener {
+ @Override
+ public boolean onChooseActivity(ActivityChooserModel host, Intent intent) {
+ if (mOnShareTargetSelectedListener != null) {
+ return mOnShareTargetSelectedListener.onShareTargetSelected(
+ ShareActionProvider.this, intent);
+ }
+ return false;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java
new file mode 100644
index 0000000000..82d4f0c425
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java
@@ -0,0 +1,758 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+package com.actionbarsherlock.widget;
+
+import android.app.SearchManager;
+import android.app.SearchableInfo;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v4.widget.ResourceCursorAdapter;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.text.style.TextAppearanceSpan;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+import com.actionbarsherlock.R;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.WeakHashMap;
+
+/**
+ * Provides the contents for the suggestion drop-down list.
+ *
+ * @hide
+ */
+class SuggestionsAdapter extends ResourceCursorAdapter implements OnClickListener {
+
+ private static final boolean DBG = false;
+ private static final String LOG_TAG = "SuggestionsAdapter";
+ private static final int QUERY_LIMIT = 50;
+
+ static final int REFINE_NONE = 0;
+ static final int REFINE_BY_ENTRY = 1;
+ static final int REFINE_ALL = 2;
+
+ private SearchManager mSearchManager;
+ private SearchableInfo mSearchable;
+ private SearchView mSearchView;
+ private Context mProviderContext;
+ private WeakHashMap<String, Drawable.ConstantState> mOutsideDrawablesCache;
+ private boolean mClosed = false;
+ private int mQueryRefinement = REFINE_BY_ENTRY;
+
+ // URL color
+ private ColorStateList mUrlColor;
+
+ static final int INVALID_INDEX = -1;
+
+ // Cached column indexes, updated when the cursor changes.
+ private int mText1Col = INVALID_INDEX;
+ private int mText2Col = INVALID_INDEX;
+ private int mText2UrlCol = INVALID_INDEX;
+ private int mIconName1Col = INVALID_INDEX;
+ private int mIconName2Col = INVALID_INDEX;
+ private int mFlagsCol = INVALID_INDEX;
+
+ // private final Runnable mStartSpinnerRunnable;
+ // private final Runnable mStopSpinnerRunnable;
+
+ /**
+ * The amount of time we delay in the filter when the user presses the delete key.
+ */
+ //private static final long DELETE_KEY_POST_DELAY = 500L;
+
+ public SuggestionsAdapter(Context context, SearchView searchView,
+ SearchableInfo searchable, WeakHashMap<String, Drawable.ConstantState> outsideDrawablesCache) {
+ super(context,
+ R.layout.abs__search_dropdown_item_icons_2line,
+ null, // no initial cursor
+ true); // auto-requery
+ mSearchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
+ mSearchable = searchable;
+ mProviderContext = mContext;
+ mSearchView = searchView;
+
+ mOutsideDrawablesCache = outsideDrawablesCache;
+
+ // mStartSpinnerRunnable = new Runnable() {
+ // public void run() {
+ // // mSearchView.setWorking(true); // TODO:
+ // }
+ // };
+ //
+ // mStopSpinnerRunnable = new Runnable() {
+ // public void run() {
+ // // mSearchView.setWorking(false); // TODO:
+ // }
+ // };
+
+ // delay 500ms when deleting
+// TODO getFilter().setDelayer(new Filter.Delayer() {
+//
+// private int mPreviousLength = 0;
+//
+// public long getPostingDelay(CharSequence constraint) {
+// if (constraint == null) return 0;
+//
+// long delay = constraint.length() < mPreviousLength ? DELETE_KEY_POST_DELAY : 0;
+// mPreviousLength = constraint.length();
+// return delay;
+// }
+// });
+ }
+
+ /**
+ * Enables query refinement for all suggestions. This means that an additional icon
+ * will be shown for each entry. When clicked, the suggested text on that line will be
+ * copied to the query text field.
+ * <p>
+ *
+ * @param refineWhat which queries to refine. Possible values are {@link #REFINE_NONE},
+ * {@link #REFINE_BY_ENTRY}, and {@link #REFINE_ALL}.
+ */
+ public void setQueryRefinement(int refineWhat) {
+ mQueryRefinement = refineWhat;
+ }
+
+ /**
+ * Returns the current query refinement preference.
+ * @return value of query refinement preference
+ */
+ public int getQueryRefinement() {
+ return mQueryRefinement;
+ }
+
+ /**
+ * Overridden to always return <code>false</code>, since we cannot be sure that
+ * suggestion sources return stable IDs.
+ */
+ @Override
+ public boolean hasStableIds() {
+ return false;
+ }
+
+ /**
+ * Use the search suggestions provider to obtain a live cursor. This will be called
+ * in a worker thread, so it's OK if the query is slow (e.g. round trip for suggestions).
+ * The results will be processed in the UI thread and changeCursor() will be called.
+ */
+ @Override
+ public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
+ if (DBG) Log.d(LOG_TAG, "runQueryOnBackgroundThread(" + constraint + ")");
+ String query = (constraint == null) ? "" : constraint.toString();
+ /**
+ * for in app search we show the progress spinner until the cursor is returned with
+ * the results.
+ */
+ Cursor cursor = null;
+ if (mSearchView.getVisibility() != View.VISIBLE
+ || mSearchView.getWindowVisibility() != View.VISIBLE) {
+ return null;
+ }
+ //mSearchView.getWindow().getDecorView().post(mStartSpinnerRunnable); // TODO:
+ try {
+ cursor = getSuggestions(query, QUERY_LIMIT);
+ // trigger fill window so the spinner stays up until the results are copied over and
+ // closer to being ready
+ if (cursor != null) {
+ cursor.getCount();
+ return cursor;
+ }
+ } catch (RuntimeException e) {
+ Log.w(LOG_TAG, "Search suggestions query threw an exception.", e);
+ }
+ // If cursor is null or an exception was thrown, stop the spinner and return null.
+ // changeCursor doesn't get called if cursor is null
+ // mSearchView.getWindow().getDecorView().post(mStopSpinnerRunnable); // TODO:
+ return null;
+ }
+
+ public Cursor getSuggestions(String query, int limit) {
+ if (mSearchable == null) {
+ return null;
+ }
+
+ String authority = mSearchable.getSuggestAuthority();
+ if (authority == null) {
+ return null;
+ }
+
+ Uri.Builder uriBuilder = new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(authority)
+ .query("") // TODO: Remove, workaround for a bug in Uri.writeToParcel()
+ .fragment(""); // TODO: Remove, workaround for a bug in Uri.writeToParcel()
+
+ // if content path provided, insert it now
+ final String contentPath = mSearchable.getSuggestPath();
+ if (contentPath != null) {
+ uriBuilder.appendEncodedPath(contentPath);
+ }
+
+ // append standard suggestion query path
+ uriBuilder.appendPath(SearchManager.SUGGEST_URI_PATH_QUERY);
+
+ // get the query selection, may be null
+ String selection = mSearchable.getSuggestSelection();
+ // inject query, either as selection args or inline
+ String[] selArgs = null;
+ if (selection != null) { // use selection if provided
+ selArgs = new String[] { query };
+ } else { // no selection, use REST pattern
+ uriBuilder.appendPath(query);
+ }
+
+ if (limit > 0) {
+ uriBuilder.appendQueryParameter("limit", String.valueOf(limit));
+ }
+
+ Uri uri = uriBuilder.build();
+
+ // finally, make the query
+ return mContext.getContentResolver().query(uri, null, selection, selArgs, null);
+ }
+
+ public void close() {
+ if (DBG) Log.d(LOG_TAG, "close()");
+ changeCursor(null);
+ mClosed = true;
+ }
+
+ @Override
+ public void notifyDataSetChanged() {
+ if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
+ super.notifyDataSetChanged();
+
+ // mSearchView.onDataSetChanged(); // TODO:
+
+ updateSpinnerState(getCursor());
+ }
+
+ @Override
+ public void notifyDataSetInvalidated() {
+ if (DBG) Log.d(LOG_TAG, "notifyDataSetInvalidated");
+ super.notifyDataSetInvalidated();
+
+ updateSpinnerState(getCursor());
+ }
+
+ private void updateSpinnerState(Cursor cursor) {
+ Bundle extras = cursor != null ? cursor.getExtras() : null;
+ if (DBG) {
+ Log.d(LOG_TAG, "updateSpinnerState - extra = "
+ + (extras != null
+ ? extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)
+ : null));
+ }
+ // Check if the Cursor indicates that the query is not complete and show the spinner
+ if (extras != null
+ && extras.getBoolean(SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS)) {
+ // mSearchView.getWindow().getDecorView().post(mStartSpinnerRunnable); // TODO:
+ return;
+ }
+ // If cursor is null or is done, stop the spinner
+ // mSearchView.getWindow().getDecorView().post(mStopSpinnerRunnable); // TODO:
+ }
+
+ /**
+ * Cache columns.
+ */
+ @Override
+ public void changeCursor(Cursor c) {
+ if (DBG) Log.d(LOG_TAG, "changeCursor(" + c + ")");
+
+ if (mClosed) {
+ Log.w(LOG_TAG, "Tried to change cursor after adapter was closed.");
+ if (c != null) c.close();
+ return;
+ }
+
+ try {
+ super.changeCursor(c);
+
+ if (c != null) {
+ mText1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1);
+ mText2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2);
+ mText2UrlCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_2_URL);
+ mIconName1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_1);
+ mIconName2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_2);
+ mFlagsCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_FLAGS);
+ }
+ } catch (Exception e) {
+ Log.e(LOG_TAG, "error changing cursor and caching columns", e);
+ }
+ }
+
+ /**
+ * Tags the view with cached child view look-ups.
+ */
+ @Override
+ public View newView(Context context, Cursor cursor, ViewGroup parent) {
+ View v = super.newView(context, cursor, parent);
+ v.setTag(new ChildViewCache(v));
+ return v;
+ }
+
+ /**
+ * Cache of the child views of drop-drown list items, to avoid looking up the children
+ * each time the contents of a list item are changed.
+ */
+ private final static class ChildViewCache {
+ public final TextView mText1;
+ public final TextView mText2;
+ public final ImageView mIcon1;
+ public final ImageView mIcon2;
+ public final ImageView mIconRefine;
+
+ public ChildViewCache(View v) {
+ mText1 = (TextView) v.findViewById(android.R.id.text1);
+ mText2 = (TextView) v.findViewById(android.R.id.text2);
+ mIcon1 = (ImageView) v.findViewById(android.R.id.icon1);
+ mIcon2 = (ImageView) v.findViewById(android.R.id.icon2);
+ mIconRefine = (ImageView) v.findViewById(R.id.edit_query);
+ }
+ }
+
+ @Override
+ public void bindView(View view, Context context, Cursor cursor) {
+ ChildViewCache views = (ChildViewCache) view.getTag();
+
+ int flags = 0;
+ if (mFlagsCol != INVALID_INDEX) {
+ flags = cursor.getInt(mFlagsCol);
+ }
+ if (views.mText1 != null) {
+ String text1 = getStringOrNull(cursor, mText1Col);
+ setViewText(views.mText1, text1);
+ }
+ if (views.mText2 != null) {
+ // First check TEXT_2_URL
+ CharSequence text2 = getStringOrNull(cursor, mText2UrlCol);
+ if (text2 != null) {
+ text2 = formatUrl(text2);
+ } else {
+ text2 = getStringOrNull(cursor, mText2Col);
+ }
+
+ // If no second line of text is indicated, allow the first line of text
+ // to be up to two lines if it wants to be.
+ if (TextUtils.isEmpty(text2)) {
+ if (views.mText1 != null) {
+ views.mText1.setSingleLine(false);
+ views.mText1.setMaxLines(2);
+ }
+ } else {
+ if (views.mText1 != null) {
+ views.mText1.setSingleLine(true);
+ views.mText1.setMaxLines(1);
+ }
+ }
+ setViewText(views.mText2, text2);
+ }
+
+ if (views.mIcon1 != null) {
+ setViewDrawable(views.mIcon1, getIcon1(cursor), View.INVISIBLE);
+ }
+ if (views.mIcon2 != null) {
+ setViewDrawable(views.mIcon2, getIcon2(cursor), View.GONE);
+ }
+ if (mQueryRefinement == REFINE_ALL
+ || (mQueryRefinement == REFINE_BY_ENTRY
+ && (flags & SearchManager.FLAG_QUERY_REFINEMENT) != 0)) {
+ views.mIconRefine.setVisibility(View.VISIBLE);
+ views.mIconRefine.setTag(views.mText1.getText());
+ views.mIconRefine.setOnClickListener(this);
+ } else {
+ views.mIconRefine.setVisibility(View.GONE);
+ }
+ }
+
+ public void onClick(View v) {
+ Object tag = v.getTag();
+ if (tag instanceof CharSequence) {
+ mSearchView.onQueryRefine((CharSequence) tag);
+ }
+ }
+
+ private CharSequence formatUrl(CharSequence url) {
+ if (mUrlColor == null) {
+ // Lazily get the URL color from the current theme.
+ TypedValue colorValue = new TypedValue();
+ mContext.getTheme().resolveAttribute(R.attr.textColorSearchUrl, colorValue, true);
+ mUrlColor = mContext.getResources().getColorStateList(colorValue.resourceId);
+ }
+
+ SpannableString text = new SpannableString(url);
+ text.setSpan(new TextAppearanceSpan(null, 0, 0, mUrlColor, null),
+ 0, url.length(),
+ Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ return text;
+ }
+
+ private void setViewText(TextView v, CharSequence text) {
+ // Set the text even if it's null, since we need to clear any previous text.
+ v.setText(text);
+
+ if (TextUtils.isEmpty(text)) {
+ v.setVisibility(View.GONE);
+ } else {
+ v.setVisibility(View.VISIBLE);
+ }
+ }
+
+ private Drawable getIcon1(Cursor cursor) {
+ if (mIconName1Col == INVALID_INDEX) {
+ return null;
+ }
+ String value = cursor.getString(mIconName1Col);
+ Drawable drawable = getDrawableFromResourceValue(value);
+ if (drawable != null) {
+ return drawable;
+ }
+ return getDefaultIcon1(cursor);
+ }
+
+ private Drawable getIcon2(Cursor cursor) {
+ if (mIconName2Col == INVALID_INDEX) {
+ return null;
+ }
+ String value = cursor.getString(mIconName2Col);
+ return getDrawableFromResourceValue(value);
+ }
+
+ /**
+ * Sets the drawable in an image view, makes sure the view is only visible if there
+ * is a drawable.
+ */
+ private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) {
+ // Set the icon even if the drawable is null, since we need to clear any
+ // previous icon.
+ v.setImageDrawable(drawable);
+
+ if (drawable == null) {
+ v.setVisibility(nullVisibility);
+ } else {
+ v.setVisibility(View.VISIBLE);
+
+ // This is a hack to get any animated drawables (like a 'working' spinner)
+ // to animate. You have to setVisible true on an AnimationDrawable to get
+ // it to start animating, but it must first have been false or else the
+ // call to setVisible will be ineffective. We need to clear up the story
+ // about animated drawables in the future, see http://b/1878430.
+ drawable.setVisible(false, false);
+ drawable.setVisible(true, false);
+ }
+ }
+
+ /**
+ * Gets the text to show in the query field when a suggestion is selected.
+ *
+ * @param cursor The Cursor to read the suggestion data from. The Cursor should already
+ * be moved to the suggestion that is to be read from.
+ * @return The text to show, or <code>null</code> if the query should not be
+ * changed when selecting this suggestion.
+ */
+ @Override
+ public CharSequence convertToString(Cursor cursor) {
+ if (cursor == null) {
+ return null;
+ }
+
+ String query = getColumnString(cursor, SearchManager.SUGGEST_COLUMN_QUERY);
+ if (query != null) {
+ return query;
+ }
+
+ return null;
+ }
+
+ /**
+ * This method is overridden purely to provide a bit of protection against
+ * flaky content providers.
+ *
+ * @see android.widget.ListAdapter#getView(int, View, ViewGroup)
+ */
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ try {
+ return super.getView(position, convertView, parent);
+ } catch (RuntimeException e) {
+ Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
+ // Put exception string in item title
+ View v = newView(mContext, mCursor, parent);
+ if (v != null) {
+ ChildViewCache views = (ChildViewCache) v.getTag();
+ TextView tv = views.mText1;
+ tv.setText(e.toString());
+ }
+ return v;
+ }
+ }
+
+ /**
+ * Gets a drawable given a value provided by a suggestion provider.
+ *
+ * This value could be just the string value of a resource id
+ * (e.g., "2130837524"), in which case we will try to retrieve a drawable from
+ * the provider's resources. If the value is not an integer, it is
+ * treated as a Uri and opened with
+ * {@link ContentResolver#openOutputStream(android.net.Uri, String)}.
+ *
+ * All resources and URIs are read using the suggestion provider's context.
+ *
+ * If the string is not formatted as expected, or no drawable can be found for
+ * the provided value, this method returns null.
+ *
+ * @param drawableId a string like "2130837524",
+ * "android.resource://com.android.alarmclock/2130837524",
+ * or "content://contacts/photos/253".
+ * @return a Drawable, or null if none found
+ */
+ private Drawable getDrawableFromResourceValue(String drawableId) {
+ if (drawableId == null || drawableId.length() == 0 || "0".equals(drawableId)) {
+ return null;
+ }
+ try {
+ // First, see if it's just an integer
+ int resourceId = Integer.parseInt(drawableId);
+ // It's an int, look for it in the cache
+ String drawableUri = ContentResolver.SCHEME_ANDROID_RESOURCE
+ + "://" + mProviderContext.getPackageName() + "/" + resourceId;
+ // Must use URI as cache key, since ints are app-specific
+ Drawable drawable = checkIconCache(drawableUri);
+ if (drawable != null) {
+ return drawable;
+ }
+ // Not cached, find it by resource ID
+ drawable = mProviderContext.getResources().getDrawable(resourceId);
+ // Stick it in the cache, using the URI as key
+ storeInIconCache(drawableUri, drawable);
+ return drawable;
+ } catch (NumberFormatException nfe) {
+ // It's not an integer, use it as a URI
+ Drawable drawable = checkIconCache(drawableId);
+ if (drawable != null) {
+ return drawable;
+ }
+ Uri uri = Uri.parse(drawableId);
+ drawable = getDrawable(uri);
+ storeInIconCache(drawableId, drawable);
+ return drawable;
+ } catch (Resources.NotFoundException nfe) {
+ // It was an integer, but it couldn't be found, bail out
+ Log.w(LOG_TAG, "Icon resource not found: " + drawableId);
+ return null;
+ }
+ }
+
+ /**
+ * Gets a drawable by URI, without using the cache.
+ *
+ * @return A drawable, or {@code null} if the drawable could not be loaded.
+ */
+ private Drawable getDrawable(Uri uri) {
+ try {
+ String scheme = uri.getScheme();
+ if (ContentResolver.SCHEME_ANDROID_RESOURCE.equals(scheme)) {
+ // Load drawables through Resources, to get the source density information
+ try {
+ return getTheDrawable(uri);
+ } catch (Resources.NotFoundException ex) {
+ throw new FileNotFoundException("Resource does not exist: " + uri);
+ }
+ } else {
+ // Let the ContentResolver handle content and file URIs.
+ InputStream stream = mProviderContext.getContentResolver().openInputStream(uri);
+ if (stream == null) {
+ throw new FileNotFoundException("Failed to open " + uri);
+ }
+ try {
+ return Drawable.createFromStream(stream, null);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException ex) {
+ Log.e(LOG_TAG, "Error closing icon stream for " + uri, ex);
+ }
+ }
+ }
+ } catch (FileNotFoundException fnfe) {
+ Log.w(LOG_TAG, "Icon not found: " + uri + ", " + fnfe.getMessage());
+ return null;
+ }
+ }
+
+ public Drawable getTheDrawable(Uri uri) throws FileNotFoundException {
+ String authority = uri.getAuthority();
+ Resources r;
+ if (TextUtils.isEmpty(authority)) {
+ throw new FileNotFoundException("No authority: " + uri);
+ } else {
+ try {
+ r = mContext.getPackageManager().getResourcesForApplication(authority);
+ } catch (NameNotFoundException ex) {
+ throw new FileNotFoundException("No package found for authority: " + uri);
+ }
+ }
+ List<String> path = uri.getPathSegments();
+ if (path == null) {
+ throw new FileNotFoundException("No path: " + uri);
+ }
+ int len = path.size();
+ int id;
+ if (len == 1) {
+ try {
+ id = Integer.parseInt(path.get(0));
+ } catch (NumberFormatException e) {
+ throw new FileNotFoundException("Single path segment is not a resource ID: " + uri);
+ }
+ } else if (len == 2) {
+ id = r.getIdentifier(path.get(1), path.get(0), authority);
+ } else {
+ throw new FileNotFoundException("More than two path segments: " + uri);
+ }
+ if (id == 0) {
+ throw new FileNotFoundException("No resource found for: " + uri);
+ }
+ return r.getDrawable(id);
+ }
+
+ private Drawable checkIconCache(String resourceUri) {
+ Drawable.ConstantState cached = mOutsideDrawablesCache.get(resourceUri);
+ if (cached == null) {
+ return null;
+ }
+ if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + resourceUri);
+ return cached.newDrawable();
+ }
+
+ private void storeInIconCache(String resourceUri, Drawable drawable) {
+ if (drawable != null) {
+ mOutsideDrawablesCache.put(resourceUri, drawable.getConstantState());
+ }
+ }
+
+ /**
+ * Gets the left-hand side icon that will be used for the current suggestion
+ * if the suggestion contains an icon column but no icon or a broken icon.
+ *
+ * @param cursor A cursor positioned at the current suggestion.
+ * @return A non-null drawable.
+ */
+ private Drawable getDefaultIcon1(Cursor cursor) {
+ // Fall back to a default icon
+ return mContext.getPackageManager().getDefaultActivityIcon();
+ }
+
+ /**
+ * Gets the activity or application icon for an activity.
+ * Uses the local icon cache for fast repeated lookups.
+ *
+ * @param component Name of an activity.
+ * @return A drawable, or {@code null} if neither the activity nor the application
+ * has an icon set.
+ */
+ private Drawable getActivityIconWithCache(ComponentName component) {
+ // First check the icon cache
+ String componentIconKey = component.flattenToShortString();
+ // Using containsKey() since we also store null values.
+ if (mOutsideDrawablesCache.containsKey(componentIconKey)) {
+ Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey);
+ return cached == null ? null : cached.newDrawable(mProviderContext.getResources());
+ }
+ // Then try the activity or application icon
+ Drawable drawable = getActivityIcon(component);
+ // Stick it in the cache so we don't do this lookup again.
+ Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
+ mOutsideDrawablesCache.put(componentIconKey, toCache);
+ return drawable;
+ }
+
+ /**
+ * Gets the activity or application icon for an activity.
+ *
+ * @param component Name of an activity.
+ * @return A drawable, or {@code null} if neither the acitivy or the application
+ * have an icon set.
+ */
+ private Drawable getActivityIcon(ComponentName component) {
+ PackageManager pm = mContext.getPackageManager();
+ final ActivityInfo activityInfo;
+ try {
+ activityInfo = pm.getActivityInfo(component, PackageManager.GET_META_DATA);
+ } catch (NameNotFoundException ex) {
+ Log.w(LOG_TAG, ex.toString());
+ return null;
+ }
+ int iconId = activityInfo.getIconResource();
+ if (iconId == 0) return null;
+ String pkg = component.getPackageName();
+ Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
+ if (drawable == null) {
+ Log.w(LOG_TAG, "Invalid icon resource " + iconId + " for "
+ + component.flattenToShortString());
+ return null;
+ }
+ return drawable;
+ }
+
+ /**
+ * Gets the value of a string column by name.
+ *
+ * @param cursor Cursor to read the value from.
+ * @param columnName The name of the column to read.
+ * @return The value of the given column, or <code>null</null>
+ * if the cursor does not contain the given column.
+ */
+ public static String getColumnString(Cursor cursor, String columnName) {
+ int col = cursor.getColumnIndex(columnName);
+ return getStringOrNull(cursor, col);
+ }
+
+ private static String getStringOrNull(Cursor cursor, int col) {
+ if (col == INVALID_INDEX) {
+ return null;
+ }
+ try {
+ return cursor.getString(col);
+ } catch (Exception e) {
+ Log.e(LOG_TAG,
+ "unexpected error retrieving valid column from cursor, "
+ + "did the remote process die?", e);
+ return null;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/test/com/actionbarsherlock/internal/ResourcesCompatTest.java b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/test/com/actionbarsherlock/internal/ResourcesCompatTest.java
new file mode 100644
index 0000000000..f621d3a963
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock/test/com/actionbarsherlock/internal/ResourcesCompatTest.java
@@ -0,0 +1,23 @@
+package com.actionbarsherlock.internal;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+
+import static com.actionbarsherlock.internal.ActionBarSherlockCompat.cleanActivityName;
+import static org.fest.assertions.api.Assertions.assertThat;
+
+@RunWith(RobolectricTestRunner.class)
+public class ResourcesCompatTest {
+ @Test
+ public void testCleanActivityName() {
+ assertThat(cleanActivityName("com.jakewharton.test", "com.other.package.SomeClass")) //
+ .isEqualTo("com.other.package.SomeClass");
+ assertThat(cleanActivityName("com.jakewharton.test", "com.jakewharton.test.SomeClass")) //
+ .isEqualTo("com.jakewharton.test.SomeClass");
+ assertThat(cleanActivityName("com.jakewharton.test", "SomeClass")) //
+ .isEqualTo("com.jakewharton.test.SomeClass");
+ assertThat(cleanActivityName("com.jakewharton.test", ".ui.SomeClass")) //
+ .isEqualTo("com.jakewharton.test.ui.SomeClass");
+ }
+} \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/checkstyle.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/checkstyle.xml
new file mode 100644
index 0000000000..47ab84ec77
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/checkstyle.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+ <!--module name="NewlineAtEndOfFile"/-->
+ <module name="FileLength"/>
+ <module name="FileTabCharacter"/>
+
+ <!-- Trailing spaces -->
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+
+ <module name="TreeWalker">
+ <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <!--module name="JavadocMethod"/-->
+ <!--module name="JavadocType"/-->
+ <!--module name="JavadocVariable"/-->
+ <!--module name="JavadocStyle"/-->
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <!--module name="ConstantName"/-->
+ <!--module name="LocalFinalVariableName"/-->
+ <!--module name="LocalVariableName"/-->
+ <module name="MemberName"/>
+ <!--module name="MethodName"/-->
+ <module name="PackageName"/>
+ <!--module name="ParameterName"/-->
+ <!--module name="StaticVariableName"/-->
+ <!--module name="TypeName"/-->
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <!--module name="LineLength"/-->
+ <!--module name="MethodLength"/-->
+ <!--module name="ParameterNumber"/-->
+
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <!--module name="EmptyForIteratorPad"/-->
+ <!--module name="MethodParamPad"/-->
+ <!--module name="NoWhitespaceAfter"/-->
+ <!--module name="NoWhitespaceBefore"/-->
+ <!--module name="OperatorWrap"/-->
+ <!--module name="ParenPad"/-->
+ <!--module name="TypecastParenPad"/-->
+ <!--module name="WhitespaceAfter"/-->
+ <!--module name="WhitespaceAround"/-->
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <!--module name="ModifierOrder"/-->
+ <!--module name="RedundantModifier"/-->
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <!--module name="AvoidNestedBlocks"/-->
+ <!--module name="EmptyBlock"/-->
+ <!--module name="LeftCurly"/-->
+ <!--module name="NeedBraces"/-->
+ <!--module name="RightCurly"/-->
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <!--module name="AvoidInlineConditionals"/-->
+ <!--module name="EmptyStatement"/-->
+ <!--module name="EqualsHashCode"/-->
+ <!--module name="HiddenField"/-->
+ <!--module name="IllegalInstantiation"/-->
+ <!--module name="InnerAssignment"/-->
+ <!--module name="MagicNumber"/-->
+ <!--module name="MissingSwitchDefault"/-->
+ <module name="RedundantThrows"/>
+ <!--module name="SimplifyBooleanExpression"/-->
+ <!--module name="SimplifyBooleanReturn"/-->
+ <module name="StringLiteralEquality"/>
+ <module name="CovariantEquals"/>
+ <!--module name="NoClone"/-->
+ <module name="NoFinalizer"/>
+ <module name="PackageDeclaration"/>
+ <!--module name="FallThrough"/-->
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--module name="DesignForExtension"/-->
+ <!--module name="FinalClass"/-->
+ <!--module name="HideUtilityClassConstructor"/-->
+ <!--module name="InterfaceIsType"/-->
+ <!--module name="VisibilityModifier"/-->
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <!--module name="ArrayTypeStyle"/-->
+ <!--module name="FinalParameters"/-->
+ <!--module name="TodoComment"/-->
+ <module name="UpperEll"/>
+ </module>
+</module>
diff --git a/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/pom.xml b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/pom.xml
new file mode 100644
index 0000000000..2225eaed18
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/contrib/ActionBarSherlock/pom.xml
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.sonatype.oss</groupId>
+ <artifactId>oss-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <groupId>com.actionbarsherlock</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>4.3.1</version>
+
+ <name>ActionBarSherlock (Parent)</name>
+ <description>Android library for implementing the action bar design pattern using the backported sources of Ice Cream Sandwich.</description>
+ <url>http://actionbarsherlock.com</url>
+ <inceptionYear>2011</inceptionYear>
+
+ <modules>
+ <module>actionbarsherlock</module>
+ <module>actionbarsherlock-fest</module>
+ <module>actionbarsherlock-i18n</module>
+ <module>actionbarsherlock-samples</module>
+ </modules>
+
+ <scm>
+ <url>https://github.com/JakeWharton/ActionBarSherlock/</url>
+ <connection>scm:git:git://github.com/JakeWharton/ActionBarSherlock.git</connection>
+ <developerConnection>scm:git:git@github.com:JakeWharton/ActionBarSherlock.git</developerConnection>
+ <tag>4.3.1</tag>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Jake Wharton</name>
+ <email>jakewharton@gmail.com</email>
+ <id>jakewharton</id>
+ <url>http://jakewharton.com</url>
+ <timezone>-5</timezone>
+ <roles>
+ <role>developer</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <licenses>
+ <license>
+ <name>Apache License Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <organization>
+ <name>Jake Wharton</name>
+ <url>http://jakewharton.com</url>
+ </organization>
+
+ <issueManagement>
+ <system>GitHub Issues</system>
+ <url>https://github.com/JakeWharton/ActionBarSherlock/issues</url>
+ </issueManagement>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <java.version>1.6</java.version>
+ <android.platform>14</android.platform>
+
+ <!-- Compilation dependencies -->
+ <android.version>4.0.1.2</android.version>
+ <android-support.version>r7</android-support.version>
+ <fest.android.version>1.0.4</fest.android.version>
+
+ <!-- Sample dependencies -->
+ <nineoldandroids.version>2.4.0</nineoldandroids.version>
+ <roboguice-sherlock.version>1.5</roboguice-sherlock.version>
+
+ <!-- Test dependencies -->
+ <junit.version>4.10</junit.version>
+ <fest.version>2.0M10</fest.version>
+ <robolectric.version>2.0-alpha-2</robolectric.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>com.google.android</groupId>
+ <artifactId>android</artifactId>
+ <version>${android.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.android</groupId>
+ <artifactId>support-v4</artifactId>
+ <version>${android-support.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.nineoldandroids</groupId>
+ <artifactId>library</artifactId>
+ <version>${nineoldandroids.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.rtyley</groupId>
+ <artifactId>roboguice-sherlock</artifactId>
+ <version>${roboguice-sherlock.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.easytesting</groupId>
+ <artifactId>fest-assert-core</artifactId>
+ <version>${fest.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.robolectric</groupId>
+ <artifactId>robolectric</artifactId>
+ <version>${robolectric.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup</groupId>
+ <artifactId>fest-android</artifactId>
+ <version>${fest.android.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <showWarnings>true</showWarnings>
+ <compilerArguments>
+ <Xlint />
+ </compilerArguments>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>com.jayway.maven.plugins.android.generation2</groupId>
+ <artifactId>android-maven-plugin</artifactId>
+ <version>3.5.3</version>
+ <configuration>
+ <nativeLibrariesDirectory>ignored</nativeLibrariesDirectory>
+ <sdk>
+ <platform>${android.platform}</platform>
+ </sdk>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.holoeverywhere</groupId>
+ <artifactId>resbuilder</artifactId>
+ <version>1.5.0</version>
+ </plugin>
+
+ <plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.4.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.10</version>
+ <configuration>
+ <failsOnError>true</failsOnError>
+ <consoleOutput>true</consoleOutput>
+ <configLocation>checkstyle.xml</configLocation>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>checkstyle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/android/3rd_party/HoloEverywhere/formatting.xml b/android/3rd_party/HoloEverywhere/formatting.xml
new file mode 100644
index 0000000000..9b43767005
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/formatting.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="10">
+<profile name="Android" version="10">
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
+</profile>
+</profiles>
diff --git a/android/3rd_party/HoloEverywhere/library/AndroidManifest.xml b/android/3rd_party/HoloEverywhere/library/AndroidManifest.xml
new file mode 100644
index 0000000000..21f84ac48e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/AndroidManifest.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1005000" android:versionName="1.5.0" package="org.holoeverywhere">
+ <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
+</manifest> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/build.xml b/android/3rd_party/HoloEverywhere/library/build.xml
new file mode 100644
index 0000000000..2f6f323a25
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="library" 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>
diff --git a/android/3rd_party/HoloEverywhere/library/lint.xml b/android/3rd_party/HoloEverywhere/library/lint.xml
new file mode 100644
index 0000000000..49ef765ccb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/lint.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+ <issue id="HandlerLeak" >
+ <ignore path="src/org/holoeverywhere/app/ProgressDialog.java" />
+ <ignore path="src/org/holoeverywhere/preference/PreferenceActivity.java" />
+ <ignore path="src/org/holoeverywhere/preference/PreferenceActivity.java" />
+ <ignore path="src/org/holoeverywhere/preference/PreferenceFragment.java" />
+ <ignore path="src/org/holoeverywhere/preference/PreferenceFragment.java" />
+ <ignore path="src/org/holoeverywhere/widget/ProgressDialog.java" />
+ </issue>
+ <issue id="NewApi" >
+ <ignore path="src/org/holoeverywhere/app/AlertDialog.java" />
+ <ignore path="src/org/holoeverywhere/app/Dialog.java" />
+ <ignore path="src/com/actionbarsherlock/internal/view/menu/ContextMenuDecorView.java" />
+ <ignore path="res/layout/preference_widget_switch.xml" />
+ <ignore path="res/layout/preference_dialog_numberpicker.xml" />
+ <ignore path="res/layout/date_picker_holo.xml" />
+ <ignore path="res/layout/time_picker_holo.xml" />
+ <ignore path="bin" />
+ </issue>
+</lint>
diff --git a/android/3rd_party/HoloEverywhere/library/proguard-project.txt b/android/3rd_party/HoloEverywhere/library/proguard-project.txt
new file mode 100644
index 0000000000..f2fe1559a2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/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 *;
+#}
diff --git a/android/3rd_party/HoloEverywhere/library/project.properties b/android/3rd_party/HoloEverywhere/library/project.properties
new file mode 100644
index 0000000000..a9057a83e5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/project.properties
@@ -0,0 +1,13 @@
+# 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 use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-17
+android.library=true
+android.library.reference.1=../contrib/ActionBarSherlock/actionbarsherlock
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/dialog_enter.xml b/android/3rd_party/HoloEverywhere/library/res/anim/dialog_enter.xml
new file mode 100644
index 0000000000..3d0abc1d32
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/dialog_enter.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="0.9" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="50%" android:toYScale="1.0" android:fromYScale="0.9" android:toXScale="1.0"></scale>
+ <alpha android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="0.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/dialog_exit.xml b/android/3rd_party/HoloEverywhere/library/res/anim/dialog_exit.xml
new file mode 100644
index 0000000000..f7d1f9b895
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/dialog_exit.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="1.0" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="50%" android:toYScale="0.9" android:fromYScale="1.0" android:toXScale="0.9"></scale>
+ <alpha android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="1.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/fade_in.xml b/android/3rd_party/HoloEverywhere/library/res/anim/fade_in.xml
new file mode 100644
index 0000000000..4b1ada8a1c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/fade_in.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><alpha xmlns:android="http://schemas.android.com/apk/res/android" android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_quad" android:duration="@integer/config_longAnimTime" android:fromAlpha="0.0"></alpha> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/fade_out.xml b/android/3rd_party/HoloEverywhere/library/res/anim/fade_out.xml
new file mode 100644
index 0000000000..bc0e190f27
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/fade_out.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><alpha xmlns:android="http://schemas.android.com/apk/res/android" android:toAlpha="0.0" android:interpolator="@interpolator/accelerate_quad" android:duration="@integer/config_mediumAnimTime" android:fromAlpha="1.0"></alpha> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in.xml b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in.xml
new file mode 100644
index 0000000000..f0b51037da
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="0.9" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="0%" android:toYScale="1.0" android:fromYScale="0.9" android:toXScale="1.0"></scale>
+ <alpha android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="0.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_center.xml b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_center.xml
new file mode 100644
index 0000000000..3d0abc1d32
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_center.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="0.9" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="50%" android:toYScale="1.0" android:fromYScale="0.9" android:toXScale="1.0"></scale>
+ <alpha android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="0.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_from_bottom.xml b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_from_bottom.xml
new file mode 100644
index 0000000000..e5d00c27c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/grow_fade_in_from_bottom.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="0.9" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="100%" android:toYScale="1.0" android:fromYScale="0.9" android:toXScale="1.0"></scale>
+ <alpha android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="0.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out.xml b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out.xml
new file mode 100644
index 0000000000..996dba535d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="1.0" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="0%" android:toYScale="0.9" android:fromYScale="1.0" android:toXScale="0.9"></scale>
+ <alpha android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="1.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_center.xml b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_center.xml
new file mode 100644
index 0000000000..f7d1f9b895
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_center.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="1.0" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="50%" android:toYScale="0.9" android:fromYScale="1.0" android:toXScale="0.9"></scale>
+ <alpha android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="1.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_from_bottom.xml b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_from_bottom.xml
new file mode 100644
index 0000000000..31651b4e1b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/anim/shrink_fade_out_from_bottom.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@interpolator/decelerate_quint" android:fromXScale="1.0" android:duration="@integer/config_activityDefaultDur" android:pivotX="50%" android:pivotY="100%" android:toYScale="0.9" android:fromYScale="1.0" android:toXScale="0.9"></scale>
+ <alpha android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@integer/config_activityShortDur" android:fromAlpha="1.0"></alpha>
+</set> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_dark.xml
new file mode 100644
index 0000000000..ee8a885d44
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/bright_foreground_dark_disabled"></item>
+ <item android:color="@color/bright_foreground_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_light.xml
new file mode 100644
index 0000000000..c204ec7157
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_disable_only_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/bright_foreground_light_disabled"></item>
+ <item android:color="@color/bright_foreground_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_dark.xml
new file mode 100644
index 0000000000..8066c63408
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_dark.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/bright_foreground_disabled_holo_dark"></item>
+ <item android:state_window_focused="false" android:color="@color/bright_foreground_holo_dark"></item>
+ <item android:state_pressed="true" android:color="@color/bright_foreground_holo_dark"></item>
+ <item android:state_selected="true" android:color="@color/bright_foreground_holo_dark"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_holo_dark"></item>
+ <item android:color="@color/bright_foreground_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_light.xml
new file mode 100644
index 0000000000..790c7496a3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_holo_light.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/bright_foreground_disabled_holo_light"></item>
+ <item android:state_window_focused="false" android:color="@color/bright_foreground_holo_light"></item>
+ <item android:state_pressed="true" android:color="@color/bright_foreground_holo_light"></item>
+ <item android:state_selected="true" android:color="@color/bright_foreground_holo_light"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_holo_light"></item>
+ <item android:color="@color/bright_foreground_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_dark.xml
new file mode 100644
index 0000000000..ffabcf4ac7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:color="@color/bright_foreground_dark_inverse"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_dark_inverse"></item>
+ <item android:color="@color/bright_foreground_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_light.xml
new file mode 100644
index 0000000000..d2c70ad179
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/primary_text_nodisable_holo_light.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:color="@color/bright_foreground_light"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_light"></item>
+ <item android:color="@color/bright_foreground_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_dark.xml
new file mode 100644
index 0000000000..30285b3335
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_dark.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_dark"></item>
+ <item android:state_window_focused="false" android:color="@color/dim_foreground_holo_dark"></item>
+ <item android:state_selected="true" android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_dark"></item>
+ <item android:state_enabled="false" android:state_pressed="true" android:color="@color/dim_foreground_disabled_holo_dark"></item>
+ <item android:state_selected="true" android:color="@color/dim_foreground_holo_dark"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_holo_dark"></item>
+ <item android:state_pressed="true" android:color="@color/dim_foreground_holo_dark"></item>
+ <item android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_dark"></item>
+ <item android:color="@color/dim_foreground_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_light.xml
new file mode 100644
index 0000000000..2b513974bb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_holo_light.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_light"></item>
+ <item android:state_window_focused="false" android:color="@color/dim_foreground_holo_light"></item>
+ <item android:state_enabled="false" android:state_pressed="true" android:color="@color/dim_foreground_disabled_holo_light"></item>
+ <item android:state_selected="true" android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_light"></item>
+ <item android:state_pressed="true" android:color="@color/dim_foreground_holo_light"></item>
+ <item android:state_selected="true" android:color="@color/dim_foreground_holo_light"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_holo_light"></item>
+ <item android:state_enabled="false" android:color="@color/dim_foreground_disabled_holo_light"></item>
+ <item android:color="@color/dim_foreground_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_dark.xml
new file mode 100644
index 0000000000..6b6ddf2aa3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:color="@color/dim_foreground_dark_inverse"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_dark_inverse"></item>
+ <item android:color="@color/dim_foreground_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_light.xml
new file mode 100644
index 0000000000..6b6ddf2aa3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/secondary_text_nodisable_holo_light.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:color="@color/dim_foreground_dark_inverse"></item>
+ <item android:state_activated="true" android:color="@color/bright_foreground_dark_inverse"></item>
+ <item android:color="@color/dim_foreground_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_dark.xml
new file mode 100644
index 0000000000..041e38878c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_dark.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="#808080"></item>
+ <item android:state_window_focused="false" android:color="#808080"></item>
+ <item android:state_pressed="true" android:color="#808080"></item>
+ <item android:state_selected="true" android:color="@color/dim_foreground_holo_light"></item>
+ <item android:color="#808080"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_light.xml
new file mode 100644
index 0000000000..994b1f839d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/color/tertiary_text_holo_light.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="#808080"></item>
+ <item android:state_window_focused="false" android:color="#808080"></item>
+ <item android:state_pressed="true" android:color="#808080"></item>
+ <item android:state_selected="true" android:color="#808080"></item>
+ <item android:color="#808080"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_activated.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_activated.9.png
new file mode 100644
index 0000000000..e591a7b009
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_activated.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_focused.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_focused.9.png
new file mode 100644
index 0000000000..ea27290d76
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/activity_picker_bg_focused.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_label_background.9.png
new file mode 100644
index 0000000000..3fdf8a2d55
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_focused_holo_light.png
new file mode 100644
index 0000000000..da1134a892
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_dark.png
new file mode 100644
index 0000000000..4cefd25830
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_light.png
new file mode 100644
index 0000000000..da1134a892
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disable_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..5d1eca0526
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..e6951f40ba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..9a71845f46
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_light.png
new file mode 100644
index 0000000000..4c065f93ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_dark.png
new file mode 100644
index 0000000000..1a4d882e6a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_light.png
new file mode 100644
index 0000000000..ff129f6db2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_dark.png
new file mode 100644
index 0000000000..dc2e87adcd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_light.png
new file mode 100644
index 0000000000..d90965f534
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_dark.png
new file mode 100644
index 0000000000..43323f8c30
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_light.png
new file mode 100644
index 0000000000..b96e31b856
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..b096934f4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_light.png
new file mode 100644
index 0000000000..98c4abf94f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png
new file mode 100644
index 0000000000..631cd6cca8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_dark.png
new file mode 100644
index 0000000000..5cd7fc213c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_light.png
new file mode 100644
index 0000000000..631cd6cca8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disable_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..dbbd8b9d4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..449aa174c8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..1419a5a08d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_light.png
new file mode 100644
index 0000000000..0baaf81eee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_dark.png
new file mode 100644
index 0000000000..84a65aee59
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_light.png
new file mode 100644
index 0000000000..693ea6bb97
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_dark.png
new file mode 100644
index 0000000000..d8ad02f4d9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_light.png
new file mode 100644
index 0000000000..4d03e16f59
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..e0086287ab
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_light.png
new file mode 100644
index 0000000000..dae544b64a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_check_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..0fa3ac487c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..0fa3ac487c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..f74cd69f52
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
new file mode 100644
index 0000000000..f74cd69f52
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
new file mode 100644
index 0000000000..320b0c57ca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_light.9.png
new file mode 100644
index 0000000000..320b0c57ca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
new file mode 100644
index 0000000000..1c7a82b345
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_light.9.png
new file mode 100644
index 0000000000..fd6d263961
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..456707870d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
new file mode 100644
index 0000000000..456707870d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..b66a28fc45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_light.9.png
new file mode 100644
index 0000000000..591711edbf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d2a6bb9fc7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_light.9.png
new file mode 100644
index 0000000000..d2a6bb9fc7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000000..3b033c8c41
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000000..4754276713
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..5ec8a28ccb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_light.9.png
new file mode 100644
index 0000000000..ac7c4d1915
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_label_background.9.png
new file mode 100644
index 0000000000..16c2ed40f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..dd9a2fe669
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..2fd6f7226e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..62ec812851
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png
new file mode 100644
index 0000000000..c1b6713397
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png
new file mode 100644
index 0000000000..d5d524a507
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_light.png
new file mode 100644
index 0000000000..94196a3c34
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo.png
new file mode 100644
index 0000000000..454cef9398
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_dark.png
new file mode 100644
index 0000000000..115e1ac42a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_light.png
new file mode 100644
index 0000000000..d340f742e5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..79f84b7891
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png
new file mode 100644
index 0000000000..f6636200f2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..1bcef5ed6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..4e43fa4c10
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..6ebb1845c8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png
new file mode 100644
index 0000000000..6266487367
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png
new file mode 100644
index 0000000000..512b442ccd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_light.png
new file mode 100644
index 0000000000..c96b5b50cb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_dark.png
new file mode 100644
index 0000000000..efc9b4406f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_light.png
new file mode 100644
index 0000000000..b858f151ea
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..ac33d41bb7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png
new file mode 100644
index 0000000000..50f0fc7b9f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..20a79050e3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..92b1f0258d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..896239f52d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_light.png
new file mode 100644
index 0000000000..a336f160f9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_dark.png
new file mode 100644
index 0000000000..4638e1439f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_light.png
new file mode 100644
index 0000000000..cb61753f1d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_dark.png
new file mode 100644
index 0000000000..d0a5ca50f2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_light.png
new file mode 100644
index 0000000000..08e755306d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..04b1dec404
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_light.png
new file mode 100644
index 0000000000..6744f97bf9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..16da2b4010
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..2537d976bf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..de5ff3913d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_light.png
new file mode 100644
index 0000000000..6f4e8b98a5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_dark.png
new file mode 100644
index 0000000000..505b10d542
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_light.png
new file mode 100644
index 0000000000..18788a78b4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_dark.png
new file mode 100644
index 0000000000..54d32aa2ec
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_light.png
new file mode 100644
index 0000000000..f472565336
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..930f1699af
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_light.png
new file mode 100644
index 0000000000..a144be8c0c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_rating_star_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..ed3196e121
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..ed3196e121
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..98bf92e5d6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
new file mode 100644
index 0000000000..98bf92e5d6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
new file mode 100644
index 0000000000..cf7a11de2d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
new file mode 100644
index 0000000000..cf7a11de2d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
new file mode 100644
index 0000000000..1d2e46130a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
new file mode 100644
index 0000000000..1d2e46130a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4babf77a8c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png
new file mode 100644
index 0000000000..4babf77a8c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..6fd5e3bb07
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..6fd5e3bb07
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..89b10d28fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
new file mode 100644
index 0000000000..89b10d28fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
new file mode 100644
index 0000000000..962447a7ac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
new file mode 100644
index 0000000000..962447a7ac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
new file mode 100644
index 0000000000..79b03135ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
new file mode 100644
index 0000000000..79b03135ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..5e9b4a8e02
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png
new file mode 100644
index 0000000000..5e9b4a8e02
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png
new file mode 100644
index 0000000000..1313b3743e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..256067dea3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_light.9.png
new file mode 100644
index 0000000000..233817500a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000000..0037fbc36d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png
new file mode 100644
index 0000000000..b4d849bbaa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_dark.9.png
new file mode 100644
index 0000000000..79e56f522b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_light.9.png
new file mode 100644
index 0000000000..5fc7d23c8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo.9.png
new file mode 100644
index 0000000000..db2a650d29
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_dark.9.png
new file mode 100644
index 0000000000..7429b06f12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_light.9.png
new file mode 100644
index 0000000000..66a78491e4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_middle_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_dark.9.png
new file mode 100644
index 0000000000..50534a1eaa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_light.9.png
new file mode 100644
index 0000000000..0798ecd81a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_dark.9.png
new file mode 100644
index 0000000000..b10e209baa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_light.9.png
new file mode 100644
index 0000000000..c4c7e0bb4a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_close_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_maximized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_maximized.9.png
new file mode 100644
index 0000000000..caa57a2671
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_minimized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_minimized.9.png
new file mode 100644
index 0000000000..02dc21ea87
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_dark.9.png
new file mode 100644
index 0000000000..423aa7d012
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_light.9.png
new file mode 100644
index 0000000000..5a5b49cb6d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/expander_open_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png
new file mode 100644
index 0000000000..f8fffdf464
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png
new file mode 100644
index 0000000000..df4698b14e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_left_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png
new file mode 100644
index 0000000000..cd7801d5ed
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png
new file mode 100644
index 0000000000..2e7a4c326b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_label_right_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_default_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_default_holo.png
new file mode 100644
index 0000000000..01663257f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
new file mode 100644
index 0000000000..a93ceb5f5a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
new file mode 100644
index 0000000000..774c4fb710
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
new file mode 100644
index 0000000000..774c4fb710
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..3299dbfc91
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
new file mode 100644
index 0000000000..d4bc6a51b7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_activated_holo.9.png
new file mode 100644
index 0000000000..7930953572
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..986ab0b974
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_light.9.png
new file mode 100644
index 0000000000..0279e17a12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_focused_holo.9.png
new file mode 100644
index 0000000000..3e7c90b4e0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_longpressed_holo.9.png
new file mode 100644
index 0000000000..7930953572
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..fd42ded48b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..fd42ded48b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_dark.9.png
new file mode 100644
index 0000000000..d5790c6e19
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_light.9.png
new file mode 100644
index 0000000000..af41decd1b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..16c81cc85b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..4b6d2660a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_dark.9.png
new file mode 100644
index 0000000000..50534a1eaa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_light.9.png
new file mode 100644
index 0000000000..0798ecd81a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_background_fill_parent_width_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..4d3d208578
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..996fcb933d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000000..53871a0515
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000000..d0644b9c04
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/numberpicker_selection_divider.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/numberpicker_selection_divider.9.png
new file mode 100644
index 0000000000..46fa805fe9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/numberpicker_selection_divider.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..f2c3ecfacf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..42c346466a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..9afd8875d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..ed16f8524a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..57b20bca83
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..6c7c8d6013
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..21d58f7b1c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..8f8d054c5d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/old_switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_edge.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_edge.png
new file mode 100644
index 0000000000..08fc022629
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_edge.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_glow.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_glow.png
new file mode 100644
index 0000000000..859ef53d7d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/overscroll_glow.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000000..c85a2397d0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000000..4c8c43d7aa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/panel_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..816d802aa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..d3bb238736
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..b73abba7da
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..2f76a22648
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..03399371bf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..c820592254
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo1.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo1.png
new file mode 100644
index 0000000000..c0297438af
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo2.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo2.png
new file mode 100644
index 0000000000..4b84169f6a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo3.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo3.png
new file mode 100644
index 0000000000..ea50c6044b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo4.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo4.png
new file mode 100644
index 0000000000..306bc9e76f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo5.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo5.png
new file mode 100644
index 0000000000..fbcbfc9909
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo6.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo6.png
new file mode 100644
index 0000000000..b92d07fa39
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo7.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo7.png
new file mode 100644
index 0000000000..05987b6e24
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo8.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo8.png
new file mode 100644
index 0000000000..393a08d96f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_dark.png
new file mode 100644
index 0000000000..9bd257063a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_light.png
new file mode 100644
index 0000000000..f52b5804f9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_dark.png
new file mode 100644
index 0000000000..e7e9b4bc6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_light.png
new file mode 100644
index 0000000000..5424a0fb57
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_dark.png
new file mode 100644
index 0000000000..5906b3ed3e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_light.png
new file mode 100644
index 0000000000..e8e4f26a62
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_big_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_dark.png
new file mode 100644
index 0000000000..13dbd178b2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_light.png
new file mode 100644
index 0000000000..8cb6735517
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_dark.png
new file mode 100644
index 0000000000..f31a2555ea
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_light.png
new file mode 100644
index 0000000000..233f3e5aeb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_dark.png
new file mode 100644
index 0000000000..218d69a268
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_light.png
new file mode 100644
index 0000000000..f54387802e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/rate_star_small_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_dark.9.png
new file mode 100644
index 0000000000..8345096429
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_light.9.png
new file mode 100644
index 0000000000..6d9c514e82
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrollbar_handle_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_disabled_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_disabled_holo.png
new file mode 100644
index 0000000000..e222468a23
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_focused_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_focused_holo.png
new file mode 100644
index 0000000000..013803ec12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_normal_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_normal_holo.png
new file mode 100644
index 0000000000..083abd77a8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_pressed_holo.png
new file mode 100644
index 0000000000..d8e95aa3c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_primary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_primary_holo.9.png
new file mode 100644
index 0000000000..b7fd6631ea
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_secondary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_secondary_holo.9.png
new file mode 100644
index 0000000000..00dddf30aa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_dark.9.png
new file mode 100644
index 0000000000..51dc5e3a12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_light.9.png
new file mode 100644
index 0000000000..970ecba668
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_inner_holo.png
new file mode 100644
index 0000000000..df8653d507
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_outer_holo.png
new file mode 100644
index 0000000000..ffdb78af90
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_16_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_inner_holo.png
new file mode 100644
index 0000000000..a488f9e6b9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_outer_holo.png
new file mode 100644
index 0000000000..69f0070471
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_20_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_inner_holo.png
new file mode 100644
index 0000000000..91ce9c1059
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_outer_holo.png
new file mode 100644
index 0000000000..f62f74bb38
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_inner_holo.png
new file mode 100644
index 0000000000..a077c61e9e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_outer_holo.png
new file mode 100644
index 0000000000..287afc65b4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_76_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_dark.9.png
new file mode 100644
index 0000000000..34d56496fc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_light.9.png
new file mode 100644
index 0000000000..1b7d9d6a73
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..08af914acc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_light.9.png
new file mode 100644
index 0000000000..7dc7e872b4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_dark.9.png
new file mode 100644
index 0000000000..83be41994b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_light.9.png
new file mode 100644
index 0000000000..6b70776307
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..49398c04f0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_light.9.png
new file mode 100644
index 0000000000..af8d0f3131
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..4157671103
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png
new file mode 100644
index 0000000000..0bb7a97e24
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000000..2bbea59bca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_light.9.png
new file mode 100644
index 0000000000..9ad2d43613
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_dark.9.png
new file mode 100644
index 0000000000..ffcc62a686
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_light.9.png
new file mode 100644
index 0000000000..01b8653ed7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..3197690036
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..3197690036
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..5533bb9d7a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..1cfbe02109
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..77a5049b23
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..77a5049b23
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4d30b4b258
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..4d30b4b258
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_dark.9.png
new file mode 100644
index 0000000000..e20ec979a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_light.9.png
new file mode 100644
index 0000000000..e20ec979a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png
new file mode 100644
index 0000000000..40aa0d8e8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png
new file mode 100644
index 0000000000..4ff75e4e80
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..0ba84be04a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..ad85e6fc4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000000..b53d44b142
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_dark.9.png
new file mode 100644
index 0000000000..ecde1b1c39
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_light.9.png
new file mode 100644
index 0000000000..0f630dabb6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..0d31fa7d20
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..70ab4130c4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..022a81672f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_light.9.png
new file mode 100644
index 0000000000..656150d417
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_dark.9.png
new file mode 100644
index 0000000000..ac1ab97f50
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_light.9.png
new file mode 100644
index 0000000000..ac1ab97f50
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_activated_holo_dark.9.png
new file mode 100644
index 0000000000..e20ec979a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_default_holo_dark.9.png
new file mode 100644
index 0000000000..ecde1b1c39
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..e6b8e51802
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..022a81672f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_focused_holo_dark.9.png
new file mode 100644
index 0000000000..8cc955fdcb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/textfield_multiline_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/toast_frame.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/toast_frame.9.png
new file mode 100644
index 0000000000..ad2cb5a965
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-hdpi/toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_activated.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_activated.9.png
new file mode 100644
index 0000000000..7dfea4c005
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_activated.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_focused.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_focused.9.png
new file mode 100644
index 0000000000..99b0279469
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/activity_picker_bg_focused.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_label_background.9.png
new file mode 100644
index 0000000000..c375556e66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_dark.png
new file mode 100644
index 0000000000..f93994660f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_light.png
new file mode 100644
index 0000000000..a26977bf4c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disable_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..d4bdf3345c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..7759e9e667
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..99febab86f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_light.png
new file mode 100644
index 0000000000..5644fbd30d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_dark.png
new file mode 100644
index 0000000000..e4f4c1ff79
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_light.png
new file mode 100644
index 0000000000..211128255a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_dark.png
new file mode 100644
index 0000000000..baca81be9b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_light.png
new file mode 100644
index 0000000000..088fbb88a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_dark.png
new file mode 100644
index 0000000000..9f808ddcdb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_light.png
new file mode 100644
index 0000000000..003cbe670f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..ee2c9a6498
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_light.png
new file mode 100644
index 0000000000..aadbdfb6c7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_dark.png
new file mode 100644
index 0000000000..3ed345f641
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_light.png
new file mode 100644
index 0000000000..720adf3157
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disable_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..a4e9e4387e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..015556aaa5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..a4b844b9e5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_light.png
new file mode 100644
index 0000000000..3a967f41ba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_dark.png
new file mode 100644
index 0000000000..a698e5d141
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_light.png
new file mode 100644
index 0000000000..8729815cf3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_dark.png
new file mode 100644
index 0000000000..f44835ec2f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_light.png
new file mode 100644
index 0000000000..9317ef29d6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..94a60fb020
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_light.png
new file mode 100644
index 0000000000..7778f044fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_check_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d90c72eb91
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..d90c72eb91
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..8b0d0a77c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
new file mode 100644
index 0000000000..8b0d0a77c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
new file mode 100644
index 0000000000..6dfcd615da
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_light.9.png
new file mode 100644
index 0000000000..6dfcd615da
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
new file mode 100644
index 0000000000..54c5803e78
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_light.9.png
new file mode 100644
index 0000000000..0f630ca5b5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..d21bc08ade
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
new file mode 100644
index 0000000000..d21bc08ade
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..098bd51536
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_light.9.png
new file mode 100644
index 0000000000..8003bbdc93
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_dark.9.png
new file mode 100644
index 0000000000..ec41fcb58a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_light.9.png
new file mode 100644
index 0000000000..ec41fcb58a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000000..4f7623a18e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000000..edde84b9ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..d18fc40dc2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_light.9.png
new file mode 100644
index 0000000000..e6aef6494e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_label_background.9.png
new file mode 100644
index 0000000000..c375556e66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..9ed0e844e2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..f8f8180585
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..979af62f87
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png
new file mode 100644
index 0000000000..5fb2d1b0e7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png
new file mode 100644
index 0000000000..6eff28e6e6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_light.png
new file mode 100644
index 0000000000..6142dc2191
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo.png
new file mode 100644
index 0000000000..246a8f9d20
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_dark.png
new file mode 100644
index 0000000000..c7d468a458
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_light.png
new file mode 100644
index 0000000000..dc7af87bae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..0da1a51879
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png
new file mode 100644
index 0000000000..25b5fb4bc4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..ce53618a85
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..c8f83c8d25
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..fb7bd7d77c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png
new file mode 100644
index 0000000000..4583c3e1fa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png
new file mode 100644
index 0000000000..d63cdf38a3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_light.png
new file mode 100644
index 0000000000..ae3248f2c6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_dark.png
new file mode 100644
index 0000000000..8d574944df
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_light.png
new file mode 100644
index 0000000000..06235f0a6b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..1e4a091387
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png
new file mode 100644
index 0000000000..0de13591a7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..2d88c0706b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..b010d3d6e6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..8b6bd93356
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_light.png
new file mode 100644
index 0000000000..7992806e6c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_dark.png
new file mode 100644
index 0000000000..1033f6bd3f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_light.png
new file mode 100644
index 0000000000..f7ab8996f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_dark.png
new file mode 100644
index 0000000000..1360dd0363
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_light.png
new file mode 100644
index 0000000000..7e82935531
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..0a88b701d5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_light.png
new file mode 100644
index 0000000000..fdab60f8fa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..c03f1f83f0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..1801f9c88d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..2338224592
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
new file mode 100644
index 0000000000..d2e97294f9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_dark.png
new file mode 100644
index 0000000000..d352c19125
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
new file mode 100644
index 0000000000..47fd33e1bc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_dark.png
new file mode 100644
index 0000000000..5976e2abde
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
new file mode 100644
index 0000000000..0e0d9ffb86
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..cc5832ecdb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
new file mode 100644
index 0000000000..52298d3521
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_rating_star_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..05b0636d6a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..05b0636d6a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..0373d23ce4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
new file mode 100644
index 0000000000..0373d23ce4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
new file mode 100644
index 0000000000..84368b7947
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
new file mode 100644
index 0000000000..84368b7947
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
new file mode 100644
index 0000000000..57649fe40b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
new file mode 100644
index 0000000000..57649fe40b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..aea407132e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png
new file mode 100644
index 0000000000..aea407132e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d4a06931b9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..d4a06931b9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..93da97e1cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
new file mode 100644
index 0000000000..93da97e1cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
new file mode 100644
index 0000000000..5b50955d96
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
new file mode 100644
index 0000000000..5b50955d96
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
new file mode 100644
index 0000000000..a11532003a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
new file mode 100644
index 0000000000..a11532003a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..21d0859149
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png
new file mode 100644
index 0000000000..21d0859149
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png
new file mode 100644
index 0000000000..7f817deffe
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..611d538906
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_light.9.png
new file mode 100644
index 0000000000..cf2f01b1f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000000..b3ab49fcca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png
new file mode 100644
index 0000000000..89f7ecc7e3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_dark.9.png
new file mode 100644
index 0000000000..fb3660eab1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_light.9.png
new file mode 100644
index 0000000000..f18050ea58
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo.9.png
new file mode 100644
index 0000000000..13d2b62a87
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo_dark.9.png
new file mode 100644
index 0000000000..188555b02a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_dark.9.png
new file mode 100644
index 0000000000..4d99748793
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_light.9.png
new file mode 100644
index 0000000000..cc6e99df97
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_dark.9.png
new file mode 100644
index 0000000000..80b4fe410d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_light.9.png
new file mode 100644
index 0000000000..19d4984cd5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_close_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_maximized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_maximized.9.png
new file mode 100644
index 0000000000..8deb6a84f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_minimized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_minimized.9.png
new file mode 100644
index 0000000000..b2c1969915
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_dark.9.png
new file mode 100644
index 0000000000..f791f96aac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_light.9.png
new file mode 100644
index 0000000000..056bf15e2c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/expander_open_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_dark.9.png
new file mode 100644
index 0000000000..36bb884a5f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png
new file mode 100644
index 0000000000..c6f28cb116
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_left_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png
new file mode 100644
index 0000000000..aa1a9a532f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_light.9.png
new file mode 100644
index 0000000000..142b88e680
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_label_right_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_default_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_default_holo.png
new file mode 100644
index 0000000000..1f521cfb17
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png
new file mode 100644
index 0000000000..b0f6c405b5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png
new file mode 100644
index 0000000000..017b663217
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png
new file mode 100644
index 0000000000..017b663217
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..8af63ba7c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png
new file mode 100644
index 0000000000..dde17cc0b1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_activated_holo.9.png
new file mode 100644
index 0000000000..5f50359b7f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..986ab0b974
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_light.9.png
new file mode 100644
index 0000000000..0279e17a12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_focused_holo.9.png
new file mode 100644
index 0000000000..c98c2168f9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_longpressed_holo.9.png
new file mode 100644
index 0000000000..5f50359b7f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..fb9f0ea4cf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..fb9f0ea4cf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_dark.9.png
new file mode 100644
index 0000000000..cea4c75f1c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_light.9.png
new file mode 100644
index 0000000000..b081d80e3f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..33436bf500
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..cb4a044a1c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_dark.9.png
new file mode 100644
index 0000000000..4d99748793
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_light.9.png
new file mode 100644
index 0000000000..cc6e99df97
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_background_fill_parent_width_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..460ec46eb0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..e84adf2d41
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000000..9d2aa3487b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000000..633509f23b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/numberpicker_selection_divider.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/numberpicker_selection_divider.9.png
new file mode 100644
index 0000000000..08b6a2fef8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/numberpicker_selection_divider.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..86c6925060
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..660a9cf0f5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..adaeffb9b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..ee7a22c623
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..690510b8dd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..84d18fca15
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..47144d282b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..06edb98a3a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/old_switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_edge.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_edge.png
new file mode 100644
index 0000000000..4c87a8bce6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_edge.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_glow.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_glow.png
new file mode 100644
index 0000000000..428d8b758a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/overscroll_glow.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000000..bc6080501b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000000..1db183ab34
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/panel_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..bf8c14daae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..f2a2a77632
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..b86f4b51dd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..6fb9445773
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..93fd44cc96
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..c291be2007
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo1.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo1.png
new file mode 100644
index 0000000000..7e787f4efb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo2.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo2.png
new file mode 100644
index 0000000000..d2d775f6e0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo3.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo3.png
new file mode 100644
index 0000000000..2aad889430
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo4.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo4.png
new file mode 100644
index 0000000000..9a82f29cc0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo5.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo5.png
new file mode 100644
index 0000000000..faffb27a38
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo6.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo6.png
new file mode 100644
index 0000000000..5924ff00c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo7.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo7.png
new file mode 100644
index 0000000000..4064f319aa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo8.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo8.png
new file mode 100644
index 0000000000..a873fa9aa1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_dark.png
new file mode 100644
index 0000000000..ac15d6a8ff
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_light.png
new file mode 100644
index 0000000000..e94c06cef0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_dark.png
new file mode 100644
index 0000000000..cde1fb934f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_light.png
new file mode 100644
index 0000000000..8ecf0f95be
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_dark.png
new file mode 100644
index 0000000000..0cd2fdee0c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_light.png
new file mode 100644
index 0000000000..88d04908e6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_big_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_dark.png
new file mode 100644
index 0000000000..09df0a4561
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_light.png
new file mode 100644
index 0000000000..2f770bffda
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_dark.png
new file mode 100644
index 0000000000..27cd0495b5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_light.png
new file mode 100644
index 0000000000..f009e2775b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_dark.png
new file mode 100644
index 0000000000..bf0f4f1b0a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_light.png
new file mode 100644
index 0000000000..e4a51e3c26
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/rate_star_small_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_dark.9.png
new file mode 100644
index 0000000000..22920bfcf8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_light.9.png
new file mode 100644
index 0000000000..8f6895b94e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrollbar_handle_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_disabled_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_disabled_holo.png
new file mode 100644
index 0000000000..3dc0a2c2a9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_focused_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_focused_holo.png
new file mode 100644
index 0000000000..59e9bc49fe
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_normal_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_normal_holo.png
new file mode 100644
index 0000000000..66292a484c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_pressed_holo.png
new file mode 100644
index 0000000000..1a4f31cae0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_primary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_primary_holo.9.png
new file mode 100644
index 0000000000..ab37e3b6c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_secondary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_secondary_holo.9.png
new file mode 100644
index 0000000000..3a124084b6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_dark.9.png
new file mode 100644
index 0000000000..c6fdeac6e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_light.9.png
new file mode 100644
index 0000000000..1dbf2a76ed
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_inner_holo.png
new file mode 100644
index 0000000000..b2391ad796
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_outer_holo.png
new file mode 100644
index 0000000000..6c76362bed
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_16_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_inner_holo.png
new file mode 100644
index 0000000000..19dc171b2e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_outer_holo.png
new file mode 100644
index 0000000000..9287dd7c87
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_20_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_inner_holo.png
new file mode 100644
index 0000000000..b2ee33f8eb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_outer_holo.png
new file mode 100644
index 0000000000..4ce73edce7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_inner_holo.png
new file mode 100644
index 0000000000..e877830607
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_outer_holo.png
new file mode 100644
index 0000000000..99a5ebbfa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_76_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_dark.9.png
new file mode 100644
index 0000000000..c467daf673
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_light.9.png
new file mode 100644
index 0000000000..8990f15895
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..61a71a5b31
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_light.9.png
new file mode 100644
index 0000000000..9f3d41ad1b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_dark.9.png
new file mode 100644
index 0000000000..ed914b79db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_light.9.png
new file mode 100644
index 0000000000..53e5acad1a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..36ee2fe87a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_light.9.png
new file mode 100644
index 0000000000..3dc7767998
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..f2ea22237d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png
new file mode 100644
index 0000000000..28d19b339c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000000..83c040ff09
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_light.9.png
new file mode 100644
index 0000000000..3b1a8b9406
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_dark.9.png
new file mode 100644
index 0000000000..162c27f3df
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_light.9.png
new file mode 100644
index 0000000000..bf63988ba5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..69edbdc317
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..69edbdc317
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..ae5cfc38f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..ae5cfc38f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..15a57eb34c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..15a57eb34c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..244176c564
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..244176c564
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_activated_holo_light.9.png
new file mode 100644
index 0000000000..c9f4377039
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png
new file mode 100644
index 0000000000..40aa0d8e8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png
new file mode 100644
index 0000000000..4ff75e4e80
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..0ba84be04a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..ad85e6fc4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000000..b53d44b142
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_dark.9.png
new file mode 100644
index 0000000000..b84c9b7d8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_light.9.png
new file mode 100644
index 0000000000..c4212ce8fe
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d117f36998
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..9bd4672e67
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..92de680340
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_light.9.png
new file mode 100644
index 0000000000..496866f634
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_dark.9.png
new file mode 100644
index 0000000000..02376ed7a2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_light.9.png
new file mode 100644
index 0000000000..02376ed7a2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_activated_holo_dark.9.png
new file mode 100644
index 0000000000..c9f4377039
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_default_holo_dark.9.png
new file mode 100644
index 0000000000..b84c9b7d8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..d117f36998
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..92de680340
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_focused_holo_dark.9.png
new file mode 100644
index 0000000000..0536f38f38
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/textfield_multiline_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/toast_frame.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/toast_frame.9.png
new file mode 100755
index 0000000000..b9105deeef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-mdpi/toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_activated.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_activated.9.png
new file mode 100644
index 0000000000..f01a79e3bf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_activated.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_focused.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_focused.9.png
new file mode 100644
index 0000000000..7bea197d0c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/activity_picker_bg_focused.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_label_background.9.png
new file mode 100644
index 0000000000..182049a72c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_dark.png
new file mode 100644
index 0000000000..8f9d7040f0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_light.png
new file mode 100644
index 0000000000..d452480a72
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disable_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..f45a6cb0a6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..8cedd0de0b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..ad6fedea77
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_light.png
new file mode 100644
index 0000000000..3ba8b6db89
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_dark.png
new file mode 100644
index 0000000000..f525cb531f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_light.png
new file mode 100644
index 0000000000..663ac992c6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo.png
new file mode 100644
index 0000000000..e68fe23f82
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_dark.png
new file mode 100644
index 0000000000..2eabddcc33
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_light.png
new file mode 100644
index 0000000000..f2ec7dfca2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_dark.png
new file mode 100644
index 0000000000..d3d2fa481a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_light.png
new file mode 100644
index 0000000000..945f580d8a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..b816e15985
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png
new file mode 100644
index 0000000000..1ebfdb3193
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..1af697398a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..1b93c11dff
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..1d2d70d53a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_light.png
new file mode 100644
index 0000000000..488dd8101e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_dark.png
new file mode 100644
index 0000000000..e921dbe7ab
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_light.png
new file mode 100644
index 0000000000..e05cb50e41
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo.png
new file mode 100644
index 0000000000..03fa8daa5a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_dark.png
new file mode 100644
index 0000000000..e45fb986af
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_light.png
new file mode 100644
index 0000000000..763b6058cc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..f9ed572a82
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png
new file mode 100644
index 0000000000..b325a6e866
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..e628224c92
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..e628224c92
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..0cf24b1d43
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png
new file mode 100644
index 0000000000..0cf24b1d43
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png
new file mode 100644
index 0000000000..ff06bf7056
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_light.9.png
new file mode 100644
index 0000000000..ff06bf7056
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png
new file mode 100644
index 0000000000..3d48d3f7b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_light.9.png
new file mode 100644
index 0000000000..a6b75270a3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..35f8fbdb40
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png
new file mode 100644
index 0000000000..35f8fbdb40
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..2079e0e174
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png
new file mode 100644
index 0000000000..12a73ec936
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png
new file mode 100644
index 0000000000..8965d110d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_light.9.png
new file mode 100644
index 0000000000..8965d110d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000000..069496a605
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000000..e47649ac77
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..3a1e66d0d5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png
new file mode 100644
index 0000000000..3e8cb42fe4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_group_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_label_background.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_label_background.9.png
new file mode 100644
index 0000000000..f8600b5c04
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_label_background.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..f2d43a7f4b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..d2a469299e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..0825d3e36b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png
new file mode 100644
index 0000000000..a1d9f095d9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png
new file mode 100644
index 0000000000..6731eeffd0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png
new file mode 100644
index 0000000000..38415c4eef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo.png
new file mode 100644
index 0000000000..bb4449bfad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_dark.png
new file mode 100644
index 0000000000..d985cd82bb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_light.png
new file mode 100644
index 0000000000..b205deec02
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..5571c4245d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png
new file mode 100644
index 0000000000..42c124d532
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..2135290ff1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..fad3286b62
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..346909d36f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png
new file mode 100644
index 0000000000..5741490d36
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png
new file mode 100644
index 0000000000..97043d0d99
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png
new file mode 100644
index 0000000000..ea7f9b46f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_dark.png
new file mode 100644
index 0000000000..acc1eb6157
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_light.png
new file mode 100644
index 0000000000..0f39c96835
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..fde0e7d063
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png
new file mode 100644
index 0000000000..adda0f0bee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_radio_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..ed48399626
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..bcd07e2a11
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_dark.png
new file mode 100644
index 0000000000..2a1654ac8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_light.png
new file mode 100644
index 0000000000..dd152e302d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_dark.png
new file mode 100644
index 0000000000..fbd75da69b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_light.png
new file mode 100644
index 0000000000..953a041a06
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_dark.png
new file mode 100644
index 0000000000..5d7b031813
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_light.png
new file mode 100644
index 0000000000..9fe1ff72b8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_dark.png
new file mode 100644
index 0000000000..c40e28a1ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_light.png
new file mode 100644
index 0000000000..707d762d90
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_off_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_dark.png
new file mode 100644
index 0000000000..d6c61d6b7f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_light.png
new file mode 100644
index 0000000000..b290a3dcbb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_dark.png
new file mode 100644
index 0000000000..b1893704a9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_light.png
new file mode 100644
index 0000000000..a0eb1f4909
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_disabled_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_dark.png
new file mode 100644
index 0000000000..81de243b93
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_light.png
new file mode 100644
index 0000000000..e62c7aa1ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_focused_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_dark.png
new file mode 100644
index 0000000000..68b45bd0c7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_light.png
new file mode 100644
index 0000000000..6b11c54ba8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_normal_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_dark.png
new file mode 100644
index 0000000000..75a12c508f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_light.png
new file mode 100644
index 0000000000..65227d4ce1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_rating_star_on_pressed_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..de3bdf0865
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..de3bdf0865
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..eb8d623180
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png
new file mode 100644
index 0000000000..eb8d623180
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png
new file mode 100644
index 0000000000..03ba132734
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png
new file mode 100644
index 0000000000..03ba132734
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png
new file mode 100644
index 0000000000..19ef990a6d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png
new file mode 100644
index 0000000000..19ef990a6d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4e970d2b84
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png
new file mode 100644
index 0000000000..4e970d2b84
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..a1096c0fa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..a1096c0fa6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..85602d8476
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png
new file mode 100644
index 0000000000..85602d8476
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png
new file mode 100644
index 0000000000..637a89b0c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png
new file mode 100644
index 0000000000..637a89b0c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png
new file mode 100644
index 0000000000..1d78e5289d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png
new file mode 100644
index 0000000000..1d78e5289d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..13ca8c133b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png
new file mode 100644
index 0000000000..13ca8c133b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png
new file mode 100644
index 0000000000..a92cfe93ad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/day_picker_week_view_dayline_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
new file mode 100644
index 0000000000..94bb8e140f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
new file mode 100644
index 0000000000..ef58e29240
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000000..53427f402c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png
new file mode 100644
index 0000000000..8633374a7b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_divider_horizontal_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_dark.9.png
new file mode 100644
index 0000000000..0f4720f0ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_light.9.png
new file mode 100644
index 0000000000..db96033e66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
new file mode 100644
index 0000000000..b695936f2b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_light.9.png
new file mode 100644
index 0000000000..6c29b32064
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_middle_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_dark.9.png
new file mode 100644
index 0000000000..e1c602fbc0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_light.9.png
new file mode 100644
index 0000000000..606b4bcc4b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_dark.9.png
new file mode 100644
index 0000000000..b1ec13f562
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_light.9.png
new file mode 100644
index 0000000000..04d5e7b351
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_close_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_maximized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_maximized.9.png
new file mode 100644
index 0000000000..24f12f41b3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_minimized.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_minimized.9.png
new file mode 100644
index 0000000000..ce28f0194b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_dark.9.png
new file mode 100644
index 0000000000..17f8e3865a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_light.9.png
new file mode 100644
index 0000000000..a58e4331bb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/expander_open_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png
new file mode 100644
index 0000000000..a92d396fee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_light.9.png
new file mode 100644
index 0000000000..94079264a1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_left_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_dark.9.png
new file mode 100644
index 0000000000..30b1c51796
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_light.9.png
new file mode 100644
index 0000000000..b815d0dc8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_label_right_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_default_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_default_holo.png
new file mode 100644
index 0000000000..596f8551be
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_default_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
new file mode 100644
index 0000000000..bd48e8497c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
new file mode 100644
index 0000000000..80a28f106a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
new file mode 100644
index 0000000000..80a28f106a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4afef8c012
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
new file mode 100644
index 0000000000..a17b92eb10
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_activated_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_activated_holo.9.png
new file mode 100644
index 0000000000..6a8a97e1e1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_activated_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_dark.9.png
new file mode 100644
index 0000000000..e62f011d45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_light.9.png
new file mode 100644
index 0000000000..65061c0f45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_focused_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_focused_holo.9.png
new file mode 100644
index 0000000000..1a107382ed
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_focused_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_longpressed_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_longpressed_holo.9.png
new file mode 100644
index 0000000000..6a8a97e1e1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4c9bb4975e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_light.9.png
new file mode 100644
index 0000000000..4c9bb4975e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_dark.9.png
new file mode 100644
index 0000000000..7e249cbf44
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_light.9.png
new file mode 100644
index 0000000000..05b5ff6f99
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..a791f5ca73
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000000..ce1bc83b22
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_dark.9.png
new file mode 100644
index 0000000000..e1c602fbc0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_light.9.png
new file mode 100644
index 0000000000..606b4bcc4b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_background_fill_parent_width_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000000..26481856d8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000000..6a684c9d8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000000..521e2d9d09
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000000..f0661e6bd5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/numberpicker_selection_divider.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/numberpicker_selection_divider.9.png
new file mode 100644
index 0000000000..ffb60e809e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/numberpicker_selection_divider.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..9f7a9ec71f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..09fad6e3f7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..a56fa2d441
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..6b649331d3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..7a5ead14ad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..fbd54a3992
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..3f92e575cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..298e8b4238
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/old_switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_edge.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_edge.png
new file mode 100644
index 0000000000..f07563aa21
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_edge.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_glow.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_glow.png
new file mode 100644
index 0000000000..f11854c76d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/overscroll_glow.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000000..c704150385
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000000..5d52d2c408
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/panel_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_dark.9.png
new file mode 100644
index 0000000000..2eb5841e7d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_light.9.png
new file mode 100644
index 0000000000..174b932361
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_dark.9.png
new file mode 100644
index 0000000000..e761265ac6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_light.9.png
new file mode 100644
index 0000000000..396fadb3a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_primary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
new file mode 100644
index 0000000000..b74a4ff4dd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_light.9.png
new file mode 100644
index 0000000000..9b1717a093
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progress_secondary_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo1.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
new file mode 100644
index 0000000000..93684e8528
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo2.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
new file mode 100644
index 0000000000..904386dbe1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo3.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
new file mode 100644
index 0000000000..f6b703dc06
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo4.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
new file mode 100644
index 0000000000..b9dbc45bfa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo5.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
new file mode 100644
index 0000000000..e7152fc5c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo6.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
new file mode 100644
index 0000000000..51e466ce61
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo7.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
new file mode 100644
index 0000000000..1d75c4c34a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo8.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
new file mode 100644
index 0000000000..d6321976c8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_dark.png
new file mode 100644
index 0000000000..85068130f1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_light.png
new file mode 100644
index 0000000000..185326eb42
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_dark.png
new file mode 100644
index 0000000000..8a85ce4fe3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_light.png
new file mode 100644
index 0000000000..f88123c27b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_dark.png
new file mode 100644
index 0000000000..5a1d0d1b92
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_light.png
new file mode 100644
index 0000000000..14e5ffa3e7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_big_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_dark.png
new file mode 100644
index 0000000000..ac9c7b0a6f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_light.png
new file mode 100644
index 0000000000..a1e3f1a446
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_half_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_dark.png
new file mode 100644
index 0000000000..346daa31fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_light.png
new file mode 100644
index 0000000000..4c2b62c3f7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_off_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_dark.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_dark.png
new file mode 100644
index 0000000000..e4bb43009a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_dark.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_light.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_light.png
new file mode 100644
index 0000000000..0f5ae83083
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/rate_star_small_on_holo_light.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_dark.9.png
new file mode 100644
index 0000000000..d7b274ae9c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_light.9.png
new file mode 100644
index 0000000000..fbb202b8c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrollbar_handle_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_disabled_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_disabled_holo.png
new file mode 100644
index 0000000000..17f00e4af9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_focused_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_focused_holo.png
new file mode 100644
index 0000000000..85c1bf2722
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_focused_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_normal_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_normal_holo.png
new file mode 100644
index 0000000000..b2b1cff81a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_normal_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_pressed_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_pressed_holo.png
new file mode 100644
index 0000000000..d8f52734c4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_control_pressed_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_primary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_primary_holo.9.png
new file mode 100644
index 0000000000..e6b3f1fc53
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_primary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_secondary_holo.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_secondary_holo.9.png
new file mode 100644
index 0000000000..24f9a899b1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_secondary_holo.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
new file mode 100644
index 0000000000..c3bc32fa1d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_light.9.png
new file mode 100644
index 0000000000..6585a04542
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/scrubber_track_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_inner_holo.png
new file mode 100644
index 0000000000..9ba14b2d50
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_outer_holo.png
new file mode 100644
index 0000000000..afd4bb921f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_16_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_inner_holo.png
new file mode 100644
index 0000000000..da7109c187
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_outer_holo.png
new file mode 100644
index 0000000000..6f693d6315
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_20_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_inner_holo.png
new file mode 100644
index 0000000000..50e5463196
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_outer_holo.png
new file mode 100644
index 0000000000..14143c51c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_48_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_inner_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_inner_holo.png
new file mode 100644
index 0000000000..0187f21a4c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_inner_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_outer_holo.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_outer_holo.png
new file mode 100644
index 0000000000..7f6ff94bbb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_76_outer_holo.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_dark.9.png
new file mode 100644
index 0000000000..f9c69e1366
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_light.9.png
new file mode 100644
index 0000000000..4bae93248a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..d77884482c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
new file mode 100644
index 0000000000..cf7f41b33e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
new file mode 100644
index 0000000000..61cd6467fd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_light.9.png
new file mode 100644
index 0000000000..42ca63b10a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..4a598c9eb0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
new file mode 100644
index 0000000000..998c2dfe48
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/spinner_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..f9f187c64a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png
new file mode 100644
index 0000000000..c5d11014a7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000000..17e161a035
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png
new file mode 100644
index 0000000000..7cf1895a6f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_dark.9.png
new file mode 100644
index 0000000000..652b1eecf9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_light.9.png
new file mode 100644
index 0000000000..f274c8a009
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_bg_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png
new file mode 100644
index 0000000000..949d854afb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png
new file mode 100644
index 0000000000..949d854afb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..d443572074
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png
new file mode 100644
index 0000000000..d443572074
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_dark.9.png
new file mode 100644
index 0000000000..f31d0e8e70
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_light.9.png
new file mode 100644
index 0000000000..0f8dc9187e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png
new file mode 100644
index 0000000000..77b5a3e558
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png
new file mode 100644
index 0000000000..77b5a3e558
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_dark.9.png
new file mode 100644
index 0000000000..cb0b6cb137
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_light.9.png
new file mode 100644
index 0000000000..cb0b6cb137
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_dark.9.png
new file mode 100644
index 0000000000..075251c587
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_light.9.png
new file mode 100644
index 0000000000..3680512605
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..23cda8134f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..b90b8472c8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..fc4a4eb663
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_light.9.png
new file mode 100644
index 0000000000..fb999b4439
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_dark.9.png
new file mode 100644
index 0000000000..f8739d7593
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_light.9.png
new file mode 100644
index 0000000000..f8739d7593
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_dark.9.png
new file mode 100644
index 0000000000..cb0b6cb137
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_light.9.png
new file mode 100644
index 0000000000..cb0b6cb137
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_activated_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_dark.9.png
new file mode 100644
index 0000000000..075251c587
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png
new file mode 100644
index 0000000000..3680512605
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000000..23cda8134f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_light.9.png
new file mode 100644
index 0000000000..b90b8472c8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_dark.9.png
new file mode 100644
index 0000000000..fc4a4eb663
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_light.9.png
new file mode 100644
index 0000000000..fb999b4439
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_disabled_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_dark.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_dark.9.png
new file mode 100644
index 0000000000..f2de222ff9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_dark.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_light.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_light.9.png
new file mode 100644
index 0000000000..f2de222ff9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/textfield_multiline_focused_holo_light.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/toast_frame.9.png b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/toast_frame.9.png
new file mode 100644
index 0000000000..403e129fe4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable-xhdpi/toast_frame.9.png
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/activated_background_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/activated_background_holo.xml
new file mode 100644
index 0000000000..87c6f15b95
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/activated_background_holo.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/list_activated_holo" android:state_activated="true"></item>
+ <item android:drawable="@android:color/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/activity_picker_bg.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/activity_picker_bg.xml
new file mode 100644
index 0000000000..8cbe1a216b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/activity_picker_bg.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@color/transparent"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="false" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/activity_picker_bg_focused"></item>
+ <item android:drawable="@drawable/activity_picker_bg_activated" android:state_activated="true"></item>
+ <item android:drawable="@color/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_dark.xml
new file mode 100644
index 0000000000..8ede372e6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_accelerated="false" android:color="#ff000000"></item>
+ <item android:color="@android:color/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_light.xml
new file mode 100644
index 0000000000..86e238156e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/background_cache_hint_selector_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_accelerated="false" android:color="#fff3f3f3"></item>
+ <item android:color="@android:color/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_dark.xml
new file mode 100644
index 0000000000..5f7a0ec5e1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_dark.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <gradient android:endColor="#272D33" android:startColor="#000000" android:angle="270" android:type="linear"></gradient>
+</shape> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_light.xml
new file mode 100644
index 0000000000..6746a910c7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/background_holo_light.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient android:endColor="#ffffffff" android:startColor="#ffe8e8e8" android:angle="270"></gradient>
+</shape> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_dark.xml
new file mode 100644
index 0000000000..428d4e3170
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_dark.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_on_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_off_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_pressed_holo_dark" android:state_enabled="true" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_check_off_pressed_holo_dark" android:state_enabled="true" android:state_pressed="true" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_on_focused_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_off_focused_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_off_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_on_disabled_holo_dark" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_off_disabled_holo_dark" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_on_disabled_focused_holo_dark" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_off_disabled_focused_holo_dark" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_off_disabled_holo_dark" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_disabled_holo_dark" android:state_checked="true"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_light.xml
new file mode 100644
index 0000000000..c2fc6f6dcb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_checkbox_holo_light.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_on_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_off_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_pressed_holo_light" android:state_enabled="true" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_check_off_pressed_holo_light" android:state_enabled="true" android:state_pressed="true" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_on_focused_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_off_focused_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_off_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_on_disabled_holo_light" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_check_off_disabled_holo_light" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_on_disabled_focused_holo_light" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_check_off_disabled_focused_holo_light" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_off_disabled_holo_light" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_check_on_disabled_holo_light" android:state_checked="true"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_dark.xml
new file mode 100644
index 0000000000..234e1f2d12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_dark.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_default_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/btn_default_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_default_focused_holo_dark" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_default_normal_holo_dark" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_default_disabled_focused_holo_dark"></item>
+ <item android:drawable="@drawable/btn_default_disabled_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_light.xml
new file mode 100644
index 0000000000..eaa272aff0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_default_holo_light.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_default_normal_holo_light" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_default_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/btn_default_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_default_focused_holo_light" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_default_normal_holo_light" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_default_disabled_focused_holo_light"></item>
+ <item android:drawable="@drawable/btn_default_disabled_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_dark.xml
new file mode 100644
index 0000000000..81c63c54f0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/btn_group_normal_holo_dark" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_group_disabled_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_light.xml
new file mode 100644
index 0000000000..f1e3b1f296
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_group_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/btn_group_normal_holo_light" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_group_disabled_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_dark.xml
new file mode 100644
index 0000000000..3d35a26018
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_dark.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_on_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_off_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_pressed_holo_dark" android:state_enabled="true" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_radio_off_pressed_holo_dark" android:state_enabled="true" android:state_pressed="true" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_on_focused_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_off_focused_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_off_holo_dark" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_on_disabled_holo_dark" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_off_disabled_holo_dark" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_on_disabled_focused_holo_dark" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_off_disabled_focused_holo_dark" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_off_disabled_holo_dark" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_disabled_holo_dark" android:state_checked="true"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_light.xml
new file mode 100644
index 0000000000..984fb05ef9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_radio_holo_light.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_on_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_off_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_pressed_holo_light" android:state_enabled="true" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_radio_off_pressed_holo_light" android:state_enabled="true" android:state_pressed="true" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_on_focused_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_off_focused_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_off_holo_light" android:state_enabled="true" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_on_disabled_holo_light" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_radio_off_disabled_holo_light" android:state_checked="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_on_disabled_focused_holo_light" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_radio_off_disabled_focused_holo_light" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_off_disabled_holo_light" android:state_checked="false"></item>
+ <item android:drawable="@drawable/btn_radio_on_disabled_holo_light" android:state_checked="true"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_dark.xml
new file mode 100644
index 0000000000..efb623acb9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_dark.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_on_normal_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_on_disabled_holo_dark" android:state_enabled="false" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_pressed_holo_dark" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_on_focused_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_normal_holo_dark" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_on_disabled_focused_holo_dark" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_disabled_holo_dark" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_off_normal_holo_dark" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_off_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/btn_toggle_off_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_off_focused_holo_dark" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_toggle_off_normal_holo_dark" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_off_disabled_focused_holo_dark"></item>
+ <item android:drawable="@drawable/btn_toggle_off_disabled_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_light.xml
new file mode 100644
index 0000000000..37abe8860b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/btn_toggle_holo_light.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_on_normal_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_on_disabled_holo_light" android:state_enabled="false" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_pressed_holo_light" android:state_pressed="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_on_focused_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_normal_holo_light" android:state_enabled="true" android:state_checked="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_on_disabled_focused_holo_light" android:state_checked="true"></item>
+ <item android:drawable="@drawable/btn_toggle_on_disabled_holo_light" android:state_checked="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_off_normal_holo_light" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/btn_toggle_off_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/btn_toggle_off_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_off_focused_holo_light" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/btn_toggle_off_normal_holo_light" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/btn_toggle_off_disabled_focused_holo_light"></item>
+ <item android:drawable="@drawable/btn_toggle_off_disabled_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_dark.xml
new file mode 100644
index 0000000000..a61a4b7851
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_dark.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="false" android:drawable="@drawable/textfield_default_holo_dark" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/textfield_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/textfield_activated_holo_dark" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/textfield_default_holo_dark" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/textfield_disabled_focused_holo_dark"></item>
+ <item android:drawable="@drawable/textfield_disabled_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_light.xml
new file mode 100644
index 0000000000..e1c067ea89
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/edit_text_holo_light.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="false" android:drawable="@drawable/textfield_default_holo_light" android:state_enabled="true"></item>
+ <item android:state_window_focused="false" android:drawable="@drawable/textfield_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/textfield_activated_holo_light" android:state_enabled="true"></item>
+ <item android:drawable="@drawable/textfield_default_holo_light" android:state_enabled="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/textfield_disabled_focused_holo_light"></item>
+ <item android:drawable="@drawable/textfield_disabled_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group.xml
new file mode 100644
index 0000000000..f971fdf48d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/expander_ic_maximized" android:state_expanded="true"></item>
+ <item android:drawable="@drawable/expander_ic_minimized"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_dark.xml
new file mode 100644
index 0000000000..f7ff3512f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/expander_close_holo_dark" android:state_expanded="true"></item>
+ <item android:drawable="@drawable/expander_open_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_light.xml
new file mode 100644
index 0000000000..18e25bc876
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/expander_group_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/expander_close_holo_light" android:state_expanded="true"></item>
+ <item android:drawable="@drawable/expander_open_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_thumb_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_thumb_holo.xml
new file mode 100644
index 0000000000..f6d6c91fa2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_thumb_holo.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fastscroll_thumb_pressed_holo" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/fastscroll_thumb_default_holo"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_dark.xml
new file mode 100644
index 0000000000..3bd754826f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fastscroll_track_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/fastscroll_track_default_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_light.xml
new file mode 100644
index 0000000000..92ee1f0281
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/fastscroll_track_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fastscroll_track_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/fastscroll_track_default_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_dark.xml
new file mode 100644
index 0000000000..7f56e15ae3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_dark.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="false" android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo"></item>
+ <item android:drawable="@drawable/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_light.xml
new file mode 100644
index 0000000000..f603676d86
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/item_background_holo_light.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="false" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo"></item>
+ <item android:drawable="@drawable/transparent"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_dark.xml
new file mode 100644
index 0000000000..1c134cd112
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_dark.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/list_pressed_holo_dark"></item>
+ <item android:drawable="@drawable/list_longpressed_holo"></item>
+</transition> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_light.xml
new file mode 100644
index 0000000000..33c9e7fe11
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_background_transition_holo_light.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/list_pressed_holo_light"></item>
+ <item android:drawable="@drawable/list_longpressed_holo"></item>
+</transition> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_dark.xml
new file mode 100644
index 0000000000..87879bf6b8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_dark.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@integer/config_mediumAnimTime">
+ <item android:state_window_focused="false" android:drawable="@android:color/transparent"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="false" android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_light.xml
new file mode 100644
index 0000000000..8729f29e4e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/list_selector_holo_light.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@integer/config_mediumAnimTime">
+ <item android:state_window_focused="false" android:drawable="@color/transparent"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="false" android:drawable="@drawable/list_selector_background_transition_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_dark.xml
new file mode 100644
index 0000000000..61fb5e045e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_dark.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/progress_bg_holo_dark" android:id="@android:id/background"></item>
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:drawable="@drawable/progress_secondary_holo_dark" android:scaleWidth="100%"></scale>
+ </item>
+ <item android:id="@android:id/progress">
+ <scale android:drawable="@drawable/progress_primary_holo_dark" android:scaleWidth="100%"></scale>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_light.xml
new file mode 100644
index 0000000000..49c11021f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_horizontal_holo_light.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/progress_bg_holo_light" android:id="@android:id/background"></item>
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:drawable="@drawable/progress_secondary_holo_light" android:scaleWidth="100%"></scale>
+ </item>
+ <item android:id="@android:id/progress">
+ <scale android:drawable="@drawable/progress_primary_holo_light" android:scaleWidth="100%"></scale>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_indeterminate_horizontal_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_indeterminate_horizontal_holo.xml
new file mode 100644
index 0000000000..8ae9e6f74c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_indeterminate_horizontal_holo.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
+ <item android:drawable="@drawable/progressbar_indeterminate_holo1" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo2" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo3" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo4" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo5" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo6" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo7" android:duration="50"></item>
+ <item android:drawable="@drawable/progressbar_indeterminate_holo8" android:duration="50"></item>
+</animation-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_large_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_large_holo.xml
new file mode 100644
index 0000000000..da571e50e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_large_holo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <rotate android:toDegrees="1080" android:drawable="@drawable/spinner_76_outer_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"></rotate>
+ </item>
+ <item>
+ <rotate android:toDegrees="0" android:drawable="@drawable/spinner_76_inner_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="720"></rotate>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_medium_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_medium_holo.xml
new file mode 100644
index 0000000000..ae94265d94
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_medium_holo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <rotate android:toDegrees="1080" android:drawable="@drawable/spinner_48_outer_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"></rotate>
+ </item>
+ <item>
+ <rotate android:toDegrees="0" android:drawable="@drawable/spinner_48_inner_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="720"></rotate>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/progress_small_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_small_holo.xml
new file mode 100644
index 0000000000..7a3fb68b7b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/progress_small_holo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <rotate android:toDegrees="1080" android:drawable="@drawable/spinner_16_outer_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"></rotate>
+ </item>
+ <item>
+ <rotate android:toDegrees="0" android:drawable="@drawable/spinner_16_inner_holo" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="720"></rotate>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_dark.xml
new file mode 100644
index 0000000000..abdd5f363f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_dark.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_pressed_holo_dark" android:state_pressed="true"></item>
+
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_focused_holo_dark"></item>
+
+ <item android:state_selected="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_focused_holo_dark"></item>
+
+ <item android:drawable="@drawable/btn_rating_star_off_normal_holo_dark"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_light.xml
new file mode 100644
index 0000000000..71a4eea379
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_empty_holo_light.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_pressed_holo_light" android:state_pressed="true"></item>
+
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_focused_holo_light"></item>
+
+ <item android:state_selected="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_off_focused_holo_light"></item>
+
+ <item android:drawable="@drawable/btn_rating_star_off_normal_holo_light"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_dark.xml
new file mode 100644
index 0000000000..846b477861
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_dark.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_pressed_holo_dark" android:state_pressed="true"></item>
+
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_focused_holo_dark"></item>
+
+ <item android:state_selected="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_focused_holo_dark"></item>
+
+ <item android:drawable="@drawable/btn_rating_star_on_normal_holo_dark"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_light.xml
new file mode 100644
index 0000000000..832e60a920
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_filled_holo_light.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_pressed_holo_light" android:state_pressed="true"></item>
+
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_focused_holo_light"></item>
+
+ <item android:state_selected="true" android:state_window_focused="true" android:drawable="@drawable/btn_rating_star_on_focused_holo_light"></item>
+
+ <item android:drawable="@drawable/btn_rating_star_on_normal_holo_light"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_dark.xml
new file mode 100644
index 0000000000..475f74b5b6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/ratingbar_full_empty_holo_dark" android:id="@+android:id/background"></item>
+ <item android:drawable="@drawable/ratingbar_full_empty_holo_dark" android:id="@+android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/ratingbar_full_filled_holo_dark" android:id="@+android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_light.xml
new file mode 100644
index 0000000000..7b8aef7fd6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_full_holo_light.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/ratingbar_full_empty_holo_light" android:id="@+android:id/background"></item>
+ <item android:drawable="@drawable/ratingbar_full_empty_holo_light" android:id="@+android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/ratingbar_full_filled_holo_light" android:id="@+android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_dark.xml
new file mode 100644
index 0000000000..13bf8fce66
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/rate_star_big_off_holo_dark" android:id="@+android:id/background"></item>
+ <item android:drawable="@drawable/rate_star_big_half_holo_dark" android:id="@+android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/rate_star_big_on_holo_dark" android:id="@+android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_light.xml
new file mode 100644
index 0000000000..e707b27e86
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_holo_light.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/rate_star_big_off_holo_light" android:id="@+android:id/background"></item>
+ <item android:drawable="@drawable/rate_star_big_half_holo_light" android:id="@+android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/rate_star_big_on_holo_light" android:id="@+android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_dark.xml
new file mode 100644
index 0000000000..af4b4fc7d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/rate_star_small_off_holo_dark" android:id="@android:id/background"></item>
+ <item android:drawable="@drawable/rate_star_small_half_holo_dark" android:id="@android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/rate_star_small_on_holo_dark" android:id="@android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_light.xml
new file mode 100644
index 0000000000..eb379de9ca
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/ratingbar_small_holo_light.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/rate_star_small_off_holo_light" android:id="@android:id/background"></item>
+ <item android:drawable="@drawable/rate_star_small_half_holo_light" android:id="@android:id/secondaryProgress"></item>
+ <item android:drawable="@drawable/rate_star_small_on_holo_light" android:id="@android:id/progress"></item>
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_control_selector_holo.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_control_selector_holo.xml
new file mode 100644
index 0000000000..1279056f7a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_control_selector_holo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/scrubber_control_disabled_holo" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/scrubber_control_pressed_holo" android:state_pressed="true"></item>
+ <item android:state_selected="true" android:drawable="@drawable/scrubber_control_focused_holo"></item>
+ <item android:drawable="@drawable/scrubber_control_normal_holo"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_dark.xml
new file mode 100644
index 0000000000..3738d88550
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_dark.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/scrubber_track_holo_dark" android:id="@android:id/background"></item>
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:drawable="@drawable/scrubber_secondary_holo" android:scaleWidth="100%"></scale>
+ </item>
+ <item android:id="@android:id/progress">
+ <scale android:drawable="@drawable/scrubber_primary_holo" android:scaleWidth="100%"></scale>
+ </item>
+
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_light.xml
new file mode 100644
index 0000000000..19777d442a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/scrubber_progress_horizontal_holo_light.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/scrubber_track_holo_light" android:id="@android:id/background"></item>
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:drawable="@drawable/scrubber_secondary_holo" android:scaleWidth="100%"></scale>
+ </item>
+ <item android:id="@android:id/progress">
+ <scale android:drawable="@drawable/scrubber_primary_holo" android:scaleWidth="100%"></scale>
+ </item>
+
+</layer-list> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_dark.xml
new file mode 100644
index 0000000000..6e5629cd36
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_dark.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/spinner_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/spinner_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/spinner_focused_holo_dark" android:state_pressed="false"></item>
+ <item android:drawable="@drawable/spinner_default_holo_dark"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_light.xml
new file mode 100644
index 0000000000..df3e81e352
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/spinner_background_holo_light.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/spinner_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/spinner_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:state_focused="true" android:drawable="@drawable/spinner_focused_holo_light" android:state_pressed="false"></item>
+ <item android:drawable="@drawable/spinner_default_holo_light"></item>
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_dark.xml
new file mode 100644
index 0000000000..85b6a52fae
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_dark.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/switch_thumb_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/switch_thumb_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/switch_thumb_activated_holo_dark" android:state_checked="true"></item>
+ <item android:drawable="@drawable/switch_thumb_holo_dark"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_light.xml
new file mode 100644
index 0000000000..f2de5d9ced
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_inner_holo_light.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/switch_thumb_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/switch_thumb_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/switch_thumb_activated_holo_light" android:state_checked="true"></item>
+ <item android:drawable="@drawable/switch_thumb_holo_light"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_dark.xml
new file mode 100644
index 0000000000..dcabdaa998
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_dark.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/old_switch_thumb_disabled_holo_dark" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/old_switch_thumb_pressed_holo_dark" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/old_switch_thumb_activated_holo_dark" android:state_checked="true"></item>
+ <item android:drawable="@drawable/old_switch_thumb_holo_dark"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_light.xml
new file mode 100644
index 0000000000..52e3766a4f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_old_inner_holo_light.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/old_switch_thumb_disabled_holo_light" android:state_enabled="false"></item>
+ <item android:drawable="@drawable/old_switch_thumb_pressed_holo_light" android:state_pressed="true"></item>
+ <item android:drawable="@drawable/old_switch_thumb_activated_holo_light" android:state_checked="true"></item>
+ <item android:drawable="@drawable/old_switch_thumb_holo_light"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_dark.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_dark.xml
new file mode 100644
index 0000000000..116bc3cf2a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_dark.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_focused="true" android:drawable="@drawable/switch_bg_focused_holo_dark"></item>
+ <item android:drawable="@drawable/switch_bg_holo_dark"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_light.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_light.xml
new file mode 100644
index 0000000000..df70f13a40
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/switch_track_holo_light.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_focused="true" android:drawable="@drawable/switch_bg_focused_holo_light"></item>
+ <item android:drawable="@drawable/switch_bg_holo_light"></item>
+
+</selector> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/drawable/transparent.xml b/android/3rd_party/HoloEverywhere/library/res/drawable/transparent.xml
new file mode 100644
index 0000000000..2919cb28a1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/drawable/transparent.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><color xmlns:android="http://schemas.android.com/apk/res/android" android:color="@android:color/transparent"></color> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_cubic.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_cubic.xml
new file mode 100644
index 0000000000..14b61f16f6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_cubic.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:factor="1.5"></accelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_decelerate.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_decelerate.xml
new file mode 100644
index 0000000000..0aa3b5a597
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_decelerate.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><accelerateDecelerateInterpolator></accelerateDecelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quad.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quad.xml
new file mode 100644
index 0000000000..952506825b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quad.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><accelerateInterpolator></accelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quint.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quint.xml
new file mode 100644
index 0000000000..9563fe3d23
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/accelerate_quint.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:factor="2.5"></accelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate.xml
new file mode 100644
index 0000000000..e93fce7b63
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><anticipateInterpolator></anticipateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate_overshoot.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate_overshoot.xml
new file mode 100644
index 0000000000..373cf4e302
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/anticipate_overshoot.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><anticipateOvershootInterpolator></anticipateOvershootInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/bounce.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/bounce.xml
new file mode 100644
index 0000000000..e713ae780e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/bounce.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><bounceInterpolator></bounceInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/cycle.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/cycle.xml
new file mode 100644
index 0000000000..5e2a2ec832
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/cycle.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><cycleInterpolator></cycleInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_cubic.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_cubic.xml
new file mode 100644
index 0000000000..8091e734c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_cubic.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:factor="1.5"></decelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quad.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quad.xml
new file mode 100644
index 0000000000..5ac34686b5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quad.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><decelerateInterpolator></decelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quint.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quint.xml
new file mode 100644
index 0000000000..613fb8b7b6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/decelerate_quint.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:factor="2.5"></decelerateInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/linear.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/linear.xml
new file mode 100644
index 0000000000..ea0d10832a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/linear.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><linearInterpolator></linearInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/interpolator/overshoot.xml b/android/3rd_party/HoloEverywhere/library/res/interpolator/overshoot.xml
new file mode 100644
index 0000000000..70972d0067
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/interpolator/overshoot.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><overshootInterpolator></overshootInterpolator> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout-sw600dp/date_picker_dialog.xml b/android/3rd_party/HoloEverywhere/library/res/layout-sw600dp/date_picker_dialog.xml
new file mode 100644
index 0000000000..3b4eb2d9c7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout-sw600dp/date_picker_dialog.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><DatePicker xmlns:android="http://schemas.android.com/apk/res/android" xmlns:holo="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:id="@+id/datePicker" holo:spinnersShown="true" holo:calendarViewShown="true"></DatePicker> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_holo.xml
new file mode 100644
index 0000000000..ef42379422
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><ListView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:divider="?listDividerAlertDialog" android:paddingLeft="16dip" android:paddingRight="16dip" android:overScrollMode="ifContentScrolls" android:layout_marginTop="5dip" android:scrollbars="vertical" android:layout_height="match_parent" android:id="@+id/select_dialog_listview" android:cacheColorHint="@null"></ListView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_item_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_item_holo.xml
new file mode 100644
index 0000000000..4592ba0e3d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_item_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?android:attr/textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?android:attr/listPreferredItemHeight" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_multichoice_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_multichoice_holo.xml
new file mode 100644
index 0000000000..7e9a2ab497
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_multichoice_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?android:attr/textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?android:attr/listPreferredItemHeight" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:checkMark="?android:attr/listChoiceIndicatorMultiple" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_singlechoice_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_singlechoice_holo.xml
new file mode 100644
index 0000000000..2e83fe4811
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout-xlarge/select_dialog_singlechoice_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?android:attr/textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?android:attr/listPreferredItemHeight" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:checkMark="?android:attr/listChoiceIndicatorSingle" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_holo.xml
new file mode 100644
index 0000000000..90ec405177
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_holo.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:holo="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:paddingLeft="8dp" android:paddingRight="8dp" android:layout_height="wrap_content" android:id="@+id/parentPanel" android:orientation="vertical">
+ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/topPanel" android:orientation="vertical">
+ <View android:layout_width="match_parent" android:layout_height="2dip" android:id="@+id/titleDividerTop" android:background="@color/holo_blue_light" android:visibility="gone"></View>
+ <LinearLayout android:layout_width="match_parent" android:layout_marginRight="16dip" android:layout_marginLeft="16dip" android:gravity="center_vertical|left" android:minHeight="@dimen/alert_dialog_title_height" android:layout_height="wrap_content" android:id="@+id/title_template" android:orientation="horizontal">
+ <ImageView android:layout_width="wrap_content" android:paddingRight="8dip" android:layout_height="wrap_content" android:id="@+id/icon" android:contentDescription="@string/loading"></ImageView>
+ <Internal.DialogTitle android:layout_width="match_parent" style="?android:attr/windowTitleStyle" android:ellipsize="end" android:singleLine="true" android:layout_height="wrap_content" android:id="@+id/alertTitle"></Internal.DialogTitle>
+ </LinearLayout>
+ <View android:layout_width="match_parent" android:layout_height="2dip" android:id="@+id/titleDivider" android:background="@color/holo_blue_light" android:visibility="gone"></View>
+ </LinearLayout>
+ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/contentPanel" android:orientation="vertical">
+ <ScrollView android:layout_width="match_parent" android:clipToPadding="false" android:layout_height="wrap_content" android:id="@+id/scrollView">
+ <TextView android:layout_width="match_parent" style="?android:attr/textAppearanceMedium" android:paddingBottom="8dip" android:paddingLeft="16dip" android:paddingRight="16dip" android:layout_height="wrap_content" android:paddingTop="8dip" android:id="@+id/message"></TextView>
+ </ScrollView>
+ </LinearLayout>
+ <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/customPanel">
+ <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/custom"></FrameLayout>
+ </FrameLayout>
+ <LinearLayout android:layout_width="match_parent" android:minHeight="@dimen/alert_dialog_button_bar_height" android:layout_height="wrap_content" android:id="@+id/buttonPanel" android:orientation="vertical">
+ <View android:layout_width="match_parent" android:layout_height="1dp" android:id="@+id/buttonPanelTopDivivder" android:background="?dividerHorizontal"></View>
+ <LinearLayout android:layout_width="match_parent" style="?buttonBarStyle" android:measureWithLargestChild="true" android:layout_height="wrap_content" android:orientation="horizontal">
+ <Button android:layout_width="wrap_content" android:layout_gravity="left" style="?buttonBarButtonStyle" android:minHeight="@dimen/alert_dialog_button_bar_height" android:textSize="14sp" android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/button2" android:maxLines="2"></Button>
+ <Button android:layout_width="wrap_content" android:layout_gravity="center_horizontal" style="?buttonBarButtonStyle" android:minHeight="@dimen/alert_dialog_button_bar_height" android:textSize="14sp" android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/button3" android:maxLines="2"></Button>
+ <Button android:layout_width="wrap_content" android:layout_gravity="right" style="?buttonBarButtonStyle" android:minHeight="@dimen/alert_dialog_button_bar_height" android:textSize="14sp" android:layout_height="match_parent" android:layout_weight="1" android:id="@+id/button1" android:maxLines="2"></Button>
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_progress_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_progress_holo.xml
new file mode 100644
index 0000000000..b61e6803ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/alert_dialog_progress_holo.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent">
+ <ProgressBar android:layout_marginBottom="1dip" android:layout_width="match_parent" android:layout_marginRight="16dip" android:layout_centerHorizontal="true" style="?android:attr/progressBarStyleHorizontal" android:layout_marginLeft="16dip" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/progress"></ProgressBar>
+ <TextView android:layout_width="wrap_content" android:layout_below="@id/progress" android:layout_marginRight="16dip" android:layout_marginLeft="16dip" android:paddingBottom="16dip" android:layout_alignParentLeft="true" android:layout_height="wrap_content" android:id="@+id/progress_percent"></TextView>
+ <TextView android:layout_width="wrap_content" android:layout_below="@id/progress" android:layout_marginRight="16dip" android:layout_alignParentRight="true" android:layout_marginLeft="16dip" android:paddingBottom="16dip" android:layout_height="wrap_content" android:id="@+id/progress_number"></TextView>
+</RelativeLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/calendar_view.xml b/android/3rd_party/HoloEverywhere/library/res/layout/calendar_view.xml
new file mode 100644
index 0000000000..3b2e7be745
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/calendar_view.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
+ <LinearLayout android:layout_width="match_parent" android:fillViewport="true" android:layout_height="match_parent" android:orientation="vertical">
+ <TextView android:layout_width="wrap_content" android:layout_gravity="center_horizontal" style="?android:textAppearanceMedium" android:paddingBottom="10dip" android:layout_height="wrap_content" android:paddingTop="10dip" android:id="@+id/month_name"></TextView>
+ <LinearLayout android:layout_marginBottom="6dip" android:layout_width="match_parent" android:layout_marginRight="2dip" android:layout_marginLeft="2dip" android:gravity="center" android:layout_height="wrap_content" android:id="@+id/day_names" android:orientation="horizontal">
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1" android:visibility="gone"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ <TextView android:layout_width="0dip" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1"></TextView>
+ </LinearLayout>
+ <ListView android:layout_width="match_parent" android:drawSelectorOnTop="false" android:fastScrollEnabled="false" android:overScrollMode="never" android:layout_height="match_parent" android:id="@+id/list"></ListView>
+ </LinearLayout>
+</FrameLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_dialog.xml b/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_dialog.xml
new file mode 100644
index 0000000000..eef3cd4ef2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_dialog.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><DatePicker xmlns:android="http://schemas.android.com/apk/res/android" xmlns:holo="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:id="@+id/datePicker" holo:spinnersShown="true" holo:calendarViewShown="false"></DatePicker> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_holo.xml
new file mode 100644
index 0000000000..a684e5da2b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/date_picker_holo.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center" android:layout_height="wrap_content" android:orientation="horizontal">
+ <LinearLayout android:layout_width="wrap_content" android:gravity="center" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/pickers" android:orientation="horizontal">
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="8dip" android:layout_marginLeft="8dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/month" android:focusable="true"></NumberPicker>
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="8dip" android:layout_marginLeft="8dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/day" android:focusable="true"></NumberPicker>
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="16dip" android:layout_marginLeft="8dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/year" android:focusable="true"></NumberPicker>
+ </LinearLayout>
+ <CalendarView android:layout_width="245dip" android:layout_marginRight="16dip" android:layout_marginLeft="16dip" android:focusableInTouchMode="true" android:layout_height="280dip" android:layout_weight="1" android:id="@+id/calendar_view" android:focusable="true"></CalendarView>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/expandable_list_content.xml b/android/3rd_party/HoloEverywhere/library/res/layout/expandable_list_content.xml
new file mode 100644
index 0000000000..fc29daeec1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/expandable_list_content.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:drawSelectorOnTop="false" android:layout_height="match_parent" android:id="@android:id/list"></ExpandableListView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/expanded_menu_layout.xml b/android/3rd_party/HoloEverywhere/library/res/layout/expanded_menu_layout.xml
new file mode 100644
index 0000000000..849d22b6f8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/expanded_menu_layout.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><Internal.ExpandedMenuView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="?panelMenuListWidth" android:layout_height="wrap_content" android:id="@+id/expanded_menu"></Internal.ExpandedMenuView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/grid_content.xml b/android/3rd_party/HoloEverywhere/library/res/layout/grid_content.xml
new file mode 100644
index 0000000000..58c715de67
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/grid_content.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
+ <LinearLayout android:layout_width="match_parent" android:gravity="center" android:layout_height="match_parent" android:id="@+id/progressContainer" android:orientation="vertical" android:visibility="gone">
+ <ProgressBar android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:layout_height="wrap_content"></ProgressBar>
+ <TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" android:text="@string/loading" android:layout_height="wrap_content" android:paddingTop="4dip"></TextView>
+ </LinearLayout>
+ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/listContainer">
+ <GridView android:layout_width="match_parent" android:drawSelectorOnTop="false" android:layout_height="match_parent" android:id="@android:id/list"></GridView>
+ <TextView android:layout_width="match_parent" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center" android:layout_height="match_parent" android:id="@+id/internalEmpty"></TextView>
+ </FrameLayout>
+</FrameLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/list_content.xml b/android/3rd_party/HoloEverywhere/library/res/layout/list_content.xml
new file mode 100644
index 0000000000..23d3ee4f90
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/list_content.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
+ <LinearLayout android:layout_width="match_parent" android:gravity="center" android:layout_height="match_parent" android:id="@+id/progressContainer" android:orientation="vertical" android:visibility="gone">
+ <ProgressBar android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:layout_height="wrap_content"></ProgressBar>
+ <TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" android:text="@string/loading" android:layout_height="wrap_content" android:paddingTop="4dip"></TextView>
+ </LinearLayout>
+ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/listContainer">
+ <ListView android:layout_width="match_parent" android:drawSelectorOnTop="false" android:layout_height="match_parent" android:id="@android:id/list"></ListView>
+ <TextView android:layout_width="match_parent" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center" android:layout_height="match_parent" android:id="@+id/internalEmpty"></TextView>
+ </FrameLayout>
+</FrameLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_checkbox.xml b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_checkbox.xml
new file mode 100644
index 0000000000..7e1f8a8232
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_checkbox.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckBox xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:clickable="false" android:layout_gravity="center_vertical" android:duplicateParentState="true" android:layout_height="wrap_content" android:id="@+id/checkbox" android:focusable="false"></CheckBox> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_icon.xml b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_icon.xml
new file mode 100644
index 0000000000..9d43c469c3
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_icon.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginBottom="8dip" android:layout_width="wrap_content" android:layout_marginRight="-8dip" android:layout_gravity="center_vertical" android:layout_marginLeft="8dip" android:duplicateParentState="true" android:layout_marginTop="8dip" android:layout_height="wrap_content" android:id="@+id/icon" android:scaleType="centerInside"></ImageView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_layout.xml b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_layout.xml
new file mode 100644
index 0000000000..d1733e9607
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_layout.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><com.actionbarsherlock.internal.view.menu.HoloListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="?listPreferredItemHeightSmall">
+ <RelativeLayout android:layout_width="0dip" android:layout_marginRight="?listPreferredItemPaddingRight" android:layout_gravity="center_vertical" android:layout_marginLeft="?listPreferredItemPaddingLeft" android:duplicateParentState="true" android:layout_height="wrap_content" android:layout_weight="1">
+ <TextView android:layout_alignParentTop="true" android:layout_width="match_parent" android:textAppearance="?dialogItemTextAppearance" android:ellipsize="marquee" android:duplicateParentState="true" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_height="wrap_content" android:id="@+id/title" android:fadingEdge="horizontal"></TextView>
+ <TextView android:layout_width="wrap_content" android:layout_below="@id/title" android:textAppearance="?android:attr/textAppearanceSmall" android:duplicateParentState="true" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_height="wrap_content" android:id="@+id/shortcut"></TextView>
+ </RelativeLayout>
+</com.actionbarsherlock.internal.view.menu.HoloListMenuItemView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_radio.xml b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_radio.xml
new file mode 100644
index 0000000000..74709dda29
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/list_menu_item_radio.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><RadioButton xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:clickable="false" android:layout_gravity="center_vertical" android:duplicateParentState="true" android:layout_height="wrap_content" android:id="@+id/radio" android:focusable="false"></RadioButton> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/number_picker_with_selector_wheel.xml b/android/3rd_party/HoloEverywhere/library/res/layout/number_picker_with_selector_wheel.xml
new file mode 100644
index 0000000000..7caddc1fce
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/number_picker_with_selector_wheel.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <Internal.NumberPickerEditText android:layout_width="fill_parent" android:textAppearance="?android:attr/textAppearanceMedium" android:gravity="center" android:singleLine="true" android:layout_height="wrap_content" android:id="@+id/numberpicker_input" android:background="@null"></Internal.NumberPickerEditText>
+</merge> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/popup_menu_item_layout.xml b/android/3rd_party/HoloEverywhere/library/res/layout/popup_menu_item_layout.xml
new file mode 100644
index 0000000000..a99bafedfc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/popup_menu_item_layout.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><Internal.HoloListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingRight="16dip" android:layout_height="?dropdownListPreferredItemHeight" android:minWidth="196dip">
+ <RelativeLayout android:layout_width="0dip" android:layout_gravity="center_vertical" android:layout_marginLeft="16dip" android:duplicateParentState="true" android:layout_height="wrap_content" android:layout_weight="1">
+ <TextView android:layout_alignParentTop="true" android:layout_width="match_parent" android:textAppearance="?dialogItemTextAppearance" android:ellipsize="marquee" android:duplicateParentState="true" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_height="wrap_content" android:id="@+id/title" android:fadingEdge="horizontal"></TextView>
+ <TextView android:layout_width="wrap_content" android:layout_below="@id/title" android:textAppearance="?android:textAppearanceSmall" android:duplicateParentState="true" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_height="wrap_content" android:id="@+id/shortcut"></TextView>
+ </RelativeLayout>
+</Internal.HoloListMenuItemView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/progress_dialog_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/progress_dialog_holo.xml
new file mode 100644
index 0000000000..ac09ba5264
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/progress_dialog_holo.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:padding="16dip" android:layout_height="match_parent" android:orientation="horizontal" android:baselineAligned="false">
+ <ProgressBar android:layout_width="wrap_content" android:layout_marginRight="16dip" style="?android:attr/progressBarStyle" android:layout_height="wrap_content" android:max="10000" android:id="@+id/progress"></ProgressBar>
+ <TextView android:layout_width="match_parent" android:layout_gravity="center_vertical" android:layout_height="wrap_content" android:id="@+id/message"></TextView>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/resolve_list_item.xml b/android/3rd_party/HoloEverywhere/library/res/layout/resolve_list_item.xml
new file mode 100644
index 0000000000..5b89ec5ba0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/resolve_list_item.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:gravity="center" android:padding="16dp" android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable/activity_picker_bg">
+ <TextView android:minLines="2" android:layout_width="wrap_content" android:paddingLeft="4dip" android:textAppearance="?android:attr/textAppearance" android:gravity="center" android:paddingRight="4dip" android:layout_height="wrap_content" android:id="@android:id/text2" android:maxLines="2"></TextView>
+ <ImageView android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/icon" android:scaleType="fitCenter"></ImageView>
+ <TextView android:minLines="2" android:layout_width="wrap_content" android:paddingLeft="4dip" android:textAppearance="?android:attr/textAppearanceSmall" android:gravity="center" android:paddingRight="4dip" android:layout_height="wrap_content" android:id="@android:id/text1" android:maxLines="2"></TextView>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/resolver_grid.xml b/android/3rd_party/HoloEverywhere/library/res/layout/resolver_grid.xml
new file mode 100644
index 0000000000..d7c00eff64
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/resolver_grid.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:divider="?dividerHorizontal" android:dividerPadding="0dip" android:showDividers="middle" android:layout_height="match_parent" android:orientation="vertical">
+ <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1">
+ <GridView android:layout_width="wrap_content" android:numColumns="4" android:columnWidth="128dp" android:layout_gravity="center" android:padding="16dp" android:clipToPadding="false" android:layout_height="match_parent" android:scrollbarStyle="outsideOverlay" android:id="@+id/resolver_grid"></GridView>
+ </FrameLayout>
+ <LinearLayout android:layout_width="match_parent" style="?buttonBarStyle" android:measureWithLargestChild="true" android:layout_height="wrap_content" android:id="@+id/button_bar" android:orientation="horizontal" android:visibility="gone">
+ <Button android:layout_width="wrap_content" android:layout_gravity="end" style="?buttonBarButtonStyle" android:minHeight="@dimen/alert_dialog_button_bar_height" android:text="@string/activity_resolver_use_always" android:textSize="14sp" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/button_always" android:enabled="false" android:onClick="onButtonClick" android:maxLines="2"></Button>
+ <Button android:layout_width="wrap_content" android:layout_gravity="start" style="?buttonBarButtonStyle" android:minHeight="@dimen/alert_dialog_button_bar_height" android:text="@string/activity_resolver_use_once" android:textSize="14sp" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/button_once" android:enabled="false" android:onClick="onButtonClick" android:maxLines="2"></Button>
+ </LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_holo.xml
new file mode 100644
index 0000000000..1124c47cba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><ListView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:divider="?listDividerAlertDialog" android:overScrollMode="ifContentScrolls" android:scrollbars="vertical" android:layout_height="match_parent" android:id="@+id/select_dialog_listview" android:cacheColorHint="@null"></ListView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_item_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_item_holo.xml
new file mode 100644
index 0000000000..e7a77387c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_item_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?textAppearanceListItemSmall" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?listPreferredItemHeightSmall" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_multichoice_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_multichoice_holo.xml
new file mode 100644
index 0000000000..bbf6875adf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_multichoice_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?android:textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?listPreferredItemHeightSmall" android:textColor="?android:textColorPrimary" android:layout_height="wrap_content" android:checkMark="?android:listChoiceIndicatorMultiple" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_singlechoice_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_singlechoice_holo.xml
new file mode 100644
index 0000000000..a17216b326
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/select_dialog_singlechoice_holo.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:textAppearance="?android:textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical" android:paddingRight="16dip" android:minHeight="?listPreferredItemHeightSmall" android:textColor="?android:textColorPrimary" android:layout_height="wrap_content" android:checkMark="?android:listChoiceIndicatorSingle" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_hint.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_hint.xml
new file mode 100644
index 0000000000..0c76a115bf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_hint.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginBottom="3dip" android:layout_width="match_parent" android:layout_marginRight="3dip" android:layout_marginLeft="3dip" android:textAppearance="?android:attr/dropDownHintAppearance" android:singleLine="true" android:layout_marginTop="3dip" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_item_1line.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_item_1line.xml
new file mode 100644
index 0000000000..760746fe37
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_dropdown_item_1line.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" style="?android:dropDownItemStyle" android:textAppearance="?textAppearanceLargePopupMenu" android:ellipsize="marquee" android:singleLine="true" android:layout_height="?listPreferredItemHeight" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_1.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_1.xml
new file mode 100644
index 0000000000..6907798a4b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_1.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItemSmall" android:gravity="center_vertical" android:paddingRight="?listPreferredItemPaddingRight" android:minHeight="?listPreferredItemHeightSmall" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2.xml
new file mode 100644
index 0000000000..3bde4debe8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:minHeight="?android:attr/listPreferredItemHeight" android:layout_height="wrap_content" android:orientation="vertical">
+ <TextView android:layout_width="match_parent" android:layout_marginLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItem" android:layout_marginTop="8dip" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView>
+ <TextView android:layout_width="match_parent" android:layout_marginLeft="?listPreferredItemPaddingLeft" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_height="wrap_content" android:id="@android:id/text2"></TextView>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2_single_choice.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2_single_choice.xml
new file mode 100644
index 0000000000..aa65e8fdc4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_2_single_choice.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="16dip" android:gravity="center_vertical" android:paddingRight="12dip" android:minHeight="?listPreferredItemHeightSmall" android:layout_height="wrap_content" android:orientation="horizontal">
+ <LinearLayout android:layout_width="wrap_content" android:gravity="center_vertical" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical">
+ <TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:ellipsize="marquee" android:gravity="center_vertical|left" android:singleLine="true" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView>
+ <TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:ellipsize="marquee" android:gravity="center_vertical|left" android:singleLine="true" android:textColor="?textColorAlertDialogListItem" android:layout_height="wrap_content" android:id="@android:id/text2"></TextView>
+ </LinearLayout>
+ <RadioButton android:layout_width="35dip" android:clickable="false" android:gravity="center_vertical" android:paddingRight="12dip" android:layout_height="wrap_content" android:id="@+id/radio" android:focusable="false"></RadioButton>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_1.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_1.xml
new file mode 100644
index 0000000000..0b3d8f525f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_1.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItemSmall" android:gravity="center_vertical" android:paddingRight="?listPreferredItemPaddingRight" android:minHeight="?listPreferredItemHeightSmall" android:layout_height="wrap_content" android:id="@android:id/text1" android:background="?activatedBackgroundIndicator"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_2.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_2.xml
new file mode 100644
index 0000000000..bc2ed28b6f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_activated_2.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingBottom="2dip" android:minHeight="?android:attr/listPreferredItemHeight" android:layout_height="wrap_content" android:paddingTop="2dip" android:orientation="vertical" android:background="?activatedBackgroundIndicator">
+ <TextView android:layout_width="match_parent" android:layout_marginLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItem" android:layout_marginTop="6dip" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView>
+ <TextView android:layout_width="match_parent" android:layout_marginLeft="?listPreferredItemPaddingLeft" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_height="wrap_content" android:id="@android:id/text2"></TextView>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_checked.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_checked.xml
new file mode 100644
index 0000000000..17358d8737
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_checked.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItemSmall" android:gravity="center_vertical" android:paddingRight="?listPreferredItemPaddingRight" android:layout_height="?listPreferredItemHeightSmall" android:checkMark="?android:attr/textCheckMark" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_multiple_choice.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_multiple_choice.xml
new file mode 100644
index 0000000000..e05ef364b8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_multiple_choice.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItemSmall" android:gravity="center_vertical" android:paddingRight="?listPreferredItemPaddingRight" android:layout_height="?listPreferredItemHeightSmall" android:checkMark="?android:attr/listChoiceIndicatorMultiple" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_single_choice.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_single_choice.xml
new file mode 100644
index 0000000000..dadeb44ed5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_list_item_single_choice.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:paddingLeft="?listPreferredItemPaddingLeft" android:textAppearance="?textAppearanceListItemSmall" android:gravity="center_vertical" android:paddingRight="?listPreferredItemPaddingRight" android:layout_height="?listPreferredItemHeightSmall" android:checkMark="?android:attr/listChoiceIndicatorSingle" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_dropdown_item.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_dropdown_item.xml
new file mode 100644
index 0000000000..962eda6f12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_dropdown_item.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" style="?spinnerDropDownItemStyle" android:ellipsize="marquee" android:singleLine="true" android:layout_height="?dropdownListPreferredItemHeight" android:id="@android:id/text1"></CheckedTextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_item.xml b/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_item.xml
new file mode 100644
index 0000000000..f8586599b6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/simple_spinner_item.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" style="?spinnerItemStyle" android:ellipsize="marquee" android:singleLine="true" android:layout_height="wrap_content" android:id="@android:id/text1"></TextView> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/tab_swipe.xml b/android/3rd_party/HoloEverywhere/library/res/layout/tab_swipe.xml
new file mode 100644
index 0000000000..67cd38a364
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/tab_swipe.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><ViewPager xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/tabSwipePager"></ViewPager> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_dialog.xml b/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_dialog.xml
new file mode 100644
index 0000000000..d376bf6bda
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_dialog.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><TimePicker xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:id="@+id/timePicker"></TimePicker> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_holo.xml b/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_holo.xml
new file mode 100644
index 0000000000..71e5256534
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/layout/time_picker_holo.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:orientation="horizontal">
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="6dip" android:layout_marginLeft="16dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/hour" android:focusable="true"></NumberPicker>
+ <TextView android:layout_width="wrap_content" android:layout_gravity="center_vertical" android:layout_height="wrap_content" android:importantForAccessibility="no" android:id="@+id/divider"></TextView>
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="8dip" android:layout_marginLeft="6dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/minute" android:focusable="true"></NumberPicker>
+ <NumberPicker android:layout_marginBottom="16dip" android:layout_width="wrap_content" android:layout_marginRight="16dip" android:layout_marginLeft="8dip" android:focusableInTouchMode="true" android:layout_marginTop="16dip" android:layout_height="wrap_content" android:id="@+id/amPm" android:focusable="true"></NumberPicker>
+</LinearLayout> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bold.ttf b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bold.ttf
new file mode 100644
index 0000000000..91ec212278
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bold.ttf
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bolditalic.ttf b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bolditalic.ttf
new file mode 100644
index 0000000000..4013bf88a5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_bolditalic.ttf
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/raw/roboto_italic.ttf b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_italic.ttf
new file mode 100644
index 0000000000..9f49ffd869
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_italic.ttf
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/raw/roboto_regular.ttf b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_regular.ttf
new file mode 100644
index 0000000000..7d9a6c4c32
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/raw/roboto_regular.ttf
Binary files differ
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-af/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-af/strings.xml
new file mode 100644
index 0000000000..d333128a87
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-af/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Altyd"</string>
+ <string name="activity_resolver_use_once">"Net een keer"</string>
+ <string name="candidates_style">"kandidate"</string>
+ <string name="capital_off">"AF"</string>
+ <string name="capital_on">"AAN"</string>
+ <string name="chooseActivity">"Kies \'n handeling"</string>
+ <string name="date_picker_decrement_day_button">"Verminder dag"</string>
+ <string name="date_picker_decrement_month_button">"Verminder maand"</string>
+ <string name="date_picker_decrement_year_button">"Verminder jaar"</string>
+ <string name="date_picker_dialog_title">"Stel datum"</string>
+ <string name="date_picker_increment_day_button">"Vermeerder dag"</string>
+ <string name="date_picker_increment_month_button">"Vermeerder maand"</string>
+ <string name="date_picker_increment_year_button">"Vermeerder jaar"</string>
+ <string name="date_time_done">"Klaar"</string>
+ <string name="date_time_set">"Stel"</string>
+ <string name="loading">"Laai tans..."</string>
+ <string name="noApplications">"Geen programme kan hierdie handeling uitvoer nie."</string>
+ <string name="number_picker_decrement_button">"Verminder"</string>
+ <string name="number_picker_increment_button">"Vermeerder"</string>
+ <string name="number_picker_increment_scroll_action">"Gly op om te vermeeder en af om te verminder."</string>
+ <string name="number_picker_increment_scroll_mode">"%s raak en hou."</string>
+ <string name="ringtone_default">"Verstek luitoon"</string>
+ <string name="ringtone_picker_title">"Luitone"</string>
+ <string name="ringtone_silent">"Stil"</string>
+ <string name="time_picker_decrement_hour_button">"Verminder uur"</string>
+ <string name="time_picker_decrement_minute_button">"Verminder minute"</string>
+ <string name="time_picker_decrement_set_am_button">"Stel VM."</string>
+ <string name="time_picker_dialog_title">"Stel tyd"</string>
+ <string name="time_picker_increment_hour_button">"Vermeerder uur"</string>
+ <string name="time_picker_increment_minute_button">"Vermeerder minuut"</string>
+ <string name="time_picker_increment_set_pm_button">"Stel NM."</string>
+ <string name="whichApplication">"Voltooi handeling met"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-am/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-am/strings.xml
new file mode 100644
index 0000000000..209dd51779
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-am/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"ዘወትር"</string>
+ <string name="activity_resolver_use_once">"አንዴ ብቻ"</string>
+ <string name="candidates_style">"ዕጩዎች"</string>
+ <string name="capital_off">"ውጪ"</string>
+ <string name="capital_on">"በ"</string>
+ <string name="chooseActivity">"ድርጊት ምረጥ"</string>
+ <string name="date_picker_decrement_day_button">"ቀን ቀንስ"</string>
+ <string name="date_picker_decrement_month_button">"ወር ቀንስ"</string>
+ <string name="date_picker_decrement_year_button">"ዓመት ቀንስ"</string>
+ <string name="date_picker_dialog_title">"ውሂብ አዘጋጅ"</string>
+ <string name="date_picker_increment_day_button">"ቀን ጨምር"</string>
+ <string name="date_picker_increment_month_button">"ወር ጨምር"</string>
+ <string name="date_picker_increment_year_button">"ዓመት ጨምር"</string>
+ <string name="date_time_done">"ተጠናቋል"</string>
+ <string name="date_time_set">"አዘጋጅ"</string>
+ <string name="loading">"በመጫን ላይ…"</string>
+ <string name="noApplications">"ምንም ትግበራዎች ይህን ድርጊት ማከናወን አይችሉም።"</string>
+ <string name="number_picker_decrement_button">"ቀንስ"</string>
+ <string name="number_picker_increment_button">"ጨምር"</string>
+ <string name="number_picker_increment_scroll_action">"ለመጨመር ወደ ላይ እና ለመቀነስ ወደ ታች አንሸራትት።"</string>
+ <string name="number_picker_increment_scroll_mode">"%s ንካ እና ያዝ።"</string>
+ <string name="ringtone_default">"ነባሪ የስልክ ላይ ጥሪ"</string>
+ <string name="ringtone_picker_title">"ጥሪ ድምፆች"</string>
+ <string name="ringtone_silent">"ፀጥታ"</string>
+ <string name="time_picker_decrement_hour_button">"ሰዓት ቀንስ"</string>
+ <string name="time_picker_decrement_minute_button">"ደቂቃ ቀንስ"</string>
+ <string name="time_picker_decrement_set_am_button">"AM አዘጋጅ"</string>
+ <string name="time_picker_dialog_title">"ጊዜ አዘጋጅ"</string>
+ <string name="time_picker_increment_hour_button">"ሰዓት ጨምር"</string>
+ <string name="time_picker_increment_minute_button">"ደቂቃ ጨምር"</string>
+ <string name="time_picker_increment_set_pm_button">"PM አዘጋጅ"</string>
+ <string name="whichApplication">"... በመጠቀም ድርጊቱን አጠናቅ"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ar/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ar/strings.xml
new file mode 100644
index 0000000000..a385bc2ae5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ar/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"دومًا"</string>
+ <string name="activity_resolver_use_once">"مرة واحدة فقط"</string>
+ <string name="candidates_style">"العناصر المرشحة"</string>
+ <string name="capital_off">"إيقاف"</string>
+ <string name="capital_on">"تشغيل"</string>
+ <string name="chooseActivity">"اختيار إجراء"</string>
+ <string name="date_picker_decrement_day_button">"تقليل الأيام"</string>
+ <string name="date_picker_decrement_month_button">"تقليل الشهور"</string>
+ <string name="date_picker_decrement_year_button">"تقليل الأعوام"</string>
+ <string name="date_picker_dialog_title">"تعيين التاريخ"</string>
+ <string name="date_picker_increment_day_button">"زيادة الأيام"</string>
+ <string name="date_picker_increment_month_button">"زيادة الشهور"</string>
+ <string name="date_picker_increment_year_button">"زيادة الأعوام"</string>
+ <string name="date_time_done">"تم"</string>
+ <string name="date_time_set">"تعيين"</string>
+ <string name="loading">"جارٍ التحميل…"</string>
+ <string name="noApplications">"ليست هناك تطبيقات يمكنها تنفيذ هذا الإجراء."</string>
+ <string name="number_picker_decrement_button">"تقليل"</string>
+ <string name="number_picker_increment_button">"زيادة"</string>
+ <string name="number_picker_increment_scroll_action">"مرر لأعلى للزيادة ولأسفل للتقليل."</string>
+ <string name="number_picker_increment_scroll_mode">"%s المس مع الاستمرار."</string>
+ <string name="ringtone_default">"نغمة الرنين الافتراضية"</string>
+ <string name="ringtone_picker_title">"نغمات الرنين"</string>
+ <string name="ringtone_silent">"صامت"</string>
+ <string name="time_picker_decrement_hour_button">"تقليل الساعات"</string>
+ <string name="time_picker_decrement_minute_button">"تقليل الدقائق"</string>
+ <string name="time_picker_decrement_set_am_button">"تعيين الصباح"</string>
+ <string name="time_picker_dialog_title">"تعيين الوقت"</string>
+ <string name="time_picker_increment_hour_button">"زيادة الساعات"</string>
+ <string name="time_picker_increment_minute_button">"زيادة الدقائق"</string>
+ <string name="time_picker_increment_set_pm_button">"تعيين المساء"</string>
+ <string name="whichApplication">"إكمال الإجراء باستخدام"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-be/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-be/strings.xml
new file mode 100644
index 0000000000..6ff11a4693
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-be/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Заўсёды"</string>
+ <string name="activity_resolver_use_once">"Толькі адзін раз"</string>
+ <string name="candidates_style">"кандыдат."</string>
+ <string name="capital_off">"Адключана"</string>
+ <string name="capital_on">"Уключыць"</string>
+ <string name="chooseActivity">"Выберыце дзеянне"</string>
+ <string name="date_picker_decrement_day_button">"Паменшыць лічбу дня"</string>
+ <string name="date_picker_decrement_month_button">"Паменшыць лічбу месяца"</string>
+ <string name="date_picker_decrement_year_button">"Паменшыць лічбу года"</string>
+ <string name="date_picker_dialog_title">"Усталяваць дату"</string>
+ <string name="date_picker_increment_day_button">"Павялічыць лічбу дня"</string>
+ <string name="date_picker_increment_month_button">"Павялічыць лічбу месяца"</string>
+ <string name="date_picker_increment_year_button">"Павялічыць лічбу года"</string>
+ <string name="date_time_done">"Гатова"</string>
+ <string name="date_time_set">"Задаць"</string>
+ <string name="loading">"Загрузка..."</string>
+ <string name="noApplications">"Няма прыкладанняў, якія могуць выконваць гэты працэс."</string>
+ <string name="number_picker_decrement_button">"Паменшыць"</string>
+ <string name="number_picker_increment_button">"Павялічыць"</string>
+ <string name="number_picker_increment_scroll_action">"Правядзіце пальцам уверх, каб павялічыць, або ўніз, каб паменшыць."</string>
+ <string name="number_picker_increment_scroll_mode">"Націсніце і ўтрымлівайце %s."</string>
+ <string name="ringtone_default">"Рынгтон па змаўчаннi"</string>
+ <string name="ringtone_picker_title">"Рынгтоны"</string>
+ <string name="ringtone_silent">"Ціхі рэжым"</string>
+ <string name="time_picker_decrement_hour_button">"Паменшыць лічбу гадзін."</string>
+ <string name="time_picker_decrement_minute_button">"Паменшыць лічбу хвілін."</string>
+ <string name="time_picker_decrement_set_am_button">"Усталяваць час да паўдня"</string>
+ <string name="time_picker_dialog_title">"Усталяваць час"</string>
+ <string name="time_picker_increment_hour_button">"Павялічыць лічбу гадзін."</string>
+ <string name="time_picker_increment_minute_button">"Павялічыць лічбу хвілін."</string>
+ <string name="time_picker_increment_set_pm_button">"Усталяваць час пасля паўдня"</string>
+ <string name="whichApplication">"Завяршыць дзеянне з дапамогай"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-bg/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-bg/strings.xml
new file mode 100644
index 0000000000..2f81de3c6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-bg/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Винаги"</string>
+ <string name="activity_resolver_use_once">"Само веднъж"</string>
+ <string name="candidates_style">"кандидати"</string>
+ <string name="capital_off">"ИЗКЛ"</string>
+ <string name="capital_on">"ВКЛ"</string>
+ <string name="chooseActivity">"Избиране на действие"</string>
+ <string name="date_picker_decrement_day_button">"Намаляване на дните"</string>
+ <string name="date_picker_decrement_month_button">"Намаляване на месеците"</string>
+ <string name="date_picker_decrement_year_button">"Намаляване на годините"</string>
+ <string name="date_picker_dialog_title">"Задаване на дата"</string>
+ <string name="date_picker_increment_day_button">"Увеличаване на дните"</string>
+ <string name="date_picker_increment_month_button">"Увеличаване на месеците"</string>
+ <string name="date_picker_increment_year_button">"Увеличаване на годините"</string>
+ <string name="date_time_done">"Готово"</string>
+ <string name="date_time_set">"Задаване"</string>
+ <string name="loading">"Зарежда се..."</string>
+ <string name="noApplications">"Това действие не може да се изпълни от нито едно приложение."</string>
+ <string name="number_picker_decrement_button">"Намаляване"</string>
+ <string name="number_picker_increment_button">"Увеличаване"</string>
+ <string name="number_picker_increment_scroll_action">"Плъзнете нагоре за увеличаване и надолу за намаляване."</string>
+ <string name="number_picker_increment_scroll_mode">"Докоснете %s път/и и задръжте."</string>
+ <string name="ringtone_default">"Стандартна мелодия"</string>
+ <string name="ringtone_picker_title">"Мелодии"</string>
+ <string name="ringtone_silent">"Тишина"</string>
+ <string name="time_picker_decrement_hour_button">"Намаляване на часовете"</string>
+ <string name="time_picker_decrement_minute_button">"Намаляване на минутите"</string>
+ <string name="time_picker_decrement_set_am_button">"Задаване на AM"</string>
+ <string name="time_picker_dialog_title">"Задаване на часа"</string>
+ <string name="time_picker_increment_hour_button">"Увеличаване на часовете"</string>
+ <string name="time_picker_increment_minute_button">"Увеличаване на минутите"</string>
+ <string name="time_picker_increment_set_pm_button">"Задаване на PM"</string>
+ <string name="whichApplication">"Изпълняване на действието чрез"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ca/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ca/strings.xml
new file mode 100644
index 0000000000..f6c25c8233
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ca/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Sempre"</string>
+ <string name="activity_resolver_use_once">"Només una"</string>
+ <string name="candidates_style">"candidats"</string>
+ <string name="capital_off">"NO"</string>
+ <string name="capital_on">"SÍ"</string>
+ <string name="chooseActivity">"Tria una acció"</string>
+ <string name="date_picker_decrement_day_button">"Fes disminuir el dia"</string>
+ <string name="date_picker_decrement_month_button">"Fes disminuir el mes"</string>
+ <string name="date_picker_decrement_year_button">"Fes disminuir l\'any"</string>
+ <string name="date_picker_dialog_title">"Establiment de data"</string>
+ <string name="date_picker_increment_day_button">"Fes augmentar el dia"</string>
+ <string name="date_picker_increment_month_button">"Fes augmentar el mes"</string>
+ <string name="date_picker_increment_year_button">"Fes augmentar l\'any"</string>
+ <string name="date_time_done">"Fet"</string>
+ <string name="date_time_set">"Defineix"</string>
+ <string name="loading">"S\'està carregant…"</string>
+ <string name="noApplications">"No hi ha cap aplicació que pugui dur a terme aquesta acció."</string>
+ <string name="number_picker_decrement_button">"Redueix"</string>
+ <string name="number_picker_increment_button">"Incrementa"</string>
+ <string name="number_picker_increment_scroll_action">"Fes lliscar el dit cap amunt per incrementar i cap avall per disminuir."</string>
+ <string name="number_picker_increment_scroll_mode">"Mantén premut %s."</string>
+ <string name="ringtone_default">"To predeterminat"</string>
+ <string name="ringtone_picker_title">"Sons de trucada"</string>
+ <string name="ringtone_silent">"Silenci"</string>
+ <string name="time_picker_decrement_hour_button">"Fes disminuir l\'hora"</string>
+ <string name="time_picker_decrement_minute_button">"Fes disminuir el minut"</string>
+ <string name="time_picker_decrement_set_am_button">"Estableix com a a. m."</string>
+ <string name="time_picker_dialog_title">"Estableix l\'hora"</string>
+ <string name="time_picker_increment_hour_button">"Fes augmentar l\'hora"</string>
+ <string name="time_picker_increment_minute_button">"Fes augmentar el minut"</string>
+ <string name="time_picker_increment_set_pm_button">"Estableix com a p. m."</string>
+ <string name="whichApplication">"Completa l\'acció mitjançant"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-cs/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-cs/strings.xml
new file mode 100644
index 0000000000..6f03dd45a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-cs/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Vždy"</string>
+ <string name="activity_resolver_use_once">"Pouze jednou"</string>
+ <string name="candidates_style">"kandidáti"</string>
+ <string name="capital_off">"O"</string>
+ <string name="capital_on">"I"</string>
+ <string name="chooseActivity">"Vyberte činnost"</string>
+ <string name="date_picker_decrement_day_button">"Ubrat den"</string>
+ <string name="date_picker_decrement_month_button">"Ubrat měsíc"</string>
+ <string name="date_picker_decrement_year_button">"Ubrat rok"</string>
+ <string name="date_picker_dialog_title">"Nastavení data"</string>
+ <string name="date_picker_increment_day_button">"Přidat den"</string>
+ <string name="date_picker_increment_month_button">"Přidat měsíc"</string>
+ <string name="date_picker_increment_year_button">"Přidat rok"</string>
+ <string name="date_time_done">"Hotovo"</string>
+ <string name="date_time_set">"Nastavit"</string>
+ <string name="loading">"Načítání..."</string>
+ <string name="noApplications">"Tuto činnost nemohou provádět žádné aplikace."</string>
+ <string name="number_picker_decrement_button">"Snížit"</string>
+ <string name="number_picker_increment_button">"Zvýšit"</string>
+ <string name="number_picker_increment_scroll_action">"Chcete-li hodnotu zvýšit, přijeďte prstem nahoru, chcete-li hodnotu snížit, přejeďte prstem dolů."</string>
+ <string name="number_picker_increment_scroll_mode">"%s dotkněte se a podržte."</string>
+ <string name="ringtone_default">"Výchozí vyzváněcí tón"</string>
+ <string name="ringtone_picker_title">"Vyzváněcí tóny"</string>
+ <string name="ringtone_silent">"Ticho"</string>
+ <string name="time_picker_decrement_hour_button">"Ubrat hodinu"</string>
+ <string name="time_picker_decrement_minute_button">"Ubrat minutu"</string>
+ <string name="time_picker_decrement_set_am_button">"Nastavit dop."</string>
+ <string name="time_picker_dialog_title">"Nastavení času"</string>
+ <string name="time_picker_increment_hour_button">"Přidat hodinu"</string>
+ <string name="time_picker_increment_minute_button">"Přidat minutu"</string>
+ <string name="time_picker_increment_set_pm_button">"Nastavit odp."</string>
+ <string name="whichApplication">"Dokončit akci pomocí aplikace"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-da/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-da/strings.xml
new file mode 100644
index 0000000000..26c34bd544
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-da/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Altid"</string>
+ <string name="activity_resolver_use_once">"Kun én gang"</string>
+ <string name="candidates_style">"kandidater"</string>
+ <string name="capital_off">"FRA"</string>
+ <string name="capital_on">"TIL"</string>
+ <string name="chooseActivity">"Vælg en handling"</string>
+ <string name="date_picker_decrement_day_button">"Tidligere dag"</string>
+ <string name="date_picker_decrement_month_button">"Tidligere måned"</string>
+ <string name="date_picker_decrement_year_button">"Tidligere år"</string>
+ <string name="date_picker_dialog_title">"Angiv dato"</string>
+ <string name="date_picker_increment_day_button">"Senere dag"</string>
+ <string name="date_picker_increment_month_button">"Senere måned"</string>
+ <string name="date_picker_increment_year_button">"Senere år"</string>
+ <string name="date_time_done">"Udført"</string>
+ <string name="date_time_set">"Angiv"</string>
+ <string name="loading">"Indlæser…"</string>
+ <string name="noApplications">"Der er ingen apps, der kan foretage denne handling."</string>
+ <string name="number_picker_decrement_button">"Lavere"</string>
+ <string name="number_picker_increment_button">"Højere"</string>
+ <string name="number_picker_increment_scroll_action">"Glid op for at øge og ned for at mindske."</string>
+ <string name="number_picker_increment_scroll_mode">"Tryk %s gange, og hold inde."</string>
+ <string name="ringtone_default">"Standardringetone"</string>
+ <string name="ringtone_picker_title">"Ringetoner"</string>
+ <string name="ringtone_silent">"Lydløs"</string>
+ <string name="time_picker_decrement_hour_button">"Sænk timetal"</string>
+ <string name="time_picker_decrement_minute_button">"Sænk minuttal"</string>
+ <string name="time_picker_decrement_set_am_button">"Indstil AM"</string>
+ <string name="time_picker_dialog_title">"Angiv tidspunkt"</string>
+ <string name="time_picker_increment_hour_button">"Forøg timetal"</string>
+ <string name="time_picker_increment_minute_button">"Forøg minuttal"</string>
+ <string name="time_picker_increment_set_pm_button">"Indstil PM"</string>
+ <string name="whichApplication">"Fuldfør handling ved hjælp af"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-de/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-de/strings.xml
new file mode 100644
index 0000000000..d8da28f331
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-de/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Immer"</string>
+ <string name="activity_resolver_use_once">"Nur einmal"</string>
+ <string name="candidates_style">"Kandidaten"</string>
+ <string name="capital_off">"AUS"</string>
+ <string name="capital_on">"AN"</string>
+ <string name="chooseActivity">"Aktion auswählen"</string>
+ <string name="date_picker_decrement_day_button">"Tag verringern"</string>
+ <string name="date_picker_decrement_month_button">"Monat verringern"</string>
+ <string name="date_picker_decrement_year_button">"Jahr verringern"</string>
+ <string name="date_picker_dialog_title">"Datum festlegen"</string>
+ <string name="date_picker_increment_day_button">"Tag verlängern"</string>
+ <string name="date_picker_increment_month_button">"Monat verlängern"</string>
+ <string name="date_picker_increment_year_button">"Jahr verlängern"</string>
+ <string name="date_time_done">"Fertig"</string>
+ <string name="date_time_set">"Speichern"</string>
+ <string name="loading">"Wird geladen…"</string>
+ <string name="noApplications">"Diese Aktion kann von keiner App ausgeführt werden."</string>
+ <string name="number_picker_decrement_button">"Verringern"</string>
+ <string name="number_picker_increment_button">"Verlängern"</string>
+ <string name="number_picker_increment_scroll_action">"Zum Verlängern nach oben und zum Verringern nach unten schieben"</string>
+ <string name="number_picker_increment_scroll_mode">"%s berühren und gedrückt halten"</string>
+ <string name="ringtone_default">"Standard-Klingelton"</string>
+ <string name="ringtone_picker_title">"Klingeltöne"</string>
+ <string name="ringtone_silent">"Lautlos"</string>
+ <string name="time_picker_decrement_hour_button">"Stunden verringern"</string>
+ <string name="time_picker_decrement_minute_button">"Minuten verringern"</string>
+ <string name="time_picker_decrement_set_am_button">"Zeit festlegen"</string>
+ <string name="time_picker_dialog_title">"Uhrzeit festlegen"</string>
+ <string name="time_picker_increment_hour_button">"Stunden verlängern"</string>
+ <string name="time_picker_increment_minute_button">"Minuten verlängern"</string>
+ <string name="time_picker_increment_set_pm_button">"Zeit festlegen"</string>
+ <string name="whichApplication">"Aktion durchführen mit"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-el/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-el/strings.xml
new file mode 100644
index 0000000000..706386f03e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-el/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Πάντα"</string>
+ <string name="activity_resolver_use_once">"Μόνο μία φορά"</string>
+ <string name="candidates_style">"υποψήφιοι"</string>
+ <string name="capital_off">"Ανενεργό"</string>
+ <string name="capital_on">"Ενεργό"</string>
+ <string name="chooseActivity">"Επιλέξτε μια ενέργεια"</string>
+ <string name="date_picker_decrement_day_button">"Μείωση ημέρας"</string>
+ <string name="date_picker_decrement_month_button">"Μείωση μήνα"</string>
+ <string name="date_picker_decrement_year_button">"Μείωση έτους"</string>
+ <string name="date_picker_dialog_title">"Ορισμός ημερομηνίας"</string>
+ <string name="date_picker_increment_day_button">"Αύξηση ημέρας"</string>
+ <string name="date_picker_increment_month_button">"Αύξηση μήνα"</string>
+ <string name="date_picker_increment_year_button">"Αύξηση έτους"</string>
+ <string name="date_time_done">"Τέλος"</string>
+ <string name="date_time_set">"Ορισμός"</string>
+ <string name="loading">"Φόρτωση…"</string>
+ <string name="noApplications">"Δεν υπάρχουν εφαρμογές, οι οποίες μπορούν να εκτελέσουν αυτήν την ενέργεια."</string>
+ <string name="number_picker_decrement_button">"Μείωση"</string>
+ <string name="number_picker_increment_button">"Αύξηση"</string>
+ <string name="number_picker_increment_scroll_action">"Πραγματοποιήστε κύλιση προς τα πάνω για αύξηση και προς τα κάτω για μείωση."</string>
+ <string name="number_picker_increment_scroll_mode">"Πατήστε παρατεταμένα το %s."</string>
+ <string name="ringtone_default">"Προεπιλεγμένος ήχος κλήσης"</string>
+ <string name="ringtone_picker_title">"Ήχοι κλήσης"</string>
+ <string name="ringtone_silent">"Σίγαση"</string>
+ <string name="time_picker_decrement_hour_button">"Μείωση ώρας"</string>
+ <string name="time_picker_decrement_minute_button">"Μείωση λεπτού"</string>
+ <string name="time_picker_decrement_set_am_button">"Ορισμός ΠΜ"</string>
+ <string name="time_picker_dialog_title">"Ρύθμιση ώρας"</string>
+ <string name="time_picker_increment_hour_button">"Αύξηση ώρας"</string>
+ <string name="time_picker_increment_minute_button">"Αύξηση λεπτού"</string>
+ <string name="time_picker_increment_set_pm_button">"Ορισμός ΜΜ"</string>
+ <string name="whichApplication">"Ολοκλήρωση ενέργειας με τη χρήση"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-en-rGB/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-en-rGB/strings.xml
new file mode 100644
index 0000000000..efda1f5585
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-en-rGB/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Always"</string>
+ <string name="activity_resolver_use_once">"Just once"</string>
+ <string name="candidates_style">"candidates"</string>
+ <string name="capital_off">"OFF"</string>
+ <string name="capital_on">"ON"</string>
+ <string name="chooseActivity">"Choose an action"</string>
+ <string name="date_picker_decrement_day_button">"Decrease day"</string>
+ <string name="date_picker_decrement_month_button">"Decrease month"</string>
+ <string name="date_picker_decrement_year_button">"Decrease year"</string>
+ <string name="date_picker_dialog_title">"Set date"</string>
+ <string name="date_picker_increment_day_button">"Increase day"</string>
+ <string name="date_picker_increment_month_button">"Increase month"</string>
+ <string name="date_picker_increment_year_button">"Increase year"</string>
+ <string name="date_time_done">"Done"</string>
+ <string name="date_time_set">"Set"</string>
+ <string name="loading">"Loading…"</string>
+ <string name="noApplications">"No apps can perform this action."</string>
+ <string name="number_picker_decrement_button">"Decrease"</string>
+ <string name="number_picker_increment_button">"Increase"</string>
+ <string name="number_picker_increment_scroll_action">"Slide up to increase and down to decrease."</string>
+ <string name="number_picker_increment_scroll_mode">"%s touch and hold."</string>
+ <string name="ringtone_default">"Default ringtone"</string>
+ <string name="ringtone_picker_title">"Ringtones"</string>
+ <string name="ringtone_silent">"Silent"</string>
+ <string name="time_picker_decrement_hour_button">"Decrease hour"</string>
+ <string name="time_picker_decrement_minute_button">"Decrease minute"</string>
+ <string name="time_picker_decrement_set_am_button">"Set a.m."</string>
+ <string name="time_picker_dialog_title">"Set time"</string>
+ <string name="time_picker_increment_hour_button">"Increase hour"</string>
+ <string name="time_picker_increment_minute_button">"Increase minute"</string>
+ <string name="time_picker_increment_set_pm_button">"Set p.m."</string>
+ <string name="whichApplication">"Complete action using"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-es-rUS/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-es-rUS/strings.xml
new file mode 100644
index 0000000000..24a21f0d14
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-es-rUS/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Siempre"</string>
+ <string name="activity_resolver_use_once">"Solo una vez"</string>
+ <string name="candidates_style">"candidatos"</string>
+ <string name="capital_off">"No"</string>
+ <string name="capital_on">"Sí"</string>
+ <string name="chooseActivity">"Seleccionar una acción"</string>
+ <string name="date_picker_decrement_day_button">"Reducir día"</string>
+ <string name="date_picker_decrement_month_button">"Reducir mes"</string>
+ <string name="date_picker_decrement_year_button">"Reducir año"</string>
+ <string name="date_picker_dialog_title">"Configurar fecha"</string>
+ <string name="date_picker_increment_day_button">"Aumentar día"</string>
+ <string name="date_picker_increment_month_button">"Aumentar mes"</string>
+ <string name="date_picker_increment_year_button">"Aumentar año"</string>
+ <string name="date_time_done">"Listo"</string>
+ <string name="date_time_set">"Establecer"</string>
+ <string name="loading">"Cargando…"</string>
+ <string name="noApplications">"Ninguna aplicación puede realizar esta acción."</string>
+ <string name="number_picker_decrement_button">"Reducir"</string>
+ <string name="number_picker_increment_button">"Aumentar"</string>
+ <string name="number_picker_increment_scroll_action">"Desliza el dedo hacia arriba para aumentar los valores y hacia abajo para reducirlos."</string>
+ <string name="number_picker_increment_scroll_mode">"Mantén presionado %s."</string>
+ <string name="ringtone_default">"Tono de llamada predeterminado"</string>
+ <string name="ringtone_picker_title">"Tonos de llamada"</string>
+ <string name="ringtone_silent">"Silencioso"</string>
+ <string name="time_picker_decrement_hour_button">"Reducir hora"</string>
+ <string name="time_picker_decrement_minute_button">"Reducir minutos"</string>
+ <string name="time_picker_decrement_set_am_button">"Establecer a.m."</string>
+ <string name="time_picker_dialog_title">"Configurar hora"</string>
+ <string name="time_picker_increment_hour_button">"Aumentar hora"</string>
+ <string name="time_picker_increment_minute_button">"Aumentar minutos"</string>
+ <string name="time_picker_increment_set_pm_button">"Establecer p.m."</string>
+ <string name="whichApplication">"Completar la acción mediante"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-es/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-es/strings.xml
new file mode 100644
index 0000000000..aca9f3ffbb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-es/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Siempre"</string>
+ <string name="activity_resolver_use_once">"Solo una vez"</string>
+ <string name="candidates_style">"candidatos"</string>
+ <string name="capital_off">"NO"</string>
+ <string name="capital_on">"SÍ"</string>
+ <string name="chooseActivity">"Seleccionar una acción"</string>
+ <string name="date_picker_decrement_day_button">"Reducir días"</string>
+ <string name="date_picker_decrement_month_button">"Reducir mes"</string>
+ <string name="date_picker_decrement_year_button">"Reducir año"</string>
+ <string name="date_picker_dialog_title">"Establecer fecha"</string>
+ <string name="date_picker_increment_day_button">"Aumentar días"</string>
+ <string name="date_picker_increment_month_button">"Aumentar mes"</string>
+ <string name="date_picker_increment_year_button">"Aumentar año"</string>
+ <string name="date_time_done">"Listo"</string>
+ <string name="date_time_set">"Establecer"</string>
+ <string name="loading">"Cargando..."</string>
+ <string name="noApplications">"Ninguna aplicación puede realizar esta acción."</string>
+ <string name="number_picker_decrement_button">"Reducir"</string>
+ <string name="number_picker_increment_button">"Aumentar"</string>
+ <string name="number_picker_increment_scroll_action">"Desliza el dedo hacia arriba para aumentar y hacia abajo para disminuir."</string>
+ <string name="number_picker_increment_scroll_mode">"Mantén pulsado %s."</string>
+ <string name="ringtone_default">"Tono predeterminado"</string>
+ <string name="ringtone_picker_title">"Tonos"</string>
+ <string name="ringtone_silent">"Silencio"</string>
+ <string name="time_picker_decrement_hour_button">"Reducir horas"</string>
+ <string name="time_picker_decrement_minute_button">"Reducir minutos"</string>
+ <string name="time_picker_decrement_set_am_button">"Establecer a.m."</string>
+ <string name="time_picker_dialog_title">"Establecer hora"</string>
+ <string name="time_picker_increment_hour_button">"Aumentar horas"</string>
+ <string name="time_picker_increment_minute_button">"Aumentar minutos"</string>
+ <string name="time_picker_increment_set_pm_button">"Establecer p.m."</string>
+ <string name="whichApplication">"Completar acción utilizando"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-et/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-et/strings.xml
new file mode 100644
index 0000000000..5066f579f4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-et/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Alati"</string>
+ <string name="activity_resolver_use_once">"Ainult üks kord"</string>
+ <string name="candidates_style">"kandidaadid"</string>
+ <string name="capital_off">"VÄLJAS"</string>
+ <string name="capital_on">"SEES"</string>
+ <string name="chooseActivity">"Toimingu valimine"</string>
+ <string name="date_picker_decrement_day_button">"Päeva vähendamine"</string>
+ <string name="date_picker_decrement_month_button">"Kuu vähendamine"</string>
+ <string name="date_picker_decrement_year_button">"Aasta vähendamine"</string>
+ <string name="date_picker_dialog_title">"Kuupäeva määramine"</string>
+ <string name="date_picker_increment_day_button">"Päeva suurendamine"</string>
+ <string name="date_picker_increment_month_button">"Kuu suurendamine"</string>
+ <string name="date_picker_increment_year_button">"Aasta suurendamine"</string>
+ <string name="date_time_done">"Valmis"</string>
+ <string name="date_time_set">"Määra"</string>
+ <string name="loading">"Laadimine ..."</string>
+ <string name="noApplications">"Ükski rakendus ei saa seda toimingut teostada."</string>
+ <string name="number_picker_decrement_button">"Vähendamine"</string>
+ <string name="number_picker_increment_button">"Suurendamine"</string>
+ <string name="number_picker_increment_scroll_action">"Suurendamiseks lohistage üles, vähendamiseks alla."</string>
+ <string name="number_picker_increment_scroll_mode">"%s puudutage ja hoidke."</string>
+ <string name="ringtone_default">"Vaikehelin"</string>
+ <string name="ringtone_picker_title">"Helinad"</string>
+ <string name="ringtone_silent">"Hääletu"</string>
+ <string name="time_picker_decrement_hour_button">"Tundide vähendamine"</string>
+ <string name="time_picker_decrement_minute_button">"Minutite vähendamine"</string>
+ <string name="time_picker_decrement_set_am_button">"AM-i seadmine"</string>
+ <string name="time_picker_dialog_title">"Kellaaja määramine"</string>
+ <string name="time_picker_increment_hour_button">"Tundide suurendamine"</string>
+ <string name="time_picker_increment_minute_button">"Minutite suurendamine"</string>
+ <string name="time_picker_increment_set_pm_button">"PM-i seadmine"</string>
+ <string name="whichApplication">"Lõpetage toiming rakendusega"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-fa/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-fa/strings.xml
new file mode 100644
index 0000000000..3aa87dbc26
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-fa/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"همیشه"</string>
+ <string name="activity_resolver_use_once">"فقط این بار"</string>
+ <string name="candidates_style">"داوطلبین"</string>
+ <string name="capital_off">"خاموش"</string>
+ <string name="capital_on">"روشن"</string>
+ <string name="chooseActivity">"انتخاب عملکرد"</string>
+ <string name="date_picker_decrement_day_button">"کاهش روز"</string>
+ <string name="date_picker_decrement_month_button">"کاهش ماه"</string>
+ <string name="date_picker_decrement_year_button">"کاهش سال"</string>
+ <string name="date_picker_dialog_title">"تاریخ تنظیم"</string>
+ <string name="date_picker_increment_day_button">"افزایش روز"</string>
+ <string name="date_picker_increment_month_button">"افزایش ماه"</string>
+ <string name="date_picker_increment_year_button">"افزایش سال"</string>
+ <string name="date_time_done">"انجام شد"</string>
+ <string name="date_time_set">"تنظیم"</string>
+ <string name="loading">"در حال بارگیری..."</string>
+ <string name="noApplications">"هیچ برنامه‌ای نمی‎تواند این کار را انجام دهد."</string>
+ <string name="number_picker_decrement_button">"کاهش"</string>
+ <string name="number_picker_increment_button">"افزایش"</string>
+ <string name="number_picker_increment_scroll_action">"برای افزایش به بالا بلغزانید و برای کاهش به پایین بلغزانید."</string>
+ <string name="number_picker_increment_scroll_mode">"%s لمس کرده و نگه دارید."</string>
+ <string name="ringtone_default">"آهنگ زنگ پیش‌فرض"</string>
+ <string name="ringtone_picker_title">"آهنگ‌های زنگ"</string>
+ <string name="ringtone_silent">"ساکت"</string>
+ <string name="time_picker_decrement_hour_button">"کاهش ساعت"</string>
+ <string name="time_picker_decrement_minute_button">"کاهش دقیقه"</string>
+ <string name="time_picker_decrement_set_am_button">"تنظیم ق.ظ"</string>
+ <string name="time_picker_dialog_title">"تنظیم زمان"</string>
+ <string name="time_picker_increment_hour_button">"افزایش ساعت"</string>
+ <string name="time_picker_increment_minute_button">"افزایش دقیقه"</string>
+ <string name="time_picker_increment_set_pm_button">"تنظیم ب.ظ"</string>
+ <string name="whichApplication">"تکمیل عملکرد با استفاده از"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-fi/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-fi/strings.xml
new file mode 100644
index 0000000000..fa56e531a0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-fi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Aina"</string>
+ <string name="activity_resolver_use_once">"Vain kerran"</string>
+ <string name="candidates_style">"kandidaatit"</string>
+ <string name="capital_off">"POIS"</string>
+ <string name="capital_on">"PÄÄLLÄ"</string>
+ <string name="chooseActivity">"Valitse toiminto"</string>
+ <string name="date_picker_decrement_day_button">"Vähennä päivien määrää."</string>
+ <string name="date_picker_decrement_month_button">"Vähennä kuukausien määrää."</string>
+ <string name="date_picker_decrement_year_button">"Vähennä vuosien määrää."</string>
+ <string name="date_picker_dialog_title">"Aseta päivämäärä"</string>
+ <string name="date_picker_increment_day_button">"Lisää päivien määrää."</string>
+ <string name="date_picker_increment_month_button">"Lisää kuukausien määrää."</string>
+ <string name="date_picker_increment_year_button">"Lisää vuosien määrää."</string>
+ <string name="date_time_done">"Valmis"</string>
+ <string name="date_time_set">"Aseta"</string>
+ <string name="loading">"Ladataan…"</string>
+ <string name="noApplications">"Yksikään sovellus ei voi suorittaa tätä toimintoa."</string>
+ <string name="number_picker_decrement_button">"Vähennä"</string>
+ <string name="number_picker_increment_button">"Lisää"</string>
+ <string name="number_picker_increment_scroll_action">"Lisää tai vähennä arvoa liu\'uttamalla ylös tai alas."</string>
+ <string name="number_picker_increment_scroll_mode">"%s kosketa pitkään."</string>
+ <string name="ringtone_default">"Oletussoittoääni"</string>
+ <string name="ringtone_picker_title">"Soittoäänet"</string>
+ <string name="ringtone_silent">"Äänetön"</string>
+ <string name="time_picker_decrement_hour_button">"Vähennä tuntien määrää."</string>
+ <string name="time_picker_decrement_minute_button">"Vähennä minuuttien määrää."</string>
+ <string name="time_picker_decrement_set_am_button">"Aseta ap"</string>
+ <string name="time_picker_dialog_title">"Aseta aika"</string>
+ <string name="time_picker_increment_hour_button">"Lisää tuntien määrää."</string>
+ <string name="time_picker_increment_minute_button">"Lisää minuuttien määrää."</string>
+ <string name="time_picker_increment_set_pm_button">"Aseta ip"</string>
+ <string name="whichApplication">"Tee toiminto käyttäen sovellusta"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-fr/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-fr/strings.xml
new file mode 100644
index 0000000000..95cb2c1c1a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-fr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Toujours"</string>
+ <string name="activity_resolver_use_once">"Une seule fois"</string>
+ <string name="candidates_style">"candidats"</string>
+ <string name="capital_off">"NON"</string>
+ <string name="capital_on">"OUI"</string>
+ <string name="chooseActivity">"Sélectionnez une action"</string>
+ <string name="date_picker_decrement_day_button">"Jour précédent"</string>
+ <string name="date_picker_decrement_month_button">"Mois précédent"</string>
+ <string name="date_picker_decrement_year_button">"Année précédente"</string>
+ <string name="date_picker_dialog_title">"Définir la date"</string>
+ <string name="date_picker_increment_day_button">"Jour suivant"</string>
+ <string name="date_picker_increment_month_button">"Mois suivant"</string>
+ <string name="date_picker_increment_year_button">"Année suivante"</string>
+ <string name="date_time_done">"OK"</string>
+ <string name="date_time_set">"Définir"</string>
+ <string name="loading">"Chargement…"</string>
+ <string name="noApplications">"Aucune application ne peut effectuer cette action."</string>
+ <string name="number_picker_decrement_button">"Diminuer"</string>
+ <string name="number_picker_increment_button">"Augmenter"</string>
+ <string name="number_picker_increment_scroll_action">"Faites glisser vers le haut pour augmenter et vers le bas pour diminuer."</string>
+ <string name="number_picker_increment_scroll_mode">"%s appuyez de manière prolongée."</string>
+ <string name="ringtone_default">"Sonnerie par défaut"</string>
+ <string name="ringtone_picker_title">"Sonneries"</string>
+ <string name="ringtone_silent">"Silencieux"</string>
+ <string name="time_picker_decrement_hour_button">"Heure précédente"</string>
+ <string name="time_picker_decrement_minute_button">"Minute précédente"</string>
+ <string name="time_picker_decrement_set_am_button">"Définir la valeur AM"</string>
+ <string name="time_picker_dialog_title">"Définir l\'heure"</string>
+ <string name="time_picker_increment_hour_button">"Heure suivante"</string>
+ <string name="time_picker_increment_minute_button">"Minute suivante"</string>
+ <string name="time_picker_increment_set_pm_button">"Définir la valeur PM"</string>
+ <string name="whichApplication">"Continuer avec"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-h720dp/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values-h720dp/dimens.xml
new file mode 100644
index 0000000000..867e95057e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-h720dp/dimens.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <dimen name="alert_dialog_button_bar_height">54dip</dimen>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-hi/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-hi/strings.xml
new file mode 100644
index 0000000000..3ab6cca1d5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-hi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"हमेशा"</string>
+ <string name="activity_resolver_use_once">"केवल एक बार"</string>
+ <string name="candidates_style">"उम्‍मीदवार"</string>
+ <string name="capital_off">"बंद"</string>
+ <string name="capital_on">"चालू"</string>
+ <string name="chooseActivity">"कोई क्रिया चुनें"</string>
+ <string name="date_picker_decrement_day_button">"दिन कम करें"</string>
+ <string name="date_picker_decrement_month_button">"माह कम करें"</string>
+ <string name="date_picker_decrement_year_button">"वर्ष कम करें"</string>
+ <string name="date_picker_dialog_title">"दिनांक सेट करें"</string>
+ <string name="date_picker_increment_day_button">"दिन बढ़ाएं"</string>
+ <string name="date_picker_increment_month_button">"माह बढ़ाएं"</string>
+ <string name="date_picker_increment_year_button">"वर्ष बढ़ाएं"</string>
+ <string name="date_time_done">"पूर्ण"</string>
+ <string name="date_time_set">"सेट करें"</string>
+ <string name="loading">"लोड हो रहे हैं..."</string>
+ <string name="noApplications">"कोई भी एप्‍लिकेशन यह कार्यवाही नहीं कर सकता."</string>
+ <string name="number_picker_decrement_button">"कम करें"</string>
+ <string name="number_picker_increment_button">"बढ़ाएं"</string>
+ <string name="number_picker_increment_scroll_action">"बढ़ाने के लिए ऊपर और कम करने के लिए नीचे स्‍लाइड करें."</string>
+ <string name="number_picker_increment_scroll_mode">"%s को स्‍पर्श करके रखें."</string>
+ <string name="ringtone_default">"डिफ़ॉल्‍ट रिंगटोन"</string>
+ <string name="ringtone_picker_title">"रिंगटोन"</string>
+ <string name="ringtone_silent">"मौन"</string>
+ <string name="time_picker_decrement_hour_button">"घंटे कम करें"</string>
+ <string name="time_picker_decrement_minute_button">"मिनट कम करें"</string>
+ <string name="time_picker_decrement_set_am_button">"प्रात: सेट करें"</string>
+ <string name="time_picker_dialog_title">"समय सेट करें"</string>
+ <string name="time_picker_increment_hour_button">"घंटे बढ़ाएं"</string>
+ <string name="time_picker_increment_minute_button">"मिनट बढ़ाएं"</string>
+ <string name="time_picker_increment_set_pm_button">"सायं सेट करें"</string>
+ <string name="whichApplication">"इसका उपयोग करके क्रिया पूर्ण करें"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-hr/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-hr/strings.xml
new file mode 100644
index 0000000000..9180aff97a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-hr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Uvijek"</string>
+ <string name="activity_resolver_use_once">"Samo jednom"</string>
+ <string name="candidates_style">"kandidati"</string>
+ <string name="capital_off">"Isklj."</string>
+ <string name="capital_on">"Uklj."</string>
+ <string name="chooseActivity">"Odaberi radnju"</string>
+ <string name="date_picker_decrement_day_button">"Smanjenje dana"</string>
+ <string name="date_picker_decrement_month_button">"Smanjenje mjeseca"</string>
+ <string name="date_picker_decrement_year_button">"Smanjenje godine"</string>
+ <string name="date_picker_dialog_title">"Postavi datum"</string>
+ <string name="date_picker_increment_day_button">"Povećanje dana"</string>
+ <string name="date_picker_increment_month_button">"Povećanje mjeseca"</string>
+ <string name="date_picker_increment_year_button">"Povećanje godine"</string>
+ <string name="date_time_done">"Gotovo"</string>
+ <string name="date_time_set">"Postavi"</string>
+ <string name="loading">"Učitavanje…"</string>
+ <string name="noApplications">"Tu radnju ne može izvesti nijedna aplikacija."</string>
+ <string name="number_picker_decrement_button">"Smanjivanje"</string>
+ <string name="number_picker_increment_button">"Povećavanje"</string>
+ <string name="number_picker_increment_scroll_action">"Kliznite prema gore za povećavanje i prema dolje za smanjivanje."</string>
+ <string name="number_picker_increment_scroll_mode">"%s pritisnite i držite."</string>
+ <string name="ringtone_default">"Zadana melodija zvona"</string>
+ <string name="ringtone_picker_title">"Melodije zvona"</string>
+ <string name="ringtone_silent">"Bešumno"</string>
+ <string name="time_picker_decrement_hour_button">"Smanjenje sati"</string>
+ <string name="time_picker_decrement_minute_button">"Smanjenje minuta"</string>
+ <string name="time_picker_decrement_set_am_button">"Postavi AM"</string>
+ <string name="time_picker_dialog_title">"Postavljanje vremena"</string>
+ <string name="time_picker_increment_hour_button">"Povećanje sati"</string>
+ <string name="time_picker_increment_minute_button">"Povećanje minuta"</string>
+ <string name="time_picker_increment_set_pm_button">"Postavi PM"</string>
+ <string name="whichApplication">"Radnju dovrši pomoću stavke"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-hu/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-hu/strings.xml
new file mode 100644
index 0000000000..c2a560d194
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-hu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Mindig"</string>
+ <string name="activity_resolver_use_once">"Csak egyszer"</string>
+ <string name="candidates_style">"jelöltek"</string>
+ <string name="capital_off">"Ki"</string>
+ <string name="capital_on">"Be"</string>
+ <string name="chooseActivity">"Válasszon egy műveletet"</string>
+ <string name="date_picker_decrement_day_button">"Dátum értékének csökkentése"</string>
+ <string name="date_picker_decrement_month_button">"Hónap értékének csökkentése"</string>
+ <string name="date_picker_decrement_year_button">"Év értékének csökkentése"</string>
+ <string name="date_picker_dialog_title">"Dátum beállítása"</string>
+ <string name="date_picker_increment_day_button">"Dátum értékének növelése"</string>
+ <string name="date_picker_increment_month_button">"Hónap értékének növelése"</string>
+ <string name="date_picker_increment_year_button">"Év értékének növelése"</string>
+ <string name="date_time_done">"Kész"</string>
+ <string name="date_time_set">"Beállítás"</string>
+ <string name="loading">"Betöltés..."</string>
+ <string name="noApplications">"Egy alkalmazás sem tudja végrehajtani ezt a műveletet."</string>
+ <string name="number_picker_decrement_button">"Csökkentés"</string>
+ <string name="number_picker_increment_button">"Növelés"</string>
+ <string name="number_picker_increment_scroll_action">"A növeléshez csúsztassa felfelé, a csökkentéshez pedig lefelé."</string>
+ <string name="number_picker_increment_scroll_mode">"%s érintse meg és tartsa lenyomva."</string>
+ <string name="ringtone_default">"Alapértelmezett csengőhang"</string>
+ <string name="ringtone_picker_title">"Csengőhangok"</string>
+ <string name="ringtone_silent">"Néma"</string>
+ <string name="time_picker_decrement_hour_button">"Óra értékének csökkentése"</string>
+ <string name="time_picker_decrement_minute_button">"Perc értékének csökkentése"</string>
+ <string name="time_picker_decrement_set_am_button">"Állítsa de. értékre"</string>
+ <string name="time_picker_dialog_title">"Idő beállítása"</string>
+ <string name="time_picker_increment_hour_button">"Óra értékének növelése"</string>
+ <string name="time_picker_increment_minute_button">"Perc értékének növelése"</string>
+ <string name="time_picker_increment_set_pm_button">"Állítsa du. értékre"</string>
+ <string name="whichApplication">"Művelet végrehajtása a következővel:"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-in/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-in/strings.xml
new file mode 100644
index 0000000000..688f985583
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-in/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Selalu"</string>
+ <string name="activity_resolver_use_once">"Hanya sekali"</string>
+ <string name="candidates_style">"calon"</string>
+ <string name="capital_off">"MATI"</string>
+ <string name="capital_on">"HIDUP"</string>
+ <string name="chooseActivity">"Pilih tindakan"</string>
+ <string name="date_picker_decrement_day_button">"Kurangi hari"</string>
+ <string name="date_picker_decrement_month_button">"Kurangi bulan"</string>
+ <string name="date_picker_decrement_year_button">"Kurangi tahun"</string>
+ <string name="date_picker_dialog_title">"Setel tanggal"</string>
+ <string name="date_picker_increment_day_button">"Tambah hari"</string>
+ <string name="date_picker_increment_month_button">"Tambah bulan"</string>
+ <string name="date_picker_increment_year_button">"Tambah tahun"</string>
+ <string name="date_time_done">"Selesai"</string>
+ <string name="date_time_set">"Setel"</string>
+ <string name="loading">"Memuat..."</string>
+ <string name="noApplications">"Tidak ada apl yang dapat melakukan tindakan ini."</string>
+ <string name="number_picker_decrement_button">"Kurangi"</string>
+ <string name="number_picker_increment_button">"Tambah"</string>
+ <string name="number_picker_increment_scroll_action">"Geser ke atas untuk menambah dan ke bawah untuk mengurangi."</string>
+ <string name="number_picker_increment_scroll_mode">"%s sentuh dan tahan."</string>
+ <string name="ringtone_default">"Nada dering default"</string>
+ <string name="ringtone_picker_title">"Nada dering"</string>
+ <string name="ringtone_silent">"Senyap"</string>
+ <string name="time_picker_decrement_hour_button">"Kurangi jam"</string>
+ <string name="time_picker_decrement_minute_button">"Kurangi menit"</string>
+ <string name="time_picker_decrement_set_am_button">"Setel AM"</string>
+ <string name="time_picker_dialog_title">"Setel waktu"</string>
+ <string name="time_picker_increment_hour_button">"Tambah jam"</string>
+ <string name="time_picker_increment_minute_button">"Tambah menit"</string>
+ <string name="time_picker_increment_set_pm_button">"Menyetel PM"</string>
+ <string name="whichApplication">"Tindakan lengkap menggunakan"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-it/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-it/strings.xml
new file mode 100644
index 0000000000..15753ea279
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-it/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Sempre"</string>
+ <string name="activity_resolver_use_once">"Solo una volta"</string>
+ <string name="candidates_style">"candidati"</string>
+ <string name="capital_off">"OFF"</string>
+ <string name="capital_on">"ON"</string>
+ <string name="chooseActivity">"Scegli un\'azione"</string>
+ <string name="date_picker_decrement_day_button">"Riduci giorno"</string>
+ <string name="date_picker_decrement_month_button">"Riduci mese"</string>
+ <string name="date_picker_decrement_year_button">"Riduci anno"</string>
+ <string name="date_picker_dialog_title">"Imposta data"</string>
+ <string name="date_picker_increment_day_button">"Aumenta giorno"</string>
+ <string name="date_picker_increment_month_button">"Aumenta mese"</string>
+ <string name="date_picker_increment_year_button">"Aumenta anno"</string>
+ <string name="date_time_done">"Fine"</string>
+ <string name="date_time_set">"Imposta"</string>
+ <string name="loading">"Caricamento..."</string>
+ <string name="noApplications">"Nessuna applicazione è in grado di eseguire questa azione."</string>
+ <string name="number_picker_decrement_button">"Riduci"</string>
+ <string name="number_picker_increment_button">"Aumenta"</string>
+ <string name="number_picker_increment_scroll_action">"Scorri verso l\'alto per aumentare il valore e verso il basso per diminuirlo."</string>
+ <string name="number_picker_increment_scroll_mode">"Tocca e tieni premuto il numero %s."</string>
+ <string name="ringtone_default">"Suoneria predefinita"</string>
+ <string name="ringtone_picker_title">"Suonerie"</string>
+ <string name="ringtone_silent">"Silenzioso"</string>
+ <string name="time_picker_decrement_hour_button">"Riduci ore"</string>
+ <string name="time_picker_decrement_minute_button">"Riduci minuti"</string>
+ <string name="time_picker_decrement_set_am_button">"Imposta AM"</string>
+ <string name="time_picker_dialog_title">"Imposta ora"</string>
+ <string name="time_picker_increment_hour_button">"Aumenta ore"</string>
+ <string name="time_picker_increment_minute_button">"Aumenta minuti"</string>
+ <string name="time_picker_increment_set_pm_button">"Imposta PM"</string>
+ <string name="whichApplication">"Completa l\'azione con"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-iw/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-iw/strings.xml
new file mode 100644
index 0000000000..59fc986317
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-iw/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"תמיד"</string>
+ <string name="activity_resolver_use_once">"רק פעם אחת"</string>
+ <string name="candidates_style">"מועמדים"</string>
+ <string name="capital_off">"כבוי"</string>
+ <string name="capital_on">"מופעל"</string>
+ <string name="chooseActivity">"בחירת פעולה"</string>
+ <string name="date_picker_decrement_day_button">"הפחת יום"</string>
+ <string name="date_picker_decrement_month_button">"הפחת חודש"</string>
+ <string name="date_picker_decrement_year_button">"הפחת שנה"</string>
+ <string name="date_picker_dialog_title">"הגדר תאריך"</string>
+ <string name="date_picker_increment_day_button">"הוסף יום"</string>
+ <string name="date_picker_increment_month_button">"הוסף חודש"</string>
+ <string name="date_picker_increment_year_button">"הוסף שנה"</string>
+ <string name="date_time_done">"בוצע"</string>
+ <string name="date_time_set">"הגדר"</string>
+ <string name="loading">"טוען..."</string>
+ <string name="noApplications">"אין יישומים שיכולים לבצע פעולה זו."</string>
+ <string name="number_picker_decrement_button">"הפחת"</string>
+ <string name="number_picker_increment_button">"הוסף"</string>
+ <string name="number_picker_increment_scroll_action">"הסט למעלה כדי להוסיף ולמטה כדי להפחית."</string>
+ <string name="number_picker_increment_scroll_mode">"%s גע והחזק."</string>
+ <string name="ringtone_default">"רינגטון ברירת מחדל"</string>
+ <string name="ringtone_picker_title">"רינגטונים"</string>
+ <string name="ringtone_silent">"שקט"</string>
+ <string name="time_picker_decrement_hour_button">"הפחת שעה"</string>
+ <string name="time_picker_decrement_minute_button">"הפחת דקה"</string>
+ <string name="time_picker_decrement_set_am_button">"הגדר AM"</string>
+ <string name="time_picker_dialog_title">"הגדרת שעה"</string>
+ <string name="time_picker_increment_hour_button">"הוסף שעה"</string>
+ <string name="time_picker_increment_minute_button">"הוסף דקה"</string>
+ <string name="time_picker_increment_set_pm_button">"הגדר PM"</string>
+ <string name="whichApplication">"השלמת פעולה באמצעות"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ja/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ja/strings.xml
new file mode 100644
index 0000000000..c351a34177
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ja/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"常時"</string>
+ <string name="activity_resolver_use_once">"1回のみ"</string>
+ <string name="candidates_style">"候補"</string>
+ <string name="capital_off">"OFF"</string>
+ <string name="capital_on">"ON"</string>
+ <string name="chooseActivity">"操作の選択"</string>
+ <string name="date_picker_decrement_day_button">"1日戻します"</string>
+ <string name="date_picker_decrement_month_button">"1か月戻します"</string>
+ <string name="date_picker_decrement_year_button">"1年戻します"</string>
+ <string name="date_picker_dialog_title">"日付設定"</string>
+ <string name="date_picker_increment_day_button">"1日進めます"</string>
+ <string name="date_picker_increment_month_button">"1か月進めます"</string>
+ <string name="date_picker_increment_year_button">"1年進めます"</string>
+ <string name="date_time_done">"完了"</string>
+ <string name="date_time_set">"設定"</string>
+ <string name="loading">"読み込んでいます..."</string>
+ <string name="noApplications">"この操作を実行できるアプリはありません。"</string>
+ <string name="number_picker_decrement_button">"戻します"</string>
+ <string name="number_picker_increment_button">"進めます"</string>
+ <string name="number_picker_increment_scroll_action">"上にスライドで進み、下にスライドで戻ります。"</string>
+ <string name="number_picker_increment_scroll_mode">"%s回タップして押し続けます。"</string>
+ <string name="ringtone_default">"プリセット着信音"</string>
+ <string name="ringtone_picker_title">"着信音"</string>
+ <string name="ringtone_silent">"サイレント"</string>
+ <string name="time_picker_decrement_hour_button">"1時間戻します"</string>
+ <string name="time_picker_decrement_minute_button">"1分戻します"</string>
+ <string name="time_picker_decrement_set_am_button">"午前に設定"</string>
+ <string name="time_picker_dialog_title">"時刻設定"</string>
+ <string name="time_picker_increment_hour_button">"1時間進めます"</string>
+ <string name="time_picker_increment_minute_button">"1分進めます"</string>
+ <string name="time_picker_increment_set_pm_button">"午後に設定"</string>
+ <string name="whichApplication">"アプリケーションを選択"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ko/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ko/strings.xml
new file mode 100644
index 0000000000..a37de4c65a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ko/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"항상"</string>
+ <string name="activity_resolver_use_once">"한 번만"</string>
+ <string name="candidates_style">"가능한 원인"</string>
+ <string name="capital_off">"OFF"</string>
+ <string name="capital_on">"ON"</string>
+ <string name="chooseActivity">"작업 선택"</string>
+ <string name="date_picker_decrement_day_button">"\'일\'을 줄입니다."</string>
+ <string name="date_picker_decrement_month_button">"\'월\'을 줄입니다."</string>
+ <string name="date_picker_decrement_year_button">"\'연도\'를 줄입니다."</string>
+ <string name="date_picker_dialog_title">"날짜 설정"</string>
+ <string name="date_picker_increment_day_button">"\'일\'을 늘립니다."</string>
+ <string name="date_picker_increment_month_button">"\'월\'을 늘립니다."</string>
+ <string name="date_picker_increment_year_button">"\'연도\'를 늘립니다."</string>
+ <string name="date_time_done">"완료"</string>
+ <string name="date_time_set">"설정"</string>
+ <string name="loading">"로드 중.."</string>
+ <string name="noApplications">"작업을 수행할 수 있는 앱이 없습니다."</string>
+ <string name="number_picker_decrement_button">"줄이기"</string>
+ <string name="number_picker_increment_button">"늘리기"</string>
+ <string name="number_picker_increment_scroll_action">"늘리려면 위로 슬라이드하고 줄이려면 아래로 슬라이드합니다."</string>
+ <string name="number_picker_increment_scroll_mode">"%s 길게 터치하세요."</string>
+ <string name="ringtone_default">"기본 벨소리"</string>
+ <string name="ringtone_picker_title">"벨소리"</string>
+ <string name="ringtone_silent">"무음"</string>
+ <string name="time_picker_decrement_hour_button">"\'시간\'을 줄입니다."</string>
+ <string name="time_picker_decrement_minute_button">"\'분\'을 줄입니다."</string>
+ <string name="time_picker_decrement_set_am_button">"AM 설정"</string>
+ <string name="time_picker_dialog_title">"시간 설정"</string>
+ <string name="time_picker_increment_hour_button">"\'시간\'을 늘립니다."</string>
+ <string name="time_picker_increment_minute_button">"\'분\'을 늘립니다."</string>
+ <string name="time_picker_increment_set_pm_button">"PM 설정"</string>
+ <string name="whichApplication">"작업을 수행할 때 사용하는 애플리케이션"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-large/config.xml b/android/3rd_party/HoloEverywhere/library/res/values-large/config.xml
new file mode 100644
index 0000000000..b5c168bcc4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-large/config.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <dimen name="config_prefDialogWidth">440dp</dimen>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-large/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values-large/dimens.xml
new file mode 100644
index 0000000000..2b1f13865f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-large/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <item name="dialog_min_width_major" type="dimen">55%</item>
+ <item name="dialog_min_width_minor" type="dimen">80%</item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-large/themes.xml b/android/3rd_party/HoloEverywhere/library/res/values-large/themes.xml
new file mode 100644
index 0000000000..fade8b5e81
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-large/themes.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.Theme.DialogWhenLarge" parent="Holo.Theme.Dialog.FixedSize"/>
+ <style name="Holo.Theme.DialogWhenLarge.Light" parent="Holo.Theme.Dialog.Light.FixedSize"/>
+ <style name="Holo.Theme.DialogWhenLarge.Light.DarkActionBar"/>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-lt/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-lt/strings.xml
new file mode 100644
index 0000000000..8a3f3ff51e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-lt/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Visada"</string>
+ <string name="activity_resolver_use_once">"Tik kartą"</string>
+ <string name="candidates_style">"kandidatai"</string>
+ <string name="capital_off">"IŠJ."</string>
+ <string name="capital_on">"ĮJ."</string>
+ <string name="chooseActivity">"Pasirinkti veiksmą"</string>
+ <string name="date_picker_decrement_day_button">"Sumažinti dienų skaičių"</string>
+ <string name="date_picker_decrement_month_button">"Sumažinti mėnesių skaičių"</string>
+ <string name="date_picker_decrement_year_button">"Sumažinti metų skaičių"</string>
+ <string name="date_picker_dialog_title">"Nustatyti datą"</string>
+ <string name="date_picker_increment_day_button">"Padidinti dienų skaičių"</string>
+ <string name="date_picker_increment_month_button">"Padidinti mėnesių skaičių"</string>
+ <string name="date_picker_increment_year_button">"Padidinti metų skaičių"</string>
+ <string name="date_time_done">"Baigta"</string>
+ <string name="date_time_set">"Nustatyti"</string>
+ <string name="loading">"Įkeliama..."</string>
+ <string name="noApplications">"Jokios programos negali atlikti šio veiksmo."</string>
+ <string name="number_picker_decrement_button">"Sumažinti"</string>
+ <string name="number_picker_increment_button">"Padidinti"</string>
+ <string name="number_picker_increment_scroll_action">"Slinkite aukštyn, kad padidintumėte, ir žemyn, kad sumažintumėte."</string>
+ <string name="number_picker_increment_scroll_mode">"Palieskite %s ir laikykite."</string>
+ <string name="ringtone_default">"Numatytasis skambėjimo tonas"</string>
+ <string name="ringtone_picker_title">"Skambėjimo tonai"</string>
+ <string name="ringtone_silent">"Tylus"</string>
+ <string name="time_picker_decrement_hour_button">"Sumažinti valandų skaičių"</string>
+ <string name="time_picker_decrement_minute_button">"Sumažinti minučių skaičių"</string>
+ <string name="time_picker_decrement_set_am_button">"Nustatyti prieš pusiaudienį"</string>
+ <string name="time_picker_dialog_title">"Nustatyti laiką"</string>
+ <string name="time_picker_increment_hour_button">"Padidinti valandų skaičių"</string>
+ <string name="time_picker_increment_minute_button">"Padidinti minučių skaičių"</string>
+ <string name="time_picker_increment_set_pm_button">"Nustatyti po pusiaudienio"</string>
+ <string name="whichApplication">"Užbaigti veiksmą naudojant"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-lv/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-lv/strings.xml
new file mode 100644
index 0000000000..58f88f0292
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-lv/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Vienmēr"</string>
+ <string name="activity_resolver_use_once">"Tikai vienreiz"</string>
+ <string name="candidates_style">"kandidāti"</string>
+ <string name="capital_off">"IZSLĒGT"</string>
+ <string name="capital_on">"IESLĒGT"</string>
+ <string name="chooseActivity">"Darbības izvēle"</string>
+ <string name="date_picker_decrement_day_button">"Norādīt agrāku dienu"</string>
+ <string name="date_picker_decrement_month_button">"Norādīt agrāku mēnesi"</string>
+ <string name="date_picker_decrement_year_button">"Norādīt agrāku gadu"</string>
+ <string name="date_picker_dialog_title">"Datuma iestatīšana"</string>
+ <string name="date_picker_increment_day_button">"Norādīt vēlāku dienu"</string>
+ <string name="date_picker_increment_month_button">"Norādīt vēlāku mēnesi"</string>
+ <string name="date_picker_increment_year_button">"Norādīt vēlāku gadu"</string>
+ <string name="date_time_done">"Gatavs"</string>
+ <string name="date_time_set">"Iestatīt"</string>
+ <string name="loading">"Notiek ielāde..."</string>
+ <string name="noApplications">"Šo darbību nevar veikt neviena lietotne."</string>
+ <string name="number_picker_decrement_button">"Samazināt"</string>
+ <string name="number_picker_increment_button">"Palielināt"</string>
+ <string name="number_picker_increment_scroll_action">"Velciet uz augšu, lai palielinātu vērtību, un uz leju, lai to samazinātu."</string>
+ <string name="number_picker_increment_scroll_mode">"%s: pieskarieties un turiet nospiestu."</string>
+ <string name="ringtone_default">"Noklusējuma zvana signāls"</string>
+ <string name="ringtone_picker_title">"Zvana signāli"</string>
+ <string name="ringtone_silent">"Klusums"</string>
+ <string name="time_picker_decrement_hour_button">"Norādīt agrāku stundu"</string>
+ <string name="time_picker_decrement_minute_button">"Norādīt agrākas minūtes"</string>
+ <string name="time_picker_decrement_set_am_button">"Iestatīt priekšpusdienas laiku"</string>
+ <string name="time_picker_dialog_title">"Laika iestatīšana"</string>
+ <string name="time_picker_increment_hour_button">"Norādīt vēlāku stundu"</string>
+ <string name="time_picker_increment_minute_button">"Norādīt vēlākas minūtes"</string>
+ <string name="time_picker_increment_set_pm_button">"Iestatīt pēcpusdienas laiku"</string>
+ <string name="whichApplication">"Pabeigt darbību, izmantojot"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ms/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ms/strings.xml
new file mode 100644
index 0000000000..cd471ddc48
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ms/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Sentiasa"</string>
+ <string name="activity_resolver_use_once">"Hanya sekali"</string>
+ <string name="candidates_style">"calon"</string>
+ <string name="capital_off">"MATIKAN"</string>
+ <string name="capital_on">"HIDUP"</string>
+ <string name="chooseActivity">"Pilih tindakan"</string>
+ <string name="date_picker_decrement_day_button">"Kurangkan hari"</string>
+ <string name="date_picker_decrement_month_button">"Kurangkan bulan"</string>
+ <string name="date_picker_decrement_year_button">"Kurangkan tahun"</string>
+ <string name="date_picker_dialog_title">"Tetapkan tarikh"</string>
+ <string name="date_picker_increment_day_button">"Tingkatkan hari"</string>
+ <string name="date_picker_increment_month_button">"Tingkatkan bulan"</string>
+ <string name="date_picker_increment_year_button">"Tingkatkan tahun"</string>
+ <string name="date_time_done">"Selesai"</string>
+ <string name="date_time_set">"Tetapkan"</string>
+ <string name="loading">"Memuatkan…"</string>
+ <string name="noApplications">"Tiada apl yang boleh menjalankan tindakan ini."</string>
+ <string name="number_picker_decrement_button">"Kurangkan"</string>
+ <string name="number_picker_increment_button">"Tingkatkan"</string>
+ <string name="number_picker_increment_scroll_action">"Luncurkan ke atas untuk meningkatkan dan ke bawah untuk mengurangkan."</string>
+ <string name="number_picker_increment_scroll_mode">"%s sentuh terus."</string>
+ <string name="ringtone_default">"Nada dering lalai"</string>
+ <string name="ringtone_picker_title">"Nada dering"</string>
+ <string name="ringtone_silent">"Senyap"</string>
+ <string name="time_picker_decrement_hour_button">"Kurangkan jam"</string>
+ <string name="time_picker_decrement_minute_button">"Kurangkan minit"</string>
+ <string name="time_picker_decrement_set_am_button">"Tetapkan AM"</string>
+ <string name="time_picker_dialog_title">"Tetapkan masa"</string>
+ <string name="time_picker_increment_hour_button">"Tingkatkan jam"</string>
+ <string name="time_picker_increment_minute_button">"Tingkatkan minit"</string>
+ <string name="time_picker_increment_set_pm_button">"Tetapkan PM"</string>
+ <string name="whichApplication">"Selesaikan tindakan menggunakan"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-nb/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-nb/strings.xml
new file mode 100644
index 0000000000..f5399f4c11
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-nb/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Alltid"</string>
+ <string name="activity_resolver_use_once">"Bare én gang"</string>
+ <string name="candidates_style">"TAG_FONT""kandidater""CLOSE_FONT"</string>
+ <string name="capital_off">"Av"</string>
+ <string name="capital_on">"På"</string>
+ <string name="chooseActivity">"Velg en handling"</string>
+ <string name="date_picker_decrement_day_button">"Reduser dager"</string>
+ <string name="date_picker_decrement_month_button">"Reduser måneder"</string>
+ <string name="date_picker_decrement_year_button">"Reduser år"</string>
+ <string name="date_picker_dialog_title">"Angi dato"</string>
+ <string name="date_picker_increment_day_button">"Øk dager"</string>
+ <string name="date_picker_increment_month_button">"Øk måneder"</string>
+ <string name="date_picker_increment_year_button">"Øk år"</string>
+ <string name="date_time_done">"Ferdig"</string>
+ <string name="date_time_set">"Lagre"</string>
+ <string name="loading">"Laster inn …"</string>
+ <string name="noApplications">"Ingen apper kan gjøre dette."</string>
+ <string name="number_picker_decrement_button">"Reduser"</string>
+ <string name="number_picker_increment_button">"Øk"</string>
+ <string name="number_picker_increment_scroll_action">"Dra opp for å øke og ned for å redusere."</string>
+ <string name="number_picker_increment_scroll_mode">"%s – trykk og hold inne."</string>
+ <string name="ringtone_default">"Standard ringetone"</string>
+ <string name="ringtone_picker_title">"Ringetoner"</string>
+ <string name="ringtone_silent">"Stille"</string>
+ <string name="time_picker_decrement_hour_button">"Reduser timer"</string>
+ <string name="time_picker_decrement_minute_button">"Reduser minutter"</string>
+ <string name="time_picker_decrement_set_am_button">"Angi a.m."</string>
+ <string name="time_picker_dialog_title">"Stille klokken"</string>
+ <string name="time_picker_increment_hour_button">"Øk timer"</string>
+ <string name="time_picker_increment_minute_button">"Øk minutter"</string>
+ <string name="time_picker_increment_set_pm_button">"Angi p.m."</string>
+ <string name="whichApplication">"Fullfør med"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-nl/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-nl/strings.xml
new file mode 100644
index 0000000000..7eaaf4bf5f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-nl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Altijd"</string>
+ <string name="activity_resolver_use_once">"Eén keer"</string>
+ <string name="candidates_style">"kandidaten"</string>
+ <string name="capital_off">"UIT"</string>
+ <string name="capital_on">"AAN"</string>
+ <string name="chooseActivity">"Een actie selecteren"</string>
+ <string name="date_picker_decrement_day_button">"Lagere waarde voor dag"</string>
+ <string name="date_picker_decrement_month_button">"Lagere waarde voor maand"</string>
+ <string name="date_picker_decrement_year_button">"Lagere waarde voor jaar"</string>
+ <string name="date_picker_dialog_title">"Datum instellen"</string>
+ <string name="date_picker_increment_day_button">"Hogere waarde voor dag"</string>
+ <string name="date_picker_increment_month_button">"Hogere waarde voor maand"</string>
+ <string name="date_picker_increment_year_button">"Hogere waarde voor jaar"</string>
+ <string name="date_time_done">"Gereed"</string>
+ <string name="date_time_set">"Instellen"</string>
+ <string name="loading">"Laden..."</string>
+ <string name="noApplications">"Geen enkele app kan deze actie uitvoeren."</string>
+ <string name="number_picker_decrement_button">"Verlagen"</string>
+ <string name="number_picker_increment_button">"Verhogen"</string>
+ <string name="number_picker_increment_scroll_action">"Veeg omhoog om te verhogen en omlaag om te verlagen."</string>
+ <string name="number_picker_increment_scroll_mode">"%s blijven aanraken."</string>
+ <string name="ringtone_default">"Standaardbeltoon"</string>
+ <string name="ringtone_picker_title">"Beltonen"</string>
+ <string name="ringtone_silent">"Stil"</string>
+ <string name="time_picker_decrement_hour_button">"Lagere waarde voor uren"</string>
+ <string name="time_picker_decrement_minute_button">"Lagere waarde voor minuten"</string>
+ <string name="time_picker_decrement_set_am_button">"AM instellen"</string>
+ <string name="time_picker_dialog_title">"Tijd instellen"</string>
+ <string name="time_picker_increment_hour_button">"Hogere waarde voor uren"</string>
+ <string name="time_picker_increment_minute_button">"Hogere waarde voor minuten"</string>
+ <string name="time_picker_increment_set_pm_button">"PM instellen"</string>
+ <string name="whichApplication">"Actie voltooien met"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-pl/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-pl/strings.xml
new file mode 100644
index 0000000000..7842da68ee
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-pl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Zawsze"</string>
+ <string name="activity_resolver_use_once">"Tylko raz"</string>
+ <string name="candidates_style">"kandydaci"</string>
+ <string name="capital_off">"Wył."</string>
+ <string name="capital_on">"Wł."</string>
+ <string name="chooseActivity">"Wybierz czynność"</string>
+ <string name="date_picker_decrement_day_button">"Zmień dzień na wcześniejszy"</string>
+ <string name="date_picker_decrement_month_button">"Zmień miesiąc na wcześniejszy"</string>
+ <string name="date_picker_decrement_year_button">"Zmień rok na wcześniejszy"</string>
+ <string name="date_picker_dialog_title">"Ustaw datę"</string>
+ <string name="date_picker_increment_day_button">"Zmień dzień na późniejszy"</string>
+ <string name="date_picker_increment_month_button">"Zmień miesiąc na późniejszy"</string>
+ <string name="date_picker_increment_year_button">"Zmień rok na późniejszy"</string>
+ <string name="date_time_done">"Gotowe"</string>
+ <string name="date_time_set">"Ustaw"</string>
+ <string name="loading">"Wczytywanie…"</string>
+ <string name="noApplications">"Żadna z aplikacji nie może wykonać tej czynności."</string>
+ <string name="number_picker_decrement_button">"Zmniejsz"</string>
+ <string name="number_picker_increment_button">"Zwiększ"</string>
+ <string name="number_picker_increment_scroll_action">"Przesuń w górę, by zwiększyć, i w dół, by zmniejszyć."</string>
+ <string name="number_picker_increment_scroll_mode">"%s dotknij i przytrzymaj."</string>
+ <string name="ringtone_default">"Dzwonek domyślny"</string>
+ <string name="ringtone_picker_title">"Dzwonki"</string>
+ <string name="ringtone_silent">"Cichy"</string>
+ <string name="time_picker_decrement_hour_button">"Zmień godzinę na wcześniejszą"</string>
+ <string name="time_picker_decrement_minute_button">"Zmień minutę na wcześniejszą"</string>
+ <string name="time_picker_decrement_set_am_button">"Ustaw AM"</string>
+ <string name="time_picker_dialog_title">"Ustaw godzinę"</string>
+ <string name="time_picker_increment_hour_button">"Zmień godzinę na późniejszą"</string>
+ <string name="time_picker_increment_minute_button">"Zmień minutę na późniejszą"</string>
+ <string name="time_picker_increment_set_pm_button">"Ustaw PM"</string>
+ <string name="whichApplication">"Zakończ czynność przez..."</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-pt-rPT/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000000..54733c8236
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-pt-rPT/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Sempre"</string>
+ <string name="activity_resolver_use_once">"Apenas uma vez"</string>
+ <string name="candidates_style">"candidatos"</string>
+ <string name="capital_off">"Desactivar"</string>
+ <string name="capital_on">"Activado"</string>
+ <string name="chooseActivity">"Escolha uma ação"</string>
+ <string name="date_picker_decrement_day_button">"Diminuir dia"</string>
+ <string name="date_picker_decrement_month_button">"Diminuir mês"</string>
+ <string name="date_picker_decrement_year_button">"Diminuir ano"</string>
+ <string name="date_picker_dialog_title">"Definir data"</string>
+ <string name="date_picker_increment_day_button">"Aumentar o dia"</string>
+ <string name="date_picker_increment_month_button">"Aumentar mês"</string>
+ <string name="date_picker_increment_year_button">"Aumentar ano"</string>
+ <string name="date_time_done">"Concluído"</string>
+ <string name="date_time_set">"Definir"</string>
+ <string name="loading">"A carregar…"</string>
+ <string name="noApplications">"Nenhuma aplicação pode efetuar esta ação."</string>
+ <string name="number_picker_decrement_button">"Diminuir"</string>
+ <string name="number_picker_increment_button">"Aumentar"</string>
+ <string name="number_picker_increment_scroll_action">"Deslizar para cima para aumentar e para baixo para diminuir."</string>
+ <string name="number_picker_increment_scroll_mode">"Toque sem soltar em %s."</string>
+ <string name="ringtone_default">"Toque predefinido"</string>
+ <string name="ringtone_picker_title">"Toques"</string>
+ <string name="ringtone_silent">"Silencioso"</string>
+ <string name="time_picker_decrement_hour_button">"Diminuir hora"</string>
+ <string name="time_picker_decrement_minute_button">"Diminuir minutos"</string>
+ <string name="time_picker_decrement_set_am_button">"Definir AM"</string>
+ <string name="time_picker_dialog_title">"Definir hora"</string>
+ <string name="time_picker_increment_hour_button">"Aumentar horas"</string>
+ <string name="time_picker_increment_minute_button">"Aumentar minutos"</string>
+ <string name="time_picker_increment_set_pm_button">"Definir PM"</string>
+ <string name="whichApplication">"Concluir acção utilizando"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-pt/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-pt/strings.xml
new file mode 100644
index 0000000000..4386dc96af
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-pt/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Sempre"</string>
+ <string name="activity_resolver_use_once">"Só uma vez"</string>
+ <string name="candidates_style">"candidatos"</string>
+ <string name="capital_off">"DESL"</string>
+ <string name="capital_on">"LIG"</string>
+ <string name="chooseActivity">"Escolher uma ação"</string>
+ <string name="date_picker_decrement_day_button">"Diminuir dia"</string>
+ <string name="date_picker_decrement_month_button">"Diminuir mês"</string>
+ <string name="date_picker_decrement_year_button">"Diminuir ano"</string>
+ <string name="date_picker_dialog_title">"Definir data"</string>
+ <string name="date_picker_increment_day_button">"Aumentar dia"</string>
+ <string name="date_picker_increment_month_button">"Aumentar mês"</string>
+ <string name="date_picker_increment_year_button">"Aumentar ano"</string>
+ <string name="date_time_done">"Concluído"</string>
+ <string name="date_time_set">"Definir"</string>
+ <string name="loading">"Carregando…"</string>
+ <string name="noApplications">"Nenhum aplicativo pode realizar esta ação."</string>
+ <string name="number_picker_decrement_button">"Diminuir"</string>
+ <string name="number_picker_increment_button">"Aumentar"</string>
+ <string name="number_picker_increment_scroll_action">"Deslize para cima para aumentar e para baixo para diminuir."</string>
+ <string name="number_picker_increment_scroll_mode">"%s toque e mantenha pressionado."</string>
+ <string name="ringtone_default">"Toque padrão"</string>
+ <string name="ringtone_picker_title">"Toques"</string>
+ <string name="ringtone_silent">"Silencioso"</string>
+ <string name="time_picker_decrement_hour_button">"Diminuir hora"</string>
+ <string name="time_picker_decrement_minute_button">"Diminuir minuto"</string>
+ <string name="time_picker_decrement_set_am_button">"Configurar valor AM"</string>
+ <string name="time_picker_dialog_title">"Definir hora"</string>
+ <string name="time_picker_increment_hour_button">"Aumentar hora"</string>
+ <string name="time_picker_increment_minute_button">"Aumentar minuto"</string>
+ <string name="time_picker_increment_set_pm_button">"Configurar valor PM"</string>
+ <string name="whichApplication">"Complete a ação usando"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-rm/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-rm/strings.xml
new file mode 100644
index 0000000000..8c5de3311e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-rm/strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="candidates_style">"candidats"</string>
+ <string name="capital_off">"DEACTIVÀ"</string>
+ <string name="capital_on">"ACTIVÀ"</string>
+ <string name="date_time_set">"Definir"</string>
+ <string name="ringtone_default">"Tun da scalin predefinì"</string>
+ <string name="ringtone_picker_title">"Tuns da scalin"</string>
+ <string name="ringtone_silent">"Silenzius"</string>
+ <string name="whichApplication">"Cumplettar l\'acziun cun"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ro/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ro/strings.xml
new file mode 100644
index 0000000000..1c4e7d61d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ro/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Întotdeauna"</string>
+ <string name="activity_resolver_use_once">"Numai o dată"</string>
+ <string name="candidates_style">"candidaţi"</string>
+ <string name="capital_off">"DEZACTIVAT"</string>
+ <string name="capital_on">"ACTIVAT"</string>
+ <string name="chooseActivity">"Alegeţi o acţiune"</string>
+ <string name="date_picker_decrement_day_button">"Reduceţi valoarea pentru zi"</string>
+ <string name="date_picker_decrement_month_button">"Reduceţi valoarea pentru lună"</string>
+ <string name="date_picker_decrement_year_button">"Reduceţi valoarea pentru an"</string>
+ <string name="date_picker_dialog_title">"Setaţi data"</string>
+ <string name="date_picker_increment_day_button">"Creşteţi valoarea pentru zi"</string>
+ <string name="date_picker_increment_month_button">"Creşteţi valoarea pentru lună"</string>
+ <string name="date_picker_increment_year_button">"Creşteţi valoarea pentru an"</string>
+ <string name="date_time_done">"Terminat"</string>
+ <string name="date_time_set">"Setaţi"</string>
+ <string name="loading">"Se încarcă…"</string>
+ <string name="noApplications">"Această acţiune nu poate fi efectuată de nicio aplicaţie."</string>
+ <string name="number_picker_decrement_button">"Reduceţi"</string>
+ <string name="number_picker_increment_button">"Creşteţi"</string>
+ <string name="number_picker_increment_scroll_action">"Glisaţi în sus pentru a creşte şi în jos pentru a reduce."</string>
+ <string name="number_picker_increment_scroll_mode">"Atingeţi şi ţineţi apăsat %s."</string>
+ <string name="ringtone_default">"Ton de apel prestabilit"</string>
+ <string name="ringtone_picker_title">"Tonuri de apel"</string>
+ <string name="ringtone_silent">"Silenţios"</string>
+ <string name="time_picker_decrement_hour_button">"Reduceţi valoarea pentru oră"</string>
+ <string name="time_picker_decrement_minute_button">"Reduceţi valoarea pentru minute"</string>
+ <string name="time_picker_decrement_set_am_button">"Setaţi valoarea AM"</string>
+ <string name="time_picker_dialog_title">"Setaţi ora"</string>
+ <string name="time_picker_increment_hour_button">"Creşteţi valoarea pentru oră"</string>
+ <string name="time_picker_increment_minute_button">"Creşteţi valoarea pentru minute"</string>
+ <string name="time_picker_increment_set_pm_button">"Setaţi valoarea PM"</string>
+ <string name="whichApplication">"Finalizare acţiune utilizând"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-ru/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-ru/strings.xml
new file mode 100644
index 0000000000..526bb10c11
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-ru/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Всегда"</string>
+ <string name="activity_resolver_use_once">"Только сейчас"</string>
+ <string name="candidates_style">"варианты"</string>
+ <string name="capital_off">"ВЫКЛ"</string>
+ <string name="capital_on">"ВКЛ"</string>
+ <string name="chooseActivity">"Выберите действие"</string>
+ <string name="date_picker_decrement_day_button">"На день назад"</string>
+ <string name="date_picker_decrement_month_button">"На месяц назад"</string>
+ <string name="date_picker_decrement_year_button">"На год назад"</string>
+ <string name="date_picker_dialog_title">"Настройка даты"</string>
+ <string name="date_picker_increment_day_button">"На день вперед"</string>
+ <string name="date_picker_increment_month_button">"На месяц вперед"</string>
+ <string name="date_picker_increment_year_button">"На год вперед"</string>
+ <string name="date_time_done">"Готово"</string>
+ <string name="date_time_set">"Установить"</string>
+ <string name="loading">"Загрузка…"</string>
+ <string name="noApplications">"Действие не поддерживается ни в одном приложении."</string>
+ <string name="number_picker_decrement_button">"Уменьшить"</string>
+ <string name="number_picker_increment_button">"Увеличить"</string>
+ <string name="number_picker_increment_scroll_action">"Проведите вверх, чтобы увеличить значение, и вниз, чтобы уменьшить его."</string>
+ <string name="number_picker_increment_scroll_mode">"Нажмите и удерживайте %s."</string>
+ <string name="ringtone_default">"Мелодия по умолчанию"</string>
+ <string name="ringtone_picker_title">"Мелодии"</string>
+ <string name="ringtone_silent">"Без звука"</string>
+ <string name="time_picker_decrement_hour_button">"На час назад"</string>
+ <string name="time_picker_decrement_minute_button">"На минуту назад"</string>
+ <string name="time_picker_decrement_set_am_button">"Установить время до полудня"</string>
+ <string name="time_picker_dialog_title">"Настройка времени"</string>
+ <string name="time_picker_increment_hour_button">"На час вперед"</string>
+ <string name="time_picker_increment_minute_button">"На минуту вперед"</string>
+ <string name="time_picker_increment_set_pm_button">"Установить время после полудня"</string>
+ <string name="whichApplication">"Что использовать?"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sk/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-sk/strings.xml
new file mode 100644
index 0000000000..263f304f50
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Vždy"</string>
+ <string name="activity_resolver_use_once">"Len raz"</string>
+ <string name="candidates_style">"kandidáti"</string>
+ <string name="capital_off">"O"</string>
+ <string name="capital_on">"I"</string>
+ <string name="chooseActivity">"Zvoľte akciu"</string>
+ <string name="date_picker_decrement_day_button">"Ubrať deň"</string>
+ <string name="date_picker_decrement_month_button">"Ubrať mesiac"</string>
+ <string name="date_picker_decrement_year_button">"Ubrať rok"</string>
+ <string name="date_picker_dialog_title">"Nastaviť dátum"</string>
+ <string name="date_picker_increment_day_button">"Pridať deň"</string>
+ <string name="date_picker_increment_month_button">"Pridať mesiac"</string>
+ <string name="date_picker_increment_year_button">"Pridať rok"</string>
+ <string name="date_time_done">"Hotovo"</string>
+ <string name="date_time_set">"Nastaviť"</string>
+ <string name="loading">"Prebieha načítavanie..."</string>
+ <string name="noApplications">"Túto akciu nemôžu vykonávať žiadne aplikácie."</string>
+ <string name="number_picker_decrement_button">"Znížiť"</string>
+ <string name="number_picker_increment_button">"Zvýšiť"</string>
+ <string name="number_picker_increment_scroll_action">"Ak chcete hodnotu zvýšiť, prejdite prstom nahor. Ak chcete hodnotu znížiť, prejdite prstom nadol."</string>
+ <string name="number_picker_increment_scroll_mode">"Dotknite sa a podržte %s."</string>
+ <string name="ringtone_default">"Predvolený vyzváňací tón"</string>
+ <string name="ringtone_picker_title">"Vyzváňacie tóny"</string>
+ <string name="ringtone_silent">"Tichý"</string>
+ <string name="time_picker_decrement_hour_button">"Ubrať hodinu"</string>
+ <string name="time_picker_decrement_minute_button">"Ubrať minútu"</string>
+ <string name="time_picker_decrement_set_am_button">"Nastaviť čas dopoludnia"</string>
+ <string name="time_picker_dialog_title">"Nastaviť čas"</string>
+ <string name="time_picker_increment_hour_button">"Pridať hodinu"</string>
+ <string name="time_picker_increment_minute_button">"Pridať minútu"</string>
+ <string name="time_picker_increment_set_pm_button">"Nastaviť čas popoludní"</string>
+ <string name="whichApplication">"Dokončiť akciu pomocou aplikácie"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sl/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-sl/strings.xml
new file mode 100644
index 0000000000..1267d3ac6e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Vedno"</string>
+ <string name="activity_resolver_use_once">"Samo tokrat"</string>
+ <string name="candidates_style">"kandidati"</string>
+ <string name="capital_off">"IZKLOPLJENO"</string>
+ <string name="capital_on">"VKLOPLJENO"</string>
+ <string name="chooseActivity">"Izberite dejanje"</string>
+ <string name="date_picker_decrement_day_button">"Zmanjšanje vrednosti za dan"</string>
+ <string name="date_picker_decrement_month_button">"Zmanjšanje vrednosti za mesec"</string>
+ <string name="date_picker_decrement_year_button">"Zmanjšanje vrednosti za leto"</string>
+ <string name="date_picker_dialog_title">"Nastavi datum"</string>
+ <string name="date_picker_increment_day_button">"Povečanje vrednosti za dan"</string>
+ <string name="date_picker_increment_month_button">"Povečanje vrednosti za mesec"</string>
+ <string name="date_picker_increment_year_button">"Povečanje vrednosti za leto"</string>
+ <string name="date_time_done">"Končano"</string>
+ <string name="date_time_set">"Nastavi"</string>
+ <string name="loading">"Nalaganje …"</string>
+ <string name="noApplications">"Tega dejanja ne more izvesti noben program."</string>
+ <string name="number_picker_decrement_button">"Manj"</string>
+ <string name="number_picker_increment_button">"Več"</string>
+ <string name="number_picker_increment_scroll_action">"Povlecite navzgor za povečanje in navzdol za zmanjšanje."</string>
+ <string name="number_picker_increment_scroll_mode">"Dotaknite se vrednosti %s in jo pridržite."</string>
+ <string name="ringtone_default">"Privzeta melodija zvonjenja"</string>
+ <string name="ringtone_picker_title">"Melodije zvonjenja"</string>
+ <string name="ringtone_silent">"Tiho"</string>
+ <string name="time_picker_decrement_hour_button">"Zmanjšanje vrednosti za uro"</string>
+ <string name="time_picker_decrement_minute_button">"Zmanjšanje vrednosti za minuto"</string>
+ <string name="time_picker_decrement_set_am_button">"Nastavi AM"</string>
+ <string name="time_picker_dialog_title">"Nastavi uro"</string>
+ <string name="time_picker_increment_hour_button">"Povečanje vrednosti za uro"</string>
+ <string name="time_picker_increment_minute_button">"Povečanje vrednosti za minuto"</string>
+ <string name="time_picker_increment_set_pm_button">"Nastavi PM"</string>
+ <string name="whichApplication">"Dokončanje dejanja z"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sr/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-sr/strings.xml
new file mode 100644
index 0000000000..455544776f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Увек"</string>
+ <string name="activity_resolver_use_once">"Само једном"</string>
+ <string name="candidates_style">"кандидати"</string>
+ <string name="capital_off">"НЕ"</string>
+ <string name="capital_on">"ДА"</string>
+ <string name="chooseActivity">"Изаберите радњу"</string>
+ <string name="date_picker_decrement_day_button">"Смањивање дана"</string>
+ <string name="date_picker_decrement_month_button">"Смањивање месеца"</string>
+ <string name="date_picker_decrement_year_button">"Смањивање године"</string>
+ <string name="date_picker_dialog_title">"Подешавање датума"</string>
+ <string name="date_picker_increment_day_button">"Повећавање дана"</string>
+ <string name="date_picker_increment_month_button">"Повећавање месеца"</string>
+ <string name="date_picker_increment_year_button">"Повећавање године"</string>
+ <string name="date_time_done">"Готово"</string>
+ <string name="date_time_set">"Подеси"</string>
+ <string name="loading">"Учитавање…"</string>
+ <string name="noApplications">"Ниједна апликација не може да обавља ову радњу."</string>
+ <string name="number_picker_decrement_button">"Смањивање"</string>
+ <string name="number_picker_increment_button">"Повећавање"</string>
+ <string name="number_picker_increment_scroll_action">"Превуците нагоре да бисте повећали, а надоле да бисте смањили."</string>
+ <string name="number_picker_increment_scroll_mode">"%s додирните и задржите."</string>
+ <string name="ringtone_default">"Подразумевани звук звона"</string>
+ <string name="ringtone_picker_title">"Звукови звона"</string>
+ <string name="ringtone_silent">"Нечујно"</string>
+ <string name="time_picker_decrement_hour_button">"Смањивање сати"</string>
+ <string name="time_picker_decrement_minute_button">"Смањивање минута"</string>
+ <string name="time_picker_decrement_set_am_button">"Подеси пре подне"</string>
+ <string name="time_picker_dialog_title">"Подешавање времена"</string>
+ <string name="time_picker_increment_hour_button">"Повећавање сати"</string>
+ <string name="time_picker_increment_minute_button">"Повећавање минута"</string>
+ <string name="time_picker_increment_set_pm_button">"Подеси по подне"</string>
+ <string name="whichApplication">"Довршавање радње помоћу"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sv/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-sv/strings.xml
new file mode 100644
index 0000000000..58ed3c6ba7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sv/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Alltid"</string>
+ <string name="activity_resolver_use_once">"Bara en gång"</string>
+ <string name="candidates_style">"kandidater"</string>
+ <string name="capital_off">"AV"</string>
+ <string name="capital_on">"PÅ"</string>
+ <string name="chooseActivity">"Välj en åtgärd"</string>
+ <string name="date_picker_decrement_day_button">"Minska dagar"</string>
+ <string name="date_picker_decrement_month_button">"Minska månader"</string>
+ <string name="date_picker_decrement_year_button">"Minska år"</string>
+ <string name="date_picker_dialog_title">"Ange datum"</string>
+ <string name="date_picker_increment_day_button">"Öka dagar"</string>
+ <string name="date_picker_increment_month_button">"Öka månader"</string>
+ <string name="date_picker_increment_year_button">"Öka år"</string>
+ <string name="date_time_done">"Klar"</string>
+ <string name="date_time_set">"Ställ in"</string>
+ <string name="loading">"Läser in …"</string>
+ <string name="noApplications">"Inga appar kan utföra den här åtgärden."</string>
+ <string name="number_picker_decrement_button">"Minska"</string>
+ <string name="number_picker_increment_button">"Öka"</string>
+ <string name="number_picker_increment_scroll_action">"Dra uppåt för att öka och nedåt för att minska."</string>
+ <string name="number_picker_increment_scroll_mode">"%s tryck länge."</string>
+ <string name="ringtone_default">"Standardringsignal"</string>
+ <string name="ringtone_picker_title">"Ringsignaler"</string>
+ <string name="ringtone_silent">"Tyst"</string>
+ <string name="time_picker_decrement_hour_button">"Minska timmar"</string>
+ <string name="time_picker_decrement_minute_button">"Minska minuter"</string>
+ <string name="time_picker_decrement_set_am_button">"Ange fm"</string>
+ <string name="time_picker_dialog_title">"Ange tid"</string>
+ <string name="time_picker_increment_hour_button">"Öka timmar"</string>
+ <string name="time_picker_increment_minute_button">"Öka minuter"</string>
+ <string name="time_picker_increment_set_pm_button">"Ange em"</string>
+ <string name="whichApplication">"Slutför åtgärd genom att använda"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sw/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-sw/strings.xml
new file mode 100644
index 0000000000..46be307993
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sw/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Kila mara"</string>
+ <string name="activity_resolver_use_once">"Mara moja tu"</string>
+ <string name="candidates_style">"wagombeaji"</string>
+ <string name="capital_off">"ZIMA"</string>
+ <string name="capital_on">"Washa"</string>
+ <string name="chooseActivity">"Chagua kitendo"</string>
+ <string name="date_picker_decrement_day_button">"Punguza siku"</string>
+ <string name="date_picker_decrement_month_button">"Punguza mwezi"</string>
+ <string name="date_picker_decrement_year_button">"Punguza mwaka"</string>
+ <string name="date_picker_dialog_title">"Weka tarehe"</string>
+ <string name="date_picker_increment_day_button">"Ongeza siku"</string>
+ <string name="date_picker_increment_month_button">"Ongeza mwezi"</string>
+ <string name="date_picker_increment_year_button">"Ongeza mwaka"</string>
+ <string name="date_time_done">"Imekamilika"</string>
+ <string name="date_time_set">"Weka"</string>
+ <string name="loading">"Inapakia…"</string>
+ <string name="noApplications">"Hakuna programu zinazoweza kufanya tendo hili."</string>
+ <string name="number_picker_decrement_button">"Punguza"</string>
+ <string name="number_picker_increment_button">"Ongeza"</string>
+ <string name="number_picker_increment_scroll_action">"Sogeza juu ili uongeze na chini ili upunguze."</string>
+ <string name="number_picker_increment_scroll_mode">"%s gusa na ushikilie."</string>
+ <string name="ringtone_default">"Toni mlio chaguo-msingi"</string>
+ <string name="ringtone_picker_title">"Toni za mlio"</string>
+ <string name="ringtone_silent">"Kimya"</string>
+ <string name="time_picker_decrement_hour_button">"Punguza saa"</string>
+ <string name="time_picker_decrement_minute_button">"Punguza dakika"</string>
+ <string name="time_picker_decrement_set_am_button">"Seti AM"</string>
+ <string name="time_picker_dialog_title">"Weka muda"</string>
+ <string name="time_picker_increment_hour_button">"Ongeza saa"</string>
+ <string name="time_picker_increment_minute_button">"Ongeza dakika"</string>
+ <string name="time_picker_increment_set_pm_button">"Seti PM"</string>
+ <string name="whichApplication">"Kamilisha kitendo kwa kutumia"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/config.xml b/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/config.xml
new file mode 100644
index 0000000000..9ef16ae5fc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/config.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <integer name="config_maxResolverActivityColumns">3</integer>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000000..a30837744c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sw600dp/dimens.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <item name="dialog_fixed_width_major" type="dimen">60%</item>
+ <item name="dialog_fixed_width_minor" type="dimen">90%</item>
+ <item name="dialog_fixed_height_major" type="dimen">60%</item>
+ <item name="dialog_fixed_height_minor" type="dimen">90%</item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/config.xml b/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/config.xml
new file mode 100644
index 0000000000..84ae5f31e9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/config.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <integer name="config_maxResolverActivityColumns">4</integer>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/dimens.xml
new file mode 100644
index 0000000000..39b43afd3c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-sw720dp/dimens.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <item name="dialog_fixed_width_major" type="dimen">50%</item>
+ <item name="dialog_fixed_width_minor" type="dimen">70%</item>
+ <item name="dialog_fixed_height_major" type="dimen">60%</item>
+ <item name="dialog_fixed_height_minor" type="dimen">90%</item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-th/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-th/strings.xml
new file mode 100644
index 0000000000..b7667749db
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-th/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"ทุกครั้ง"</string>
+ <string name="activity_resolver_use_once">"เฉพาะครั้งนี้"</string>
+ <string name="candidates_style">"ตัวเลือก"</string>
+ <string name="capital_off">"ปิด"</string>
+ <string name="capital_on">"เปิด"</string>
+ <string name="chooseActivity">"เลือกการทำงาน"</string>
+ <string name="date_picker_decrement_day_button">"ลดวัน"</string>
+ <string name="date_picker_decrement_month_button">"ลดเดือน"</string>
+ <string name="date_picker_decrement_year_button">"ลดปี"</string>
+ <string name="date_picker_dialog_title">"ตั้งวันที่"</string>
+ <string name="date_picker_increment_day_button">"เพิ่มวัน"</string>
+ <string name="date_picker_increment_month_button">"เพิ่มเดือน"</string>
+ <string name="date_picker_increment_year_button">"เพิ่มปี"</string>
+ <string name="date_time_done">"เสร็จสิ้น"</string>
+ <string name="date_time_set">"ตั้งค่า"</string>
+ <string name="loading">"กำลังโหลด..."</string>
+ <string name="noApplications">"ไม่มีแอปพลิเคชันใดทำงานนี้ได้"</string>
+ <string name="number_picker_decrement_button">"ลด"</string>
+ <string name="number_picker_increment_button">"เพิ่ม"</string>
+ <string name="number_picker_increment_scroll_action">"เลื่อนขึ้นเพื่อเพิ่มและเลื่อนลงเพื่อลด"</string>
+ <string name="number_picker_increment_scroll_mode">"แตะ %s ค้างไว้"</string>
+ <string name="ringtone_default">"เสียงเรียกเข้าเริ่มต้น"</string>
+ <string name="ringtone_picker_title">"เสียงเรียกเข้า"</string>
+ <string name="ringtone_silent">"ปิดเสียง"</string>
+ <string name="time_picker_decrement_hour_button">"ลดชั่วโมง"</string>
+ <string name="time_picker_decrement_minute_button">"ลดนาที"</string>
+ <string name="time_picker_decrement_set_am_button">"ตั้งค่า AM"</string>
+ <string name="time_picker_dialog_title">"ตั้งเวลา"</string>
+ <string name="time_picker_increment_hour_button">"เพิ่มชั่วโมง"</string>
+ <string name="time_picker_increment_minute_button">"เพิ่มนาที"</string>
+ <string name="time_picker_increment_set_pm_button">"ตั้งค่า PM"</string>
+ <string name="whichApplication">"ทำงานให้เสร็จโดยใช้"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-tl/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-tl/strings.xml
new file mode 100644
index 0000000000..3b539ce87a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-tl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Palagi"</string>
+ <string name="activity_resolver_use_once">"Isang beses lang"</string>
+ <string name="candidates_style">"mga kandidato"</string>
+ <string name="capital_off">"I-OFF"</string>
+ <string name="capital_on">"I-ON"</string>
+ <string name="chooseActivity">"Pumili ng pagkilos"</string>
+ <string name="date_picker_decrement_day_button">"Bawasan ang araw"</string>
+ <string name="date_picker_decrement_month_button">"Bawasan ang buwan"</string>
+ <string name="date_picker_decrement_year_button">"Bawasan ang taon"</string>
+ <string name="date_picker_dialog_title">"Itakda ang petsa"</string>
+ <string name="date_picker_increment_day_button">"Dagdagan ang araw"</string>
+ <string name="date_picker_increment_month_button">"Dagdagan ang buwan"</string>
+ <string name="date_picker_increment_year_button">"Dagdagdan ang taon"</string>
+ <string name="date_time_done">"Tapos na"</string>
+ <string name="date_time_set">"Itakda"</string>
+ <string name="loading">"Naglo-load…"</string>
+ <string name="noApplications">"Walang apps ang makakapagsagawa ng pagkilos na ito."</string>
+ <string name="number_picker_decrement_button">"Bawasan"</string>
+ <string name="number_picker_increment_button">"Dagdagan"</string>
+ <string name="number_picker_increment_scroll_action">"Mag-slide pataas upang magdagdag at pababa upang magbawas."</string>
+ <string name="number_picker_increment_scroll_mode">"%s pindutin nang matagal."</string>
+ <string name="ringtone_default">"Default na ringtone"</string>
+ <string name="ringtone_picker_title">"Mga Ringtone"</string>
+ <string name="ringtone_silent">"Tahimik"</string>
+ <string name="time_picker_decrement_hour_button">"Bawasan ang oras"</string>
+ <string name="time_picker_decrement_minute_button">"Bawasan ang minuto"</string>
+ <string name="time_picker_decrement_set_am_button">"Itakda ang AM"</string>
+ <string name="time_picker_dialog_title">"Magtakda ng oras"</string>
+ <string name="time_picker_increment_hour_button">"Dagdagan ang oras"</string>
+ <string name="time_picker_increment_minute_button">"Dagdagan ang minuto"</string>
+ <string name="time_picker_increment_set_pm_button">"Itakda ang PM"</string>
+ <string name="whichApplication">"Kumpletuhin ang pagkilos gamit ang"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-tr/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-tr/strings.xml
new file mode 100644
index 0000000000..57c8ce3303
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-tr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Her zaman"</string>
+ <string name="activity_resolver_use_once">"Yalnızca bir defa"</string>
+ <string name="candidates_style">"adaylar"</string>
+ <string name="capital_off">"KAPALI"</string>
+ <string name="capital_on">"AÇIK"</string>
+ <string name="chooseActivity">"İşlem seçin"</string>
+ <string name="date_picker_decrement_day_button">"Günü azalt"</string>
+ <string name="date_picker_decrement_month_button">"Ayı azalt"</string>
+ <string name="date_picker_decrement_year_button">"Yılı azalt"</string>
+ <string name="date_picker_dialog_title">"Tarihi ayarlayın"</string>
+ <string name="date_picker_increment_day_button">"Günü artır"</string>
+ <string name="date_picker_increment_month_button">"Ayı artır"</string>
+ <string name="date_picker_increment_year_button">"Yılı artır"</string>
+ <string name="date_time_done">"Tamamlandı"</string>
+ <string name="date_time_set">"Ayarla"</string>
+ <string name="loading">"Yükleniyor..."</string>
+ <string name="noApplications">"Bu eylemi hiçbir uygulama gerçekleştiremez."</string>
+ <string name="number_picker_decrement_button">"Azalt"</string>
+ <string name="number_picker_increment_button">"Artır"</string>
+ <string name="number_picker_increment_scroll_action">"Artırmak için yukarı, azaltmak için aşağı kaydırın."</string>
+ <string name="number_picker_increment_scroll_mode">"%s rakamına dokunun ve basılı tutun."</string>
+ <string name="ringtone_default">"Varsayılan zil sesi"</string>
+ <string name="ringtone_picker_title">"Zil sesleri"</string>
+ <string name="ringtone_silent">"Sessiz"</string>
+ <string name="time_picker_decrement_hour_button">"Saati azalt"</string>
+ <string name="time_picker_decrement_minute_button">"Dakikayı azalt"</string>
+ <string name="time_picker_decrement_set_am_button">"ÖÖ değerini ayarla"</string>
+ <string name="time_picker_dialog_title">"Saati ayarlayın"</string>
+ <string name="time_picker_increment_hour_button">"Saati artır"</string>
+ <string name="time_picker_increment_minute_button">"Dakikayı artır"</string>
+ <string name="time_picker_increment_set_pm_button">"ÖS değerini ayarla"</string>
+ <string name="whichApplication">"İşlemi şunu kullanarak tamamla"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-uk/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-uk/strings.xml
new file mode 100644
index 0000000000..e09b6ba49d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-uk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Завжди"</string>
+ <string name="activity_resolver_use_once">"Лише цього разу"</string>
+ <string name="candidates_style">"кандидати"</string>
+ <string name="capital_off">"ВИМК"</string>
+ <string name="capital_on">"УВІМК"</string>
+ <string name="chooseActivity">"Виберіть дію"</string>
+ <string name="date_picker_decrement_day_button">"На день назад"</string>
+ <string name="date_picker_decrement_month_button">"На місяць назад"</string>
+ <string name="date_picker_decrement_year_button">"На рік назад"</string>
+ <string name="date_picker_dialog_title">"Установити дату"</string>
+ <string name="date_picker_increment_day_button">"На день уперед"</string>
+ <string name="date_picker_increment_month_button">"На місяць уперед"</string>
+ <string name="date_picker_increment_year_button">"На рік уперед"</string>
+ <string name="date_time_done">"Готово"</string>
+ <string name="date_time_set">"Застосувати"</string>
+ <string name="loading">"Завантаження..."</string>
+ <string name="noApplications">"Жодна програма не може виконати цю дію."</string>
+ <string name="number_picker_decrement_button">"Зменшити"</string>
+ <string name="number_picker_increment_button">"Збільшити"</string>
+ <string name="number_picker_increment_scroll_action">"Проведіть пальцем угору, щоб збільшити, і вниз, щоб зменшити."</string>
+ <string name="number_picker_increment_scroll_mode">"%s – торкніться й утримуйте."</string>
+ <string name="ringtone_default">"Мелодія за умовч."</string>
+ <string name="ringtone_picker_title">"Мелодії"</string>
+ <string name="ringtone_silent">"Без звуку"</string>
+ <string name="time_picker_decrement_hour_button">"На годину назад"</string>
+ <string name="time_picker_decrement_minute_button">"На хвилину назад"</string>
+ <string name="time_picker_decrement_set_am_button">"Установити час \"дп\""</string>
+ <string name="time_picker_dialog_title">"Установити час"</string>
+ <string name="time_picker_increment_hour_button">"На годину вперед"</string>
+ <string name="time_picker_increment_minute_button">"На хвилину вперед"</string>
+ <string name="time_picker_increment_set_pm_button">"Установити час \"пп\""</string>
+ <string name="whichApplication">"Завершити дію за доп."</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-v11/themes.xml b/android/3rd_party/HoloEverywhere/library/res/values-v11/themes.xml
new file mode 100644
index 0000000000..5517cd6e8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-v11/themes.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.Theme" parent="Holo.Base.Theme">
+ <!--Include block: HoloDark-->
+ <!--Include block: Holo-->
+ <item name="android:activatedBackgroundIndicator">?activatedBackgroundIndicator</item>
+ <item name="android:dialogTheme">?dialogTheme</item>
+ <item name="android:dividerHorizontal">?dividerHorizontal</item>
+ <item name="android:dividerVertical">?dividerVertical</item>
+ <item name="android:textAppearanceLargePopupMenu">?textAppearanceLargePopupMenu</item>
+ <item name="android:textAppearanceSmallPopupMenu">?textAppearanceSmallPopupMenu</item>
+ <item name="android:windowMinWidthMajor">?windowMinWidthMajor</item>
+ <item name="android:windowMinWidthMinor">?windowMinWidthMinor</item>
+ <!--End of block Holo-->
+ <!--End of block HoloDark-->
+ <!--Include block: HoloBarDark-->
+ <!--Include block: HoloBar-->
+ <!--End of block HoloBar-->
+ <!--End of block HoloBarDark-->
+ <item name="holoTheme">dark</item>
+ </style>
+ <style name="Holo.Theme.Light" parent="Holo.Base.Theme.Light">
+ <!--Include block: HoloLight-->
+ <!--Include block: Holo-->
+ <item name="android:activatedBackgroundIndicator">?activatedBackgroundIndicator</item>
+ <item name="android:dialogTheme">?dialogTheme</item>
+ <item name="android:dividerHorizontal">?dividerHorizontal</item>
+ <item name="android:dividerVertical">?dividerVertical</item>
+ <item name="android:textAppearanceLargePopupMenu">?textAppearanceLargePopupMenu</item>
+ <item name="android:textAppearanceSmallPopupMenu">?textAppearanceSmallPopupMenu</item>
+ <item name="android:windowMinWidthMajor">?windowMinWidthMajor</item>
+ <item name="android:windowMinWidthMinor">?windowMinWidthMinor</item>
+ <!--End of block Holo-->
+ <!--End of block HoloLight-->
+ <!--Include block: HoloBarLight-->
+ <!--Include block: HoloBar-->
+ <!--End of block HoloBar-->
+ <!--End of block HoloBarLight-->
+ <item name="holoTheme">light</item>
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar" parent="Holo.Base.Theme.Light.DarkActionBar">
+ <!--Include block: HoloLight-->
+ <!--Include block: Holo-->
+ <item name="android:activatedBackgroundIndicator">?activatedBackgroundIndicator</item>
+ <item name="android:dialogTheme">?dialogTheme</item>
+ <item name="android:dividerHorizontal">?dividerHorizontal</item>
+ <item name="android:dividerVertical">?dividerVertical</item>
+ <item name="android:textAppearanceLargePopupMenu">?textAppearanceLargePopupMenu</item>
+ <item name="android:textAppearanceSmallPopupMenu">?textAppearanceSmallPopupMenu</item>
+ <item name="android:windowMinWidthMajor">?windowMinWidthMajor</item>
+ <item name="android:windowMinWidthMinor">?windowMinWidthMinor</item>
+ <!--End of block Holo-->
+ <!--End of block HoloLight-->
+ <!--Include block: HoloBarDark-->
+ <!--Include block: HoloBar-->
+ <!--End of block HoloBar-->
+ <!--End of block HoloBarDark-->
+ <item name="holoTheme">mixed</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-vi/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-vi/strings.xml
new file mode 100644
index 0000000000..e7eed2dda1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-vi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Luôn chọn"</string>
+ <string name="activity_resolver_use_once">"Chỉ một lần"</string>
+ <string name="candidates_style">"ứng viên"</string>
+ <string name="capital_off">"TẮT"</string>
+ <string name="capital_on">"BẬT"</string>
+ <string name="chooseActivity">"Chọn một tác vụ"</string>
+ <string name="date_picker_decrement_day_button">"Giảm ngày"</string>
+ <string name="date_picker_decrement_month_button">"Giảm tháng"</string>
+ <string name="date_picker_decrement_year_button">"Giảm năm"</string>
+ <string name="date_picker_dialog_title">"Đặt ngày"</string>
+ <string name="date_picker_increment_day_button">"Tăng ngày"</string>
+ <string name="date_picker_increment_month_button">"Tăng tháng"</string>
+ <string name="date_picker_increment_year_button">"Tăng năm"</string>
+ <string name="date_time_done">"Xong"</string>
+ <string name="date_time_set">"Đặt"</string>
+ <string name="loading">"Đang tải…"</string>
+ <string name="noApplications">"Không ứng dụng nào có thể thực hiện tác vụ này."</string>
+ <string name="number_picker_decrement_button">"Giảm"</string>
+ <string name="number_picker_increment_button">"Tăng"</string>
+ <string name="number_picker_increment_scroll_action">"Trượt lên để tăng và trượt xuống để giảm."</string>
+ <string name="number_picker_increment_scroll_mode">"Chạm và giữ %s."</string>
+ <string name="ringtone_default">"Nhạc chuông mặc định"</string>
+ <string name="ringtone_picker_title">"Nhạc chuông"</string>
+ <string name="ringtone_silent">"Im lặng"</string>
+ <string name="time_picker_decrement_hour_button">"Giảm giờ"</string>
+ <string name="time_picker_decrement_minute_button">"Giảm phút"</string>
+ <string name="time_picker_decrement_set_am_button">"Đặt SA"</string>
+ <string name="time_picker_dialog_title">"Đặt giờ"</string>
+ <string name="time_picker_increment_hour_button">"Tăng giờ"</string>
+ <string name="time_picker_increment_minute_button">"Tăng phút"</string>
+ <string name="time_picker_increment_set_pm_button">"Đặt CH"</string>
+ <string name="whichApplication">"Hoàn tất tác vụ đang sử dụng"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-xlarge/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values-xlarge/dimens.xml
new file mode 100644
index 0000000000..ffbc252cc1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-xlarge/dimens.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <dimen name="config_prefDialogWidth">580dp</dimen>
+ <item name="dialog_min_width_major" type="dimen">45%</item>
+ <item name="dialog_min_width_minor" type="dimen">72%</item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-zh-rCN/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000000..ba8106dc5f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-zh-rCN/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"始终"</string>
+ <string name="activity_resolver_use_once">"仅此一次"</string>
+ <string name="candidates_style">"候选"</string>
+ <string name="capital_off">"关闭"</string>
+ <string name="capital_on">"打开"</string>
+ <string name="chooseActivity">"选择操作"</string>
+ <string name="date_picker_decrement_day_button">"减小日期值"</string>
+ <string name="date_picker_decrement_month_button">"减小月份值"</string>
+ <string name="date_picker_decrement_year_button">"减小年份值"</string>
+ <string name="date_picker_dialog_title">"设置日期"</string>
+ <string name="date_picker_increment_day_button">"增大日期值"</string>
+ <string name="date_picker_increment_month_button">"增大月份值"</string>
+ <string name="date_picker_increment_year_button">"增大年份值"</string>
+ <string name="date_time_done">"完成"</string>
+ <string name="date_time_set">"设置"</string>
+ <string name="loading">"正在加载..."</string>
+ <string name="noApplications">"没有应用可执行此操作。"</string>
+ <string name="number_picker_decrement_button">"减小"</string>
+ <string name="number_picker_increment_button">"增大"</string>
+ <string name="number_picker_increment_scroll_action">"向上滑动可增大数值,向下滑动可减小数值。"</string>
+ <string name="number_picker_increment_scroll_mode">"触摸 %s 次并按住。"</string>
+ <string name="ringtone_default">"默认铃声"</string>
+ <string name="ringtone_picker_title">"铃声"</string>
+ <string name="ringtone_silent">"静音"</string>
+ <string name="time_picker_decrement_hour_button">"减小小时值"</string>
+ <string name="time_picker_decrement_minute_button">"减小分钟值"</string>
+ <string name="time_picker_decrement_set_am_button">"设置上午时间"</string>
+ <string name="time_picker_dialog_title">"设置时间"</string>
+ <string name="time_picker_increment_hour_button">"增大小时值"</string>
+ <string name="time_picker_increment_minute_button">"增大分钟值"</string>
+ <string name="time_picker_increment_set_pm_button">"设置下午时间"</string>
+ <string name="whichApplication">"选择要使用的应用:"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-zh-rTW/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000000..e885572668
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-zh-rTW/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"一律採用"</string>
+ <string name="activity_resolver_use_once">"僅限一次"</string>
+ <string name="candidates_style">"待選項目"</string>
+ <string name="capital_off">"關閉"</string>
+ <string name="capital_on">"開啟"</string>
+ <string name="chooseActivity">"選擇一種動作"</string>
+ <string name="date_picker_decrement_day_button">"減少日數"</string>
+ <string name="date_picker_decrement_month_button">"減少月數"</string>
+ <string name="date_picker_decrement_year_button">"減少年數"</string>
+ <string name="date_picker_dialog_title">"日期設定"</string>
+ <string name="date_picker_increment_day_button">"增加日數"</string>
+ <string name="date_picker_increment_month_button">"增加月數"</string>
+ <string name="date_picker_increment_year_button">"增加年數"</string>
+ <string name="date_time_done">"完成"</string>
+ <string name="date_time_set">"設定"</string>
+ <string name="loading">"載入中..."</string>
+ <string name="noApplications">"沒有應用程式可執行這項操作。"</string>
+ <string name="number_picker_decrement_button">"減少"</string>
+ <string name="number_picker_increment_button">"增加"</string>
+ <string name="number_picker_increment_scroll_action">"向上滑動即可增加,向下滑動即可減少。"</string>
+ <string name="number_picker_increment_scroll_mode">"%s 輕觸並按住。"</string>
+ <string name="ringtone_default">"預設鈴聲"</string>
+ <string name="ringtone_picker_title">"鈴聲"</string>
+ <string name="ringtone_silent">"靜音"</string>
+ <string name="time_picker_decrement_hour_button">"減少小時數"</string>
+ <string name="time_picker_decrement_minute_button">"減少分鐘數"</string>
+ <string name="time_picker_decrement_set_am_button">"設定 AM 值"</string>
+ <string name="time_picker_dialog_title">"設定時間"</string>
+ <string name="time_picker_increment_hour_button">"增加小時數"</string>
+ <string name="time_picker_increment_minute_button">"增加分鐘數"</string>
+ <string name="time_picker_increment_set_pm_button">"設定 PM 值"</string>
+ <string name="whichApplication">"選擇要使用的應用程式"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values-zu/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values-zu/strings.xml
new file mode 100644
index 0000000000..651aefa0cd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values-zu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">"Njalo"</string>
+ <string name="activity_resolver_use_once">"Kanye nje"</string>
+ <string name="candidates_style">"abahlanganyeli"</string>
+ <string name="capital_off">"VALIWE"</string>
+ <string name="capital_on">"VULIWE"</string>
+ <string name="chooseActivity">"Khetha okufanele kwenziwe"</string>
+ <string name="date_picker_decrement_day_button">"Yehlisa usuku"</string>
+ <string name="date_picker_decrement_month_button">"Yehlisa inyanga"</string>
+ <string name="date_picker_decrement_year_button">"Yehlisa unyaka"</string>
+ <string name="date_picker_dialog_title">"Setha idethi"</string>
+ <string name="date_picker_increment_day_button">"Khulisa usuku"</string>
+ <string name="date_picker_increment_month_button">"Khulisa inyanga"</string>
+ <string name="date_picker_increment_year_button">"Khulisa unyaka"</string>
+ <string name="date_time_done">"Kwenziwe"</string>
+ <string name="date_time_set">"Hlela"</string>
+ <string name="loading">"Iyalayisha…"</string>
+ <string name="noApplications">"Azikho izinsiza ezingenza lokhu"</string>
+ <string name="number_picker_decrement_button">"Yehlisa"</string>
+ <string name="number_picker_increment_button">"Khulisa"</string>
+ <string name="number_picker_increment_scroll_action">"Shelelisela phezulu ukuze ungeze futhi phansi ukuze wehlise."</string>
+ <string name="number_picker_increment_scroll_mode">"%s thinta bese ucindezela."</string>
+ <string name="ringtone_default">"Iringithoni emisiwe"</string>
+ <string name="ringtone_picker_title">"Amaringithoni"</string>
+ <string name="ringtone_silent">"Thulile"</string>
+ <string name="time_picker_decrement_hour_button">"Yehlisa ihora"</string>
+ <string name="time_picker_decrement_minute_button">"Yehlisa iminithi"</string>
+ <string name="time_picker_decrement_set_am_button">"Setha Ekuseni"</string>
+ <string name="time_picker_dialog_title">"Hlela isikhathi"</string>
+ <string name="time_picker_increment_hour_button">"Khulisa ihora"</string>
+ <string name="time_picker_increment_minute_button">"Khulisa iminithi"</string>
+ <string name="time_picker_increment_set_pm_button">"Setha Ntambama"</string>
+ <string name="whichApplication">"Qedela isenzo usebenzisa"</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/attrs.xml b/android/3rd_party/HoloEverywhere/library/res/values/attrs.xml
new file mode 100644
index 0000000000..dcfd500f2a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/attrs.xml
@@ -0,0 +1,378 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <!--Start attrs definition block-->
+ <attr name="alertDialogCenterButtons" format="boolean"/>
+ <attr name="alertDialogStyle" format="reference"/>
+ <attr name="alertDialogTheme" format="reference"/>
+ <attr name="autoCompleteTextViewStyle" format="reference"/>
+ <attr name="borderlessButtonStyle" format="reference"/>
+ <attr name="bottomBright" format="reference|color"/>
+ <attr name="bottomDark" format="reference|color"/>
+ <attr name="bottomMedium" format="reference|color"/>
+ <attr name="buttonBarButtonStyle" format="reference"/>
+ <attr name="buttonBarStyle" format="reference"/>
+ <attr name="calendarViewShown" format="boolean"/>
+ <attr name="calendarViewStyle" format="reference"/>
+ <attr name="centerBright" format="reference|color"/>
+ <attr name="centerDark" format="reference|color"/>
+ <attr name="centerMedium" format="reference|color"/>
+ <attr name="datePickerStyle" format="reference"/>
+ <attr name="dateTextAppearance" format="reference"/>
+ <attr name="detailsElementBackground" format="reference"/>
+ <attr name="dialogItemBackground" format="reference|color"/>
+ <attr name="dialogItemTextAppearance" format="reference"/>
+ <attr name="dialogTheme" format="reference"/>
+ <attr name="disableChildrenWhenDisabled" format="boolean"/>
+ <attr name="dividerHorizontal" format="reference"/>
+ <attr name="dividerPadding" format="dimension"/>
+ <attr name="dropDownHorizontalOffset" format="dimension"/>
+ <attr name="dropDownVerticalOffset" format="dimension"/>
+ <attr name="endYear" format="integer"/>
+ <attr name="fastScrollOverlayPosition" format="enum">
+ <enum name="atThumb" value="1"/>
+ <enum name="floating" value="0"/>
+ </attr>
+ <attr name="fastScrollPreviewBackgroundLeft" format="reference"/>
+ <attr name="fastScrollPreviewBackgroundRight" format="reference"/>
+ <attr name="fastScrollTextColor" format="color"/>
+ <attr name="fastScrollThumbDrawable" format="reference"/>
+ <attr name="fastScrollTrackDrawable" format="reference"/>
+ <attr name="firstDayOfWeek" format="integer"/>
+ <attr name="flingable" format="boolean"/>
+ <attr name="focusedMonthDateColor" format="color|reference"/>
+ <attr name="forceShownState" format="boolean"/>
+ <attr name="fullBright" format="reference|color"/>
+ <attr name="fullDark" format="reference|color"/>
+ <attr name="gravity">
+ <flag name="bottom" value="0x50"/>
+ <flag name="center" value="0x11"/>
+ <flag name="center_horizontal" value="0x01"/>
+ <flag name="center_vertical" value="0x10"/>
+ <flag name="clip" value="0x88"/>
+ <flag name="clip_horizontal" value="0x08"/>
+ <flag name="clip_vertical" value="0x80"/>
+ <flag name="end" value="0x00800005"/>
+ <flag name="fill" value="0x77"/>
+ <flag name="fill_horizontal" value="0x07"/>
+ <flag name="fill_vertical" value="0x70"/>
+ <flag name="left" value="0x03"/>
+ <flag name="right" value="0x05"/>
+ <flag name="start" value="0x00800003"/>
+ <flag name="top" value="0x30"/>
+ </attr>
+ <attr name="holoTheme" format="enum">
+ <enum name="dark" value="1"/>
+ <enum name="invalid" value="0"/>
+ <enum name="light" value="2"/>
+ <enum name="mixed" value="3"/>
+ <enum name="preference" value="4"/>
+ </attr>
+ <attr name="horizontalProgressLayout" format="reference"/>
+ <attr name="layout" format="reference"/>
+ <attr name="listDividerAlertDialog" format="reference"/>
+ <attr name="listItemLayout" format="reference"/>
+ <attr name="listLayout" format="reference"/>
+ <attr name="listPreferredItemHeight" format="dimension"/>
+ <attr name="listPreferredItemHeightLarge" format="dimension"/>
+ <attr name="maxDate" format="reference|string"/>
+ <attr name="minDate" format="reference|string"/>
+ <attr name="multiChoiceItemLayout" format="reference"/>
+ <attr name="numberPickerDownButtonStyle" format="reference"/>
+ <attr name="numberPickerInputTextStyle" format="reference"/>
+ <attr name="numberPickerStyle" format="reference"/>
+ <attr name="numberPickerUpButtonStyle" format="reference"/>
+ <attr name="panelMenuListWidth" format="dimension"/>
+ <attr name="popupPromptView" format="reference"/>
+ <attr name="popupWindowStyle" format="reference"/>
+ <attr name="preferenceTheme" format="reference">
+ <enum name="dark" value="1"/>
+ <enum name="light" value="2"/>
+ <enum name="mixed" value="3"/>
+ </attr>
+ <attr name="progressLayout" format="reference"/>
+ <attr name="segmentedButtonStyle" format="reference"/>
+ <attr name="selectedDateVerticalBar" format="reference"/>
+ <attr name="selectedWeekBackgroundColor" format="color|reference"/>
+ <attr name="selectionDivider" format="reference"/>
+ <attr name="selectionDividerHeight" format="dimension"/>
+ <attr name="selectionDividersDistance" format="dimension"/>
+ <attr name="showDividers">
+ <flag name="all" value="7"/>
+ <flag name="beginning" value="1"/>
+ <flag name="end" value="4"/>
+ <flag name="middle" value="2"/>
+ <flag name="none" value="0"/>
+ </attr>
+ <attr name="showWeekNumber" format="boolean"/>
+ <attr name="shownWeekCount" format="integer"/>
+ <attr name="singleChoiceItemLayout" format="reference"/>
+ <attr name="solidColor" format="color|reference"/>
+ <attr name="spinnerMode" format="enum">
+ <enum name="dialog" value="0"/>
+ <enum name="dropdown" value="1"/>
+ </attr>
+ <attr name="spinnerStyle" format="reference"/>
+ <attr name="spinnersShown" format="boolean"/>
+ <attr name="startYear" format="integer"/>
+ <attr name="switchMinWidth" format="dimension"/>
+ <attr name="switchPadding" format="dimension"/>
+ <attr name="switchStyle" format="reference"/>
+ <attr name="switchStyleOld" format="reference"/>
+ <attr name="switchTextAppearance" format="reference"/>
+ <attr name="textAllCaps" format="boolean"/>
+ <attr name="textAppearanceListItem" format="reference"/>
+ <attr name="textColorAlertDialogListItem" format="reference"/>
+ <attr name="textOff" format="reference|string"/>
+ <attr name="textOn" format="reference|string"/>
+ <attr name="thumb" format="reference"/>
+ <attr name="thumbTextPadding" format="dimension"/>
+ <attr name="timePickerStyle" format="reference"/>
+ <attr name="toggleWhenClick" format="boolean"/>
+ <attr name="topBright" format="reference|color"/>
+ <attr name="topDark" format="reference|color"/>
+ <attr name="track" format="reference"/>
+ <attr name="unfocusedMonthDateColor" format="color|reference"/>
+ <attr name="virtualButtonPressedDrawable" format="reference"/>
+ <attr name="weekDayTextAppearance" format="reference"/>
+ <attr name="weekNumberColor" format="color|reference"/>
+ <attr name="weekSeparatorLineColor" format="color|reference"/>
+ <attr name="windowFixedHeightMajor" format="dimension|fraction"/>
+ <attr name="windowFixedHeightMinor" format="dimension|fraction"/>
+ <attr name="windowFixedWidthMajor" format="dimension|fraction"/>
+ <attr name="windowFixedWidthMinor" format="dimension|fraction"/>
+ <attr name="windowMinHeightMajor" format="dimension|fraction"/>
+ <attr name="windowMinHeightMinor" format="dimension|fraction"/>
+ <!--Start styleable definition block-->
+ <declare-styleable name="AbsSpinner">
+ <attr name="android:entries"/>
+ </declare-styleable>
+ <declare-styleable name="AlertDialog">
+ <attr name="bottomBright"/>
+ <attr name="bottomDark"/>
+ <attr name="bottomMedium"/>
+ <attr name="centerBright"/>
+ <attr name="centerDark"/>
+ <attr name="centerMedium"/>
+ <attr name="fullBright"/>
+ <attr name="fullDark"/>
+ <attr name="gravity"/>
+ <attr name="horizontalProgressLayout"/>
+ <attr name="layout"/>
+ <attr name="listItemLayout"/>
+ <attr name="listLayout"/>
+ <attr name="multiChoiceItemLayout"/>
+ <attr name="progressLayout"/>
+ <attr name="singleChoiceItemLayout"/>
+ <attr name="topBright"/>
+ <attr name="topDark"/>
+ </declare-styleable>
+ <declare-styleable name="AutoCompleteTextView">
+ <attr name="android:completionHint"/>
+ <attr name="android:completionHintView"/>
+ <attr name="android:completionThreshold"/>
+ <attr name="android:dropDownAnchor"/>
+ <attr name="android:dropDownHeight"/>
+ <attr name="android:dropDownSelector"/>
+ <attr name="android:dropDownWidth"/>
+ <attr name="android:entries"/>
+ <attr name="android:inputType"/>
+ <attr name="dropDownHorizontalOffset"/>
+ <attr name="dropDownVerticalOffset"/>
+ </declare-styleable>
+ <declare-styleable name="CalendarView">
+ <attr name="dateTextAppearance"/>
+ <attr name="firstDayOfWeek"/>
+ <attr name="focusedMonthDateColor"/>
+ <attr name="maxDate"/>
+ <attr name="minDate"/>
+ <attr name="selectedDateVerticalBar"/>
+ <attr name="selectedWeekBackgroundColor"/>
+ <attr name="showWeekNumber"/>
+ <attr name="shownWeekCount"/>
+ <attr name="unfocusedMonthDateColor"/>
+ <attr name="weekDayTextAppearance"/>
+ <attr name="weekNumberColor"/>
+ <attr name="weekSeparatorLineColor"/>
+ </declare-styleable>
+ <declare-styleable name="ColorDrawable">
+ <attr name="android:color"/>
+ </declare-styleable>
+ <declare-styleable name="DatePicker">
+ <attr name="calendarViewShown"/>
+ <attr name="endYear"/>
+ <attr name="forceShownState"/>
+ <attr name="layout"/>
+ <attr name="maxDate"/>
+ <attr name="minDate"/>
+ <attr name="spinnersShown"/>
+ <attr name="startYear"/>
+ </declare-styleable>
+ <declare-styleable name="Divider">
+ <attr name="android:orientation"/>
+ </declare-styleable>
+ <declare-styleable name="ExpandableListView">
+ <attr name="android:childDivider"/>
+ <attr name="android:childIndicator"/>
+ <attr name="android:childIndicatorLeft"/>
+ <attr name="android:childIndicatorRight"/>
+ <attr name="android:groupIndicator"/>
+ <attr name="android:indicatorLeft"/>
+ <attr name="android:indicatorRight"/>
+ </declare-styleable>
+ <declare-styleable name="FastScroll">
+ <attr name="fastScrollOverlayPosition"/>
+ <attr name="fastScrollPreviewBackgroundLeft"/>
+ <attr name="fastScrollPreviewBackgroundRight"/>
+ <attr name="fastScrollTextColor"/>
+ <attr name="fastScrollThumbDrawable"/>
+ <attr name="fastScrollTrackDrawable"/>
+ </declare-styleable>
+ <declare-styleable name="IconMenuView">
+ <attr name="android:maxItems"/>
+ <attr name="android:maxItemsPerRow"/>
+ <attr name="android:maxRows"/>
+ <attr name="android:moreIcon"/>
+ <attr name="android:rowHeight"/>
+ </declare-styleable>
+ <declare-styleable name="LayerDrawable">
+ <attr name="android:opacity"/>
+ </declare-styleable>
+ <declare-styleable name="LayerDrawableItem">
+ <attr name="android:bottom"/>
+ <attr name="android:drawable"/>
+ <attr name="android:id"/>
+ <attr name="android:left"/>
+ <attr name="android:right"/>
+ <attr name="android:top"/>
+ </declare-styleable>
+ <declare-styleable name="LinearLayout">
+ <attr name="android:baselineAligned"/>
+ <attr name="android:baselineAlignedChildIndex"/>
+ <attr name="android:divider"/>
+ <attr name="android:dividerPadding"/>
+ <attr name="android:gravity"/>
+ <attr name="android:measureWithLargestChild"/>
+ <attr name="android:orientation"/>
+ <attr name="android:showDividers"/>
+ <attr name="android:weightSum"/>
+ <attr name="dividerPadding"/>
+ <attr name="showDividers"/>
+ </declare-styleable>
+ <declare-styleable name="MenuView">
+ <attr name="android:headerBackground"/>
+ <attr name="android:horizontalDivider"/>
+ <attr name="android:itemIconDisabledAlpha"/>
+ <attr name="android:preserveIconSpacing"/>
+ <attr name="android:verticalDivider"/>
+ <attr name="android:windowAnimationStyle"/>
+ <attr name="dialogItemBackground"/>
+ <attr name="dialogItemTextAppearance"/>
+ </declare-styleable>
+ <declare-styleable name="NumberPicker">
+ <attr name="android:fadingEdgeLength"/>
+ <attr name="android:layout"/>
+ <attr name="android:maxHeight"/>
+ <attr name="android:maxWidth"/>
+ <attr name="android:minHeight"/>
+ <attr name="android:minWidth"/>
+ <attr name="android:orientation"/>
+ <attr name="flingable"/>
+ <attr name="selectionDivider"/>
+ <attr name="selectionDividerHeight"/>
+ <attr name="selectionDividersDistance"/>
+ <attr name="solidColor"/>
+ <attr name="virtualButtonPressedDrawable"/>
+ </declare-styleable>
+ <declare-styleable name="PopupWindow">
+ <attr name="android:popupAnimationStyle"/>
+ <attr name="android:popupBackground"/>
+ </declare-styleable>
+ <declare-styleable name="ProgressBar">
+ <attr name="android:indeterminate"/>
+ <attr name="android:indeterminateBehavior"/>
+ <attr name="android:indeterminateDrawable"/>
+ <attr name="android:indeterminateDuration"/>
+ <attr name="android:indeterminateOnly"/>
+ <attr name="android:interpolator"/>
+ <attr name="android:max"/>
+ <attr name="android:maxHeight"/>
+ <attr name="android:maxWidth"/>
+ <attr name="android:minHeight"/>
+ <attr name="android:minWidth"/>
+ <attr name="android:progress"/>
+ <attr name="android:progressDrawable"/>
+ <attr name="android:secondaryProgress"/>
+ </declare-styleable>
+ <declare-styleable name="RotateDrawable">
+ <attr name="android:drawable"/>
+ <attr name="android:fromDegrees"/>
+ <attr name="android:pivotX"/>
+ <attr name="android:pivotY"/>
+ <attr name="android:toDegrees"/>
+ <attr name="android:visible"/>
+ </declare-styleable>
+ <declare-styleable name="SeekBar">
+ <attr name="android:disabledAlpha"/>
+ <attr name="android:thumb"/>
+ <attr name="android:thumbOffset"/>
+ </declare-styleable>
+ <declare-styleable name="Spinner">
+ <attr name="android:dropDownSelector"/>
+ <attr name="android:dropDownWidth"/>
+ <attr name="android:gravity"/>
+ <attr name="android:popupBackground"/>
+ <attr name="android:prompt"/>
+ <attr name="disableChildrenWhenDisabled"/>
+ <attr name="dropDownHorizontalOffset"/>
+ <attr name="dropDownVerticalOffset"/>
+ <attr name="popupPromptView"/>
+ <attr name="spinnerMode"/>
+ </declare-styleable>
+ <declare-styleable name="StateListDrawable">
+ <attr name="android:constantSize"/>
+ <attr name="android:dither"/>
+ <attr name="android:enterFadeDuration"/>
+ <attr name="android:exitFadeDuration"/>
+ <attr name="android:variablePadding"/>
+ <attr name="android:visible"/>
+ </declare-styleable>
+ <declare-styleable name="Switch">
+ <attr name="switchMinWidth"/>
+ <attr name="switchPadding"/>
+ <attr name="switchTextAppearance"/>
+ <attr name="textOff"/>
+ <attr name="textOn"/>
+ <attr name="thumb"/>
+ <attr name="thumbTextPadding"/>
+ <attr name="toggleWhenClick"/>
+ <attr name="track"/>
+ </declare-styleable>
+ <declare-styleable name="TextAppearance">
+ <attr name="android:textAllCaps"/>
+ <attr name="android:textColor"/>
+ <attr name="android:textColorHighlight"/>
+ <attr name="android:textColorHint"/>
+ <attr name="android:textColorLink"/>
+ <attr name="android:textSize"/>
+ <attr name="android:textStyle"/>
+ <attr name="android:typeface"/>
+ </declare-styleable>
+ <declare-styleable name="TextView">
+ <attr name="android:text"/>
+ <attr name="android:textAllCaps"/>
+ <attr name="textAllCaps"/>
+ </declare-styleable>
+ <declare-styleable name="TimePicker">
+ <attr name="layout"/>
+ </declare-styleable>
+ <declare-styleable name="WindowSizes">
+ <attr name="windowFixedHeightMajor"/>
+ <attr name="windowFixedHeightMinor"/>
+ <attr name="windowFixedWidthMajor"/>
+ <attr name="windowFixedWidthMinor"/>
+ <attr name="windowMinHeightMajor"/>
+ <attr name="windowMinHeightMinor"/>
+ <attr name="windowMinWidthMajor"/>
+ <attr name="windowMinWidthMinor"/>
+ </declare-styleable>
+ <!--End of any blocks-->
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/colors.xml b/android/3rd_party/HoloEverywhere/library/res/values/colors.xml
new file mode 100644
index 0000000000..0f28d5f9cf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/colors.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+
+ <color name="holo_blue_light">#ff33b5e5</color>
+
+ <color name="holo_green_light">#ff99cc00</color>
+
+ <color name="holo_red_light">#ffff4444</color>
+
+ <color name="holo_blue_dark">#ff0099cc</color>
+
+ <color name="holo_green_dark">#ff669900</color>
+
+ <color name="holo_red_dark">#ffcc0000</color>
+
+ <color name="holo_purple">#ffaa66cc</color>
+
+ <color name="holo_orange_light">#ffffbb33</color>
+
+ <color name="holo_orange_dark">#ffff8800</color>
+
+ <color name="holo_blue_bright">#ff00ddff</color>
+ <color name="transparent">#00000000</color>
+ <color name="background_dark">#ff000000</color>
+ <color name="background_light">#ffffffff</color>
+ <color name="bright_foreground_dark">@color/background_light</color>
+ <color name="bright_foreground_light">@color/background_dark</color>
+ <color name="bright_foreground_dark_disabled">#80ffffff</color>
+ <color name="bright_foreground_light_disabled">#80000000</color>
+ <color name="bright_foreground_dark_inverse">@color/bright_foreground_light</color>
+ <color name="bright_foreground_light_inverse">@color/bright_foreground_dark</color>
+ <color name="dim_foreground_dark">#bebebe</color>
+ <color name="dim_foreground_dark_inverse">#323232</color>
+ <color name="background_holo_dark">#ff000000</color>
+ <color name="background_holo_light">#fff3f3f3</color>
+ <color name="bright_foreground_holo_dark">@color/background_holo_light</color>
+ <color name="bright_foreground_holo_light">@color/background_holo_dark</color>
+ <color name="bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
+ <color name="bright_foreground_disabled_holo_light">#ffb2b2b2</color>
+ <color name="bright_foreground_inverse_holo_dark">@color/bright_foreground_holo_light</color>
+ <color name="bright_foreground_inverse_holo_light">@color/bright_foreground_holo_dark</color>
+ <color name="dim_foreground_holo_dark">#bebebe</color>
+ <color name="dim_foreground_disabled_holo_dark">#80bebebe</color>
+ <color name="dim_foreground_inverse_holo_dark">#323232</color>
+ <color name="dim_foreground_inverse_disabled_holo_dark">#80323232</color>
+ <color name="dim_foreground_holo_light">#323232</color>
+ <color name="dim_foreground_disabled_holo_light">#80323232</color>
+ <color name="dim_foreground_inverse_holo_light">#bebebe</color>
+ <color name="dim_foreground_inverse_disabled_holo_light">#80bebebe</color>
+ <color name="hint_foreground_holo_dark">#808080</color>
+ <color name="hint_foreground_holo_light">#808080</color>
+ <color name="highlighted_text_holo_dark">#6633b5e5</color>
+ <color name="highlighted_text_holo_light">#6633b5e5</color>
+ <color name="link_text_holo_dark">#5c5cff</color>
+ <color name="link_text_holo_light">#0000ee</color>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/config.xml b/android/3rd_party/HoloEverywhere/library/res/values/config.xml
new file mode 100644
index 0000000000..65220108ef
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <integer name="config_activityShortDur">150</integer>
+ <integer name="config_activityDefaultDur">220</integer>
+ <integer name="config_shortAnimTime">200</integer>
+ <integer name="config_mediumAnimTime">400</integer>
+ <integer name="config_longAnimTime">500</integer>
+ <integer name="config_maxResolverActivityColumns">2</integer>
+ <dimen name="config_prefDialogWidth">320dp</dimen>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/dialogs.xml b/android/3rd_party/HoloEverywhere/library/res/values/dialogs.xml
new file mode 100644
index 0000000000..b5a66da954
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/dialogs.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.AlertDialog">
+ <item name="bottomBright">@drawable/dialog_bottom_holo_dark</item>
+ <item name="bottomDark">@drawable/dialog_bottom_holo_dark</item>
+ <item name="bottomMedium">@drawable/dialog_bottom_holo_dark</item>
+ <item name="centerBright">@drawable/dialog_middle_holo_dark</item>
+ <item name="centerDark">@drawable/dialog_middle_holo_dark</item>
+ <item name="centerMedium">@drawable/dialog_middle_holo_dark</item>
+ <item name="fullBright">@drawable/dialog_full_holo_dark</item>
+ <item name="fullDark">@drawable/dialog_full_holo_dark</item>
+ <item name="horizontalProgressLayout">@layout/alert_dialog_progress_holo</item>
+ <item name="layout">@layout/alert_dialog_holo</item>
+ <item name="listItemLayout">@layout/select_dialog_item_holo</item>
+ <item name="listLayout">@layout/select_dialog_holo</item>
+ <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_holo</item>
+ <item name="progressLayout">@layout/progress_dialog_holo</item>
+ <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_holo</item>
+ <item name="topBright">@drawable/dialog_top_holo_dark</item>
+ <item name="topDark">@drawable/dialog_top_holo_dark</item>
+ </style>
+ <style name="Holo.AlertDialog.Light">
+ <item name="bottomBright">@drawable/dialog_bottom_holo_light</item>
+ <item name="bottomDark">@drawable/dialog_bottom_holo_light</item>
+ <item name="bottomMedium">@drawable/dialog_bottom_holo_light</item>
+ <item name="centerBright">@drawable/dialog_middle_holo_light</item>
+ <item name="centerDark">@drawable/dialog_middle_holo_light</item>
+ <item name="centerMedium">@drawable/dialog_middle_holo_light</item>
+ <item name="fullBright">@drawable/dialog_full_holo_light</item>
+ <item name="fullDark">@drawable/dialog_full_holo_light</item>
+ <item name="topBright">@drawable/dialog_top_holo_light</item>
+ <item name="topDark">@drawable/dialog_top_holo_light</item>
+ </style>
+ <style name="Holo.Animation.Dialog">
+ <item name="android:windowEnterAnimation">@anim/dialog_enter</item>
+ <item name="android:windowExitAnimation">@anim/dialog_exit</item>
+ </style>
+ <style name="Holo.DialogWindowTitle">
+ <item name="android:maxLines">1</item>
+ <item name="android:scrollHorizontally">true</item>
+ <item name="android:textAppearance">@style/Holo.TextAppearance.DialogWindowTitle</item>
+ </style>
+ <style name="Holo.DialogWindowTitle.Light">
+ <item name="android:textAppearance">@style/Holo.TextAppearance.DialogWindowTitle.Light</item>
+ </style>
+ <style name="Holo.TextAppearance.DialogWindowTitle" parent="Holo.TextAppearance">
+ <item name="android:textColor">@color/holo_blue_light</item>
+ <item name="android:textSize">22sp</item>
+ </style>
+ <style name="Holo.TextAppearance.DialogWindowTitle.Light" parent="Holo.TextAppearance.Light">
+ <item name="android:textColor">@color/holo_blue_light</item>
+ <item name="android:textSize">22sp</item>
+ </style>
+ <style name="Holo.Theme.Dialog" parent="Holo.Theme">
+ <!--Include block: Dialog-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowActionModeOverlay">true</item>
+ <item name="android:windowAnimationStyle">@style/Holo.Animation.Dialog</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFrame">@null</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
+ <item name="borderlessButtonStyle">@style/Holo.Button.Borderless.Small</item>
+ <item name="buttonBarStyle">@style/Holo.ButtonBar.AlertDialog</item>
+ <item name="listPreferredItemPaddingLeft">16dip</item>
+ <item name="listPreferredItemPaddingRight">16dip</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowActionModeOverlay">true</item>
+ <item name="windowAnimationStyle">@style/Holo.Animation.Dialog</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="windowMinWidthMajor">@dimen/dialog_min_width_major</item>
+ <item name="windowMinWidthMinor">@dimen/dialog_min_width_minor</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block Dialog-->
+ <item name="android:windowBackground">@drawable/dialog_full_holo_dark</item>
+ <item name="android:windowTitleStyle">@style/Holo.DialogWindowTitle</item>
+ </style>
+ <style name="Holo.Theme.Dialog.Alert" parent="Holo.Theme.Dialog">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ </style>
+ <style name="Holo.Theme.Dialog.Alert.Light" parent="Holo.Theme.Dialog.Light">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ </style>
+ <style name="Holo.Theme.Dialog.FixedSize">
+ <!--Include block: FixedSize-->
+ <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
+ <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+ <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
+ <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
+ <!--End of block FixedSize-->
+ </style>
+ <style name="Holo.Theme.Dialog.Light" parent="Holo.Theme.Light">
+ <!--Include block: Dialog-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowActionModeOverlay">true</item>
+ <item name="android:windowAnimationStyle">@style/Holo.Animation.Dialog</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFrame">@null</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
+ <item name="borderlessButtonStyle">@style/Holo.Button.Borderless.Small</item>
+ <item name="buttonBarStyle">@style/Holo.ButtonBar.AlertDialog</item>
+ <item name="listPreferredItemPaddingLeft">16dip</item>
+ <item name="listPreferredItemPaddingRight">16dip</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowActionModeOverlay">true</item>
+ <item name="windowAnimationStyle">@style/Holo.Animation.Dialog</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="windowMinWidthMajor">@dimen/dialog_min_width_major</item>
+ <item name="windowMinWidthMinor">@dimen/dialog_min_width_minor</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block Dialog-->
+ <item name="android:windowBackground">@drawable/dialog_full_holo_light</item>
+ <item name="android:windowTitleStyle">@style/Holo.DialogWindowTitle.Light</item>
+ </style>
+ <style name="Holo.Theme.Dialog.Light.FixedSize">
+ <!--Include block: FixedSize-->
+ <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
+ <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+ <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
+ <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
+ <!--End of block FixedSize-->
+ </style>
+ <style name="Holo.Theme.Dialog.Light.NoFrame">
+ <!--Include block: NoFrame-->
+ <item name="android:backgroundDimEnabled">false</item>
+ <item name="android:windowAnimationStyle">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowCloseOnTouchOutside">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoFrame-->
+ </style>
+ <style name="Holo.Theme.Dialog.NoFrame">
+ <!--Include block: NoFrame-->
+ <item name="android:backgroundDimEnabled">false</item>
+ <item name="android:windowAnimationStyle">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowCloseOnTouchOutside">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoFrame-->
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/dimens.xml b/android/3rd_party/HoloEverywhere/library/res/values/dimens.xml
new file mode 100644
index 0000000000..ede0eecf34
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/dimens.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <dimen name="alert_dialog_title_height">64dip</dimen>
+ <dimen name="alert_dialog_button_bar_height">48dip</dimen>
+ <dimen name="fastscroll_thumb_width">64dp</dimen>
+ <dimen name="fastscroll_thumb_height">52dp</dimen>
+ <dimen name="fastscroll_overlay_size">104dp</dimen>
+ <item name="dialog_min_width_major" type="dimen">65%</item>
+ <item name="dialog_min_width_minor" type="dimen">95%</item>
+ <item name="dialog_fixed_width_major" type="dimen">320dp</item>
+ <item name="dialog_fixed_width_minor" type="dimen">320dp</item>
+ <item name="dialog_fixed_height_major" type="dimen">80%</item>
+ <item name="dialog_fixed_height_minor" type="dimen">100%</item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/ids.xml b/android/3rd_party/HoloEverywhere/library/res/values/ids.xml
new file mode 100644
index 0000000000..1151cfe049
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/ids.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><resources>
+ <item name="progress" type="id"></item>
+ <item name="secondaryProgress" type="id"></item>
+ <item name="edit" type="id"></item>
+ <item name="leftSpacer" type="id"></item>
+ <item name="rightSpacer" type="id"></item>
+ <item name="typeface" type="id"></item>
+ <item name="increment" type="id"></item>
+ <item name="decrement" type="id"></item>
+ <item name="empty" type="id"></item>
+</resources> \ No newline at end of file
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/strings.xml b/android/3rd_party/HoloEverywhere/library/res/values/strings.xml
new file mode 100644
index 0000000000..0c6d7b7dbf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/strings.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <string name="activity_resolver_use_always">Always</string>
+ <string name="activity_resolver_use_once">Just once</string>
+ <string name="candidates_style">candidates</string>
+ <string name="capital_off">OFF</string>
+ <string name="capital_on">ON</string>
+ <string name="chooseActivity">Choose an action</string>
+ <string name="date_picker_decrement_day_button">Decrease day</string>
+ <string name="date_picker_decrement_month_button">Decrease month</string>
+ <string name="date_picker_decrement_year_button">Decrease year</string>
+ <string name="date_picker_dialog_title">Set date</string>
+ <string name="date_picker_increment_day_button">Increase day</string>
+ <string name="date_picker_increment_month_button">Increase month</string>
+ <string name="date_picker_increment_year_button">Increase year</string>
+ <string name="date_time_done">Done</string>
+ <string name="date_time_set">Set</string>
+ <string name="loading">Loading\u2026</string>
+ <string name="noApplications">No apps can perform this action.</string>
+ <string name="number_picker_decrement_button">Decrease</string>
+ <string name="number_picker_increment_button">Increase</string>
+ <string name="number_picker_increment_scroll_action">Slide up to increase and down to decrease.</string>
+ <string name="number_picker_increment_scroll_mode">%s touch and hold.</string>
+ <string name="ringtone_default">Default ringtone</string>
+ <string name="ringtone_picker_title">Ringtones</string>
+ <string name="ringtone_silent">Silent</string>
+ <string name="time_picker_decrement_hour_button">Decrease hour</string>
+ <string name="time_picker_decrement_minute_button">Decrease minute</string>
+ <string name="time_picker_decrement_set_am_button">Set AM</string>
+ <string name="time_picker_dialog_title">Set time</string>
+ <string name="time_picker_increment_hour_button">Increase hour</string>
+ <string name="time_picker_increment_minute_button">Increase minute</string>
+ <string name="time_picker_increment_set_pm_button">Set PM</string>
+ <string name="time_picker_separator">:</string>
+ <string name="whichApplication">Complete action using</string>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/styles.xml b/android/3rd_party/HoloEverywhere/library/res/values/styles.xml
new file mode 100644
index 0000000000..b1a531accb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/styles.xml
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo"/>
+ <style name="Holo.Animation"/>
+ <style name="Holo.Animation.DropDownDown">
+ <item name="android:windowEnterAnimation">@anim/grow_fade_in</item>
+ <item name="android:windowExitAnimation">@anim/shrink_fade_out</item>
+ </style>
+ <style name="Holo.Animation.DropDownUp">
+ <item name="android:windowEnterAnimation">@anim/grow_fade_in_from_bottom</item>
+ <item name="android:windowExitAnimation">@anim/shrink_fade_out_from_bottom</item>
+ </style>
+ <style name="Holo.Animation.PopupWindow"/>
+ <style name="Holo.AutoCompleteTextView" parent="Holo.EditText">
+ <item name="android:completionHintView">@layout/simple_dropdown_hint</item>
+ <item name="android:completionThreshold">2</item>
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_dark</item>
+ <item name="dropDownHorizontalOffset">0dip</item>
+ <item name="dropDownVerticalOffset">-6dip</item>
+ </style>
+ <style name="Holo.AutoCompleteTextView.Light" parent="Holo.EditText.Light">
+ <item name="android:completionHintView">@layout/simple_dropdown_hint</item>
+ <item name="android:completionThreshold">2</item>
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_light</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_light</item>
+ <item name="dropDownHorizontalOffset">0dip</item>
+ <item name="dropDownVerticalOffset">-6dip</item>
+ </style>
+ <style name="Holo.Button">
+ <item name="android:background">@drawable/btn_default_holo_dark</item>
+ <item name="android:clickable">true</item>
+ <item name="android:focusable">true</item>
+ <item name="android:gravity">center</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:minWidth">64dip</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
+ <item name="android:textColor">?android:textColorPrimary</item>
+ </style>
+ <style name="Holo.Button.Borderless">
+ <item name="android:background">?selectableItemBackground</item>
+ <item name="android:paddingLeft">4dip</item>
+ <item name="android:paddingRight">4dip</item>
+ </style>
+ <style name="Holo.Button.Borderless.Light" parent="Holo.Button.Light">
+ <item name="android:background">?selectableItemBackground</item>
+ <item name="android:paddingLeft">4dip</item>
+ <item name="android:paddingRight">4dip</item>
+ </style>
+ <style name="Holo.Button.Borderless.Small" parent="Holo.Button.Borderless">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="Holo.Button.Borderless.Small.Light" parent="Holo.Button.Borderless.Light">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="Holo.Button.Light">
+ <item name="android:background">@drawable/btn_default_holo_light</item>
+ </style>
+ <style name="Holo.Button.Small" parent="Holo.Button">
+ <item name="android:background">@drawable/btn_default_holo_dark</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:minWidth">48dip</item>
+ <item name="android:textAppearance">?android:textAppearanceSmall</item>
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ </style>
+ <style name="Holo.Button.Small.Light" parent="Holo.Button.Light">
+ <item name="android:background">@drawable/btn_default_holo_light</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:minWidth">48dip</item>
+ <item name="android:textAppearance">?android:textAppearanceSmall</item>
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ </style>
+ <style name="Holo.Button.Toggle" parent="Holo.Button">
+ <item name="android:background">@drawable/btn_toggle_holo_dark</item>
+ <item name="android:textOff">@string/capital_off</item>
+ <item name="android:textOn">@string/capital_on</item>
+ </style>
+ <style name="Holo.Button.Toggle.Light" parent="Holo.Button.Light">
+ <item name="android:background">@drawable/btn_toggle_holo_light</item>
+ <item name="android:textOff">@string/capital_off</item>
+ <item name="android:textOn">@string/capital_on</item>
+ </style>
+ <style name="Holo.ButtonBar">
+ <item name="android:background">@null</item>
+ <item name="android:divider">?dividerVertical</item>
+ <item name="android:dividerPadding">12dip</item>
+ <item name="android:paddingBottom">0dip</item>
+ <item name="android:paddingLeft">0dip</item>
+ <item name="android:paddingRight">0dip</item>
+ <item name="android:paddingTop">0dip</item>
+ <item name="android:showDividers">middle</item>
+ <item name="dividerPadding">12dip</item>
+ <item name="showDividers">middle</item>
+ </style>
+ <style name="Holo.ButtonBar.AlertDialog">
+ <item name="android:dividerPadding">0dip</item>
+ <item name="dividerPadding">0dip</item>
+ </style>
+ <style name="Holo.CalendarView">
+ <item name="dateTextAppearance">?android:textAppearanceSmall</item>
+ <item name="firstDayOfWeek">1</item>
+ <item name="focusedMonthDateColor">#FFFFFFFF</item>
+ <item name="maxDate">12/31/2100</item>
+ <item name="minDate">01/01/1900</item>
+ <item name="selectedDateVerticalBar">@drawable/day_picker_week_view_dayline_holo</item>
+ <item name="selectedWeekBackgroundColor">#330099FF</item>
+ <item name="showWeekNumber">true</item>
+ <item name="shownWeekCount">6</item>
+ <item name="unfocusedMonthDateColor">#66FFFFFF</item>
+ <item name="weekDayTextAppearance">@style/Holo.TextAppearance.CalendarView.WeekDayView</item>
+ <item name="weekNumberColor">#33FFFFFF</item>
+ <item name="weekSeparatorLineColor">#19FFFFFF</item>
+ </style>
+ <style name="Holo.CalendarView.Light">
+ <item name="focusedMonthDateColor">#FF000000</item>
+ <item name="selectedWeekBackgroundColor">#330066ff</item>
+ <item name="unfocusedMonthDateColor">#7F08002B</item>
+ <item name="weekNumberColor">#7F080021</item>
+ <item name="weekSeparatorLineColor">#7F08002A</item>
+ </style>
+ <style name="Holo.CompoundButton">
+ <item name="android:clickable">true</item>
+ <item name="android:focusable">true</item>
+ <item name="android:gravity">center_vertical|left</item>
+ <item name="android:textAppearance">?android:attr/textAppearance</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ </style>
+ <style name="Holo.CompoundButton.CheckBox">
+ <item name="android:background">@drawable/btn_check_label_background</item>
+ <item name="android:button">?android:attr/listChoiceIndicatorMultiple</item>
+ </style>
+ <style name="Holo.CompoundButton.CheckBox.Light"/>
+ <style name="Holo.CompoundButton.RadioButton">
+ <item name="android:background">@drawable/btn_radio_label_background</item>
+ <item name="android:button">?android:attr/listChoiceIndicatorSingle</item>
+ </style>
+ <style name="Holo.CompoundButton.RadioButton.Light"/>
+ <style name="Holo.DatePicker">
+ <item name="calendarViewShown">false</item>
+ <item name="endYear">2100</item>
+ <item name="forceShownState">false</item>
+ <item name="layout">@layout/date_picker_holo</item>
+ <item name="spinnersShown">true</item>
+ <item name="startYear">1900</item>
+ </style>
+ <style name="Holo.DropDownItem">
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ <item name="android:textAppearance">@style/Holo.TextAppearance.DropDownItem</item>
+ </style>
+ <style name="Holo.EditText">
+ <item name="android:background">@drawable/edit_text_holo_dark</item>
+ <item name="android:clickable">true</item>
+ <item name="android:focusable">true</item>
+ <item name="android:focusableInTouchMode">true</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:textAppearance">?android:textAppearanceMediumInverse</item>
+ <item name="android:textColor">?android:textColorPrimary</item>
+ </style>
+ <style name="Holo.EditText.Light">
+ <item name="android:background">@drawable/edit_text_holo_light</item>
+ </style>
+ <style name="Holo.EditText.NumberPickerInputText">
+ <item name="android:background">@null</item>
+ <item name="android:gravity">center</item>
+ <item name="android:paddingBottom">13sp</item>
+ <item name="android:paddingLeft">2sp</item>
+ <item name="android:paddingRight">2sp</item>
+ <item name="android:paddingTop">13sp</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="Holo.ExpandableListView" parent="Holo.ListView">
+ <item name="android:childDivider">?android:attr/listDivider</item>
+ <item name="android:groupIndicator">@drawable/expander_group_holo_dark</item>
+ <item name="android:indicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+ <item name="android:indicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+ </style>
+ <style name="Holo.ExpandableListView.Light" parent="Holo.ListView.Light">
+ <item name="android:childDivider">?android:attr/listDivider</item>
+ <item name="android:groupIndicator">@drawable/expander_group_holo_light</item>
+ <item name="android:indicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+ <item name="android:indicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+ </style>
+ <style name="Holo.GridView" parent="@android:Widget.GridView">
+ <item name="android:listSelector">?selectableItemBackground</item>
+ </style>
+ <style name="Holo.ImageButton">
+ <item name="android:background">@drawable/btn_default_holo_dark</item>
+ <item name="android:clickable">true</item>
+ <item name="android:focusable">true</item>
+ <item name="android:scaleType">center</item>
+ </style>
+ <style name="Holo.ImageButton.Light">
+ <item name="android:background">@drawable/btn_default_holo_light</item>
+ </style>
+ <style name="Holo.ListPopupWindow">
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_dark</item>
+ <item name="dropDownHorizontalOffset">0dip</item>
+ <item name="dropDownVerticalOffset">0dip</item>
+ </style>
+ <style name="Holo.ListPopupWindow.Light">
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_light</item>
+ </style>
+ <style name="Holo.ListView" parent="@android:Widget.ListView">
+ <item name="android:cacheColorHint">@drawable/background_cache_hint_selector_holo_dark</item>
+ <item name="android:divider">@drawable/list_divider_holo_dark</item>
+ <item name="android:fadingEdge">vertical</item>
+ <item name="android:listDivider">@drawable/list_divider_holo_dark</item>
+ <item name="android:listSelector">@drawable/list_selector_holo_dark</item>
+ <item name="android:scrollbars">vertical</item>
+ </style>
+ <style name="Holo.ListView.DropDown" parent="Holo.ListView"/>
+ <style name="Holo.ListView.DropDown.Light" parent="Holo.ListView.Light"/>
+ <style name="Holo.ListView.Light">
+ <item name="android:cacheColorHint">@drawable/background_cache_hint_selector_holo_light</item>
+ <item name="android:divider">@drawable/list_divider_holo_light</item>
+ <item name="android:listDivider">@drawable/list_divider_holo_light</item>
+ <item name="android:listSelector">@drawable/list_selector_holo_light</item>
+ </style>
+ <style name="Holo.NumberPicker">
+ <item name="android:fadingEdge">vertical</item>
+ <item name="android:fadingEdgeLength">50dip</item>
+ <item name="android:layout">@layout/number_picker_with_selector_wheel</item>
+ <item name="android:maxHeight">180dip</item>
+ <item name="android:minWidth">64dip</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:solidColor">@android:color/transparent</item>
+ <item name="selectionDivider">@drawable/numberpicker_selection_divider</item>
+ <item name="selectionDividerHeight">2dip</item>
+ <item name="selectionDividersDistance">48dip</item>
+ <item name="virtualButtonPressedDrawable">?selectableItemBackground</item>
+ </style>
+ <style name="Holo.PopupWindow">
+ <item name="android:popupAnimationStyle">@style/Holo.Animation.PopupWindow</item>
+ </style>
+ <style name="Holo.PopupWindow.Light"/>
+ <style name="Holo.ProgressBar" parent="@android:Widget.ProgressBar">
+ <item name="android:indeterminateDrawable">@drawable/progress_medium_holo</item>
+ </style>
+ <style name="Holo.ProgressBar.Horizontal" parent="@android:Widget.ProgressBar.Horizontal">
+ <item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_holo</item>
+ <item name="android:maxHeight">16dip</item>
+ <item name="android:minHeight">16dip</item>
+ <item name="android:progressDrawable">@drawable/progress_horizontal_holo_dark</item>
+ </style>
+ <style name="Holo.ProgressBar.Horizontal.Light">
+ <item name="android:progressDrawable">@drawable/progress_horizontal_holo_light</item>
+ </style>
+ <style name="Holo.ProgressBar.Large" parent="@android:Widget.ProgressBar.Large">
+ <item name="android:indeterminateDrawable">@drawable/progress_large_holo</item>
+ </style>
+ <style name="Holo.ProgressBar.Small" parent="@android:Widget.ProgressBar.Small">
+ <item name="android:indeterminateDrawable">@drawable/progress_small_holo</item>
+ </style>
+ <style name="Holo.RatingBar" parent="@android:Widget.RatingBar">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_full_holo_dark</item>
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:maxHeight">57dip</item>
+ <item name="android:minHeight">57dip</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_full_holo_dark</item>
+ <item name="android:thumb">@null</item>
+ </style>
+ <style name="Holo.RatingBar.Indicator">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_holo_dark</item>
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:isIndicator">true</item>
+ <item name="android:maxHeight">35dip</item>
+ <item name="android:minHeight">35dip</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_holo_dark</item>
+ <item name="android:thumb">@null</item>
+ </style>
+ <style name="Holo.RatingBar.Indicator.Light">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_holo_light</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_holo_light</item>
+ </style>
+ <style name="Holo.RatingBar.Light">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_full_holo_light</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_full_holo_light</item>
+ </style>
+ <style name="Holo.RatingBar.Small">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_small_holo_dark</item>
+ <item name="android:maxHeight">16dip</item>
+ <item name="android:minHeight">16dip</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_small_holo_dark</item>
+ </style>
+ <style name="Holo.RatingBar.Small.Light">
+ <item name="android:indeterminateDrawable">@drawable/ratingbar_small_holo_light</item>
+ <item name="android:progressDrawable">@drawable/ratingbar_small_holo_light</item>
+ </style>
+ <style name="Holo.SeekBar" parent="@android:Widget.SeekBar">
+ <item name="android:focusable">true</item>
+ <item name="android:indeterminateDrawable">@drawable/scrubber_progress_horizontal_holo_dark</item>
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:maxHeight">13dip</item>
+ <item name="android:minHeight">13dip</item>
+ <item name="android:paddingLeft">16dip</item>
+ <item name="android:paddingRight">16dip</item>
+ <item name="android:progressDrawable">@drawable/scrubber_progress_horizontal_holo_dark</item>
+ <item name="android:thumb">@drawable/scrubber_control_selector_holo</item>
+ <item name="android:thumbOffset">16dip</item>
+ </style>
+ <style name="Holo.SeekBar.Light">
+ <item name="android:indeterminateDrawable">@drawable/scrubber_progress_horizontal_holo_light</item>
+ <item name="android:progressDrawable">@drawable/scrubber_progress_horizontal_holo_light</item>
+ </style>
+ <style name="Holo.SegmentedButton">
+ <item name="android:background">@drawable/btn_group_holo_dark</item>
+ <item name="android:divider">?dividerVertical</item>
+ <item name="android:showDividers">middle</item>
+ <item name="showDividers">middle</item>
+ </style>
+ <style name="Holo.SegmentedButton.Light">
+ <item name="android:background">@drawable/btn_group_holo_light</item>
+ </style>
+ <style name="Holo.Spinner">
+ <item name="android:background">@drawable/spinner_background_holo_dark</item>
+ <item name="android:clickable">true</item>
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
+ <item name="android:dropDownWidth">wrap_content</item>
+ <item name="android:gravity">left|center_vertical</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_dark</item>
+ <item name="dropDownHorizontalOffset">0dip</item>
+ <item name="dropDownVerticalOffset">0dip</item>
+ <item name="spinnerMode">dropdown</item>
+ </style>
+ <style name="Holo.Spinner.Light">
+ <item name="android:background">@drawable/spinner_background_holo_light</item>
+ <item name="android:dropDownSelector">@drawable/list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/menu_dropdown_panel_holo_light</item>
+ </style>
+ <style name="Holo.Switch">
+ <item name="switchMinWidth">96dp</item>
+ <item name="switchPadding">16dp</item>
+ <item name="switchTextAppearance">@style/Holo.Switch.TextAppearance</item>
+ <item name="textOff">@string/capital_off</item>
+ <item name="textOn">@string/capital_on</item>
+ <item name="thumb">@drawable/switch_inner_holo_dark</item>
+ <item name="thumbTextPadding">12dp</item>
+ <item name="toggleWhenClick">true</item>
+ <item name="track">@drawable/switch_track_holo_dark</item>
+ </style>
+ <style name="Holo.Switch.Light">
+ <item name="switchTextAppearance">@style/Holo.Switch.TextAppearance.Light</item>
+ <item name="thumb">@drawable/switch_inner_holo_light</item>
+ <item name="track">@drawable/switch_track_holo_light</item>
+ </style>
+ <style name="Holo.Switch.Light.Old">
+ <item name="thumb">@drawable/switch_old_inner_holo_light</item>
+ </style>
+ <style name="Holo.Switch.Old">
+ <item name="thumb">@drawable/switch_old_inner_holo_dark</item>
+ </style>
+ <style name="Holo.Switch.TextAppearance" parent="Holo.TextAppearance.Small">
+ <item name="android:textSize">12sp</item>
+ </style>
+ <style name="Holo.Switch.TextAppearance.Light" parent="Holo.TextAppearance.Small.Light">
+ <item name="android:textSize">12sp</item>
+ </style>
+ <style name="Holo.TextView">
+ <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ </style>
+ <style name="Holo.TextView.ListSeparator">
+ <item name="android:background">@drawable/list_section_divider_holo_dark</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:paddingLeft">8dip</item>
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textColor">?android:textColorSecondary</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="textAllCaps">true</item>
+ </style>
+ <style name="Holo.TextView.ListSeparator.Light">
+ <item name="android:background">@drawable/list_section_divider_holo_light</item>
+ </style>
+ <style name="Holo.TextView.SpinnerItem">
+ <item name="android:gravity">left|center_vertical</item>
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ <item name="android:textAppearance">@style/Holo.TextAppearance.TextView.SpinnerItem</item>
+ <item name="gravity">left|center_vertical</item>
+ </style>
+ <style name="Holo.TextView.SpinnerItem.DropDown" parent="Holo.TextView.SpinnerItem">
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ </style>
+ <style name="Holo.TextView.SpinnerItem.DropDown.Light" parent="Holo.TextView.SpinnerItem.Light">
+ <item name="android:paddingLeft">8dp</item>
+ <item name="android:paddingRight">8dp</item>
+ </style>
+ <style name="Holo.TextView.SpinnerItem.Light">
+ <item name="android:textAppearance">@style/Holo.TextAppearance.TextView.SpinnerItem.Light</item>
+ </style>
+ <style name="Holo.TimePicker">
+ <item name="layout">@layout/time_picker_holo</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/text.xml b/android/3rd_party/HoloEverywhere/library/res/values/text.xml
new file mode 100644
index 0000000000..f73986e9ad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/text.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.TextAppearance">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ <item name="android:textColorLink">@color/holo_blue_light</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:textStyle">normal</item>
+ </style>
+ <style name="Holo.TextAppearance.CalendarView.WeekDayView" parent="Holo.TextAppearance">
+ <item name="android:textColor">#505050</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+ <style name="Holo.TextAppearance.DropDownItem">
+ <item name="android:textColor">?android:textColorPrimaryDisableOnly</item>
+ </style>
+ <style name="Holo.TextAppearance.Inverse">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Inverse.Light">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ </style>
+ <style name="Holo.TextAppearance.Large">
+ <item name="android:textSize">22sp</item>
+ </style>
+ <style name="Holo.TextAppearance.Large.Inverse">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Large.Inverse.Light">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ </style>
+ <style name="Holo.TextAppearance.Large.Light">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Light">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Medium">
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="Holo.TextAppearance.Medium.Inverse">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Medium.Inverse.Light">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ </style>
+ <style name="Holo.TextAppearance.Medium.Light">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu.Large">
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu.Light">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu.Light.Large">
+ <item name="android:textSize">18sp</item>
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu.Light.Small">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="Holo.TextAppearance.PopupMenu.Small">
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="Holo.TextAppearance.Small">
+ <item name="android:textColor">@color/secondary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <item name="android:textSize">14sp</item>
+ </style>
+ <style name="Holo.TextAppearance.Small.Inverse">
+ <item name="android:textColor">@color/secondary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ </style>
+ <style name="Holo.TextAppearance.Small.Inverse.Light">
+ <item name="android:textColor">@color/secondary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ </style>
+ <style name="Holo.TextAppearance.Small.Light">
+ <item name="android:textColor">@color/secondary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ </style>
+ <style name="Holo.TextAppearance.TextView"/>
+ <style name="Holo.TextAppearance.TextView.SpinnerItem">
+ <!--Include block: ColorsDark-->
+ <item name="android:textColor">@color/primary_text_holo_dark</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <!--End of block ColorsDark-->
+ </style>
+ <style name="Holo.TextAppearance.TextView.SpinnerItem.Light">
+ <!--Include block: ColorsLight-->
+ <item name="android:textColor">@color/primary_text_holo_light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <!--End of block ColorsLight-->
+ </style>
+ <style name="Holo.TextAppearance.Widget.IconMenu.Item" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
+ <item name="android:textColor">?android:panelColorForeground</item>
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/themes-core.xml b/android/3rd_party/HoloEverywhere/library/res/values/themes-core.xml
new file mode 100644
index 0000000000..69c379f26c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/themes-core.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.Base.Theme" parent="Theme.Sherlock">
+ <!--Include block: Dark-->
+ <!--Include block: Base-->
+ <item name="activatedBackgroundIndicator">@drawable/activated_background_holo</item>
+ <item name="android:dropDownListViewStyle">?dropDownListViewStyle</item>
+ <item name="buttonBarButtonStyle">?borderlessButtonStyle</item>
+ <item name="buttonBarStyle">@style/Holo.ButtonBar</item>
+ <item name="datePickerStyle">@style/Holo.DatePicker</item>
+ <item name="dialogItemTextAppearance">?textAppearanceListItemSmall</item>
+ <item name="dividerHorizontal">?android:listDivider</item>
+ <item name="dividerVertical">?android:listDivider</item>
+ <item name="dropdownListPreferredItemHeight">?listPreferredItemHeightSmall</item>
+ <item name="fastScrollOverlayPosition">atThumb</item>
+ <item name="fastScrollTextColor">@color/primary_text_holo_dark</item>
+ <item name="fastScrollThumbDrawable">@drawable/fastscroll_thumb_holo</item>
+ <item name="listPreferredItemHeight">64dip</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemPaddingLeft">8dp</item>
+ <item name="listPreferredItemPaddingRight">8dp</item>
+ <item name="numberPickerInputTextStyle">@style/Holo.EditText.NumberPickerInputText</item>
+ <item name="numberPickerStyle">@style/Holo.NumberPicker</item>
+ <item name="panelMenuListWidth">250dp</item>
+ <item name="textAppearanceListItem">?android:textAppearanceLarge</item>
+ <item name="textAppearanceListItemSmall">?android:textAppearanceMedium</item>
+ <item name="timePickerStyle">@style/Holo.TimePicker</item>
+ <!--End of block Base-->
+ <!--Include block: TextDark-->
+ <!--Include block: Text-->
+ <item name="android:candidatesTextStyleSpans">@string/candidates_style</item>
+ <item name="android:textCheckMark">?android:checkMark</item>
+ <item name="android:textCheckMarkInverse">?android:checkMark</item>
+ <item name="android:textColorLink">@color/holo_blue_light</item>
+ <!--End of block Text-->
+ <item name="android:textAppearance">@style/Holo.TextAppearance</item>
+ <item name="android:textAppearanceInverse">@style/Holo.TextAppearance.Inverse</item>
+ <item name="android:textAppearanceLarge">@style/Holo.TextAppearance.Large</item>
+ <item name="android:textAppearanceLargeInverse">@style/Holo.TextAppearance.Large.Inverse</item>
+ <item name="android:textAppearanceMedium">@style/Holo.TextAppearance.Medium</item>
+ <item name="android:textAppearanceMediumInverse">@style/Holo.TextAppearance.Medium.Inverse</item>
+ <item name="android:textAppearanceSmall">@style/Holo.TextAppearance.Small</item>
+ <item name="android:textAppearanceSmallInverse">@style/Holo.TextAppearance.Small.Inverse</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_dark</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_dark</item>
+ <item name="android:textColorHintInverse">@color/hint_foreground_holo_light</item>
+ <item name="android:textColorPrimary">@color/primary_text_holo_dark</item>
+ <item name="android:textColorPrimaryDisableOnly">@color/primary_text_disable_only_holo_dark</item>
+ <item name="android:textColorPrimaryInverse">@color/primary_text_holo_light</item>
+ <item name="android:textColorPrimaryInverseDisableOnly">@color/primary_text_disable_only_holo_light</item>
+ <item name="android:textColorPrimaryInverseNoDisable">@color/primary_text_nodisable_holo_light</item>
+ <item name="android:textColorPrimaryNoDisable">@color/primary_text_nodisable_holo_dark</item>
+ <item name="android:textColorSecondary">@color/secondary_text_holo_dark</item>
+ <item name="android:textColorSecondaryInverse">@color/secondary_text_holo_light</item>
+ <item name="android:textColorSecondaryInverseNoDisable">@color/secondary_text_nodisable_holo_light</item>
+ <item name="android:textColorSecondaryNoDisable">@color/secondary_text_nodisable_holo_dark</item>
+ <item name="android:textColorTertiary">@color/tertiary_text_holo_dark</item>
+ <item name="android:textColorTertiaryInverse">@color/tertiary_text_holo_light</item>
+ <!--End of block TextDark-->
+ <item name="alertDialogStyle">@style/Holo.AlertDialog</item>
+ <item name="alertDialogTheme">@style/Holo.Theme.Dialog.Alert</item>
+ <item name="android:windowBackground">@drawable/background_holo_dark</item>
+ <item name="autoCompleteTextViewStyle">@style/Holo.AutoCompleteTextView</item>
+ <item name="borderlessButtonStyle">@style/Holo.Button.Borderless</item>
+ <item name="calendarViewStyle">@style/Holo.CalendarView</item>
+ <item name="detailsElementBackground">@drawable/panel_bg_holo_dark</item>
+ <item name="dialogTheme">@style/Holo.Theme.Dialog</item>
+ <item name="dropDownListViewStyle">@style/Holo.ListView.DropDown</item>
+ <item name="fastScrollPreviewBackgroundLeft">@drawable/fastscroll_label_left_holo_dark</item>
+ <item name="fastScrollPreviewBackgroundRight">@drawable/fastscroll_label_right_holo_dark</item>
+ <item name="fastScrollTrackDrawable">@drawable/fastscroll_track_holo_dark</item>
+ <item name="listDividerAlertDialog">@drawable/list_divider_holo_dark</item>
+ <item name="listPopupWindowStyle">@style/Holo.ListPopupWindow</item>
+ <item name="popupWindowStyle">@style/Holo.PopupWindow</item>
+ <item name="segmentedButtonStyle">@style/Holo.SegmentedButton</item>
+ <item name="selectableItemBackground">@drawable/item_background_holo_dark</item>
+ <item name="spinnerDropDownItemStyle">@style/Holo.TextView.SpinnerItem.DropDown</item>
+ <item name="spinnerItemStyle">@style/Holo.TextView.SpinnerItem</item>
+ <item name="spinnerStyle">@style/Holo.Spinner</item>
+ <item name="switchStyle">@style/Holo.Switch</item>
+ <item name="switchStyleOld">@style/Holo.Switch.Old</item>
+ <item name="textColorAlertDialogListItem">@color/primary_text_holo_dark</item>
+ <!--End of block Dark-->
+ <!--Include block: BarDark-->
+ <item name="textAppearanceLargePopupMenu">@style/Holo.TextAppearance</item>
+ <item name="textAppearanceSmallPopupMenu">@style/Holo.TextAppearance.Small</item>
+ <!--End of block BarDark-->
+ </style>
+ <style name="Holo.Base.Theme.Light" parent="Theme.Sherlock.Light">
+ <!--Include block: Light-->
+ <!--Include block: Base-->
+ <item name="activatedBackgroundIndicator">@drawable/activated_background_holo</item>
+ <item name="android:dropDownListViewStyle">?dropDownListViewStyle</item>
+ <item name="buttonBarButtonStyle">?borderlessButtonStyle</item>
+ <item name="buttonBarStyle">@style/Holo.ButtonBar</item>
+ <item name="datePickerStyle">@style/Holo.DatePicker</item>
+ <item name="dialogItemTextAppearance">?textAppearanceListItemSmall</item>
+ <item name="dividerHorizontal">?android:listDivider</item>
+ <item name="dividerVertical">?android:listDivider</item>
+ <item name="dropdownListPreferredItemHeight">?listPreferredItemHeightSmall</item>
+ <item name="fastScrollOverlayPosition">atThumb</item>
+ <item name="fastScrollTextColor">@color/primary_text_holo_dark</item>
+ <item name="fastScrollThumbDrawable">@drawable/fastscroll_thumb_holo</item>
+ <item name="listPreferredItemHeight">64dip</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemPaddingLeft">8dp</item>
+ <item name="listPreferredItemPaddingRight">8dp</item>
+ <item name="numberPickerInputTextStyle">@style/Holo.EditText.NumberPickerInputText</item>
+ <item name="numberPickerStyle">@style/Holo.NumberPicker</item>
+ <item name="panelMenuListWidth">250dp</item>
+ <item name="textAppearanceListItem">?android:textAppearanceLarge</item>
+ <item name="textAppearanceListItemSmall">?android:textAppearanceMedium</item>
+ <item name="timePickerStyle">@style/Holo.TimePicker</item>
+ <!--End of block Base-->
+ <!--Include block: TextLight-->
+ <!--Include block: Text-->
+ <item name="android:candidatesTextStyleSpans">@string/candidates_style</item>
+ <item name="android:textCheckMark">?android:checkMark</item>
+ <item name="android:textCheckMarkInverse">?android:checkMark</item>
+ <item name="android:textColorLink">@color/holo_blue_light</item>
+ <!--End of block Text-->
+ <item name="android:textAppearance">@style/Holo.TextAppearance.Light</item>
+ <item name="android:textAppearanceInverse">@style/Holo.TextAppearance.Inverse.Light</item>
+ <item name="android:textAppearanceLarge">@style/Holo.TextAppearance.Large.Light</item>
+ <item name="android:textAppearanceLargeInverse">@style/Holo.TextAppearance.Large.Inverse.Light</item>
+ <item name="android:textAppearanceMedium">@style/Holo.TextAppearance.Medium.Light</item>
+ <item name="android:textAppearanceMediumInverse">@style/Holo.TextAppearance.Medium.Inverse.Light</item>
+ <item name="android:textAppearanceSmall">@style/Holo.TextAppearance.Small.Light</item>
+ <item name="android:textAppearanceSmallInverse">@style/Holo.TextAppearance.Small.Inverse.Light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <item name="android:textColorHintInverse">@color/hint_foreground_holo_dark</item>
+ <item name="android:textColorPrimary">@color/primary_text_holo_light</item>
+ <item name="android:textColorPrimaryDisableOnly">@color/primary_text_disable_only_holo_light</item>
+ <item name="android:textColorPrimaryInverse">@color/primary_text_holo_dark</item>
+ <item name="android:textColorPrimaryInverseDisableOnly">@color/primary_text_disable_only_holo_dark</item>
+ <item name="android:textColorPrimaryInverseNoDisable">@color/primary_text_nodisable_holo_dark</item>
+ <item name="android:textColorPrimaryNoDisable">@color/primary_text_nodisable_holo_light</item>
+ <item name="android:textColorSecondary">@color/secondary_text_holo_light</item>
+ <item name="android:textColorSecondaryInverse">@color/secondary_text_holo_dark</item>
+ <item name="android:textColorSecondaryInverseNoDisable">@color/secondary_text_nodisable_holo_dark</item>
+ <item name="android:textColorSecondaryNoDisable">@color/secondary_text_nodisable_holo_light</item>
+ <item name="android:textColorTertiary">@color/tertiary_text_holo_light</item>
+ <item name="android:textColorTertiaryInverse">@color/tertiary_text_holo_dark</item>
+ <!--End of block TextLight-->
+ <item name="alertDialogStyle">@style/Holo.AlertDialog.Light</item>
+ <item name="alertDialogTheme">@style/Holo.Theme.Dialog.Alert.Light</item>
+ <item name="android:windowBackground">@drawable/background_holo_light</item>
+ <item name="autoCompleteTextViewStyle">@style/Holo.AutoCompleteTextView.Light</item>
+ <item name="borderlessButtonStyle">@style/Holo.Button.Borderless.Light</item>
+ <item name="calendarViewStyle">@style/Holo.CalendarView.Light</item>
+ <item name="detailsElementBackground">@drawable/panel_bg_holo_light</item>
+ <item name="dialogTheme">@style/Holo.Theme.Dialog.Light</item>
+ <item name="dropDownListViewStyle">@style/Holo.ListView.DropDown.Light</item>
+ <item name="fastScrollPreviewBackgroundLeft">@drawable/fastscroll_label_left_holo_light</item>
+ <item name="fastScrollPreviewBackgroundRight">@drawable/fastscroll_label_right_holo_light</item>
+ <item name="fastScrollTrackDrawable">@drawable/fastscroll_track_holo_light</item>
+ <item name="listDividerAlertDialog">@drawable/list_divider_holo_light</item>
+ <item name="listPopupWindowStyle">@style/Holo.ListPopupWindow.Light</item>
+ <item name="popupWindowStyle">@style/Holo.PopupWindow.Light</item>
+ <item name="segmentedButtonStyle">@style/Holo.SegmentedButton.Light</item>
+ <item name="selectableItemBackground">@drawable/item_background_holo_light</item>
+ <item name="spinnerDropDownItemStyle">@style/Holo.TextView.SpinnerItem.DropDown.Light</item>
+ <item name="spinnerItemStyle">@style/Holo.TextView.SpinnerItem.Light</item>
+ <item name="spinnerStyle">@style/Holo.Spinner.Light</item>
+ <item name="switchStyle">@style/Holo.Switch.Light</item>
+ <item name="switchStyleOld">@style/Holo.Switch.Light.Old</item>
+ <item name="textColorAlertDialogListItem">@color/primary_text_holo_light</item>
+ <!--End of block Light-->
+ <!--Include block: BarLight-->
+ <item name="textAppearanceLargePopupMenu">@style/Holo.TextAppearance.Light</item>
+ <item name="textAppearanceSmallPopupMenu">@style/Holo.TextAppearance.Small.Light</item>
+ <!--End of block BarLight-->
+ </style>
+ <style name="Holo.Base.Theme.Light.DarkActionBar" parent="Theme.Sherlock.Light.DarkActionBar">
+ <!--Include block: Light-->
+ <!--Include block: Base-->
+ <item name="activatedBackgroundIndicator">@drawable/activated_background_holo</item>
+ <item name="android:dropDownListViewStyle">?dropDownListViewStyle</item>
+ <item name="buttonBarButtonStyle">?borderlessButtonStyle</item>
+ <item name="buttonBarStyle">@style/Holo.ButtonBar</item>
+ <item name="datePickerStyle">@style/Holo.DatePicker</item>
+ <item name="dialogItemTextAppearance">?textAppearanceListItemSmall</item>
+ <item name="dividerHorizontal">?android:listDivider</item>
+ <item name="dividerVertical">?android:listDivider</item>
+ <item name="dropdownListPreferredItemHeight">?listPreferredItemHeightSmall</item>
+ <item name="fastScrollOverlayPosition">atThumb</item>
+ <item name="fastScrollTextColor">@color/primary_text_holo_dark</item>
+ <item name="fastScrollThumbDrawable">@drawable/fastscroll_thumb_holo</item>
+ <item name="listPreferredItemHeight">64dip</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemPaddingLeft">8dp</item>
+ <item name="listPreferredItemPaddingRight">8dp</item>
+ <item name="numberPickerInputTextStyle">@style/Holo.EditText.NumberPickerInputText</item>
+ <item name="numberPickerStyle">@style/Holo.NumberPicker</item>
+ <item name="panelMenuListWidth">250dp</item>
+ <item name="textAppearanceListItem">?android:textAppearanceLarge</item>
+ <item name="textAppearanceListItemSmall">?android:textAppearanceMedium</item>
+ <item name="timePickerStyle">@style/Holo.TimePicker</item>
+ <!--End of block Base-->
+ <!--Include block: TextLight-->
+ <!--Include block: Text-->
+ <item name="android:candidatesTextStyleSpans">@string/candidates_style</item>
+ <item name="android:textCheckMark">?android:checkMark</item>
+ <item name="android:textCheckMarkInverse">?android:checkMark</item>
+ <item name="android:textColorLink">@color/holo_blue_light</item>
+ <!--End of block Text-->
+ <item name="android:textAppearance">@style/Holo.TextAppearance.Light</item>
+ <item name="android:textAppearanceInverse">@style/Holo.TextAppearance.Inverse.Light</item>
+ <item name="android:textAppearanceLarge">@style/Holo.TextAppearance.Large.Light</item>
+ <item name="android:textAppearanceLargeInverse">@style/Holo.TextAppearance.Large.Inverse.Light</item>
+ <item name="android:textAppearanceMedium">@style/Holo.TextAppearance.Medium.Light</item>
+ <item name="android:textAppearanceMediumInverse">@style/Holo.TextAppearance.Medium.Inverse.Light</item>
+ <item name="android:textAppearanceSmall">@style/Holo.TextAppearance.Small.Light</item>
+ <item name="android:textAppearanceSmallInverse">@style/Holo.TextAppearance.Small.Inverse.Light</item>
+ <item name="android:textColorHighlight">@color/highlighted_text_holo_light</item>
+ <item name="android:textColorHint">@color/hint_foreground_holo_light</item>
+ <item name="android:textColorHintInverse">@color/hint_foreground_holo_dark</item>
+ <item name="android:textColorPrimary">@color/primary_text_holo_light</item>
+ <item name="android:textColorPrimaryDisableOnly">@color/primary_text_disable_only_holo_light</item>
+ <item name="android:textColorPrimaryInverse">@color/primary_text_holo_dark</item>
+ <item name="android:textColorPrimaryInverseDisableOnly">@color/primary_text_disable_only_holo_dark</item>
+ <item name="android:textColorPrimaryInverseNoDisable">@color/primary_text_nodisable_holo_dark</item>
+ <item name="android:textColorPrimaryNoDisable">@color/primary_text_nodisable_holo_light</item>
+ <item name="android:textColorSecondary">@color/secondary_text_holo_light</item>
+ <item name="android:textColorSecondaryInverse">@color/secondary_text_holo_dark</item>
+ <item name="android:textColorSecondaryInverseNoDisable">@color/secondary_text_nodisable_holo_dark</item>
+ <item name="android:textColorSecondaryNoDisable">@color/secondary_text_nodisable_holo_light</item>
+ <item name="android:textColorTertiary">@color/tertiary_text_holo_light</item>
+ <item name="android:textColorTertiaryInverse">@color/tertiary_text_holo_dark</item>
+ <!--End of block TextLight-->
+ <item name="alertDialogStyle">@style/Holo.AlertDialog.Light</item>
+ <item name="alertDialogTheme">@style/Holo.Theme.Dialog.Alert.Light</item>
+ <item name="android:windowBackground">@drawable/background_holo_light</item>
+ <item name="autoCompleteTextViewStyle">@style/Holo.AutoCompleteTextView.Light</item>
+ <item name="borderlessButtonStyle">@style/Holo.Button.Borderless.Light</item>
+ <item name="calendarViewStyle">@style/Holo.CalendarView.Light</item>
+ <item name="detailsElementBackground">@drawable/panel_bg_holo_light</item>
+ <item name="dialogTheme">@style/Holo.Theme.Dialog.Light</item>
+ <item name="dropDownListViewStyle">@style/Holo.ListView.DropDown.Light</item>
+ <item name="fastScrollPreviewBackgroundLeft">@drawable/fastscroll_label_left_holo_light</item>
+ <item name="fastScrollPreviewBackgroundRight">@drawable/fastscroll_label_right_holo_light</item>
+ <item name="fastScrollTrackDrawable">@drawable/fastscroll_track_holo_light</item>
+ <item name="listDividerAlertDialog">@drawable/list_divider_holo_light</item>
+ <item name="listPopupWindowStyle">@style/Holo.ListPopupWindow.Light</item>
+ <item name="popupWindowStyle">@style/Holo.PopupWindow.Light</item>
+ <item name="segmentedButtonStyle">@style/Holo.SegmentedButton.Light</item>
+ <item name="selectableItemBackground">@drawable/item_background_holo_light</item>
+ <item name="spinnerDropDownItemStyle">@style/Holo.TextView.SpinnerItem.DropDown.Light</item>
+ <item name="spinnerItemStyle">@style/Holo.TextView.SpinnerItem.Light</item>
+ <item name="spinnerStyle">@style/Holo.Spinner.Light</item>
+ <item name="switchStyle">@style/Holo.Switch.Light</item>
+ <item name="switchStyleOld">@style/Holo.Switch.Light.Old</item>
+ <item name="textColorAlertDialogListItem">@color/primary_text_holo_light</item>
+ <!--End of block Light-->
+ <!--Include block: BarDark-->
+ <item name="textAppearanceLargePopupMenu">@style/Holo.TextAppearance</item>
+ <item name="textAppearanceSmallPopupMenu">@style/Holo.TextAppearance.Small</item>
+ <!--End of block BarDark-->
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/res/values/themes.xml b/android/3rd_party/HoloEverywhere/library/res/values/themes.xml
new file mode 100644
index 0000000000..9a73e0b099
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/res/values/themes.xml
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+ <style name="Holo.Theme" parent="Holo.Base.Theme">
+ <!--Include block: BackportDark-->
+ <!--Include block: Backport-->
+ <item name="android:divider">?android:listDivider</item>
+ <item name="android:dropDownItemStyle">@style/Holo.DropDownItem</item>
+ <item name="android:gridViewStyle">@style/Holo.GridView</item>
+ <item name="android:itemBackground">?selectableItemBackground</item>
+ <item name="android:itemTextAppearance">@style/Holo.TextAppearance.Widget.IconMenu.Item</item>
+ <item name="android:progressBarStyle">@style/Holo.ProgressBar</item>
+ <item name="android:progressBarStyleLarge">@style/Holo.ProgressBar.Large</item>
+ <item name="android:progressBarStyleSmall">@style/Holo.ProgressBar.Small</item>
+ <item name="android:scrollbarDefaultDelayBeforeFade">300</item>
+ <item name="android:scrollbarFadeDuration">250</item>
+ <item name="android:scrollbarSize">10dp</item>
+ <item name="android:scrollbarTrackHorizontal">@null</item>
+ <item name="android:scrollbarTrackVertical">@null</item>
+ <item name="android:spinnerItemStyle">@style/Holo.TextView.SpinnerItem</item>
+ <!--End of block Backport-->
+ <item name="android:buttonStyle">@style/Holo.Button</item>
+ <item name="android:buttonStyleToggle">@style/Holo.Button.Toggle</item>
+ <item name="android:checkboxStyle">@style/Holo.CompoundButton.CheckBox</item>
+ <item name="android:editTextStyle">@style/Holo.EditText</item>
+ <item name="android:expandableListViewStyle">@style/Holo.ExpandableListView</item>
+ <item name="android:imageButtonStyle">@style/Holo.ImageButton</item>
+ <item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_dark</item>
+ <item name="android:listChoiceIndicatorMultiple">@drawable/btn_checkbox_holo_dark</item>
+ <item name="android:listChoiceIndicatorSingle">@drawable/btn_radio_holo_dark</item>
+ <item name="android:listDivider">@drawable/list_divider_holo_dark</item>
+ <item name="android:listSelector">@drawable/list_selector_holo_dark</item>
+ <item name="android:listSeparatorTextViewStyle">@style/Holo.TextView.ListSeparator</item>
+ <item name="android:listViewStyle">@style/Holo.ListView</item>
+ <item name="android:progressBarStyleHorizontal">@style/Holo.ProgressBar.Horizontal</item>
+ <item name="android:radioButtonStyle">@style/Holo.CompoundButton.RadioButton</item>
+ <item name="android:ratingBarStyle">@style/Holo.RatingBar</item>
+ <item name="android:ratingBarStyleIndicator">@style/Holo.RatingBar.Indicator</item>
+ <item name="android:ratingBarStyleSmall">@style/Holo.RatingBar.Small</item>
+ <item name="android:scrollbarThumbHorizontal">@drawable/scrollbar_handle_holo_dark</item>
+ <item name="android:scrollbarThumbVertical">@drawable/scrollbar_handle_holo_dark</item>
+ <item name="android:seekBarStyle">@style/Holo.SeekBar</item>
+ <!--End of block BackportDark-->
+ <!--Include block: BackportBarDark-->
+ <item name="android:panelBackground">@drawable/menu_hardkey_panel_holo_dark</item>
+ <item name="android:panelColorBackground">#000000</item>
+ <item name="android:panelColorForeground">@color/primary_text_holo_dark</item>
+ <item name="android:panelFullBackground">@drawable/menu_background_fill_parent_width_holo_dark</item>
+ <item name="android:panelTextAppearance">@style/Holo.TextAppearance</item>
+ <!--End of block BackportBarDark-->
+ <item name="holoTheme">dark</item>
+ </style>
+ <style name="Holo.Theme.DialogWhenLarge" parent="Holo.Theme"/>
+ <style name="Holo.Theme.DialogWhenLarge.Light" parent="Holo.Theme.Light"/>
+ <style name="Holo.Theme.DialogWhenLarge.Light.DarkActionBar" parent="Holo.Theme.Light.DarkActionBar"/>
+ <style name="Holo.Theme.DialogWhenLarge.Light.DarkActionBar.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.DialogWhenLarge.Light.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.DialogWhenLarge.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light" parent="Holo.Base.Theme.Light">
+ <!--Include block: BackportLight-->
+ <!--Include block: Backport-->
+ <item name="android:divider">?android:listDivider</item>
+ <item name="android:dropDownItemStyle">@style/Holo.DropDownItem</item>
+ <item name="android:gridViewStyle">@style/Holo.GridView</item>
+ <item name="android:itemBackground">?selectableItemBackground</item>
+ <item name="android:itemTextAppearance">@style/Holo.TextAppearance.Widget.IconMenu.Item</item>
+ <item name="android:progressBarStyle">@style/Holo.ProgressBar</item>
+ <item name="android:progressBarStyleLarge">@style/Holo.ProgressBar.Large</item>
+ <item name="android:progressBarStyleSmall">@style/Holo.ProgressBar.Small</item>
+ <item name="android:scrollbarDefaultDelayBeforeFade">300</item>
+ <item name="android:scrollbarFadeDuration">250</item>
+ <item name="android:scrollbarSize">10dp</item>
+ <item name="android:scrollbarTrackHorizontal">@null</item>
+ <item name="android:scrollbarTrackVertical">@null</item>
+ <item name="android:spinnerItemStyle">@style/Holo.TextView.SpinnerItem</item>
+ <!--End of block Backport-->
+ <item name="android:buttonStyle">@style/Holo.Button.Light</item>
+ <item name="android:buttonStyleToggle">@style/Holo.Button.Toggle.Light</item>
+ <item name="android:checkboxStyle">@style/Holo.CompoundButton.CheckBox.Light</item>
+ <item name="android:editTextStyle">@style/Holo.EditText.Light</item>
+ <item name="android:expandableListViewStyle">@style/Holo.ExpandableListView.Light</item>
+ <item name="android:imageButtonStyle">@style/Holo.ImageButton.Light</item>
+ <item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_light</item>
+ <item name="android:listChoiceIndicatorMultiple">@drawable/btn_checkbox_holo_light</item>
+ <item name="android:listChoiceIndicatorSingle">@drawable/btn_radio_holo_light</item>
+ <item name="android:listDivider">@drawable/list_divider_holo_light</item>
+ <item name="android:listSelector">@drawable/list_selector_holo_light</item>
+ <item name="android:listSeparatorTextViewStyle">@style/Holo.TextView.ListSeparator.Light</item>
+ <item name="android:listViewStyle">@style/Holo.ListView.Light</item>
+ <item name="android:progressBarStyleHorizontal">@style/Holo.ProgressBar.Horizontal.Light</item>
+ <item name="android:radioButtonStyle">@style/Holo.CompoundButton.RadioButton.Light</item>
+ <item name="android:ratingBarStyle">@style/Holo.RatingBar.Light</item>
+ <item name="android:ratingBarStyleIndicator">@style/Holo.RatingBar.Indicator.Light</item>
+ <item name="android:ratingBarStyleSmall">@style/Holo.RatingBar.Small.Light</item>
+ <item name="android:scrollbarThumbHorizontal">@drawable/scrollbar_handle_holo_light</item>
+ <item name="android:scrollbarThumbVertical">@drawable/scrollbar_handle_holo_light</item>
+ <item name="android:seekBarStyle">@style/Holo.SeekBar.Light</item>
+ <!--End of block BackportLight-->
+ <!--Include block: BackportBarLight-->
+ <item name="android:panelBackground">@drawable/menu_hardkey_panel_holo_light</item>
+ <item name="android:panelColorBackground">#FFFFFF</item>
+ <item name="android:panelColorForeground">@color/primary_text_holo_light</item>
+ <item name="android:panelFullBackground">@drawable/menu_background_fill_parent_width_holo_light</item>
+ <item name="android:panelTextAppearance">@style/Holo.TextAppearance.Light</item>
+ <!--End of block BackportBarLight-->
+ <item name="holoTheme">light</item>
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar" parent="Holo.Base.Theme.Light.DarkActionBar">
+ <!--Include block: BackportLight-->
+ <!--Include block: Backport-->
+ <item name="android:divider">?android:listDivider</item>
+ <item name="android:dropDownItemStyle">@style/Holo.DropDownItem</item>
+ <item name="android:gridViewStyle">@style/Holo.GridView</item>
+ <item name="android:itemBackground">?selectableItemBackground</item>
+ <item name="android:itemTextAppearance">@style/Holo.TextAppearance.Widget.IconMenu.Item</item>
+ <item name="android:progressBarStyle">@style/Holo.ProgressBar</item>
+ <item name="android:progressBarStyleLarge">@style/Holo.ProgressBar.Large</item>
+ <item name="android:progressBarStyleSmall">@style/Holo.ProgressBar.Small</item>
+ <item name="android:scrollbarDefaultDelayBeforeFade">300</item>
+ <item name="android:scrollbarFadeDuration">250</item>
+ <item name="android:scrollbarSize">10dp</item>
+ <item name="android:scrollbarTrackHorizontal">@null</item>
+ <item name="android:scrollbarTrackVertical">@null</item>
+ <item name="android:spinnerItemStyle">@style/Holo.TextView.SpinnerItem</item>
+ <!--End of block Backport-->
+ <item name="android:buttonStyle">@style/Holo.Button.Light</item>
+ <item name="android:buttonStyleToggle">@style/Holo.Button.Toggle.Light</item>
+ <item name="android:checkboxStyle">@style/Holo.CompoundButton.CheckBox.Light</item>
+ <item name="android:editTextStyle">@style/Holo.EditText.Light</item>
+ <item name="android:expandableListViewStyle">@style/Holo.ExpandableListView.Light</item>
+ <item name="android:imageButtonStyle">@style/Holo.ImageButton.Light</item>
+ <item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_light</item>
+ <item name="android:listChoiceIndicatorMultiple">@drawable/btn_checkbox_holo_light</item>
+ <item name="android:listChoiceIndicatorSingle">@drawable/btn_radio_holo_light</item>
+ <item name="android:listDivider">@drawable/list_divider_holo_light</item>
+ <item name="android:listSelector">@drawable/list_selector_holo_light</item>
+ <item name="android:listSeparatorTextViewStyle">@style/Holo.TextView.ListSeparator.Light</item>
+ <item name="android:listViewStyle">@style/Holo.ListView.Light</item>
+ <item name="android:progressBarStyleHorizontal">@style/Holo.ProgressBar.Horizontal.Light</item>
+ <item name="android:radioButtonStyle">@style/Holo.CompoundButton.RadioButton.Light</item>
+ <item name="android:ratingBarStyle">@style/Holo.RatingBar.Light</item>
+ <item name="android:ratingBarStyleIndicator">@style/Holo.RatingBar.Indicator.Light</item>
+ <item name="android:ratingBarStyleSmall">@style/Holo.RatingBar.Small.Light</item>
+ <item name="android:scrollbarThumbHorizontal">@drawable/scrollbar_handle_holo_light</item>
+ <item name="android:scrollbarThumbVertical">@drawable/scrollbar_handle_holo_light</item>
+ <item name="android:seekBarStyle">@style/Holo.SeekBar.Light</item>
+ <!--End of block BackportLight-->
+ <!--Include block: BackportBarDark-->
+ <item name="android:panelBackground">@drawable/menu_hardkey_panel_holo_dark</item>
+ <item name="android:panelColorBackground">#000000</item>
+ <item name="android:panelColorForeground">@color/primary_text_holo_dark</item>
+ <item name="android:panelFullBackground">@drawable/menu_background_fill_parent_width_holo_dark</item>
+ <item name="android:panelTextAppearance">@style/Holo.TextAppearance</item>
+ <!--End of block BackportBarDark-->
+ <item name="holoTheme">mixed</item>
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.NoActionBar.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.NoActionBar.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.NoActionBar.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.DarkActionBar.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.Light.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.Light.NoActionBar.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.Light.NoActionBar.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.NoActionBar.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Light.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.NoActionBar">
+ <!--Include block: NoActionBar-->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <!--End of block NoActionBar-->
+ </style>
+ <style name="Holo.Theme.NoActionBar.Fullscreen">
+ <!--Include block: Fullscreen-->
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="windowContentOverlay">@null</item>
+ <!--End of block Fullscreen-->
+ </style>
+ <style name="Holo.Theme.NoActionBar.Fullscreen.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.NoActionBar.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+ <style name="Holo.Theme.Wallpaper">
+ <!--Include block: Wallpaper-->
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowShowWallpaper">true</item>
+ <!--End of block Wallpaper-->
+ </style>
+</resources>
diff --git a/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloActivity.java b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloActivity.java
new file mode 100644
index 0000000000..05dd9c17d5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloActivity.java
@@ -0,0 +1,696 @@
+
+package android.support.v4.app;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.HoloEverywhere.PreferenceImpl;
+import org.holoeverywhere.IHoloActivity;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.SystemServiceManager;
+import org.holoeverywhere.ThemeManager;
+import org.holoeverywhere.addon.IAddonActivity;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.app.Application;
+import org.holoeverywhere.app.ContextThemeWrapperPlus;
+import org.holoeverywhere.internal.WindowDecorView;
+import org.holoeverywhere.preference.PreferenceManagerHelper;
+import org.holoeverywhere.preference.SharedPreferences;
+import org.holoeverywhere.util.SparseIntArray;
+import org.holoeverywhere.util.WeaklyMap;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources.Theme;
+import android.os.Build.VERSION;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+import android.view.View.OnCreateContextMenuListener;
+import android.view.ViewGroup.LayoutParams;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuCallbackGetter;
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView.ContextMenuListenersProvider;
+import com.actionbarsherlock.internal.view.menu.ContextMenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.ContextMenuListener;
+import com.actionbarsherlock.internal.view.menu.ContextMenuWrapper;
+import com.actionbarsherlock.view.ContextMenu;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class _HoloActivity extends Watson implements IHoloActivity,
+ ContextMenuListenersProvider {
+ public static final class Holo implements Parcelable {
+ public static final Parcelable.Creator<Holo> CREATOR = new Creator<Holo>() {
+ @Override
+ public Holo createFromParcel(Parcel source) {
+ return new Holo(source);
+ }
+
+ @Override
+ public Holo[] newArray(int size) {
+ return new Holo[size];
+ }
+ };
+
+ public static Holo defaultConfig() {
+ return new Holo();
+ }
+
+ public boolean applyImmediately = false;
+ public boolean forceThemeApply = false;
+ public boolean ignoreApplicationInstanceCheck = false;
+ public boolean ignoreThemeCheck = false;
+ public boolean requireRoboguice = false;
+ public boolean requireSherlock = true;
+ public boolean requireSlider = false;
+ private SparseIntArray windowFeatures;
+
+ public Holo() {
+
+ }
+
+ private Holo(Parcel source) {
+ forceThemeApply = source.readInt() == 1;
+ ignoreThemeCheck = source.readInt() == 1;
+ ignoreApplicationInstanceCheck = source.readInt() == 1;
+ requireSherlock = source.readInt() == 1;
+ requireSlider = source.readInt() == 1;
+ requireRoboguice = source.readInt() == 1;
+ applyImmediately = source.readInt() == 1;
+ windowFeatures = source.readParcelable(SparseIntArray.class.getClassLoader());
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void requestWindowFeature(int feature) {
+ if (windowFeatures == null) {
+ windowFeatures = new SparseIntArray();
+ }
+ windowFeatures.put(feature, 1);
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(forceThemeApply ? 1 : 0);
+ dest.writeInt(ignoreThemeCheck ? 1 : 0);
+ dest.writeInt(ignoreApplicationInstanceCheck ? 1 : 0);
+ dest.writeInt(requireSherlock ? 1 : 0);
+ dest.writeInt(requireSlider ? 1 : 0);
+ dest.writeInt(requireRoboguice ? 1 : 0);
+ dest.writeInt(applyImmediately ? 1 : 0);
+ dest.writeParcelable(windowFeatures, flags);
+ }
+ }
+
+ private static final class HoloThemeException extends RuntimeException {
+ private static final long serialVersionUID = -2346897999325868420L;
+
+ public HoloThemeException(_HoloActivity activity) {
+ super("You must apply Holo.Theme, Holo.Theme.Light or "
+ + "Holo.Theme.Light.DarkActionBar theme on the activity ("
+ + activity.getClass().getSimpleName()
+ + ") for using HoloEverywhere");
+ }
+ }
+
+ private static final String CONFIG_KEY = "holo:config:activity";
+ private Context mActionBarContext;
+ private Holo mConfig;
+ private Map<View, ContextMenuListener> mContextMenuListeners;
+ private WindowDecorView mDecorView;
+ private boolean mForceThemeApply = false;
+ private boolean mInited = false;
+ private int mLastThemeResourceId = 0;
+ private MenuInflater mMenuInflater;
+
+ private final List<WeakReference<OnWindowFocusChangeListener>> mOnWindowFocusChangeListeners = new ArrayList<WeakReference<OnWindowFocusChangeListener>>();
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ if (requestDecorView(view, params, -1)) {
+ mDecorView.addView(view, params);
+ }
+ }
+
+ @Override
+ public void addOnWindowFocusChangeListener(OnWindowFocusChangeListener listener) {
+ synchronized (mOnWindowFocusChangeListeners) {
+ Iterator<WeakReference<OnWindowFocusChangeListener>> i = mOnWindowFocusChangeListeners
+ .iterator();
+ while (i.hasNext()) {
+ WeakReference<OnWindowFocusChangeListener> reference = i.next();
+ if (reference == null) {
+ i.remove();
+ continue;
+ }
+ OnWindowFocusChangeListener iListener = reference.get();
+ if (iListener == null) {
+ i.remove();
+ continue;
+ }
+ if (iListener == listener) {
+ return;
+ }
+ }
+ mOnWindowFocusChangeListeners
+ .add(new WeakReference<OnWindowFocusChangeListener>(listener));
+ }
+ }
+
+ protected Holo createConfig(Bundle savedInstanceState) {
+ if (mConfig == null) {
+ mConfig = onCreateConfig(savedInstanceState);
+ }
+ if (mConfig == null) {
+ mConfig = Holo.defaultConfig();
+ }
+ return mConfig;
+ }
+
+ protected void forceInit(Bundle savedInstanceState) {
+ if (mInited) {
+ return;
+ }
+ if (mConfig == null && savedInstanceState != null
+ && savedInstanceState.containsKey(CONFIG_KEY)) {
+ mConfig = savedInstanceState.getParcelable(CONFIG_KEY);
+ }
+ onInit(mConfig, savedInstanceState);
+ }
+
+ public Holo getConfig() {
+ return mConfig;
+ }
+
+ @Override
+ public ContextMenuListener getContextMenuListener(View view) {
+ if (mContextMenuListeners == null) {
+ return null;
+ }
+ return mContextMenuListeners.get(view);
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences() {
+ return PreferenceManagerHelper.getDefaultSharedPreferences(this);
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences(PreferenceImpl impl) {
+ return PreferenceManagerHelper.getDefaultSharedPreferences(this, impl);
+ }
+
+ public int getLastThemeResourceId() {
+ return mLastThemeResourceId;
+ }
+
+ @Override
+ public LayoutInflater getLayoutInflater() {
+ return LayoutInflater.from(this);
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(PreferenceImpl impl,
+ String name, int mode) {
+ return PreferenceManagerHelper.wrap(this, impl, name, mode);
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(String name, int mode) {
+ return PreferenceManagerHelper.wrap(this, name, mode);
+ }
+
+ /**
+ * @return Themed context for using in action bar
+ */
+ public Context getSupportActionBarContext() {
+ if (mActionBarContext == null) {
+ int theme = ThemeManager.getThemeType(this);
+ if (theme != ThemeManager.LIGHT) {
+ theme = ThemeManager.DARK;
+ }
+ theme = ThemeManager.getThemeResource(theme, false);
+ if (mLastThemeResourceId == theme) {
+ mActionBarContext = this;
+ } else {
+ mActionBarContext = new ContextThemeWrapperPlus(this, theme);
+ }
+ }
+ return mActionBarContext;
+ }
+
+ @Override
+ public Application getSupportApplication() {
+ return Application.getLastInstance();
+ }
+
+ @Override
+ public MenuInflater getSupportMenuInflater() {
+ if (mMenuInflater != null) {
+ return mMenuInflater;
+ }
+ mMenuInflater = new MenuInflater(getSupportActionBarContext(), this);
+ return mMenuInflater;
+ }
+
+ @Override
+ public Object getSystemService(String name) {
+ return SystemServiceManager.getSystemService(this, name);
+ }
+
+ @Override
+ public Theme getTheme() {
+ if (mLastThemeResourceId == 0) {
+ setTheme(ThemeManager.getDefaultTheme());
+ }
+ return super.getTheme();
+ }
+
+ protected final WindowDecorView getWindowDecorView() {
+ return mDecorView;
+ }
+
+ protected void init(Holo config) {
+ init(config, null);
+ }
+
+ protected void init(Holo config, Bundle savedInstanceState) {
+ mConfig = config;
+ if (mConfig.applyImmediately) {
+ onInit(mConfig, savedInstanceState);
+ }
+ }
+
+ @Override
+ public void invalidateOptionsMenu() {
+ supportInvalidateOptionsMenu();
+ }
+
+ @Override
+ public boolean isForceThemeApply() {
+ return mForceThemeApply;
+ }
+
+ public boolean isInited() {
+ return mInited;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onBackPressed() {
+ if (!getSupportFragmentManager().popBackStackImmediate()) {
+ finish();
+ }
+ }
+
+ @Override
+ public final boolean onContextItemSelected(android.view.MenuItem item) {
+ return onContextItemSelected(new ContextMenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onContextItemSelected(MenuItem item) {
+ if (item instanceof ContextMenuItemWrapper) {
+ return super.onContextItemSelected(((ContextMenuItemWrapper) item)
+ .unwrap());
+ }
+ return false;
+ }
+
+ @Override
+ public final void onContextMenuClosed(android.view.Menu menu) {
+ if (menu instanceof android.view.ContextMenu) {
+ onContextMenuClosed(new ContextMenuWrapper(
+ (android.view.ContextMenu) menu));
+ } else {
+ super.onContextMenuClosed(menu);
+ }
+ }
+
+ @Override
+ public void onContextMenuClosed(ContextMenu menu) {
+ if (menu instanceof ContextMenuWrapper) {
+ super.onContextMenuClosed(((ContextMenuWrapper) menu).unwrap());
+ }
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ forceInit(savedInstanceState);
+ super.onCreate(savedInstanceState);
+ }
+
+ protected Holo onCreateConfig(Bundle savedInstanceState) {
+ if (savedInstanceState != null && savedInstanceState.containsKey(CONFIG_KEY)) {
+ final Holo config = savedInstanceState.getParcelable(CONFIG_KEY);
+ if (config != null) {
+ return config;
+ }
+ }
+ return Holo.defaultConfig();
+ }
+
+ @Override
+ public final void onCreateContextMenu(android.view.ContextMenu menu,
+ View v, ContextMenuInfo menuInfo) {
+ onCreateContextMenu(new ContextMenuWrapper(menu), v, menuInfo);
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View view,
+ ContextMenuInfo menuInfo) {
+ final android.view.ContextMenu nativeMenu;
+ if (menu instanceof ContextMenuWrapper) {
+ nativeMenu = ((ContextMenuWrapper) menu).unwrap();
+ super.onCreateContextMenu(nativeMenu, view, menuInfo);
+ if (view instanceof ContextMenuCallbackGetter) {
+ final OnCreateContextMenuListener l = ((ContextMenuCallbackGetter) view)
+ .getOnCreateContextMenuListener();
+ if (l != null) {
+ l.onCreateContextMenu(nativeMenu, view, menuInfo);
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return false;
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ LayoutInflater.removeInstance(this);
+ }
+
+ /**
+ * Do not override this method. Use {@link #onPreInit(Holo, Bundle)} and
+ * {@link #onPostInit(Holo, Bundle)}
+ */
+ protected void onInit(Holo config, Bundle savedInstanceState) {
+ if (mInited) {
+ throw new IllegalStateException("This instance was already inited");
+ }
+ mInited = true;
+ if (config == null) {
+ config = createConfig(savedInstanceState);
+ }
+ if (config == null) {
+ config = Holo.defaultConfig();
+ }
+ onPreInit(config, savedInstanceState);
+ if (!config.ignoreApplicationInstanceCheck && !(getApplication() instanceof Application)) {
+ String text = "Application instance isn't HoloEverywhere.\n";
+ if (getApplication().getClass() == android.app.Application.class) {
+ text += "Put attr 'android:name=\"org.holoeverywhere.app.Application\"'" +
+ " in <application> tag of AndroidManifest.xml";
+ } else {
+ text += "Please sure that you extend " + getApplication().getClass() +
+ " from a org.holoeverywhere.app.Application";
+ }
+ throw new IllegalStateException(text);
+ }
+ getLayoutInflater().setFragmentActivity(this);
+ if (this instanceof Activity) {
+ Activity activity = (Activity) this;
+ if (config.requireRoboguice) {
+ activity.addon(Activity.ADDON_ROBOGUICE);
+ }
+ if (config.requireSlider) {
+ activity.addon(Activity.ADDON_SLIDER);
+ }
+ if (config.requireSherlock) {
+ activity.addonSherlock();
+ }
+ final SparseIntArray windowFeatures = config.windowFeatures;
+ if (windowFeatures != null) {
+ for (int i = 0; i < windowFeatures.size(); i++) {
+ if (windowFeatures.valueAt(i) > 0) {
+ requestWindowFeature((long) windowFeatures.keyAt(i));
+ }
+ }
+ }
+ boolean forceThemeApply = isForceThemeApply();
+ if (config.forceThemeApply) {
+ setForceThemeApply(forceThemeApply = true);
+ }
+ if (mLastThemeResourceId == 0) {
+ forceThemeApply = true;
+ }
+ ThemeManager.applyTheme(activity, forceThemeApply);
+ if (!config.ignoreThemeCheck && ThemeManager.getThemeType(this) == ThemeManager.INVALID) {
+ throw new HoloThemeException(activity);
+ }
+ }
+ onPostInit(config, savedInstanceState);
+ lockAttaching();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ requestDecorView(null, null, -1);
+ super.onPostCreate(savedInstanceState);
+ }
+
+ protected void onPostInit(Holo config, Bundle savedInstanceState) {
+
+ }
+
+ protected void onPreInit(Holo config, Bundle savedInstanceState) {
+
+ }
+
+ @Override
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return false;
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ if (mConfig != null) {
+ outState.putParcelable(CONFIG_KEY, mConfig);
+ }
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasFocus) {
+ super.onWindowFocusChanged(hasFocus);
+ synchronized (mOnWindowFocusChangeListeners) {
+ Iterator<WeakReference<OnWindowFocusChangeListener>> i = mOnWindowFocusChangeListeners
+ .iterator();
+ while (i.hasNext()) {
+ WeakReference<OnWindowFocusChangeListener> reference = i.next();
+ if (reference == null) {
+ i.remove();
+ continue;
+ }
+ OnWindowFocusChangeListener iListener = reference.get();
+ if (iListener == null) {
+ i.remove();
+ continue;
+ }
+ iListener.onWindowFocusChanged(hasFocus);
+ }
+ }
+ }
+
+ @Override
+ public void registerForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.registerForContextMenu(view);
+ } else {
+ registerForContextMenu(view, this);
+ }
+ }
+
+ public void registerForContextMenu(View view, ContextMenuListener listener) {
+ if (mContextMenuListeners == null) {
+ mContextMenuListeners = new WeaklyMap<View, ContextMenuListener>();
+ }
+ mContextMenuListeners.put(view, listener);
+ view.setLongClickable(true);
+ }
+
+ private boolean requestDecorView(View view, LayoutParams params, int layoutRes) {
+ if (mDecorView != null) {
+ return true;
+ }
+ mDecorView = new WindowDecorView(this);
+ mDecorView.setId(android.R.id.content);
+ mDecorView.setProvider(this);
+ if (view != null) {
+ mDecorView.addView(view, params);
+ } else if (layoutRes > 0) {
+ getLayoutInflater().inflate(layoutRes, mDecorView, true);
+ }
+ final LayoutParams p = new LayoutParams(
+ LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.installDecorView(mDecorView, p);
+ }
+
+ @Override
+ public void justPost() {
+ getWindow().setContentView(mDecorView, p);
+ }
+ });
+ return false;
+ }
+
+ @Override
+ public void requestWindowFeature(long featureId) {
+ if (!mInited) {
+ createConfig(null).requestWindowFeature((int) featureId);
+ }
+ }
+
+ @Override
+ public void setContentView(int layoutResID) {
+ if (requestDecorView(null, null, layoutResID)) {
+ mDecorView.removeAllViewsInLayout();
+ getLayoutInflater().inflate(layoutResID, mDecorView, true);
+ }
+ }
+
+ @Override
+ public void setContentView(View view) {
+ setContentView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ if (requestDecorView(view, params, -1)) {
+ mDecorView.removeAllViewsInLayout();
+ mDecorView.addView(view, params);
+ }
+ }
+
+ public void setForceThemeApply(boolean forceThemeApply) {
+ mForceThemeApply = forceThemeApply;
+ }
+
+ @Override
+ public void setTheme(int resid) {
+ setTheme(resid, true);
+ }
+
+ public synchronized void setTheme(int resid, boolean modifyGlobal) {
+ if (resid > ThemeManager._START_RESOURCES_ID) {
+ if (mLastThemeResourceId != resid) {
+ mActionBarContext = null;
+ mMenuInflater = null;
+ super.setTheme(mLastThemeResourceId = resid);
+ }
+ } else {
+ if ((resid & ThemeManager.COLOR_SCHEME_MASK) == 0) {
+ int theme = ThemeManager.getTheme(getIntent(), false);
+ if (theme == 0) {
+ theme = ThemeManager.getTheme(getParentActivityIntent(), false);
+ }
+ theme &= ThemeManager.COLOR_SCHEME_MASK;
+ if (theme != 0) {
+ resid |= theme;
+ }
+ }
+ setTheme(ThemeManager.getThemeResource(resid, modifyGlobal));
+ }
+ }
+
+ @Override
+ public void startActivities(Intent[] intents) {
+ startActivities(intents, null);
+ }
+
+ @Override
+ public void startActivities(Intent[] intents, Bundle options) {
+ for (Intent intent : intents) {
+ startActivity(intent, options);
+ }
+ }
+
+ @Override
+ public void startActivity(Intent intent) {
+ startActivity(intent, null);
+ }
+
+ @Override
+ public void startActivity(Intent intent, Bundle options) {
+ startActivityForResult(intent, -1, options);
+ }
+
+ @Override
+ public void startActivityForResult(Intent intent, int requestCode) {
+ startActivityForResult(intent, requestCode, null);
+ }
+
+ @Override
+ public void startActivityForResult(Intent intent, int requestCode,
+ Bundle options) {
+ if (HoloEverywhere.ALWAYS_USE_PARENT_THEME) {
+ ThemeManager.startActivity(this, intent, requestCode, options);
+ } else {
+ superStartActivity(intent, requestCode, options);
+ }
+ }
+
+ @Override
+ public android.content.SharedPreferences superGetSharedPreferences(
+ String name, int mode) {
+ return super.getSharedPreferences(name, mode);
+ }
+
+ @Override
+ public Object superGetSystemService(String name) {
+ return super.getSystemService(name);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void superStartActivity(Intent intent, int requestCode,
+ Bundle options) {
+ if (VERSION.SDK_INT >= 16) {
+ super.startActivityForResult(intent, requestCode, options);
+ } else {
+ super.startActivityForResult(intent, requestCode);
+ }
+ }
+
+ @Override
+ public void supportInvalidateOptionsMenu() {
+ if (VERSION.SDK_INT >= 11) {
+ super.invalidateOptionsMenu();
+ }
+ }
+
+ @Override
+ public void unregisterForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.unregisterForContextMenu(view);
+ } else {
+ if (mContextMenuListeners != null) {
+ mContextMenuListeners.remove(view);
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragment.java b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragment.java
new file mode 100644
index 0000000000..22b2d86095
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragment.java
@@ -0,0 +1,282 @@
+
+package android.support.v4.app;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.HoloEverywhere.PreferenceImpl;
+import org.holoeverywhere.IHoloFragment;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.app.Application;
+import org.holoeverywhere.preference.SharedPreferences;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.util.AttributeSet;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView;
+import com.actionbarsherlock.internal.view.menu.ContextMenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.ContextMenuListener;
+import com.actionbarsherlock.internal.view.menu.ContextMenuWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.ContextMenu;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class _HoloFragment extends android.support.v4.app.Fragment implements
+ IHoloFragment {
+ private Activity mActivity;
+ boolean mDetachChildFragments = true;
+ boolean mDontSaveMe = false;
+
+ protected void dontSaveMe() {
+ mDontSaveMe = true;
+ }
+
+ public final int getContainerId() {
+ return mContainerId;
+ }
+
+ @Override
+ public ContextMenuListener getContextMenuListener(View view) {
+ return mActivity.getContextMenuListener(view);
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences() {
+ return mActivity.getDefaultSharedPreferences();
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences(PreferenceImpl impl) {
+ return mActivity.getDefaultSharedPreferences(impl);
+ }
+
+ @Override
+ public abstract LayoutInflater getLayoutInflater();
+
+ @Override
+ @Deprecated
+ /**
+ * It's method internal. Don't use or override it
+ */
+ public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
+ return getLayoutInflater();
+ }
+
+ public MenuInflater getMenuInflater() {
+ return mActivity.getSupportMenuInflater();
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(PreferenceImpl impl,
+ String name, int mode) {
+ return mActivity.getSharedPreferences(impl, name, mode);
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(String name, int mode) {
+ return mActivity.getSharedPreferences(name, mode);
+ }
+
+ @Override
+ public ActionBar getSupportActionBar() {
+ return mActivity.getSupportActionBar();
+ }
+
+ public Context getSupportActionBarContext() {
+ return mActivity.getSupportActionBarContext();
+ }
+
+ @Override
+ public Activity getSupportActivity() {
+ return mActivity;
+ }
+
+ @Override
+ public Application getSupportApplication() {
+ return mActivity.getSupportApplication();
+ }
+
+ @Override
+ public FragmentManager getSupportFragmentManager() {
+ if (mActivity != null) {
+ return mActivity.getSupportFragmentManager();
+ } else {
+ return getFragmentManager();
+ }
+ }
+
+ public Object getSystemService(String name) {
+ return mActivity.getSystemService(name);
+ }
+
+ public boolean isDetachChildFragments() {
+ return mDetachChildFragments;
+ }
+
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ }
+
+ @Override
+ public final void onAttach(android.app.Activity activity) {
+ if (!(activity instanceof Activity)) {
+ throw new RuntimeException(
+ "HoloEverywhere.Fragment must be attached to HoloEverywhere.Activity");
+ }
+ mActivity = (Activity) activity;
+ onAttach((Activity) activity);
+ }
+
+ @Override
+ public final boolean onContextItemSelected(android.view.MenuItem item) {
+ return onContextItemSelected(new ContextMenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onContextItemSelected(MenuItem item) {
+ return mActivity.onContextItemSelected(item);
+ }
+
+ @Override
+ public void onContextMenuClosed(ContextMenu menu) {
+ mActivity.onContextMenuClosed(menu);
+ }
+
+ @Override
+ public final void onCreateContextMenu(android.view.ContextMenu menu,
+ View v, ContextMenuInfo menuInfo) {
+ onCreateContextMenu(new ContextMenuWrapper(menu), v, menuInfo);
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View v,
+ ContextMenuInfo menuInfo) {
+ mActivity.onCreateContextMenu(menu, v, menuInfo);
+ }
+
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu,
+ android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), getMenuInflater());
+ }
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+
+ }
+
+ @Override
+ public final View onCreateView(android.view.LayoutInflater inflater,
+ ViewGroup container, Bundle savedInstanceState) {
+ ContextMenuDecorView decorView = new ContextMenuDecorView(mActivity);
+ decorView.setProvider(this);
+ final View view = onCreateView(getLayoutInflater(), decorView, savedInstanceState);
+ if (view == null) {
+ return null;
+ }
+ decorView.addView(view);
+ return decorView;
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ return super.onCreateView(inflater, container, savedInstanceState);
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ if (mChildFragmentManager != null && mChildFragmentManager.mActive != null
+ && mDetachChildFragments) {
+ for (Fragment fragment : mChildFragmentManager.mActive) {
+ if (fragment == null || !fragment.mFromLayout) {
+ continue;
+ }
+ mChildFragmentManager.detachFragment(fragment, 0, 0);
+ }
+ }
+ }
+
+ @Override
+ public void onInflate(Activity activity, AttributeSet attrs,
+ Bundle savedInstanceState) {
+ super.onInflate(activity, attrs, savedInstanceState);
+ }
+
+ @Override
+ public final void onInflate(android.app.Activity activity,
+ AttributeSet attrs, Bundle savedInstanceState) {
+ onInflate((Activity) activity, attrs, savedInstanceState);
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return onOptionsItemSelected(new MenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+ @Override
+ public final void onPrepareOptionsMenu(android.view.Menu menu) {
+ onPrepareOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ }
+
+ /**
+ * Use {@link #onViewCreated(View, Bundle)} instead
+ */
+ @Deprecated
+ public void onViewCreated(View view) {
+
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ onViewCreated(view);
+ }
+
+ public boolean openContextMenu(View v) {
+ return v.showContextMenu();
+ }
+
+ @Override
+ public void registerForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.registerForContextMenu(view);
+ } else {
+ mActivity.registerForContextMenu(view, this);
+ }
+ }
+
+ /**
+ * If true this fragment will be detach all inflated child fragments after
+ * destory view
+ */
+ public void setDetachChildFragments(boolean detachChildFragments) {
+ mDetachChildFragments = detachChildFragments;
+ }
+
+ @Override
+ public void unregisterForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.unregisterForContextMenu(view);
+ } else {
+ mActivity.unregisterForContextMenu(view);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragmentInflater.java b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragmentInflater.java
new file mode 100644
index 0000000000..2b9dbe84bd
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/android/support/v4/app/_HoloFragmentInflater.java
@@ -0,0 +1,119 @@
+
+package android.support.v4.app;
+
+import org.holoeverywhere.LayoutInflater;
+
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.content.res.TypedArray;
+import android.support.v4.app.FragmentActivity.FragmentTag;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class _HoloFragmentInflater {
+ private static View inflate(AttributeSet attrs, View parent, FragmentActivity activity,
+ Fragment parentFragment) {
+ String fname = attrs.getAttributeValue(null, "class");
+ TypedArray a = activity.obtainStyledAttributes(attrs, FragmentTag.Fragment);
+ if (fname == null) {
+ fname = a.getString(FragmentTag.Fragment_name);
+ }
+ if (fname.startsWith(".")) {
+ fname = activity.getPackageName() + fname;
+ }
+ int id = a.getResourceId(FragmentTag.Fragment_id, View.NO_ID);
+ String tag = a.getString(FragmentTag.Fragment_tag);
+ a.recycle();
+ int containerId = parent != null ? parent.getId() : 0;
+ if (containerId == View.NO_ID && id == View.NO_ID && tag == null) {
+ throw new IllegalArgumentException(
+ attrs.getPositionDescription()
+ + ": Must specify unique android:id, android:tag, or have a parent with an id for "
+ + fname);
+ }
+ final FragmentManagerImpl fm = obtainFragmentManager(activity, parentFragment);
+ Fragment fragment = id != View.NO_ID ? fm.findFragmentById(id) : null;
+ if (fragment == null && tag != null) {
+ fragment = fm.findFragmentByTag(tag);
+ }
+ if (fragment == null && containerId != View.NO_ID) {
+ fragment = fm.findFragmentById(containerId);
+ }
+ if (fragment == null) {
+ fragment = Fragment.instantiate(activity, fname);
+ fragment.mParentFragment = parentFragment;
+ fragment.mFromLayout = true;
+ fragment.mFragmentId = id != 0 ? id : containerId;
+ fragment.mContainer = (ViewGroup) parent;
+ fragment.mContainerId = containerId;
+ fragment.mTag = tag;
+ fragment.mInLayout = true;
+ fragment.mFragmentManager = fm;
+ fragment.onInflate(activity, attrs, fragment.mSavedFragmentState);
+ fm.addFragment(fragment, false);
+ fm.moveToState(fragment, Fragment.CREATED, 0, 0, false);
+ } else if (fragment.mInLayout) {
+ throw new IllegalArgumentException(attrs.getPositionDescription()
+ + ": Duplicate id 0x" + Integer.toHexString(id)
+ + ", tag " + tag + ", or parent id 0x" + Integer.toHexString(containerId)
+ + " with another fragment for " + fname);
+ } else {
+ fragment.mInLayout = true;
+ if (!fragment.mRetaining) {
+ fragment.onInflate(activity, attrs, fragment.mSavedFragmentState);
+ }
+ fm.moveToState(fragment, Fragment.CREATED, 0, 0, false);
+ }
+ if (fragment.mView == null) {
+ throw new IllegalStateException("Fragment " + fname
+ + " did not create a view.");
+ }
+ if (id != 0) {
+ fragment.mView.setId(id);
+ }
+ if (fragment.mView.getTag() == null) {
+ fragment.mView.setTag(tag);
+ }
+ return fragment.mView;
+ }
+
+ public static View inflate(LayoutInflater layoutInflater, AttributeSet attrs, View parent,
+ Fragment fragment) {
+ FragmentActivity activity = layoutInflater.getFragmentActivity();
+ if (activity != null) {
+ return inflate(attrs, parent, activity, fragment);
+ }
+ Context context = layoutInflater.getContext();
+ while (context instanceof ContextWrapper) {
+ if (context instanceof FragmentActivity) {
+ activity = (FragmentActivity) context;
+ break;
+ }
+ context = ((ContextWrapper) context).getBaseContext();
+ }
+ if (activity == null) {
+ throw new IllegalStateException("Cannot find any reference to FragmentActivity");
+ }
+ return inflate(attrs, parent, activity, fragment);
+ }
+
+ private static FragmentManagerImpl obtainFragmentManager(FragmentActivity activity,
+ Fragment fragment) {
+ FragmentManagerImpl fm = null;
+ if (fragment != null) {
+ fm = fragment.mChildFragmentManager;
+ if (fm == null) {
+ try {
+ fm = (FragmentManagerImpl) fragment.getChildFragmentManager();
+ } catch (ClassCastException e) {
+ fm = fragment.mChildFragmentManager;
+ }
+ }
+ }
+ if (fm == null && activity != null) {
+ fm = activity.mFragments;
+ }
+ return fm;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuBuilder.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuBuilder.java
new file mode 100644
index 0000000000..b505bd1bcb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuBuilder.java
@@ -0,0 +1,99 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.lang.reflect.Method;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.IBinder;
+import android.util.EventLog;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+import com.actionbarsherlock.view.ContextMenu;
+
+public class ContextMenuBuilder extends MenuBuilder implements ContextMenu {
+ public static interface ContextMenuInfoGetter {
+ public ContextMenuInfo getContextMenuInfo();
+ }
+
+ private ContextMenuInfo mContextMenuInfo;
+ private ContextMenuListener mListener;
+
+ public ContextMenuBuilder(Context context, ContextMenuListener listener) {
+ super(context);
+ setContextMenuListener(listener);
+ }
+
+ public ContextMenuInfo getContextMenuInfo() {
+ return mContextMenuInfo;
+ }
+
+ protected ContextMenuInfo getContextMenuInfo(View view) {
+ if (view instanceof ContextMenuInfoGetter) {
+ return ((ContextMenuInfoGetter) view).getContextMenuInfo();
+ }
+ ContextMenuInfo menuInfo = null;
+ try {
+ Method method = View.class.getDeclaredMethod("getContextMenuInfo");
+ method.setAccessible(true);
+ menuInfo = (ContextMenuInfo) method.invoke(view);
+ } catch (Exception e) {
+ }
+ return menuInfo;
+ }
+
+ public ContextMenuListener getContextMenuListener() {
+ return mListener;
+ }
+
+ public void setContextMenuListener(ContextMenuListener listener) {
+ mListener = listener;
+ }
+
+ @Override
+ public ContextMenu setHeaderIcon(Drawable icon) {
+ return (ContextMenu) super.setHeaderIconInt(icon);
+ }
+
+ @Override
+ public ContextMenu setHeaderIcon(int iconRes) {
+ return (ContextMenu) super.setHeaderIconInt(iconRes);
+ }
+
+ @Override
+ public ContextMenu setHeaderTitle(CharSequence title) {
+ return (ContextMenu) super.setHeaderTitleInt(title);
+ }
+
+ @Override
+ public ContextMenu setHeaderTitle(int titleRes) {
+ return (ContextMenu) super.setHeaderTitleInt(titleRes);
+ }
+
+ @Override
+ public ContextMenu setHeaderView(View view) {
+ return (ContextMenu) super.setHeaderViewInt(view);
+ }
+
+ @SuppressLint("NewApi")
+ public MenuDialogHelper show(View originalView, IBinder token) {
+ if (mListener == null) {
+ throw new IllegalStateException(
+ "Cannot show context menu without reference on ContextMenuListener");
+ }
+ mContextMenuInfo = getContextMenuInfo(originalView);
+ mListener.onCreateContextMenu(this, originalView, mContextMenuInfo);
+ if (getVisibleItems().size() > 0) {
+ if (VERSION.SDK_INT >= 8) {
+ EventLog.writeEvent(50001, 1);
+ }
+ MenuDialogHelper helper = new MenuDialogHelper(this);
+ helper.show(token);
+ return helper;
+ }
+ return null;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuCallbackGetter.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuCallbackGetter.java
new file mode 100644
index 0000000000..29338d1d8a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuCallbackGetter.java
@@ -0,0 +1,8 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.view.View.OnCreateContextMenuListener;
+
+public interface ContextMenuCallbackGetter {
+ public OnCreateContextMenuListener getOnCreateContextMenuListener();
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuDecorView.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuDecorView.java
new file mode 100644
index 0000000000..1f293ddc65
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuDecorView.java
@@ -0,0 +1,101 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.widget.FrameLayout;
+
+import android.content.Context;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.actionbarsherlock.view.ContextMenu;
+import com.actionbarsherlock.view.MenuItem;
+
+public class ContextMenuDecorView extends FrameLayout implements
+ MenuPresenter.Callback, MenuBuilder.Callback {
+ public interface ContextMenuListenersProvider {
+ public ContextMenuListener getContextMenuListener(View view);
+ }
+
+ private ContextMenuBuilder mContextMenu;
+ private ContextMenuListener mListener;
+ private MenuDialogHelper mMenuDialogHelper;
+ private ContextMenuListenersProvider mProvider;
+
+ public ContextMenuDecorView(Context context) {
+ super(context);
+ setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (mListener == null) {
+ return;
+ }
+ mListener.onContextMenuClosed((ContextMenu) menu);
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ return false;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ if (mListener == null) {
+ return false;
+ }
+ if (menu instanceof ContextMenuBuilder
+ && item instanceof MenuItemImpl) {
+ ((MenuItemImpl) item).setMenuInfo(((ContextMenuBuilder) menu)
+ .getContextMenuInfo());
+ }
+ return mListener.onContextItemSelected(item);
+ }
+
+ @Override
+ public void onMenuModeChange(MenuBuilder menu) {
+
+ }
+
+ @Override
+ public boolean onOpenSubMenu(MenuBuilder subMenu) {
+ return false;
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ return false;
+ }
+
+ public void setProvider(ContextMenuListenersProvider provider) {
+ mProvider = provider;
+ }
+
+ @Override
+ public boolean showContextMenuForChild(View originalView) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ return super.showContextMenuForChild(originalView);
+ }
+ mListener = mProvider.getContextMenuListener(originalView);
+ if (mListener == null) {
+ return false;
+ }
+ if (mContextMenu == null) {
+ mContextMenu = new ContextMenuBuilder(getContext(), mListener);
+ mContextMenu.setCallback(this);
+ } else {
+ mContextMenu.clearAll();
+ mContextMenu.setContextMenuListener(mListener);
+ }
+ mMenuDialogHelper = mContextMenu.show(originalView, originalView.getWindowToken());
+ if (mMenuDialogHelper != null) {
+ mMenuDialogHelper.setPresenterCallback(this);
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuItemWrapper.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuItemWrapper.java
new file mode 100644
index 0000000000..dde084f3d9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuItemWrapper.java
@@ -0,0 +1,17 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.view.MenuItem;
+
+public class ContextMenuItemWrapper extends MenuItemWrapper {
+ private final MenuItem nativeItem;
+
+ public ContextMenuItemWrapper(MenuItem nativeItem) {
+ super(nativeItem);
+ this.nativeItem = nativeItem;
+ }
+
+ public MenuItem unwrap() {
+ return nativeItem;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuListener.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuListener.java
new file mode 100644
index 0000000000..63f24f5924
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuListener.java
@@ -0,0 +1,16 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+import com.actionbarsherlock.view.ContextMenu;
+import com.actionbarsherlock.view.MenuItem;
+
+public interface ContextMenuListener {
+ public boolean onContextItemSelected(MenuItem item);
+
+ public void onContextMenuClosed(ContextMenu menu);
+
+ public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuWrapper.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuWrapper.java
new file mode 100644
index 0000000000..d9b197b184
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ContextMenuWrapper.java
@@ -0,0 +1,56 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+import com.actionbarsherlock.view.ContextMenu;
+
+public class ContextMenuWrapper extends MenuWrapper implements ContextMenu {
+ private android.view.ContextMenu nativeMenu;
+
+ public ContextMenuWrapper(android.view.ContextMenu nativeMenu) {
+ super(nativeMenu);
+ this.nativeMenu = nativeMenu;
+ }
+
+ @Override
+ public void clearHeader() {
+ nativeMenu.clearHeader();
+ }
+
+ @Override
+ public ContextMenu setHeaderIcon(Drawable icon) {
+ nativeMenu.setHeaderIcon(icon);
+ return this;
+ }
+
+ @Override
+ public ContextMenu setHeaderIcon(int iconRes) {
+ nativeMenu.setHeaderIcon(iconRes);
+ return this;
+ }
+
+ @Override
+ public ContextMenu setHeaderTitle(CharSequence title) {
+ nativeMenu.setHeaderTitle(title);
+ return this;
+ }
+
+ @Override
+ public ContextMenu setHeaderTitle(int titleRes) {
+ nativeMenu.setHeaderTitle(titleRes);
+ return this;
+ }
+
+ @Override
+ public ContextMenu setHeaderView(View view) {
+ nativeMenu.setHeaderView(view);
+ return this;
+ }
+
+ @Override
+ public android.view.ContextMenu unwrap() {
+ return nativeMenu;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ExpandedMenuView.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ExpandedMenuView.java
new file mode 100644
index 0000000000..11c1647992
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ExpandedMenuView.java
@@ -0,0 +1,54 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import org.holoeverywhere.widget.ListView;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+
+import com.actionbarsherlock.internal.view.menu.MenuBuilder.ItemInvoker;
+
+public final class ExpandedMenuView extends ListView implements ItemInvoker,
+ MenuView, OnItemClickListener {
+ private int mAnimations;
+ private MenuBuilder mMenu;
+
+ public ExpandedMenuView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ TypedValue value = new TypedValue();
+ context.getTheme().resolveAttribute(
+ android.R.attr.windowAnimationStyle, value, true);
+ mAnimations = value.resourceId;
+ setOnItemClickListener(this);
+ }
+
+ @Override
+ public int getWindowAnimations() {
+ return mAnimations;
+ }
+
+ @Override
+ public void initialize(MenuBuilder menu) {
+ mMenu = menu;
+ }
+
+ @Override
+ public boolean invokeItem(MenuItemImpl item) {
+ return mMenu.performItemAction(item, 0);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ setChildrenDrawingCacheEnabled(false);
+ }
+
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
+ invokeItem((MenuItemImpl) getAdapter().getItem(position));
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/HoloListMenuItemView.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/HoloListMenuItemView.java
new file mode 100644
index 0000000000..2fa871e719
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/HoloListMenuItemView.java
@@ -0,0 +1,259 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.LinearLayout;
+import org.holoeverywhere.widget.TextView;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.RadioButton;
+
+public class HoloListMenuItemView extends LinearLayout implements
+ MenuView.ItemView {
+ private Drawable mBackground;
+ private CheckBox mCheckBox;
+ private boolean mForceShowIcon;
+ private ImageView mIconView;
+ private LayoutInflater mInflater;
+ private MenuItemImpl mItemData;
+ private boolean mPreserveIconSpacing;
+ private RadioButton mRadioButton;
+ private TextView mShortcutView;
+ private int mTextAppearance;
+ private Context mTextAppearanceContext;
+ private TextView mTitleView;
+
+ public HoloListMenuItemView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public HoloListMenuItemView(Context context, AttributeSet attrs,
+ int defStyle) {
+ super(context, attrs);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.MenuView, defStyle, 0);
+ mBackground = a.getDrawable(R.styleable.MenuView_dialogItemBackground);
+ mTextAppearance = a.getResourceId(
+ R.styleable.MenuView_dialogItemTextAppearance, -1);
+ mPreserveIconSpacing = a.getBoolean(
+ R.styleable.MenuView_android_preserveIconSpacing, false);
+ mTextAppearanceContext = context;
+ a.recycle();
+ }
+
+ private LayoutInflater getInflater() {
+ if (mInflater == null) {
+ mInflater = LayoutInflater.from(getContext());
+ }
+ return mInflater;
+ }
+
+ @Override
+ public MenuItemImpl getItemData() {
+ return mItemData;
+ }
+
+ @Override
+ public void initialize(MenuItemImpl itemData, int menuType) {
+ mItemData = itemData;
+ setVisibility(itemData.isVisible() ? View.VISIBLE : View.GONE);
+ setTitle(itemData.getTitleForItemView(this));
+ setCheckable(itemData.isCheckable());
+ setShortcut(itemData.shouldShowShortcut(), itemData.getShortcut());
+ setIcon(itemData.getIcon());
+ setEnabled(itemData.isEnabled());
+ }
+
+ private void insertCheckBox() {
+ LayoutInflater inflater = getInflater();
+ mCheckBox = (CheckBox) inflater.inflate(
+ R.layout.list_menu_item_checkbox, this, false);
+ addView(mCheckBox);
+ }
+
+ private void insertIconView() {
+ LayoutInflater inflater = getInflater();
+ mIconView = (ImageView) inflater.inflate(R.layout.list_menu_item_icon,
+ this, false);
+ addView(mIconView, 0);
+ }
+
+ private void insertRadioButton() {
+ LayoutInflater inflater = getInflater();
+ mRadioButton = (RadioButton) inflater.inflate(
+ R.layout.list_menu_item_radio, this, false);
+ addView(mRadioButton);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ setBackgroundDrawable(mBackground);
+ mTitleView = (TextView) findViewById(R.id.title);
+ if (mTextAppearance != -1) {
+ mTitleView.setTextAppearance(mTextAppearanceContext,
+ mTextAppearance);
+ }
+ mShortcutView = (TextView) findViewById(R.id.shortcut);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (mIconView != null && mPreserveIconSpacing) {
+ // Enforce minimum icon spacing
+ ViewGroup.LayoutParams lp = getLayoutParams();
+ LayoutParams iconLp = (LayoutParams) mIconView.getLayoutParams();
+ if (lp.height > 0 && iconLp.width <= 0) {
+ iconLp.width = lp.height;
+ }
+ }
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+
+ @Override
+ public boolean prefersCondensedTitle() {
+ return false;
+ }
+
+ @Override
+ public void setCheckable(boolean checkable) {
+ if (!checkable && mRadioButton == null && mCheckBox == null) {
+ return;
+ }
+
+ // Depending on whether its exclusive check or not, the checkbox or
+ // radio button will be the one in use (and the other will be
+ // otherCompoundButton)
+ final CompoundButton compoundButton;
+ final CompoundButton otherCompoundButton;
+
+ if (mItemData.isExclusiveCheckable()) {
+ if (mRadioButton == null) {
+ insertRadioButton();
+ }
+ compoundButton = mRadioButton;
+ otherCompoundButton = mCheckBox;
+ } else {
+ if (mCheckBox == null) {
+ insertCheckBox();
+ }
+ compoundButton = mCheckBox;
+ otherCompoundButton = mRadioButton;
+ }
+
+ if (checkable) {
+ compoundButton.setChecked(mItemData.isChecked());
+
+ final int newVisibility = checkable ? View.VISIBLE : View.GONE;
+ if (compoundButton.getVisibility() != newVisibility) {
+ compoundButton.setVisibility(newVisibility);
+ }
+
+ // Make sure the other compound button isn't visible
+ if (otherCompoundButton != null
+ && otherCompoundButton.getVisibility() != View.GONE) {
+ otherCompoundButton.setVisibility(View.GONE);
+ }
+ } else {
+ if (mCheckBox != null) {
+ mCheckBox.setVisibility(View.GONE);
+ }
+ if (mRadioButton != null) {
+ mRadioButton.setVisibility(View.GONE);
+ }
+ }
+ }
+
+ @Override
+ public void setChecked(boolean checked) {
+ CompoundButton compoundButton;
+
+ if (mItemData.isExclusiveCheckable()) {
+ if (mRadioButton == null) {
+ insertRadioButton();
+ }
+ compoundButton = mRadioButton;
+ } else {
+ if (mCheckBox == null) {
+ insertCheckBox();
+ }
+ compoundButton = mCheckBox;
+ }
+
+ compoundButton.setChecked(checked);
+ }
+
+ public void setForceShowIcon(boolean forceShow) {
+ mPreserveIconSpacing = mForceShowIcon = forceShow;
+ }
+
+ @Override
+ public void setIcon(Drawable icon) {
+ final boolean showIcon = mItemData.shouldShowIcon() || mForceShowIcon;
+ if (!showIcon && !mPreserveIconSpacing) {
+ return;
+ }
+
+ if (mIconView == null && icon == null && !mPreserveIconSpacing) {
+ return;
+ }
+
+ if (mIconView == null) {
+ insertIconView();
+ }
+
+ if (icon != null || mPreserveIconSpacing) {
+ mIconView.setImageDrawable(showIcon ? icon : null);
+
+ if (mIconView.getVisibility() != View.VISIBLE) {
+ mIconView.setVisibility(View.VISIBLE);
+ }
+ } else {
+ mIconView.setVisibility(View.GONE);
+ }
+ }
+
+ @Override
+ public void setShortcut(boolean showShortcut, char shortcutKey) {
+ final int newVisibility = showShortcut
+ && mItemData.shouldShowShortcut() ? View.VISIBLE : View.GONE;
+
+ if (newVisibility == View.VISIBLE) {
+ mShortcutView.setText(mItemData.getShortcutLabel());
+ }
+
+ if (mShortcutView.getVisibility() != newVisibility) {
+ mShortcutView.setVisibility(newVisibility);
+ }
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ if (title != null) {
+ mTitleView.setText(title);
+
+ if (mTitleView.getVisibility() != View.VISIBLE) {
+ mTitleView.setVisibility(View.VISIBLE);
+ }
+ } else {
+ if (mTitleView.getVisibility() != View.GONE) {
+ mTitleView.setVisibility(View.GONE);
+ }
+ }
+ }
+
+ @Override
+ public boolean showsIcon() {
+ return mForceShowIcon;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ListMenuPresenter.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ListMenuPresenter.java
new file mode 100644
index 0000000000..6f5a3c4475
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/ListMenuPresenter.java
@@ -0,0 +1,254 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.ArrayList;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.ContextThemeWrapperPlus;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.util.SparseArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ListAdapter;
+
+public class ListMenuPresenter implements MenuPresenter,
+ AdapterView.OnItemClickListener {
+ private class MenuAdapter extends BaseAdapter {
+ private int mExpandedIndex = -1;
+
+ public MenuAdapter() {
+ findExpandedIndex();
+ }
+
+ void findExpandedIndex() {
+ final MenuItemImpl expandedItem = mMenu.getExpandedItem();
+ if (expandedItem != null) {
+ final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
+ final int count = items.size();
+ for (int i = 0; i < count; i++) {
+ final MenuItemImpl item = items.get(i);
+ if (item == expandedItem) {
+ mExpandedIndex = i;
+ return;
+ }
+ }
+ }
+ mExpandedIndex = -1;
+ }
+
+ @Override
+ public int getCount() {
+ ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
+ int count = items.size() - mItemIndexOffset;
+ if (mExpandedIndex < 0) {
+ return count;
+ }
+ return count - 1;
+ }
+
+ @Override
+ public MenuItemImpl getItem(int position) {
+ ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
+ position += mItemIndexOffset;
+ if (mExpandedIndex >= 0 && position >= mExpandedIndex) {
+ position++;
+ }
+ return items.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ if (convertView == null) {
+ convertView = mInflater.inflate(mItemLayoutRes, parent, false);
+ }
+
+ MenuView.ItemView itemView = (MenuView.ItemView) convertView;
+ itemView.initialize(getItem(position), 0);
+ return convertView;
+ }
+
+ @Override
+ public void notifyDataSetChanged() {
+ findExpandedIndex();
+ super.notifyDataSetChanged();
+ }
+ }
+
+ public static final String VIEWS_TAG = "android:menu:list";
+ MenuAdapter mAdapter;
+ private Callback mCallback;
+ Context mContext;
+ private int mId;
+ LayoutInflater mInflater;
+ private int mItemIndexOffset;
+ int mItemLayoutRes;
+ MenuBuilder mMenu;
+ ExpandedMenuView mMenuView;
+
+ int mThemeRes;
+
+ public ListMenuPresenter(Context context, int itemLayoutRes) {
+ this(itemLayoutRes, 0);
+ mContext = context;
+ mInflater = LayoutInflater.from(mContext);
+ }
+
+ public ListMenuPresenter(int itemLayoutRes, int themeRes) {
+ mItemLayoutRes = itemLayoutRes;
+ mThemeRes = themeRes;
+ }
+
+ @Override
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ @Override
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ @Override
+ public boolean flagActionItems() {
+ return false;
+ }
+
+ public ListAdapter getAdapter() {
+ if (mAdapter == null) {
+ mAdapter = new MenuAdapter();
+ }
+ return mAdapter;
+ }
+
+ @Override
+ public int getId() {
+ return mId;
+ }
+
+ int getItemIndexOffset() {
+ return mItemIndexOffset;
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ if (mMenuView == null) {
+ mMenuView = (ExpandedMenuView) mInflater.inflate(
+ R.layout.expanded_menu_layout, root, false);
+ if (mAdapter == null) {
+ mAdapter = new MenuAdapter();
+ }
+ mMenuView.setAdapter(mAdapter);
+ mMenuView.setOnItemClickListener(this);
+ }
+ return mMenuView;
+ }
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ if (mThemeRes != 0) {
+ mContext = new ContextThemeWrapperPlus(context, mThemeRes);
+ mInflater = LayoutInflater.from(mContext);
+ } else if (mContext != null) {
+ mContext = context;
+ if (mInflater == null) {
+ mInflater = LayoutInflater.from(mContext);
+ }
+ }
+ mMenu = menu;
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (mCallback != null) {
+ mCallback.onCloseMenu(menu, allMenusAreClosing);
+ }
+ }
+
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position,
+ long id) {
+ mMenu.performItemAction(mAdapter.getItem(position), 0);
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ restoreHierarchyState((Bundle) state);
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ if (mMenuView == null) {
+ return null;
+ }
+
+ Bundle state = new Bundle();
+ saveHierarchyState(state);
+ return state;
+ }
+
+ @Override
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (!subMenu.hasVisibleItems()) {
+ return false;
+ }
+ new MenuDialogHelper(subMenu).show(null);
+ if (mCallback != null) {
+ mCallback.onOpenSubMenu(subMenu);
+ }
+ return true;
+ }
+
+ public void restoreHierarchyState(Bundle inState) {
+ SparseArray<Parcelable> viewStates = inState
+ .getSparseParcelableArray(ListMenuPresenter.VIEWS_TAG);
+ if (viewStates != null) {
+ ((View) mMenuView).restoreHierarchyState(viewStates);
+ }
+ }
+
+ public void saveHierarchyState(Bundle outState) {
+ SparseArray<Parcelable> viewStates = new SparseArray<Parcelable>();
+ if (mMenuView != null) {
+ ((View) mMenuView).saveHierarchyState(viewStates);
+ }
+ outState.putSparseParcelableArray(ListMenuPresenter.VIEWS_TAG,
+ viewStates);
+ }
+
+ @Override
+ public void setCallback(Callback cb) {
+ mCallback = cb;
+ }
+
+ public void setId(int id) {
+ mId = id;
+ }
+
+ public void setItemIndexOffset(int offset) {
+ mItemIndexOffset = offset;
+ if (mMenuView != null) {
+ updateMenuView(false);
+ }
+ }
+
+ @Override
+ public void updateMenuView(boolean cleared) {
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/MenuDialogHelper.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/MenuDialogHelper.java
new file mode 100644
index 0000000000..ed459e4871
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/MenuDialogHelper.java
@@ -0,0 +1,131 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.AlertDialog;
+
+import android.content.DialogInterface;
+import android.os.IBinder;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+public class MenuDialogHelper implements DialogInterface.OnKeyListener,
+ DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
+ MenuPresenter.Callback {
+ private AlertDialog mDialog;
+ private MenuBuilder mMenu;
+ ListMenuPresenter mPresenter;
+ private MenuPresenter.Callback mPresenterCallback;
+
+ public MenuDialogHelper(MenuBuilder menu) {
+ mMenu = menu;
+ }
+
+ public void dismiss() {
+ if (mDialog != null) {
+ mDialog.dismiss();
+ }
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ mMenu.performItemAction(
+ (MenuItemImpl) mPresenter.getAdapter().getItem(which), 0);
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (allMenusAreClosing || menu == mMenu) {
+ dismiss();
+ }
+ if (mPresenterCallback != null) {
+ mPresenterCallback.onCloseMenu(menu, allMenusAreClosing);
+ }
+ }
+
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ mPresenter.onCloseMenu(mMenu, true);
+ }
+
+ @Override
+ public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_MENU
+ || keyCode == KeyEvent.KEYCODE_BACK) {
+ if (event.getAction() == KeyEvent.ACTION_DOWN
+ && event.getRepeatCount() == 0) {
+ Window win = mDialog.getWindow();
+ if (win != null) {
+ View decor = win.getDecorView();
+ if (decor != null) {
+ KeyEvent.DispatcherState ds = decor
+ .getKeyDispatcherState();
+ if (ds != null) {
+ ds.startTracking(event, this);
+ return true;
+ }
+ }
+ }
+ } else if (event.getAction() == KeyEvent.ACTION_UP
+ && !event.isCanceled()) {
+ Window win = mDialog.getWindow();
+ if (win != null) {
+ View decor = win.getDecorView();
+ if (decor != null) {
+ KeyEvent.DispatcherState ds = decor
+ .getKeyDispatcherState();
+ if (ds != null && ds.isTracking(event)) {
+ mMenu.close(true);
+ dialog.dismiss();
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return mMenu.performShortcut(keyCode, event, 0);
+
+ }
+
+ @Override
+ public boolean onOpenSubMenu(MenuBuilder subMenu) {
+ if (mPresenterCallback != null) {
+ return mPresenterCallback.onOpenSubMenu(subMenu);
+ }
+ return false;
+ }
+
+ public void setPresenterCallback(MenuPresenter.Callback cb) {
+ mPresenterCallback = cb;
+ }
+
+ public void show(IBinder windowToken) {
+ final MenuBuilder menu = mMenu;
+ final AlertDialog.Builder builder = new AlertDialog.Builder(
+ menu.getContext());
+ mPresenter = new ListMenuPresenter(builder.getContext(),
+ R.layout.list_menu_item_layout);
+ mPresenter.setCallback(this);
+ mMenu.addMenuPresenter(mPresenter);
+ builder.setAdapter(mPresenter.getAdapter(), this);
+ final View headerView = menu.getHeaderView();
+ if (headerView != null) {
+ builder.setCustomTitle(headerView);
+ } else {
+ builder.setIcon(menu.getHeaderIcon()).setTitle(
+ menu.getHeaderTitle());
+ }
+ builder.setOnKeyListener(this);
+ builder.setOnDismissListener(this);
+ mDialog = builder.create();
+ WindowManager.LayoutParams lp = mDialog.getWindow().getAttributes();
+ lp.type = WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
+ if (windowToken != null) {
+ lp.token = windowToken;
+ }
+ lp.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+ mDialog.show();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/PopupMenuHelper.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/PopupMenuHelper.java
new file mode 100644
index 0000000000..bd0abf1d45
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/internal/view/menu/PopupMenuHelper.java
@@ -0,0 +1,356 @@
+
+package com.actionbarsherlock.internal.view.menu;
+
+import java.util.ArrayList;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.FrameLayout;
+import org.holoeverywhere.widget.ListPopupWindow;
+import org.holoeverywhere.widget.PopupWindow;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.DataSetObserver;
+import android.os.Parcelable;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.MeasureSpec;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ListAdapter;
+
+import com.actionbarsherlock.internal.view.View_HasStateListenerSupport;
+import com.actionbarsherlock.internal.view.View_OnAttachStateChangeListener;
+import com.actionbarsherlock.view.MenuItem;
+
+public class PopupMenuHelper implements AdapterView.OnItemClickListener,
+ View.OnKeyListener, ViewTreeObserver.OnGlobalLayoutListener,
+ PopupWindow.OnDismissListener, View_OnAttachStateChangeListener,
+ MenuPresenter {
+ private class ExpandedIndexObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ mAdapter.findExpandedIndex();
+ }
+ }
+
+ private class MenuAdapter extends BaseAdapter {
+ private MenuBuilder mAdapterMenu;
+ private int mExpandedIndex = -1;
+
+ public MenuAdapter(MenuBuilder menu) {
+ mAdapterMenu = menu;
+ registerDataSetObserver(new ExpandedIndexObserver());
+ findExpandedIndex();
+ }
+
+ void findExpandedIndex() {
+ final MenuItemImpl expandedItem = mMenu.getExpandedItem();
+ if (expandedItem != null) {
+ final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems();
+ final int count = items.size();
+ for (int i = 0; i < count; i++) {
+ final MenuItemImpl item = items.get(i);
+ if (item == expandedItem) {
+ mExpandedIndex = i;
+ return;
+ }
+ }
+ }
+ mExpandedIndex = -1;
+ }
+
+ @Override
+ public int getCount() {
+ ArrayList<MenuItemImpl> items = mAdapterMenu.getVisibleItems();
+ if (mExpandedIndex < 0) {
+ return items.size();
+ }
+ return items.size() - 1;
+ }
+
+ @Override
+ public MenuItemImpl getItem(int position) {
+ ArrayList<MenuItemImpl> items = mAdapterMenu.getVisibleItems();
+ if (mExpandedIndex >= 0 && position >= mExpandedIndex) {
+ position++;
+ }
+ return items.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ if (convertView == null) {
+ convertView = mInflater.inflate(ITEM_LAYOUT, parent, false);
+ }
+ MenuView.ItemView itemView = (MenuView.ItemView) convertView;
+ if (mForceShowIcon) {
+ ((HoloListMenuItemView) convertView).setForceShowIcon(true);
+ }
+ itemView.initialize(getItem(position), 0);
+ return convertView;
+ }
+ }
+
+ static final int ITEM_LAYOUT = R.layout.popup_menu_item_layout;
+ private MenuAdapter mAdapter;
+ private View mAnchorView;
+ private Context mContext;
+ boolean mForceShowIcon;
+ private LayoutInflater mInflater;
+ private ViewGroup mMeasureParent;
+ private MenuBuilder mMenu;
+ private ListPopupWindow mPopup;
+ private int mPopupMaxWidth;
+ private Callback mPresenterCallback;
+ private ViewTreeObserver mTreeObserver;
+
+ public PopupMenuHelper(Context context, MenuBuilder menu, View decorView) {
+ mContext = context;
+ mInflater = LayoutInflater.from(context);
+ mMenu = menu;
+ final Resources res = context.getResources();
+ mPopupMaxWidth = Math.max(res.getDisplayMetrics().widthPixels / 2,
+ res.getDimensionPixelSize(R.dimen.config_prefDialogWidth));
+ mAnchorView = decorView;
+ menu.addMenuPresenter(this);
+ }
+
+ @Override
+ public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ public void dismiss() {
+ if (isShowing()) {
+ mPopup.dismiss();
+ }
+ }
+
+ @Override
+ public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
+ return false;
+ }
+
+ @Override
+ public boolean flagActionItems() {
+ return false;
+ }
+
+ @Override
+ public int getId() {
+ return 0;
+ }
+
+ @Override
+ public MenuView getMenuView(ViewGroup root) {
+ throw new UnsupportedOperationException(
+ "MenuPopupHelpers manage their own views");
+ }
+
+ @Override
+ public void initForMenu(Context context, MenuBuilder menu) {
+ }
+
+ public boolean isShowing() {
+ return mPopup != null && mPopup.isShowing();
+ }
+
+ private int measureContentWidth(ListAdapter adapter) {
+ int width = 0;
+ View itemView = null;
+ int itemType = 0;
+ final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(0,
+ MeasureSpec.UNSPECIFIED);
+ final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0,
+ MeasureSpec.UNSPECIFIED);
+ final int count = adapter.getCount();
+ for (int i = 0; i < count; i++) {
+ final int positionType = adapter.getItemViewType(i);
+ if (positionType != itemType) {
+ itemType = positionType;
+ itemView = null;
+ }
+ if (mMeasureParent == null) {
+ mMeasureParent = new FrameLayout(mContext);
+ }
+ itemView = adapter.getView(i, itemView, mMeasureParent);
+ itemView.measure(widthMeasureSpec, heightMeasureSpec);
+ width = Math.max(width, itemView.getMeasuredWidth());
+ }
+ return width;
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (menu != mMenu) {
+ return;
+ }
+ dismiss();
+ if (mPresenterCallback != null) {
+ mPresenterCallback.onCloseMenu(menu, allMenusAreClosing);
+ }
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public void onDismiss() {
+ mPopup = null;
+ mMenu.close();
+ if (mTreeObserver != null) {
+ if (!mTreeObserver.isAlive()) {
+ mTreeObserver = mAnchorView.getViewTreeObserver();
+ }
+ mTreeObserver.removeGlobalOnLayoutListener(this);
+ mTreeObserver = null;
+ }
+ if (mAnchorView instanceof View_HasStateListenerSupport) {
+ ((View_HasStateListenerSupport) mAnchorView)
+ .removeOnAttachStateChangeListener(this);
+ }
+ }
+
+ @Override
+ public void onGlobalLayout() {
+ if (isShowing()) {
+ final View anchor = mAnchorView;
+ if (anchor == null || !anchor.isShown()) {
+ dismiss();
+ } else if (isShowing()) {
+ mPopup.show();
+ }
+ }
+ }
+
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position,
+ long id) {
+ MenuAdapter adapter = mAdapter;
+ adapter.mAdapterMenu.performItemAction(adapter.getItem(position), 0);
+ }
+
+ @Override
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
+ if (event.getAction() == KeyEvent.ACTION_UP
+ && keyCode == KeyEvent.KEYCODE_MENU) {
+ dismiss();
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ return null;
+ }
+
+ @Override
+ public boolean onSubMenuSelected(SubMenuBuilder subMenu) {
+ if (subMenu.hasVisibleItems()) {
+ PopupMenuHelper subPopup = new PopupMenuHelper(mContext, subMenu,
+ mAnchorView);
+ subPopup.setCallback(mPresenterCallback);
+ boolean preserveIconSpacing = false;
+ final int count = subMenu.size();
+ for (int i = 0; i < count; i++) {
+ MenuItem childItem = subMenu.getItem(i);
+ if (childItem.isVisible() && childItem.getIcon() != null) {
+ preserveIconSpacing = true;
+ break;
+ }
+ }
+ subPopup.setForceShowIcon(preserveIconSpacing);
+ if (subPopup.tryShow()) {
+ if (mPresenterCallback != null) {
+ mPresenterCallback.onOpenSubMenu(subMenu);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void onViewAttachedToWindow(View v) {
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void onViewDetachedFromWindow(View v) {
+ if (mTreeObserver != null) {
+ if (!mTreeObserver.isAlive()) {
+ mTreeObserver = v.getViewTreeObserver();
+ }
+ mTreeObserver.removeGlobalOnLayoutListener(this);
+ }
+ if (v instanceof View_HasStateListenerSupport) {
+ ((View_HasStateListenerSupport) v)
+ .removeOnAttachStateChangeListener(this);
+ }
+ }
+
+ @Override
+ public void setCallback(Callback cb) {
+ mPresenterCallback = cb;
+ }
+
+ public void setForceShowIcon(boolean forceShow) {
+ mForceShowIcon = forceShow;
+ }
+
+ public void show() {
+ if (!tryShow()) {
+ throw new IllegalStateException(
+ "PopupMenuHelper cannot be used without an anchor");
+ }
+ }
+
+ public boolean tryShow() {
+ mPopup = new ListPopupWindow(mContext);
+ mPopup.setOnDismissListener(this);
+ mPopup.setOnItemClickListener(this);
+ mAdapter = new MenuAdapter(mMenu);
+ mPopup.setAdapter(mAdapter);
+ mPopup.setModal(true);
+ View anchor = mAnchorView;
+ if (anchor != null) {
+ final boolean addGlobalListener = mTreeObserver == null;
+ mTreeObserver = anchor.getViewTreeObserver();
+ if (addGlobalListener) {
+ mTreeObserver.addOnGlobalLayoutListener(this);
+ if (anchor instanceof View_HasStateListenerSupport) {
+ ((View_HasStateListenerSupport) anchor)
+ .addOnAttachStateChangeListener(this);
+ }
+ }
+ mPopup.setAnchorView(anchor);
+ } else {
+ return false;
+ }
+ mPopup.setContentWidth(Math.min(measureContentWidth(mAdapter),
+ mPopupMaxWidth));
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ mPopup.show();
+ mPopup.getListView().setOnKeyListener(this);
+ return true;
+ }
+
+ @Override
+ public void updateMenuView(boolean cleared) {
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/view/ContextMenu.java b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/view/ContextMenu.java
new file mode 100644
index 0000000000..10e09fa51b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/com/actionbarsherlock/view/ContextMenu.java
@@ -0,0 +1,19 @@
+
+package com.actionbarsherlock.view;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+public interface ContextMenu extends Menu {
+ public void clearHeader();
+
+ public ContextMenu setHeaderIcon(Drawable icon);
+
+ public ContextMenu setHeaderIcon(int iconRes);
+
+ public ContextMenu setHeaderTitle(CharSequence title);
+
+ public ContextMenu setHeaderTitle(int titleRes);
+
+ public ContextMenu setHeaderView(View view);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ArrayAdapter.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ArrayAdapter.java
new file mode 100644
index 0000000000..1a0a7153ec
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ArrayAdapter.java
@@ -0,0 +1,328 @@
+
+package org.holoeverywhere;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.Filter;
+import android.widget.Filterable;
+import android.widget.TextView;
+
+public class ArrayAdapter<T> extends BaseAdapter implements Filterable {
+ private class ArrayFilter extends Filter {
+ @Override
+ protected FilterResults performFiltering(CharSequence prefix) {
+ FilterResults results = new FilterResults();
+ if (mOriginalValues == null) {
+ synchronized (mLock) {
+ mOriginalValues = new ArrayList<T>(mObjects);
+ }
+ }
+ if (prefix == null || prefix.length() == 0) {
+ ArrayList<T> list;
+ synchronized (mLock) {
+ list = new ArrayList<T>(mOriginalValues);
+ }
+ results.values = list;
+ results.count = list.size();
+ } else {
+ String prefixString = prefix.toString().toLowerCase();
+ ArrayList<T> values;
+ synchronized (mLock) {
+ values = new ArrayList<T>(mOriginalValues);
+ }
+ final int count = values.size();
+ final ArrayList<T> newValues = new ArrayList<T>();
+ for (int i = 0; i < count; i++) {
+ final T value = values.get(i);
+ final String valueText = value.toString().toLowerCase();
+ if (valueText.startsWith(prefixString)) {
+ newValues.add(value);
+ } else {
+ final String[] words = valueText.split(" ");
+ final int wordCount = words.length;
+ for (int k = 0; k < wordCount; k++) {
+ if (words[k].startsWith(prefixString)) {
+ newValues.add(value);
+ break;
+ }
+ }
+ }
+ }
+ results.values = newValues;
+ results.count = newValues.size();
+ }
+ return results;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void publishResults(CharSequence constraint,
+ FilterResults results) {
+ mObjects = (List<T>) results.values;
+ if (results.count > 0) {
+ notifyDataSetChanged();
+ } else {
+ notifyDataSetInvalidated();
+ }
+ }
+ }
+
+ public static ArrayAdapter<CharSequence> createFromResource(
+ Context context, int textArrayResId, int textViewResId) {
+ CharSequence[] strings = context.getResources().getTextArray(
+ textArrayResId);
+ return new ArrayAdapter<CharSequence>(context, textViewResId, strings);
+ }
+
+ private boolean mAutoSetNotifyFlag = true;
+ private Context mContext;
+ private int mDropDownResource;
+ private int mFieldId = 0;
+ private ArrayFilter mFilter;
+ private LayoutInflater mInflater;
+ private final Object mLock = new Object();
+ private boolean mNotifyOnChange = true;
+ private List<T> mObjects;
+ private ArrayList<T> mOriginalValues;
+ private int mResource;
+
+ public ArrayAdapter(Context context, int textViewResourceId) {
+ init(context, textViewResourceId, 0, new ArrayList<T>());
+ }
+
+ public ArrayAdapter(Context context, int resource, int textViewResourceId) {
+ init(context, resource, textViewResourceId, new ArrayList<T>());
+ }
+
+ public ArrayAdapter(Context context, int resource, int textViewResourceId,
+ List<T> objects) {
+ init(context, resource, textViewResourceId, objects);
+ }
+
+ public ArrayAdapter(Context context, int resource, int textViewResourceId,
+ T[] objects) {
+ init(context, resource, textViewResourceId, Arrays.asList(objects));
+ }
+
+ public ArrayAdapter(Context context, int textViewResourceId, List<T> objects) {
+ init(context, textViewResourceId, 0, objects);
+ }
+
+ public ArrayAdapter(Context context, int textViewResourceId, T[] objects) {
+ init(context, textViewResourceId, 0, Arrays.asList(objects));
+ }
+
+ public void add(T object) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ mOriginalValues.add(object);
+ } else {
+ mObjects.add(object);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ public void addAll(Collection<? extends T> collection) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ mOriginalValues.addAll(collection);
+ } else {
+ mObjects.addAll(collection);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ public void addAll(T... items) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ Collections.addAll(mOriginalValues, items);
+ } else {
+ Collections.addAll(mObjects, items);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ public void clear() {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ mOriginalValues.clear();
+ } else {
+ mObjects.clear();
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ private View createViewFromResource(int position, View convertView,
+ ViewGroup parent, int resource) {
+ View view;
+ TextView text = null;
+ if (convertView == null) {
+ view = FontLoader.apply(mInflater.inflate(resource, parent, false));
+ } else {
+ view = convertView;
+ }
+ try {
+ if (view != null) {
+ if (mFieldId > 0) {
+ text = (TextView) view.findViewById(mFieldId);
+ } else {
+ text = (TextView) view.findViewById(android.R.id.text1);
+ }
+ if (text == null && view instanceof TextView) {
+ text = (TextView) view;
+ }
+ }
+ if (text == null) {
+ throw new NullPointerException();
+ }
+ } catch (RuntimeException e) {
+ Log.e("ArrayAdapter",
+ "You must supply a resource ID for a TextView");
+ throw new IllegalStateException(
+ "ArrayAdapter requires the resource ID to be a TextView", e);
+ }
+ T item = getItem(position);
+ if (item instanceof CharSequence) {
+ text.setText((CharSequence) item);
+ } else {
+ text.setText(item.toString());
+ }
+ return view;
+ }
+
+ public Context getContext() {
+ return mContext;
+ }
+
+ @Override
+ public int getCount() {
+ return mObjects.size();
+ }
+
+ @Override
+ public View getDropDownView(int position, View convertView, ViewGroup parent) {
+ return createViewFromResource(position, convertView, parent,
+ mDropDownResource);
+ }
+
+ @Override
+ public Filter getFilter() {
+ if (mFilter == null) {
+ mFilter = new ArrayFilter();
+ }
+ return mFilter;
+ }
+
+ @Override
+ public T getItem(int position) {
+ return mObjects.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ public int getPosition(T item) {
+ return mObjects.indexOf(item);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return createViewFromResource(position, convertView, parent, mResource);
+ }
+
+ private void init(Context context, int resource, int textViewResourceId,
+ List<T> objects) {
+ mContext = context;
+ mInflater = LayoutInflater.from(context);
+ mResource = mDropDownResource = resource;
+ mObjects = objects;
+ mFieldId = textViewResourceId;
+ }
+
+ public void insert(T object, int index) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ mOriginalValues.add(index, object);
+ } else {
+ mObjects.add(index, object);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ public boolean isAutoSetNotifyFlag() {
+ return mAutoSetNotifyFlag;
+ }
+
+ @Override
+ public void notifyDataSetChanged() {
+ super.notifyDataSetChanged();
+ if (mAutoSetNotifyFlag) {
+ mNotifyOnChange = true;
+ }
+ }
+
+ public void remove(T object) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ mOriginalValues.remove(object);
+ } else {
+ mObjects.remove(object);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+
+ public void setAutoSetNotifyFlag(boolean autoSetNotifyFlag) {
+ this.mAutoSetNotifyFlag = autoSetNotifyFlag;
+ }
+
+ public void setDropDownViewResource(int resource) {
+ this.mDropDownResource = resource;
+ }
+
+ public void setNotifyOnChange(boolean notifyOnChange) {
+ mNotifyOnChange = notifyOnChange;
+ }
+
+ public void sort(Comparator<? super T> comparator) {
+ synchronized (mLock) {
+ if (mOriginalValues != null) {
+ Collections.sort(mOriginalValues, comparator);
+ } else {
+ Collections.sort(mObjects, comparator);
+ }
+ }
+ if (mNotifyOnChange) {
+ notifyDataSetChanged();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ChooserActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ChooserActivity.java
new file mode 100644
index 0000000000..fddb647c3e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ChooserActivity.java
@@ -0,0 +1,42 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.app.ResolverActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.util.Log;
+
+public class ChooserActivity extends ResolverActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ Intent intent = getIntent();
+ Parcelable targetParcelable = intent.getParcelableExtra(Intent.EXTRA_INTENT);
+ if (!(targetParcelable instanceof Intent)) {
+ Log.w("ChooseActivity", "Target is not an intent: " + targetParcelable);
+ finish();
+ return;
+ }
+ Intent target = (Intent) targetParcelable;
+ CharSequence title = intent.getCharSequenceExtra(Intent.EXTRA_TITLE);
+ if (title == null) {
+ title = getResources().getText(R.string.chooseActivity);
+ }
+ Parcelable[] pa = intent.getParcelableArrayExtra(Intent.EXTRA_INITIAL_INTENTS);
+ Intent[] initialIntents = null;
+ if (pa != null) {
+ initialIntents = new Intent[pa.length];
+ for (int i = 0; i < pa.length; i++) {
+ if (!(pa[i] instanceof Intent)) {
+ Log.w("ChooseActivity", "Initial intent #" + i
+ + " not an Intent: " + pa[i]);
+ finish();
+ return;
+ }
+ initialIntents[i] = (Intent) pa[i];
+ }
+ }
+ onCreate(savedInstanceState, target, title, initialIntents, null, false);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ContentResolverCompat.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ContentResolverCompat.java
new file mode 100644
index 0000000000..4cd5103776
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ContentResolverCompat.java
@@ -0,0 +1,67 @@
+
+package org.holoeverywhere;
+
+import java.io.FileNotFoundException;
+import java.util.List;
+
+import android.content.Context;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.text.TextUtils;
+
+public class ContentResolverCompat {
+
+ public static class OpenResourceIdResult {
+ public int id;
+ public Resources r;
+ }
+
+ public static OpenResourceIdResult getResourceId(Context context, Uri uri)
+ throws FileNotFoundException {
+ String authority = uri.getAuthority();
+ Resources r;
+ if (TextUtils.isEmpty(authority)) {
+ throw new FileNotFoundException("No authority: " + uri);
+ } else {
+ try {
+ r = context.getPackageManager().getResourcesForApplication(
+ authority);
+ } catch (NameNotFoundException ex) {
+ throw new FileNotFoundException(
+ "No package found for authority: " + uri);
+ }
+ }
+ List<String> path = uri.getPathSegments();
+ if (path == null) {
+ throw new FileNotFoundException("No path: " + uri);
+ }
+ int len = path.size();
+ int id;
+ if (len == 1) {
+ try {
+ id = Integer.parseInt(path.get(0));
+ } catch (NumberFormatException e) {
+ throw new FileNotFoundException(
+ "Single path segment is not a resource ID: " + uri);
+ }
+ } else if (len == 2) {
+ id = r.getIdentifier(path.get(1), path.get(0), authority);
+ } else {
+ throw new FileNotFoundException("More than two path segments: "
+ + uri);
+ }
+ if (id == 0) {
+ throw new FileNotFoundException("No resource found for: " + uri);
+ }
+ OpenResourceIdResult res = new OpenResourceIdResult();
+ res.r = r;
+ res.id = id;
+ return res;
+ }
+
+ private ContentResolverCompat() {
+
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/FontLoader.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/FontLoader.java
new file mode 100644
index 0000000000..bf3db13508
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/FontLoader.java
@@ -0,0 +1,277 @@
+
+package org.holoeverywhere;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Typeface;
+import android.os.Build.VERSION;
+import android.util.Log;
+import android.util.SparseArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+public final class FontLoader {
+ public static interface FontSelector {
+ public HoloFont getFontForView(View view);
+ }
+
+ public static class HoloFont implements FontSelector {
+ public static final HoloFont ROBOTO;
+ public static final HoloFont ROBOTO_BOLD;
+ public static final HoloFont ROBOTO_BOLD_ITALIC;
+ public static final HoloFont ROBOTO_ITALIC;
+ public static final HoloFont ROBOTO_REGULAR;
+
+ static {
+ ROBOTO = makeFont(
+ ROBOTO_REGULAR = makeFont(R.raw.roboto_regular),
+ ROBOTO_BOLD = makeFont(R.raw.roboto_bold),
+ ROBOTO_ITALIC = makeFont(R.raw.roboto_italic),
+ ROBOTO_BOLD_ITALIC = makeFont(R.raw.roboto_bolditalic)
+ );
+ }
+
+ public static HoloFont makeFont(HoloFont regular, HoloFont bold, HoloFont italic,
+ HoloFont boldItalic) {
+ return new HoloFontMerger(regular, bold, italic, boldItalic);
+ }
+
+ public static HoloFont makeFont(int rawResourceId) {
+ return new HoloFont(rawResourceId);
+ }
+
+ public static HoloFont makeFont(int rawResourceId, boolean ignore) {
+ return new HoloFont(rawResourceId, ignore);
+ }
+
+ public static HoloFont makeFont(Typeface typeface) {
+ return new HoloFont(typeface);
+ }
+
+ /**
+ * Font raw resource id
+ */
+ protected int mFontId;
+ /**
+ * If this flag setted this font doesn't modify any view
+ */
+ protected boolean mIgnore;
+ /**
+ * Loaded typeface
+ */
+ protected Typeface mTypeface;
+
+ private HoloFont(int font) {
+ this(font, VERSION.SDK_INT >= 11);
+ }
+
+ private HoloFont(int font, boolean ignore) {
+ mFontId = font;
+ mIgnore = ignore;
+ mTypeface = null;
+ }
+
+ private HoloFont(Typeface typeface) {
+ mFontId = -1;
+ mIgnore = false;
+ mTypeface = typeface;
+ }
+
+ public <T extends View> T apply(T view) {
+ if (mIgnore || mTypeface == null && mFontId <= 0 || view == null) {
+ return view;
+ }
+ return FontLoader.apply(view, obtainTypeface(view.getContext()));
+ }
+
+ @Override
+ public HoloFont getFontForView(View view) {
+ return this;
+ }
+
+ public Typeface obtainTypeface(Context context) {
+ if (mTypeface != null) {
+ return mTypeface;
+ }
+ if (mTypeface == null && mFontId > 0) {
+ mTypeface = loadTypeface(context, mFontId);
+ }
+ return mTypeface;
+ }
+ }
+
+ private static final class HoloFontMerger extends HoloFont {
+ private HoloFont mBold;
+ private HoloFont mBoldItalic;
+ private HoloFont mItalic;
+ private HoloFont mRegular;
+
+ public HoloFontMerger(HoloFont regular, HoloFont bold, HoloFont italic, HoloFont boldItalic) {
+ super(regular.mFontId, false);
+ mRegular = regular;
+ mBold = bold;
+ mItalic = italic;
+ mBoldItalic = boldItalic;
+ }
+
+ @Override
+ public HoloFont getFontForView(View view) {
+ if (!(view instanceof TextView)) {
+ return super.getFontForView(view);
+ }
+ TextView textView = (TextView) view;
+ Typeface typeface = textView.getTypeface();
+ if (typeface == null) {
+ return mRegular;
+ }
+ final boolean bold = typeface.isBold(), italic = typeface.isItalic();
+ if (bold && italic) {
+ return mBoldItalic;
+ } else if (bold) {
+ return mBold;
+ } else if (italic) {
+ return mItalic;
+ } else {
+ return mRegular;
+ }
+ }
+
+ }
+
+ private static final SparseArray<Typeface> sFontCache = new SparseArray<Typeface>();
+
+ private static final String TAG = FontLoader.class.getSimpleName();
+
+ public static <T extends View> T apply(T view) {
+ return apply(view, HoloFont.ROBOTO);
+ }
+
+ public static <T extends View> T apply(T view, FontSelector fontSelector) {
+ if (view == null || view.getContext() == null
+ || view.getContext().isRestricted()) {
+ Log.e(FontLoader.TAG, "View or context is invalid");
+ return view;
+ }
+ return internalApply(view, fontSelector);
+ }
+
+ public static <T extends View> T apply(T view, HoloFont font) {
+ return apply(view, (FontSelector) font);
+ }
+
+ @SuppressLint("NewApi")
+ public static <T extends View> T apply(T view, int font) {
+ if (view == null || view.getContext() == null
+ || view.getContext().isRestricted()) {
+ Log.e(FontLoader.TAG, "View or context is invalid");
+ return view;
+ }
+ Typeface typeface = FontLoader.loadTypeface(view.getContext(), font);
+ if (typeface == null) {
+ Log.v(FontLoader.TAG, "Font " + font + " not found in resources");
+ return view;
+ } else {
+ return FontLoader.apply(view, typeface);
+ }
+ }
+
+ public static <T extends View> T apply(T view, Typeface typeface) {
+ if (view == null || view.getContext() == null
+ || view.getContext().isRestricted()) {
+ return view;
+ }
+ if (typeface == null) {
+ Log.v(FontLoader.TAG, "Font is null");
+ return view;
+ }
+ if (view instanceof TextView) {
+ ((TextView) view).setTypeface(typeface);
+ }
+ if (view instanceof ViewGroup) {
+ ViewGroup group = (ViewGroup) view;
+ for (int i = 0; i < group.getChildCount(); i++) {
+ FontLoader.apply(group.getChildAt(i), typeface);
+ }
+ }
+ return view;
+ }
+
+ private static <T extends View> T internalApply(T view, FontSelector fontSelector) {
+ if (view instanceof TextView) {
+ TextView textView = (TextView) view;
+ HoloFont font = fontSelector.getFontForView(textView);
+ if (font != null && !font.mIgnore) {
+ Typeface typeface = font.obtainTypeface(view.getContext());
+ if (typeface != null) {
+ textView.setTypeface(typeface);
+ }
+ }
+ } else if (view instanceof ViewGroup) {
+ ViewGroup group = (ViewGroup) view;
+ final int childCount = group.getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ internalApply(group.getChildAt(i), fontSelector);
+ }
+ }
+ return view;
+ }
+
+ public static Typeface loadTypeface(Context context, int font) {
+ Typeface typeface = FontLoader.sFontCache.get(font);
+ if (typeface == null) {
+ try {
+ File file = new File(context.getCacheDir(), "fonts");
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ file = new File(file, "font_0x" + Integer.toHexString(font));
+ FontLoader.sFontCache.put(font,
+ typeface = readTypeface(file, context.getResources(), font, true));
+ } catch (Exception e) {
+ Log.e(FontLoader.TAG, "Error of loading font", e);
+ }
+ }
+ return typeface;
+ }
+
+ private static Typeface readTypeface(File file, Resources res, int font,
+ boolean allowReadExistsFile) throws Exception {
+ try {
+ if (!allowReadExistsFile || !file.exists()) {
+ InputStream is = new BufferedInputStream(res.openRawResource(font));
+ OutputStream os = new ByteArrayOutputStream(Math.max(is.available(), 1024));
+ byte[] buffer = new byte[1024];
+ int read;
+ while ((read = is.read(buffer)) > 0) {
+ os.write(buffer, 0, read);
+ }
+ is.close();
+ os.flush();
+ buffer = ((ByteArrayOutputStream) os).toByteArray();
+ os.close();
+ os = new FileOutputStream(file);
+ os.write(buffer);
+ os.flush();
+ os.close();
+ }
+ return Typeface.createFromFile(file);
+ } catch (Exception e) {
+ if (allowReadExistsFile) {
+ return readTypeface(file, res, font, false);
+ }
+ throw e;
+ }
+ }
+
+ private FontLoader() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/HoloEverywhere.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/HoloEverywhere.java
new file mode 100644
index 0000000000..61e8bd0e3d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/HoloEverywhere.java
@@ -0,0 +1,73 @@
+
+package org.holoeverywhere;
+
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+
+public class HoloEverywhere {
+ public static enum PreferenceImpl {
+ JSON, XML
+ }
+
+ /**
+ * When you call new activity it will be has parent activity theme
+ */
+ public static boolean ALWAYS_USE_PARENT_THEME;
+
+ /**
+ * Print some debug lines in Log
+ */
+ public static boolean DEBUG;
+
+ /**
+ * Disable any overscroll effects for views
+ */
+ public static boolean DISABLE_OVERSCROLL_EFFECT;
+
+ /**
+ * Since 1.5 to preferences can be assigned id instead of key. But for
+ * saving values in SharedPreferences using key, and it has next format:
+ *
+ * <pre>
+ * preference_0x7fABCDEF
+ * </pre>
+ *
+ * If it options true - key for the preference will be name of id row:
+ *
+ * <pre>
+ * &lt;Preference holo:id="@+id/myCoolPreference" /&gt;
+ * Key for SharedPreferences: myCoolPreference
+ * </pre>
+ */
+ public static boolean NAMED_PREFERENCES;
+
+ /**
+ * Main package of HoloEverywhere
+ */
+ public static final String PACKAGE;
+
+ /**
+ * Preference implementation using by default
+ */
+ public static PreferenceImpl PREFERENCE_IMPL;
+
+ /**
+ * Wrap any context menu calls by native classes. Like it do ABS on Android
+ * 4.0+ with options menu
+ */
+ public static boolean WRAP_TO_NATIVE_CONTEXT_MENU;
+
+ static {
+ PACKAGE = HoloEverywhere.class.getPackage().getName();
+
+ DEBUG = false;
+ ALWAYS_USE_PARENT_THEME = false;
+ NAMED_PREFERENCES = true;
+ DISABLE_OVERSCROLL_EFFECT = VERSION.SDK_INT < VERSION_CODES.HONEYCOMB;
+ WRAP_TO_NATIVE_CONTEXT_MENU = VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB;
+ PREFERENCE_IMPL = PreferenceImpl.XML;
+ }
+
+ private HoloEverywhere() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHolo.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHolo.java
new file mode 100644
index 0000000000..e341ab4bed
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHolo.java
@@ -0,0 +1,21 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.HoloEverywhere.PreferenceImpl;
+import org.holoeverywhere.app.Application;
+import org.holoeverywhere.preference.SharedPreferences;
+
+public interface IHolo {
+ public SharedPreferences getDefaultSharedPreferences();
+
+ public SharedPreferences getDefaultSharedPreferences(PreferenceImpl impl);
+
+ public LayoutInflater getLayoutInflater();
+
+ public SharedPreferences getSharedPreferences(PreferenceImpl impl,
+ String name, int mode);
+
+ public SharedPreferences getSharedPreferences(String name, int mode);
+
+ public Application getSupportApplication();
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloActivity.java
new file mode 100644
index 0000000000..77aae2b9ba
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloActivity.java
@@ -0,0 +1,67 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.SystemServiceManager.SuperSystemService;
+import org.holoeverywhere.ThemeManager.SuperStartActivity;
+import org.holoeverywhere.addon.IAddonActivity;
+import org.holoeverywhere.addon.IAddonAttacher;
+
+import android.support.v4.app.FragmentManager;
+
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView.ContextMenuListenersProvider;
+import com.actionbarsherlock.internal.view.menu.ContextMenuListener;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public interface IHoloActivity extends IHolo, SuperStartActivity,
+ OnCreatePanelMenuListener, OnPreparePanelListener,
+ OnMenuItemSelectedListener, OnActionModeStartedListener,
+ OnActionModeFinishedListener, SuperSystemService, ContextMenuListener,
+ ContextMenuListenersProvider, IAddonAttacher<IAddonActivity> {
+ public static interface OnWindowFocusChangeListener {
+ public void onWindowFocusChanged(boolean hasFocus);
+ }
+
+ public void addOnWindowFocusChangeListener(OnWindowFocusChangeListener listener);
+
+ public ActionBar getSupportActionBar();
+
+ public FragmentManager getSupportFragmentManager();
+
+ public MenuInflater getSupportMenuInflater();
+
+ public boolean isForceThemeApply();
+
+ public boolean onCreateOptionsMenu(Menu menu);
+
+ public boolean onOptionsItemSelected(MenuItem item);
+
+ public boolean onPrepareOptionsMenu(Menu menu);
+
+ public void requestWindowFeature(long featureId);
+
+ public void setSupportProgress(int progress);
+
+ public void setSupportProgressBarIndeterminate(boolean indeterminate);
+
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible);
+
+ public void setSupportProgressBarVisibility(boolean visible);
+
+ public void setSupportSecondaryProgress(int secondaryProgress);
+
+ public ActionMode startActionMode(ActionMode.Callback callback);
+
+ public android.content.SharedPreferences superGetSharedPreferences(
+ String name, int mode);
+
+ public void supportInvalidateOptionsMenu();
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloFragment.java
new file mode 100644
index 0000000000..28242ba1c5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IHoloFragment.java
@@ -0,0 +1,47 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.addon.IAddonAttacher;
+import org.holoeverywhere.addon.IAddonFragment;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.preference.SharedPreferences;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView.ContextMenuListenersProvider;
+import com.actionbarsherlock.internal.view.menu.ContextMenuListener;
+import com.actionbarsherlock.view.ActionMode;
+
+public interface IHoloFragment extends IHolo, OnPrepareOptionsMenuListener,
+ OnCreateOptionsMenuListener, OnOptionsItemSelectedListener, ContextMenuListener,
+ ContextMenuListenersProvider, IAddonAttacher<IAddonFragment> {
+ @Override
+ public SharedPreferences getDefaultSharedPreferences();
+
+ public LayoutInflater getLayoutInflater(Bundle savedInstanceState);
+
+ @Override
+ public SharedPreferences getSharedPreferences(String name, int mode);
+
+ public ActionBar getSupportActionBar();
+
+ public Activity getSupportActivity();
+
+ public FragmentManager getSupportFragmentManager();
+
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState);
+
+ public void onInflate(Activity activity, AttributeSet attrs,
+ Bundle savedInstanceState);
+
+ public ActionMode startActionMode(ActionMode.Callback callback);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ITabSwipe.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ITabSwipe.java
new file mode 100644
index 0000000000..92cd738251
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ITabSwipe.java
@@ -0,0 +1,61 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.ITabSwipe.TabInfo;
+import org.holoeverywhere.app.Fragment;
+
+import android.os.Bundle;
+
+public interface ITabSwipe<T extends TabInfo> {
+ public static interface OnTabSelectedListener {
+ public void onTabSelected(int position);
+ }
+
+ public static interface TabInfo {
+ public Bundle getFragmentArguments();
+
+ public Class<? extends Fragment> getFragmentClass();
+
+ public CharSequence getTitle();
+
+ public void setFragmentArguments(Bundle fragmentArguments);
+
+ public void setFragmentClass(Class<? extends Fragment> fragmentClass);
+
+ public void setTitle(CharSequence title);
+ }
+
+ public T addTab(CharSequence title, Class<? extends Fragment> fragmentClass);
+
+ public T addTab(CharSequence title, Class<? extends Fragment> fragmentClass,
+ Bundle fragmentArguments);
+
+ public T addTab(int title, Class<? extends Fragment> fragmentClass);
+
+ public T addTab(int title, Class<? extends Fragment> fragmentClass,
+ Bundle fragmentArguments);
+
+ public T addTab(T tabInfo);
+
+ public T addTab(T tabInfo, int position);
+
+ public OnTabSelectedListener getOnTabSelectedListener();
+
+ public boolean isSmoothScroll();
+
+ public void reloadTabs();
+
+ public void removeAllTabs();
+
+ public T removeTab(int position);
+
+ public T removeTab(T tabInfo);
+
+ public void setCurrentTab(int position);
+
+ public void setCustomLayout(int customLayout);
+
+ public void setOnTabSelectedListener(OnTabSelectedListener onTabSelectedListener);
+
+ public void setSmoothScroll(boolean smoothScroll);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IntentCompat.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IntentCompat.java
new file mode 100644
index 0000000000..25f7a29549
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/IntentCompat.java
@@ -0,0 +1,59 @@
+
+package org.holoeverywhere;
+
+import org.holoeverywhere.app.Application;
+
+import android.content.ClipData;
+import android.content.Intent;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+
+public final class IntentCompat {
+ /**
+ * Declare chooser activity in manifest:
+ *
+ * <pre>
+ * &lt;activity android:name="org.holoeverywhere.ChooserActivity"
+ * android:theme="@style/Holo.Theme.Dialog.Alert.Light"
+ * android:finishOnCloseSystemDialogs="true"
+ * android:excludeFromRecents="true"
+ * android:multiprocess="true" /&gt;
+ * </pre>
+ */
+ public static Intent createChooser(Intent target, CharSequence title) {
+ if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
+ return Intent.createChooser(target, title);
+ }
+ Intent intent = new Intent();
+ intent.setClass(Application.getLastInstance(), ChooserActivity.class);
+ intent.putExtra(Intent.EXTRA_INTENT, target);
+ if (title != null) {
+ intent.putExtra(Intent.EXTRA_TITLE, title);
+ }
+ int permFlags = target.getFlags()
+ & (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
+ if (permFlags != 0) {
+ ClipData targetClipData = target.getClipData();
+ if (targetClipData == null && target.getData() != null) {
+ ClipData.Item item = new ClipData.Item(target.getData());
+ String[] mimeTypes;
+ if (target.getType() != null) {
+ mimeTypes = new String[] {
+ target.getType()
+ };
+ } else {
+ mimeTypes = new String[] {};
+ }
+ targetClipData = new ClipData(null, mimeTypes, item);
+ }
+ if (targetClipData != null) {
+ intent.setClipData(targetClipData);
+ intent.addFlags(permFlags);
+ }
+ }
+ return intent;
+ }
+
+ private IntentCompat() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/LayoutInflater.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/LayoutInflater.java
new file mode 100644
index 0000000000..ca17257021
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/LayoutInflater.java
@@ -0,0 +1,811 @@
+
+package org.holoeverywhere;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.holoeverywhere.SystemServiceManager.SystemServiceCreator;
+import org.holoeverywhere.SystemServiceManager.SystemServiceCreator.SystemService;
+import org.holoeverywhere.app.Fragment;
+import org.holoeverywhere.internal.DialogTitle;
+import org.holoeverywhere.internal.NumberPickerEditText;
+import org.holoeverywhere.util.WeaklyMap;
+import org.holoeverywhere.widget.FrameLayout;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.graphics.Canvas;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app._HoloFragmentInflater;
+import android.util.AttributeSet;
+import android.util.Xml;
+import android.view.InflateException;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
+
+import com.actionbarsherlock.internal.view.menu.ExpandedMenuView;
+import com.actionbarsherlock.internal.view.menu.HoloListMenuItemView;
+import com.actionbarsherlock.internal.widget.ActionBarContainer;
+import com.actionbarsherlock.internal.widget.ActionBarView;
+
+public class LayoutInflater extends android.view.LayoutInflater implements Cloneable {
+ private static class BlinkLayout extends FrameLayout {
+ private static final int BLINK_DELAY = 500;
+ private static final int MESSAGE_BLINK = 0x42;
+
+ private boolean mBlink;
+ private boolean mBlinkState;
+ private final Handler mHandler;
+
+ public BlinkLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mHandler = new Handler(new Handler.Callback() {
+ @Override
+ public boolean handleMessage(Message msg) {
+ if (msg.what == MESSAGE_BLINK) {
+ if (mBlink) {
+ mBlinkState = !mBlinkState;
+ makeBlink();
+ }
+ invalidate();
+ return true;
+ }
+ return false;
+ }
+ });
+ }
+
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ if (mBlinkState) {
+ super.dispatchDraw(canvas);
+ }
+ }
+
+ private void makeBlink() {
+ Message message = mHandler.obtainMessage(MESSAGE_BLINK);
+ mHandler.sendMessageDelayed(message, BLINK_DELAY);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mBlink = true;
+ mBlinkState = true;
+ makeBlink();
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mBlink = false;
+ mBlinkState = true;
+ mHandler.removeMessages(MESSAGE_BLINK);
+ }
+ }
+
+ public interface Factory {
+ public View onCreateView(View parent, String name, Context context, AttributeSet attrs);
+ }
+
+ private static final class Factory2Wrapper implements Factory {
+ private Factory2 mFactory;
+
+ public Factory2Wrapper(Factory2 factory) {
+ mFactory = factory;
+ }
+
+ @Override
+ public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
+ return mFactory.onCreateView(parent, name, context, attrs);
+ }
+ }
+
+ private static final class FactoryWrapper implements Factory {
+ private android.view.LayoutInflater.Factory mFactory;
+
+ public FactoryWrapper(android.view.LayoutInflater.Factory factory) {
+ mFactory = factory;
+ }
+
+ @Override
+ public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
+ return mFactory.onCreateView(name, context, attrs);
+ }
+ }
+
+ @SystemService(Context.LAYOUT_INFLATER_SERVICE)
+ public static class LayoutInflaterCreator implements
+ SystemServiceCreator<LayoutInflater> {
+ @Override
+ public LayoutInflater createService(Context context) {
+ return LayoutInflater.from(context);
+ }
+ }
+
+ public static interface OnInitInflaterListener {
+ public void onInitInflater(LayoutInflater inflater);
+ }
+
+ private static final HashMap<String, Constructor<? extends View>> sConstructorMap =
+ new HashMap<String, Constructor<? extends View>>();
+ private static final Class<?>[] sConstructorSignature = {
+ Context.class, AttributeSet.class
+ };
+ private static final Map<Class<?>, Method> sFinishInflateMethods =
+ new HashMap<Class<?>, Method>(100);
+ private static final Map<Context, LayoutInflater> sInstances = new WeaklyMap<Context, LayoutInflater>();
+ private static OnInitInflaterListener sListener;
+ private static final List<String> sPackages = new ArrayList<String>();
+ private static final Map<String, String> sRemaps = new HashMap<String, String>();
+ private static final String TAG_1995 = "blink";
+ private static final String TAG_INCLUDE = "include";
+ private static final String TAG_MERGE = "merge";
+ private static final String TAG_REQUEST_FOCUS = "requestFocus";
+
+ static {
+ registerPackage("android.webkit");
+ registerPackage("android.view");
+ registerPackage("android.widget");
+ registerPackage("android.support.v4.view");
+ registerPackage(HoloEverywhere.PACKAGE + ".widget");
+
+ asInternal(ActionBarView.class);
+ asInternal(HoloListMenuItemView.class);
+ asInternal(ExpandedMenuView.class);
+ asInternal(ActionBarContainer.class);
+ asInternal(DialogTitle.class);
+ asInternal(NumberPickerEditText.class);
+ }
+
+ private static void asInternal(Class<?> clazz) {
+ register("Internal." + clazz.getSimpleName(), clazz.getName());
+ }
+
+ public static LayoutInflater from(android.view.LayoutInflater inflater) {
+ if (inflater instanceof LayoutInflater) {
+ return (LayoutInflater) inflater;
+ }
+ return LayoutInflater.from(inflater.getContext()).setParent(inflater);
+ }
+
+ public static LayoutInflater from(Context context) {
+ LayoutInflater inflater = sInstances.get(context);
+ if (inflater == null) {
+ sInstances.put(context, inflater = new LayoutInflater(context));
+ }
+ return inflater;
+ }
+
+ public static View inflate(Context context, int resource) {
+ return from(context).inflate(resource, null);
+ }
+
+ public static View inflate(Context context, int resource, ViewGroup root) {
+ return from(context).inflate(resource, root);
+ }
+
+ public static View inflate(Context context, int resource, ViewGroup root,
+ boolean attachToRoot) {
+ return from(context).inflate(resource, root, attachToRoot);
+ }
+
+ /**
+ * Iterate over classes and call {@link #register(Class)} for each
+ */
+ public static void register(Class<? extends View>... classes) {
+ for (Class<? extends View> classe : classes) {
+ register(classe);
+ }
+ }
+
+ /**
+ * Fast mapping views by name<br />
+ * <br />
+ * MyView -> com.myapppackage.widget.MyView<br />
+ */
+ public static void register(Class<? extends View> clazz) {
+ if (clazz != null) {
+ register(clazz.getSimpleName(), clazz.getName());
+ }
+ }
+
+ /**
+ * Manually register shortcuts for inflating<br />
+ * Not recommend to use. You are warned. <br />
+ * <br />
+ * MyView -> com.myapppackage.widget.SuperPuperViewVeryCustom
+ */
+ public static void register(String from, String to) {
+ LayoutInflater.sRemaps.put(from, to);
+ }
+
+ public static void registerPackage(String packageName) {
+ packageName = Package.getPackage(packageName).getName();
+ if (!sPackages.contains(packageName)) {
+ sPackages.add(packageName);
+ }
+ }
+
+ /**
+ * @deprecated Use {@link #register(Class<? extends View>...)} instead
+ */
+ @Deprecated
+ public static void remap(Class<? extends View>... classes) {
+ register(classes);
+ }
+
+ /**
+ * @deprecated Use {@link #register(Class<? extends View>)} instead
+ */
+ @Deprecated
+ public static void remap(Class<? extends View> clazz) {
+ register(clazz);
+ }
+
+ @Deprecated
+ public static void remap(String prefix, String... classess) {
+ for (String clazz : classess) {
+ LayoutInflater.sRemaps.put(clazz, prefix + "." + clazz);
+ }
+ }
+
+ /**
+ * @deprecated Use {@link #register(String,String)} instead
+ */
+ @Deprecated
+ public static void remapHard(String from, String to) {
+ register(from, to);
+ }
+
+ public static void removeInstance(Context context) {
+ sInstances.remove(context);
+ }
+
+ public static void setOnInitInflaterListener(OnInitInflaterListener listener) {
+ sListener = listener;
+ }
+
+ private final Fragment mChildFragment;
+ private Map<Context, LayoutInflater> mClonedInstances;
+ private final Object[] mConstructorArgs = new Object[2];
+ private final Context mContext;
+ private List<Factory> mFactories;
+ private Filter mFilter;
+ private HashMap<String, Boolean> mFilterMap;
+ private FragmentActivity mFragmentActivity;
+ private Map<Fragment, LayoutInflater> mFragmentChildInstances;
+ private LayoutInflater mParentInflater;
+
+ protected LayoutInflater(android.view.LayoutInflater original,
+ Context newContext) {
+ this(original, newContext, null);
+ }
+
+ protected LayoutInflater(android.view.LayoutInflater original,
+ Context newContext, Fragment childFragment) {
+ this(original.getContext(), childFragment);
+ setParent(original);
+ }
+
+ protected LayoutInflater(Context context) {
+ this(context, null);
+ }
+
+ protected LayoutInflater(Context context, Fragment childFragment) {
+ super(context);
+ mChildFragment = childFragment;
+ mContext = context;
+ if (LayoutInflater.sListener != null) {
+ LayoutInflater.sListener.onInitInflater(this);
+ }
+ }
+
+ public View _createView(String name, String prefix, AttributeSet attrs)
+ throws ClassNotFoundException, InflateException {
+ Constructor<? extends View> constructor = sConstructorMap.get(name);
+ Class<? extends View> clazz = null;
+ try {
+ if (constructor == null) {
+ clazz = mContext.getClassLoader().loadClass(
+ prefix != null ? prefix + name : name).asSubclass(View.class);
+ if (mFilter != null && clazz != null) {
+ boolean allowed = mFilter.onLoadClass(clazz);
+ if (!allowed) {
+ failNotAllowed(name, prefix, attrs);
+ }
+ }
+ constructor = clazz.getConstructor(sConstructorSignature);
+ sConstructorMap.put(name, constructor);
+ } else {
+ if (mFilter != null) {
+ Boolean allowedState = mFilterMap.get(name);
+ if (allowedState == null) {
+ clazz = mContext.getClassLoader().loadClass(
+ prefix != null ? prefix + name : name).asSubclass(View.class);
+ boolean allowed = clazz != null && mFilter.onLoadClass(clazz);
+ mFilterMap.put(name, allowed);
+ if (!allowed) {
+ failNotAllowed(name, prefix, attrs);
+ }
+ } else if (allowedState.equals(Boolean.FALSE)) {
+ failNotAllowed(name, prefix, attrs);
+ }
+ }
+ }
+ Object[] args = mConstructorArgs;
+ args[1] = attrs;
+ final View view = constructor.newInstance(args);
+ if (view instanceof ViewStub) {
+ final ViewStub viewStub = (ViewStub) view;
+ if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
+ viewStub.setLayoutInflater(this);
+ }
+ }
+ return view;
+ } catch (NoSuchMethodException e) {
+ InflateException ie = new InflateException(attrs.getPositionDescription()
+ + ": Error inflating class "
+ + (prefix != null ? prefix + name : name));
+ ie.initCause(e);
+ throw ie;
+
+ } catch (ClassCastException e) {
+ InflateException ie = new InflateException(attrs.getPositionDescription()
+ + ": Class is not a View "
+ + (prefix != null ? prefix + name : name));
+ ie.initCause(e);
+ throw ie;
+ } catch (ClassNotFoundException e) {
+ throw e;
+ } catch (Exception e) {
+ InflateException ie = new InflateException(attrs.getPositionDescription()
+ + ": Error inflating class "
+ + (clazz == null ? "<unknown>" : clazz.getName()));
+ ie.initCause(e);
+ throw ie;
+ }
+ }
+
+ public void addFactory(Factory factory) {
+ checkFactoryOnNull(factory);
+ if (mFactories == null) {
+ mFactories = new ArrayList<Factory>();
+ }
+ mFactories.add(factory);
+ }
+
+ public void addFactory(Factory factory, int index) {
+ checkFactoryOnNull(factory);
+ if (mFactories == null) {
+ mFactories = new ArrayList<Factory>();
+ }
+ mFactories.add(index, factory);
+ }
+
+ private void checkFactoryOnNull(Factory factory) {
+ if (factory == null) {
+ throw new NullPointerException("Given factory can not be null");
+ }
+ }
+
+ @Override
+ public LayoutInflater cloneInContext(Context newContext) {
+ if (mClonedInstances == null) {
+ mClonedInstances = new HashMap<Context, LayoutInflater>();
+ }
+ LayoutInflater inflater = mClonedInstances.get(newContext);
+ if (inflater == null) {
+ inflater = new LayoutInflater(this, newContext);
+ mClonedInstances.put(newContext, inflater);
+ }
+ return inflater;
+ }
+
+ View createViewFromTag(View parent, String name, AttributeSet attrs) {
+ if ("fragment".equals(name)) {
+ return _HoloFragmentInflater
+ .inflate(LayoutInflater.this, attrs, parent, mChildFragment);
+ }
+ if (name.equals("view")) {
+ name = attrs.getAttributeValue(null, "class");
+ }
+ try {
+ View view = null;
+ if (mFactories != null) {
+ for (int i = 0; i < mFactories.size(); i++) {
+ view = mFactories.get(i).onCreateView(parent, name, mContext, attrs);
+ if (view != null) {
+ break;
+ }
+ }
+ }
+ if (view == null) {
+ view = onCreateView(parent, name, attrs);
+ }
+ return prepareView(view);
+ } catch (InflateException e) {
+ throw e;
+ } catch (ClassNotFoundException e) {
+ InflateException ie = new InflateException(attrs.getPositionDescription()
+ + ": Error inflating class " + name);
+ ie.initCause(e);
+ throw ie;
+ } catch (Exception e) {
+ InflateException ie = new InflateException(attrs.getPositionDescription()
+ + ": Error inflating class " + name);
+ ie.initCause(e);
+ throw ie;
+ }
+ }
+
+ private void failNotAllowed(String name, String prefix, AttributeSet attrs) {
+ throw new InflateException(attrs.getPositionDescription()
+ + ": Class not allowed to be inflated "
+ + (prefix != null ? prefix + name : name));
+ }
+
+ @Override
+ public Filter getFilter() {
+ return mFilter;
+ }
+
+ public FragmentActivity getFragmentActivity() {
+ return mFragmentActivity;
+ }
+
+ public View inflate(int resource) {
+ return inflate(resource, null, false);
+ }
+
+ @Override
+ public View inflate(int resource, ViewGroup root) {
+ return inflate(resource, root, root != null);
+ }
+
+ @Override
+ public View inflate(int resource, ViewGroup root, boolean attachToRoot) {
+ return inflate(getContext().getResources().getLayout(resource), root, attachToRoot);
+ }
+
+ public View inflate(XmlPullParser parser) {
+ return inflate(parser, null, false);
+ }
+
+ @Override
+ public View inflate(XmlPullParser parser, ViewGroup root) {
+ return inflate(parser, root, root != null);
+ }
+
+ @Override
+ public View inflate(XmlPullParser parser, ViewGroup root,
+ boolean attachToRoot) {
+ synchronized (mConstructorArgs) {
+ final AttributeSet attrs = Xml.asAttributeSet(parser);
+ mConstructorArgs[0] = mContext;
+ View result = root;
+ try {
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG &&
+ type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new InflateException(parser.getPositionDescription()
+ + ": No start tag found!");
+ }
+ final String name = parser.getName();
+ if (TAG_MERGE.equals(name)) {
+ if (root == null || !attachToRoot) {
+ throw new InflateException("<merge /> can be used only with a valid "
+ + "ViewGroup root and attachToRoot=true");
+ }
+ rInflate(parser, root, attrs, false);
+ } else {
+ View temp;
+ if (TAG_1995.equals(name)) {
+ temp = new BlinkLayout(mContext, attrs);
+ } else {
+ temp = createViewFromTag(root, name, attrs);
+ }
+ ViewGroup.LayoutParams params = null;
+ if (root != null) {
+ params = root.generateLayoutParams(attrs);
+ if (!attachToRoot) {
+ temp.setLayoutParams(params);
+ }
+ }
+ rInflate(parser, temp, attrs, true);
+ if (root != null && attachToRoot) {
+ root.addView(temp, params);
+ }
+ if (root == null || !attachToRoot) {
+ result = temp;
+ }
+ }
+ } catch (XmlPullParserException e) {
+ InflateException ex = new InflateException(e.getMessage());
+ ex.initCause(e);
+ throw ex;
+ } catch (IOException e) {
+ InflateException ex = new InflateException(
+ parser.getPositionDescription()
+ + ": " + e.getMessage());
+ ex.initCause(e);
+ throw ex;
+ } finally {
+ mConstructorArgs[1] = null;
+ }
+ return FontLoader.apply(result);
+ }
+ }
+
+ public LayoutInflater obtainFragmentChildInflater(Fragment fragment) {
+ if (mParentInflater != null) {
+ return mParentInflater.obtainFragmentChildInflater(fragment);
+ }
+ if (mFragmentChildInstances == null) {
+ mFragmentChildInstances = new WeaklyMap<Fragment, LayoutInflater>();
+ }
+ LayoutInflater inflater = mFragmentChildInstances.get(fragment);
+ if (inflater == null) {
+ mFragmentChildInstances.put(fragment,
+ inflater = new LayoutInflater(this, mContext, fragment));
+ }
+ return inflater;
+ }
+
+ @Override
+ protected View onCreateView(View parent, String name, AttributeSet attrs)
+ throws ClassNotFoundException {
+ View view;
+ String newName = LayoutInflater.sRemaps.get(name);
+ if (newName != null) {
+ view = _createView(newName, null, attrs);
+ if (view != null) {
+ return view;
+ }
+ }
+ if (name.indexOf('.') > 0) {
+ return _createView(name, null, attrs);
+ }
+ for (int i = sPackages.size() - 1; i >= 0; i--) {
+ try {
+ view = _createView(name, sPackages.get(i) + ".", attrs);
+ if (view != null) {
+ return view;
+ }
+ } catch (ClassNotFoundException e) {
+ }
+ }
+ throw new ClassNotFoundException("Could not find class: " + name);
+ }
+
+ private void parseInclude(XmlPullParser parser, View parent, AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ int type;
+ if (parent instanceof ViewGroup) {
+ final int layout = attrs.getAttributeResourceValue(null, "layout", 0);
+ if (layout == 0) {
+ final String value = attrs.getAttributeValue(null, "layout");
+ if (value == null) {
+ throw new InflateException("You must specifiy a layout in the"
+ + " include tag: <include layout=\"@layout/layoutID\" />");
+ } else {
+ throw new InflateException("You must specifiy a valid layout "
+ + "reference. The layout ID " + value + " is not valid.");
+ }
+ } else {
+ final XmlResourceParser childParser =
+ getContext().getResources().getLayout(layout);
+ try {
+ final AttributeSet childAttrs = Xml.asAttributeSet(childParser);
+ while ((type = childParser.next()) != XmlPullParser.START_TAG &&
+ type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new InflateException(childParser.getPositionDescription() +
+ ": No start tag found!");
+ }
+ final String childName = childParser.getName();
+ if (TAG_MERGE.equals(childName)) {
+ rInflate(childParser, parent, childAttrs, false);
+ } else {
+ final View view = createViewFromTag(parent, childName, childAttrs);
+ final ViewGroup group = (ViewGroup) parent;
+ ViewGroup.LayoutParams params = null;
+ try {
+ params = group.generateLayoutParams(attrs);
+ } catch (RuntimeException e) {
+ params = group.generateLayoutParams(childAttrs);
+ } finally {
+ if (params != null) {
+ view.setLayoutParams(params);
+ }
+ }
+ rInflate(childParser, view, childAttrs, true);
+ TypedArray a = mContext.obtainStyledAttributes(attrs,
+ new int[] {
+ android.R.attr.id,
+ android.R.attr.visibility
+ }, 0, 0);
+ int id = a.getResourceId(0, View.NO_ID);
+ int visibility = a.getInt(1, -1);
+ a.recycle();
+ if (id != View.NO_ID) {
+ view.setId(id);
+ }
+ switch (visibility) {
+ case 0:
+ view.setVisibility(View.VISIBLE);
+ break;
+ case 1:
+ view.setVisibility(View.INVISIBLE);
+ break;
+ case 2:
+ view.setVisibility(View.GONE);
+ break;
+ }
+ group.addView(view);
+ }
+ } finally {
+ childParser.close();
+ }
+ }
+ } else {
+ throw new InflateException("<include /> can only be used inside of a ViewGroup");
+ }
+ final int currentDepth = parser.getDepth();
+ while (((type = parser.next()) != XmlPullParser.END_TAG ||
+ parser.getDepth() > currentDepth) && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ }
+
+ private void parseRequestFocus(XmlPullParser parser, View parent)
+ throws XmlPullParserException, IOException {
+ int type;
+ parent.requestFocus();
+ final int currentDepth = parser.getDepth();
+ while (((type = parser.next()) != XmlPullParser.END_TAG ||
+ parser.getDepth() > currentDepth) && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ }
+
+ @SuppressLint("NewApi")
+ private View prepareView(View view) {
+ if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
+ view.setOverScrollMode(View.OVER_SCROLL_NEVER);
+ }
+ return view;
+ }
+
+ void rInflate(XmlPullParser parser, View parent, final AttributeSet attrs,
+ boolean finishInflate) throws XmlPullParserException, IOException {
+ final int depth = parser.getDepth();
+ int type;
+ while (((type = parser.next()) != XmlPullParser.END_TAG ||
+ parser.getDepth() > depth) && type != XmlPullParser.END_DOCUMENT) {
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+ final String name = parser.getName();
+ if (TAG_REQUEST_FOCUS.equals(name)) {
+ parseRequestFocus(parser, parent);
+ } else if (TAG_INCLUDE.equals(name)) {
+ if (parser.getDepth() == 0) {
+ throw new InflateException("<include /> cannot be the root element");
+ }
+ parseInclude(parser, parent, attrs);
+ } else if (TAG_MERGE.equals(name)) {
+ throw new InflateException("<merge /> must be the root element");
+ } else if (TAG_1995.equals(name)) {
+ final View view = new BlinkLayout(mContext, attrs);
+ final ViewGroup viewGroup = (ViewGroup) parent;
+ final ViewGroup.LayoutParams params = viewGroup.generateLayoutParams(attrs);
+ rInflate(parser, view, attrs, true);
+ viewGroup.addView(view, params);
+ } else {
+ final View view = createViewFromTag(parent, name, attrs);
+ final ViewGroup viewGroup = (ViewGroup) parent;
+ final ViewGroup.LayoutParams params = viewGroup.generateLayoutParams(attrs);
+ rInflate(parser, view, attrs, true);
+ viewGroup.addView(view, params);
+ }
+ }
+ if (finishInflate) {
+ Class<?> clazz = parent.getClass();
+ Method method = sFinishInflateMethods.get(clazz);
+ if (method == null) {
+ while (clazz != Object.class && method == null) {
+ try {
+ method = clazz.getDeclaredMethod("onFinishInflate", (Class<?>[]) null);
+ } catch (Exception e) {
+ clazz = clazz.getSuperclass();
+ }
+ }
+ if (method != null) {
+ method.setAccessible(true);
+ sFinishInflateMethods.put(parent.getClass(), method);
+ }
+ }
+ if (method != null) {
+ try {
+ method.invoke(parent, (Object[]) null);
+ } catch (Exception e) {
+ }
+ }
+ }
+ }
+
+ @Override
+ public void setFactory(android.view.LayoutInflater.Factory factory) {
+ setFactory(new FactoryWrapper(factory));
+ }
+
+ public void setFactory(Factory factory) {
+ addFactory(factory, 0);
+ }
+
+ @Override
+ public void setFactory2(Factory2 factory) {
+ setFactory(new Factory2Wrapper(factory));
+ }
+
+ @Override
+ public void setFilter(Filter filter) {
+ mFilter = filter;
+ if (filter != null) {
+ mFilterMap = new HashMap<String, Boolean>();
+ }
+ }
+
+ public void setFragmentActivity(FragmentActivity fragmentActivity) {
+ mFragmentActivity = fragmentActivity;
+ }
+
+ protected LayoutInflater setParent(android.view.LayoutInflater original) {
+ if (original == this) {
+ return this;
+ }
+ if (original instanceof LayoutInflater) {
+ mParentInflater = (LayoutInflater) original;
+ mFilter = mParentInflater.mFilter;
+ mFilterMap = mParentInflater.mFilterMap;
+ mFactories = mParentInflater.mFactories;
+ } else {
+ mParentInflater = null;
+ if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
+ final Factory2 factory = original.getFactory2();
+ if (factory != null) {
+ setFactory2(factory);
+ }
+ }
+ final android.view.LayoutInflater.Factory factory = original.getFactory();
+ if (factory != null) {
+ setFactory(factory);
+ }
+ final Filter filter = original.getFilter();
+ if (filter != null) {
+ setFilter(filter);
+ }
+ }
+ return this;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/SystemServiceManager.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/SystemServiceManager.java
new file mode 100644
index 0000000000..993efb373e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/SystemServiceManager.java
@@ -0,0 +1,104 @@
+
+package org.holoeverywhere;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.holoeverywhere.SystemServiceManager.SystemServiceCreator.SystemService;
+
+import android.content.Context;
+
+/**
+ * Manager of system services
+ *
+ * @author prok (prototypegamez@gmail.com)
+ */
+public final class SystemServiceManager {
+ public static interface SuperSystemService {
+ public Object superGetSystemService(String name);
+ }
+
+ public static interface SystemServiceCreator<T> {
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ public static @interface SystemService {
+ public String value();
+ }
+
+ public T createService(Context context);
+ }
+
+ private static final Map<Class<? extends SystemServiceCreator<?>>, SystemServiceCreator<?>> CREATORS_MAP = new HashMap<Class<? extends SystemServiceCreator<?>>, SystemServiceManager.SystemServiceCreator<?>>();
+ private static final Map<String, Class<? extends SystemServiceCreator<?>>> MAP = new HashMap<String, Class<? extends SystemServiceCreator<?>>>();
+
+ private static Object getSuperSystemService(Context context, String name) {
+ if (context instanceof SuperSystemService) {
+ return ((SuperSystemService) context).superGetSystemService(name);
+ } else {
+ return context.getSystemService(name);
+ }
+ }
+
+ public static Object getSystemService(Context context, String name) {
+ if (context == null || context.isRestricted()) {
+ throw new RuntimeException("Invalid context");
+ } else if (name == null || name.length() == 0) {
+ return null;
+ }
+ Class<? extends SystemServiceCreator<?>> clazz = MAP.get(name);
+ if (clazz == null) {
+ return getSuperSystemService(context, name);
+ }
+ SystemServiceCreator<?> creator = CREATORS_MAP.get(clazz);
+ if (creator == null) {
+ try {
+ creator = clazz.newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ CREATORS_MAP.put(clazz, creator);
+ }
+ if (creator != null) {
+ Object o = creator.createService(context);
+ if (o != null) {
+ return o;
+ }
+ }
+ return getSuperSystemService(context, name);
+ }
+
+ public static void register(Class<? extends SystemServiceCreator<?>> clazz) {
+ if (!clazz.isAnnotationPresent(SystemService.class)) {
+ throw new RuntimeException(
+ "SystemServiceCreator must be implement SystemService");
+ }
+ SystemService systemService = clazz.getAnnotation(SystemService.class);
+ final String name = systemService.value();
+ if (name == null || name.length() == 0) {
+ throw new RuntimeException("SystemService has incorrect name");
+ }
+ MAP.put(name, clazz);
+ }
+
+ public static synchronized void unregister(
+ Class<? extends SystemServiceCreator<?>> clazz) {
+ if (MAP.containsValue(clazz)) {
+ for (Entry<String, Class<? extends SystemServiceCreator<?>>> e : MAP
+ .entrySet()) {
+ if (e.getValue() == clazz) {
+ MAP.remove(e.getKey());
+ break;
+ }
+ }
+ }
+ CREATORS_MAP.remove(clazz);
+ }
+
+ private SystemServiceManager() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ThemeManager.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ThemeManager.java
new file mode 100644
index 0000000000..86a0af3ce8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/ThemeManager.java
@@ -0,0 +1,982 @@
+
+package org.holoeverywhere;
+
+import static org.holoeverywhere.R.style.Holo_Theme;
+import static org.holoeverywhere.R.style.Holo_Theme_Dialog;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge_Light;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge_Light_DarkActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge_Light_DarkActionBar_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge_Light_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_DialogWhenLarge_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_Dialog_Light;
+import static org.holoeverywhere.R.style.Holo_Theme_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_NoActionBar_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_DarkActionBar_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_NoActionBar_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_NoActionBar_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_NoActionBar_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Light_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_NoActionBar;
+import static org.holoeverywhere.R.style.Holo_Theme_NoActionBar_Fullscreen;
+import static org.holoeverywhere.R.style.Holo_Theme_NoActionBar_Fullscreen_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_NoActionBar_Wallpaper;
+import static org.holoeverywhere.R.style.Holo_Theme_Wallpaper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.holoeverywhere.ThemeManager.ThemeGetter.ThemeTag;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.app.Application;
+import org.holoeverywhere.app.ContextThemeWrapperPlus;
+import org.holoeverywhere.preference.PreferenceManagerHelper;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.os.Bundle;
+import android.util.SparseIntArray;
+
+/**
+ * ThemeManager for using different themes in activity, dialogs, etc. <br />
+ * It uses the principle of binary flags. For example, you can get a dark theme
+ * on the fullscreen mixing the two flags:<br />
+ * {@link ThemeManager#DARK} | {@link ThemeManager#FULLSCREEN} <br />
+ * <br />
+ * Default themes map for different flags:
+ * <table>
+ * <th>
+ * <td>{@link #DARK}</td>
+ * <td>{@link #LIGHT}</td>
+ * <td>{@link #MIXED}</td></th>
+ * <tr>
+ * <td>no other flags</td>
+ * <td>{@link R.style#Holo_Theme}</td>
+ * <td>{@link R.style#Holo_Theme_Light}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #FULLSCREEN}</td>
+ * <td>{@link R.style#Holo_Theme_Fullscreen}</td>
+ * <td>{@link R.style#Holo_Theme_Light_Fullscreen}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_Fullscreen}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #NO_ACTION_BAR}</td>
+ * <td>{@link R.style#Holo_Theme_NoActionBar}</td>
+ * <td>{@link R.style#Holo_Theme_Light_NoActionBar}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_NoActionBar}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #NO_ACTION_BAR} | {@link #FULLSCREEN}</td>
+ * <td>{@link R.style#Holo_Theme_NoActionBar_Fullscreen}</td>
+ * <td>{@link R.style#Holo_Theme_Light_NoActionBar_Fullscreen}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #WALLPAPER}</td>
+ * <td>{@link R.style#Holo_Theme_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_Wallpaper}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #WALLPAPER} | {@link #FULLSCREEN}</td>
+ * <td>{@link R.style#Holo_Theme_Fullscreen_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_Fullscreen_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_Fullscreen_Wallpaper}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #WALLPAPER} | {@link #NO_ACTION_BAR}</td>
+ * <td>{@link R.style#Holo_Theme_NoActionBar_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_NoActionBar_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_DarkActionBar_NoActionBar_Wallpaper}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #WALLPAPER} | {@link #NO_ACTION_BAR} | {@link #FULLSCREEN}</td>
+ * <td>{@link R.style#Holo_Theme_NoActionBar_Fullscreen_Wallpaper}</td>
+ * <td>{@link R.style#Holo_Theme_Light_NoActionBar_Fullscreen_Wallpaper}</td>
+ * <td>
+ * {@link R.style#Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen_Wallpaper}
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>{@link #DIALOG}</td>
+ * <td>{@link R.style#Holo_Theme_Dialog}</td>
+ * <td>{@link R.style#Holo_Theme_Dialog_Light}</td>
+ * <td>{@link R.style#Holo_Theme_Dialog_Light}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #DIALOG_WHEN_LARGE}</td>
+ * <td>{@link R.style#Holo_Theme_DialogWhenLarge}</td>
+ * <td>{@link R.style#Holo_Theme_DialogWhenLarge_Light}</td>
+ * <td>{@link R.style#Holo_Theme_DialogWhenLarge_Light_DarkActionBar}</td>
+ * </tr>
+ * <tr>
+ * <td>{@link #DIALOG_WHEN_LARGE} | {@link #NO_ACTION_BAR}</td>
+ * <td>{@link R.style#Holo_Theme_DialogWhenLarge_NoActionBar}</td>
+ * <td>{@link R.style#Holo_Theme_DialogWhenLarge_Light_NoActionBar}</td>
+ * <td>
+ * {@link R.style#Holo_Theme_DialogWhenLarge_Light_DarkActionBar_NoActionBar}</td>
+ * </tr>
+ * </table>
+ * <br />
+ * You may remap themes for certain flags with method {@link #map(int, int)}
+ * where first arg - flags, second - theme resource <br />
+ * <br />
+ * Part of HoloEverywhere
+ *
+ * @author prok (prototypegamez@gmail.com)
+ */
+public final class ThemeManager {
+ /**
+ * System interface for calling super.startActivity in the activities.
+ */
+ public static interface SuperStartActivity {
+ public void superStartActivity(Intent intent, int requestCode,
+ Bundle options);
+ }
+
+ /**
+ * Theme getter. This class should return theme resource for set of flags.
+ * If under the right ThemeTag no have theme, return a negative number or
+ * zero. <br />
+ * <br />
+ * Example:
+ *
+ * <pre>
+ * ThemeGetter getter = new ThemeGetter() {
+ * public int getThemeResource(ThemeTag themeTag) {
+ * if(themeTag.fullscreen) { // theme has {@link ThemeManager#FULLSCREEN} flag
+ * return R.style.CustomThemeWithFullscreenFlag;
+ * }
+ * return 0; // default behavior
+ * }
+ * }
+ * </pre>
+ */
+ public static interface ThemeGetter {
+ /**
+ * Class-container for theme flags.
+ */
+ public static final class ThemeTag {
+ public final boolean dark, fullscreen, light, mixed, noActionBar, wallpaper, dialog,
+ dialogWhenLarge;
+ public final int flags;
+
+ private ThemeTag(int flags) {
+ this.flags = flags;
+ dark = isDark(flags);
+ light = isLight(flags);
+ mixed = isMixed(flags);
+ noActionBar = isNoActionBar(flags);
+ fullscreen = isFullScreen(flags);
+ wallpaper = isWallpaper(flags);
+ dialog = isDialog(flags);
+ dialogWhenLarge = isDialogWhenLarge(flags);
+ }
+ }
+
+ public int getThemeResource(ThemeTag themeTag);
+ }
+
+ public static interface ThemeSetter {
+ public void setupThemes();
+ }
+
+ private static int _DEFAULT_THEME;
+ public static final int _START_RESOURCES_ID = 0x01000000;
+ private static ThemeGetter _THEME_GETTER;
+ private static int _THEME_MASK = 0;
+ private static int _THEME_MODIFIER = 0;
+ private static final String _THEME_TAG = ":holoeverywhere:theme";
+
+ private static final SparseIntArray _THEMES_MAP = new SparseIntArray();
+
+ public static final int COLOR_SCHEME_MASK;
+ /**
+ * Flag indicates on the dark theme
+ */
+ public static final int DARK;
+ /**
+ * Flag indicates on the dialog theme.
+ */
+ public static final int DIALOG;
+ /**
+ * Flag indicates on the dialog-when-large theme.
+ */
+ public static final int DIALOG_WHEN_LARGE;
+ /**
+ * Flag indicates on the fullscreen theme
+ */
+ public static final int FULLSCREEN;
+ /**
+ * Invalid theme
+ */
+ public static final int INVALID = 0;
+ /**
+ * Boolean flag indicates that activity was be created by theme manager
+ */
+ public static final String KEY_CREATED_BY_THEME_MANAGER = ":holoeverywhere:createbythememanager";
+ /**
+ * Key for saving activity instance state. Only for system use
+ */
+ public static final String KEY_INSTANCE_STATE = ":holoeverywhere:instancestate";
+ /**
+ * Flag indicates on the light theme. If you want light theme with dark
+ * action bar, use {@link #MIXED} flag
+ */
+ public static final int LIGHT;
+ /**
+ * Flag indicates on the light theme with dark action bar
+ */
+ public static final int MIXED;
+
+ private static int NEXT_OFFSET = 0;
+
+ /**
+ * Flag indicates on the theme without action bar
+ */
+ public static final int NO_ACTION_BAR;
+
+ private static List<ThemeSetter> sThemeSetters;
+
+ /**
+ * Flag indicates on the theme with wallpaper background
+ */
+ public static final int WALLPAPER;
+
+ static {
+ DARK = makeNewFlag();
+ LIGHT = makeNewFlag();
+ MIXED = DARK | LIGHT;
+ FULLSCREEN = makeNewFlag();
+ NO_ACTION_BAR = makeNewFlag();
+ WALLPAPER = makeNewFlag();
+ DIALOG = makeNewFlag();
+ DIALOG_WHEN_LARGE = makeNewFlag();
+
+ COLOR_SCHEME_MASK = DARK | LIGHT | MIXED;
+
+ reset();
+ }
+
+ /**
+ * Apply theme from intent. Only system use, don't call it!
+ */
+ public static void applyTheme(Activity activity) {
+ boolean force = activity instanceof IHoloActivity ? ((IHoloActivity) activity)
+ .isForceThemeApply() : false;
+ ThemeManager.applyTheme(activity, force);
+ }
+
+ /**
+ * Apply theme from intent. Only system use, don't call it!
+ */
+ public static void applyTheme(Activity activity, boolean force) {
+ if (force || ThemeManager.hasSpecifiedTheme(activity)) {
+ activity.setTheme(ThemeManager.getThemeResource(activity));
+ }
+ }
+
+ /**
+ * Synonym for {@link #cloneTheme(Intent, Intent, boolean)} with third arg -
+ * false
+ *
+ * @see #cloneTheme(Intent, Intent, boolean)
+ */
+ public static void cloneTheme(Intent sourceIntent, Intent intent) {
+ ThemeManager.cloneTheme(sourceIntent, intent, false);
+ }
+
+ /**
+ * Clone theme from sourceIntent to intent, if it specified for sourceIntent
+ * or set flag force
+ *
+ * @param sourceIntent Intent with specified {@link #_THEME_TAG}
+ * @param intent Intent into which will be put a theme
+ * @param force Clone theme even if sourceIntent not contain
+ * {@link #_THEME_TAG}
+ */
+ public static void cloneTheme(Intent sourceIntent, Intent intent,
+ boolean force) {
+ final boolean hasSourceTheme = hasSpecifiedTheme(sourceIntent);
+ if (force || hasSourceTheme) {
+ intent.putExtra(_THEME_TAG, hasSourceTheme ? getTheme(sourceIntent)
+ : _DEFAULT_THEME);
+ }
+ }
+
+ public static Context context(Context context, int theme) {
+ return context(context, theme, true);
+ }
+
+ public static Context context(Context context, int theme, boolean applyModifier) {
+ while (context instanceof ContextThemeWrapperPlus) {
+ context = ((ContextThemeWrapperPlus) context).getBaseContext();
+ }
+ return new ContextThemeWrapperPlus(context, getThemeResource(theme, applyModifier));
+ }
+
+ /**
+ * @return Default theme, which will be using if theme not specified for
+ * intent
+ * @see #setDefaultTheme(int)
+ * @see #modifyDefaultTheme(int)
+ * @see #modifyDefaultThemeClear(int)
+ */
+ public static int getDefaultTheme() {
+ return _DEFAULT_THEME;
+ }
+
+ /**
+ * @return Modifier, which applying on all themes.
+ * @see #modify(int)
+ * @see #setModifier(int)
+ */
+ public static int getModifier() {
+ return _THEME_MODIFIER;
+ }
+
+ /**
+ * Extract theme flags from activity intent
+ */
+ public static int getTheme(Activity activity) {
+ return getTheme(activity.getIntent());
+ }
+
+ /**
+ * Extract theme flags from intent
+ */
+ public static int getTheme(Intent intent) {
+ return getTheme(intent, true);
+ }
+
+ /**
+ * Extract theme flags from intent
+ */
+ public static int getTheme(Intent intent, boolean applyModifier) {
+ return prepareFlags(intent.getIntExtra(ThemeManager._THEME_TAG,
+ ThemeManager._DEFAULT_THEME), applyModifier);
+ }
+
+ public static int getThemeMask() {
+ return _THEME_MASK;
+ }
+
+ /**
+ * Resolve theme resource id by flags from activity intent
+ */
+ public static int getThemeResource(Activity activity) {
+ return getThemeResource(getTheme(activity));
+ }
+
+ /**
+ * Resolve theme resource id by flags
+ */
+ public static int getThemeResource(int themeTag) {
+ return getThemeResource(themeTag, true);
+ }
+
+ /**
+ * Resolve theme resource id by flags
+ */
+ public static int getThemeResource(int themeTag, boolean applyModifier) {
+ themeTag = prepareFlags(themeTag, applyModifier);
+ if (themeTag >= _START_RESOURCES_ID) {
+ return themeTag;
+ }
+ if (ThemeManager._THEME_GETTER != null) {
+ final int getterResource = ThemeManager._THEME_GETTER
+ .getThemeResource(new ThemeTag(themeTag));
+ if (getterResource > 0) {
+ return getterResource;
+ }
+ }
+ final int i = _THEMES_MAP.get(themeTag, _DEFAULT_THEME);
+ if (i == _DEFAULT_THEME) {
+ return _THEMES_MAP.get(_DEFAULT_THEME, R.style.Holo_Theme);
+ } else {
+ return i;
+ }
+ }
+
+ /**
+ * Resolve theme resource id by flags from intent
+ */
+ public static int getThemeResource(Intent intent) {
+ return getThemeResource(getTheme(intent));
+ }
+
+ public static int getThemeType(Context context) {
+ TypedArray a = context.obtainStyledAttributes(new int[] {
+ R.attr.holoTheme
+ });
+ final int holoTheme = a.getInt(0, 0);
+ a.recycle();
+ switch (holoTheme) {
+ case 1:
+ return DARK;
+ case 2:
+ return LIGHT;
+ case 3:
+ return MIXED;
+ case 4:
+ return PreferenceManagerHelper.obtainThemeTag();
+ case 0:
+ default:
+ return INVALID;
+ }
+ }
+
+ /**
+ * @return true if activity has specified theme in intent
+ */
+ public static boolean hasSpecifiedTheme(Activity activity) {
+ return activity == null ? false : ThemeManager
+ .hasSpecifiedTheme(activity.getIntent());
+ }
+
+ /**
+ * @return true if intent has specified theme
+ */
+ public static boolean hasSpecifiedTheme(Intent intent) {
+ return intent != null && intent.hasExtra(ThemeManager._THEME_TAG)
+ && intent.getIntExtra(ThemeManager._THEME_TAG, 0) > 0;
+ }
+
+ private static boolean is(int config, int key) {
+ return (config & key) == key;
+ }
+
+ public static boolean isDark(Activity activity) {
+ return ThemeManager.isDark(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isDark(int i) {
+ return ThemeManager.is(i, ThemeManager.DARK);
+ }
+
+ public static boolean isDark(Intent intent) {
+ return ThemeManager.isDark(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isDialog(Activity activity) {
+ return ThemeManager.isDialog(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isDialog(int i) {
+ return ThemeManager.is(i, ThemeManager.DIALOG);
+ }
+
+ public static boolean isDialog(Intent intent) {
+ return ThemeManager.isDialog(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isDialogWhenLarge(Activity activity) {
+ return ThemeManager.isDialog(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isDialogWhenLarge(int i) {
+ return ThemeManager.is(i, ThemeManager.DIALOG_WHEN_LARGE);
+ }
+
+ public static boolean isDialogWhenLarge(Intent intent) {
+ return ThemeManager.isDialog(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isFullScreen(Activity activity) {
+ return ThemeManager.isFullScreen(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isFullScreen(int i) {
+ return ThemeManager.is(i, ThemeManager.FULLSCREEN);
+ }
+
+ public static boolean isFullScreen(Intent intent) {
+ return ThemeManager.isFullScreen(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isLight(Activity activity) {
+ return ThemeManager.isLight(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isLight(int i) {
+ return ThemeManager.is(i, ThemeManager.LIGHT);
+ }
+
+ public static boolean isLight(Intent intent) {
+ return ThemeManager.isLight(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isMixed(Activity activity) {
+ return ThemeManager.isMixed(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isMixed(int i) {
+ return ThemeManager.is(i, ThemeManager.MIXED);
+ }
+
+ public static boolean isMixed(Intent intent) {
+ return ThemeManager.isMixed(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isNoActionBar(Activity activity) {
+ return ThemeManager.isNoActionBar(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isNoActionBar(int i) {
+ return ThemeManager.is(i, ThemeManager.NO_ACTION_BAR);
+ }
+
+ public static boolean isNoActionBar(Intent intent) {
+ return ThemeManager.isNoActionBar(ThemeManager.getTheme(intent));
+ }
+
+ public static boolean isWallpaper(Activity activity) {
+ return ThemeManager.isWallpaper(ThemeManager.getTheme(activity));
+ }
+
+ public static boolean isWallpaper(int i) {
+ return ThemeManager.is(i, ThemeManager.WALLPAPER);
+ }
+
+ public static boolean isWallpaper(Intent intent) {
+ return ThemeManager.isWallpaper(ThemeManager.getTheme(intent));
+ }
+
+ /**
+ * Generate flag for using it in ThemeManager. Not more than 32 flags can be
+ * created.
+ */
+ public static int makeNewFlag() {
+ if (NEXT_OFFSET > 32) {
+ throw new IllegalStateException();
+ }
+ final int flag = 1 << NEXT_OFFSET++;
+ _THEME_MASK |= flag;
+ return flag;
+ }
+
+ /**
+ * Remap default theme.
+ *
+ * @see #map(int, int)
+ */
+ public static void map(int theme) {
+ map(_DEFAULT_THEME, theme);
+ }
+
+ /**
+ * Remap themes. <br />
+ * <br />
+ * Example, you can remap {@link #LIGHT} theme on
+ * {@link R.style#Holo_Theme_Dialog_Light}:<br />
+ *
+ * <pre>
+ * ThemeManager.map({@link #LIGHT}, {@link R.style#Holo_Theme_Dialog_Light});
+ * </pre>
+ *
+ * If theme value negative - remove pair flags-theme
+ */
+ public static void map(int flags, int theme) {
+ if (theme > 0) {
+ _THEMES_MAP.put(flags & _THEME_MASK, theme);
+ } else {
+ final int i = _THEMES_MAP.indexOfKey(flags & _THEME_MASK);
+ if (i > 0) {
+ _THEMES_MAP.removeAt(i);
+ }
+ }
+ }
+
+ /**
+ * Add modifier to all themes, using in {@link ThemeManager}. If you call
+ * modify({@link #NO_ACTION_BAR}), then all themes will be without action
+ * bar by default, regardless of the flag is passed.
+ *
+ * @see #modifyClear(int)
+ * @see #modifyClear()
+ * @see #setModifier(int)
+ */
+ public static void modify(int mod) {
+ ThemeManager._THEME_MODIFIER |= mod & ThemeManager._THEME_MASK;
+ }
+
+ /**
+ * Clear all modifiers
+ *
+ * @see #modify(int)
+ * @see #modifyClear(int)
+ * @see #setModifier(int)
+ */
+ public static void modifyClear() {
+ ThemeManager._THEME_MODIFIER = 0;
+ }
+
+ /**
+ * Clear modifier
+ *
+ * @see #modify(int)
+ * @see #modifyClear()
+ * @see #setModifier(int)
+ */
+ public static void modifyClear(int mod) {
+ mod &= ThemeManager._THEME_MASK;
+ ThemeManager._THEME_MODIFIER |= mod;
+ ThemeManager._THEME_MODIFIER ^= mod;
+ }
+
+ /**
+ * Like {@link #modify(int)}, but applying only on default theme.
+ *
+ * @see #modifyDefaultThemeClear(int)
+ * @see #setDefaultTheme(int)
+ * @see #getDefaultTheme()
+ */
+ public static void modifyDefaultTheme(int mod) {
+ ThemeManager._DEFAULT_THEME |= mod & ThemeManager._THEME_MASK;
+ }
+
+ /**
+ * Clear modifier from default theme
+ *
+ * @see #modifyDefaultTheme(int)
+ * @see #setDefaultTheme(int)
+ * @see #getDefaultTheme()
+ */
+ public static void modifyDefaultThemeClear(int mod) {
+ mod &= ThemeManager._THEME_MASK;
+ ThemeManager._DEFAULT_THEME |= mod;
+ ThemeManager._DEFAULT_THEME ^= mod;
+ }
+
+ private static int prepareFlags(int i, boolean applyModifier) {
+ if (i >= _START_RESOURCES_ID) {
+ return i;
+ }
+ if (applyModifier && ThemeManager._THEME_MODIFIER > 0) {
+ i |= ThemeManager._THEME_MODIFIER;
+ }
+ return i & ThemeManager._THEME_MASK;
+ }
+
+ public static void registerThemeSetter(ThemeSetter themeSetter) {
+ if (themeSetter == null) {
+ return;
+ }
+ if (sThemeSetters == null) {
+ sThemeSetters = new ArrayList<ThemeManager.ThemeSetter>();
+ }
+ if (!sThemeSetters.contains(themeSetter)) {
+ sThemeSetters.add(themeSetter);
+ themeSetter.setupThemes();
+ }
+ }
+
+ /**
+ * Remove theme from the intent extras.
+ */
+ public static void removeTheme(Activity activity) {
+ activity.getIntent().removeExtra(_THEME_TAG);
+ }
+
+ /**
+ * Reset all themes to default
+ */
+ public static void reset() {
+ if ((_DEFAULT_THEME & COLOR_SCHEME_MASK) == 0) {
+ _DEFAULT_THEME = DARK;
+ }
+ _THEME_MODIFIER = 0;
+ _THEMES_MAP.clear();
+
+ map(DARK,
+ Holo_Theme);
+ map(DARK | FULLSCREEN,
+ Holo_Theme_Fullscreen);
+ map(DARK | NO_ACTION_BAR,
+ Holo_Theme_NoActionBar);
+ map(DARK | NO_ACTION_BAR | FULLSCREEN,
+ Holo_Theme_NoActionBar_Fullscreen);
+ map(DARK | DIALOG,
+ Holo_Theme_Dialog);
+ map(DARK | DIALOG_WHEN_LARGE,
+ Holo_Theme_DialogWhenLarge);
+ map(DARK | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
+ Holo_Theme_DialogWhenLarge_NoActionBar);
+
+ map(DARK | WALLPAPER,
+ Holo_Theme_Wallpaper);
+ map(DARK | NO_ACTION_BAR | WALLPAPER,
+ Holo_Theme_NoActionBar_Wallpaper);
+ map(DARK | FULLSCREEN | WALLPAPER,
+ Holo_Theme_Fullscreen_Wallpaper);
+ map(DARK | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
+ Holo_Theme_NoActionBar_Fullscreen_Wallpaper);
+
+ map(LIGHT,
+ Holo_Theme_Light);
+ map(LIGHT | FULLSCREEN,
+ Holo_Theme_Light_Fullscreen);
+ map(LIGHT | NO_ACTION_BAR,
+ Holo_Theme_Light_NoActionBar);
+ map(LIGHT | NO_ACTION_BAR | FULLSCREEN,
+ Holo_Theme_Light_NoActionBar_Fullscreen);
+ map(LIGHT | DIALOG,
+ Holo_Theme_Dialog_Light);
+ map(LIGHT | DIALOG_WHEN_LARGE,
+ Holo_Theme_DialogWhenLarge_Light);
+ map(LIGHT | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
+ Holo_Theme_DialogWhenLarge_Light_NoActionBar);
+
+ map(LIGHT | WALLPAPER,
+ Holo_Theme_Light_Wallpaper);
+ map(LIGHT | NO_ACTION_BAR | WALLPAPER,
+ Holo_Theme_Light_NoActionBar_Wallpaper);
+ map(LIGHT | FULLSCREEN | WALLPAPER,
+ Holo_Theme_Light_Fullscreen_Wallpaper);
+ map(LIGHT | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
+ Holo_Theme_Light_NoActionBar_Fullscreen_Wallpaper);
+
+ map(MIXED,
+ Holo_Theme_Light_DarkActionBar);
+ map(MIXED | FULLSCREEN,
+ Holo_Theme_Light_DarkActionBar_Fullscreen);
+ map(MIXED | NO_ACTION_BAR,
+ Holo_Theme_Light_DarkActionBar_NoActionBar);
+ map(MIXED | NO_ACTION_BAR | FULLSCREEN,
+ Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen);
+ map(MIXED | DIALOG,
+ Holo_Theme_Dialog_Light);
+ map(MIXED | DIALOG_WHEN_LARGE,
+ Holo_Theme_DialogWhenLarge_Light_DarkActionBar);
+ map(MIXED | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
+ Holo_Theme_DialogWhenLarge_Light_DarkActionBar_NoActionBar);
+
+ map(MIXED | WALLPAPER,
+ Holo_Theme_Light_DarkActionBar_Wallpaper);
+ map(MIXED | NO_ACTION_BAR | WALLPAPER,
+ Holo_Theme_Light_DarkActionBar_NoActionBar_Wallpaper);
+ map(MIXED | FULLSCREEN | WALLPAPER,
+ Holo_Theme_Light_DarkActionBar_Fullscreen_Wallpaper);
+ map(MIXED | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
+ Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen_Wallpaper);
+
+ if (sThemeSetters != null) {
+ for (ThemeSetter setter : sThemeSetters) {
+ setter.setupThemes();
+ }
+ }
+ }
+
+ /**
+ * Simply restart activity
+ *
+ * @param activity Activity
+ */
+ public static void restart(Activity activity) {
+ restart(activity, true);
+ }
+
+ public static void restart(Activity activity, boolean force) {
+ restartWithTheme(activity, -1, force);
+ }
+
+ /**
+ * Check activity on dark theme and restart it if theme incorrect.
+ *
+ * @see #restartWithTheme(Activity, int)
+ */
+ public static void restartWithDarkTheme(Activity activity) {
+ ThemeManager.restartWithTheme(activity, ThemeManager.DARK);
+ }
+
+ /**
+ * Check activity on light theme and restart it if theme incorrect.
+ *
+ * @see #restartWithTheme(Activity, int)
+ */
+ public static void restartWithLightTheme(Activity activity) {
+ ThemeManager.restartWithTheme(activity, ThemeManager.LIGHT);
+ }
+
+ /**
+ * Check activity on light with dark action bar theme and restart it if
+ * theme incorrect.
+ *
+ * @see #restartWithTheme(Activity, int)
+ */
+ public static void restartWithMixedTheme(Activity activity) {
+ ThemeManager.restartWithTheme(activity, ThemeManager.MIXED);
+ }
+
+ /**
+ * Check activity on theme and restart it if theme incorrect.
+ *
+ * @param activity Activity
+ * @param theme Theme flags for check
+ */
+ public static void restartWithTheme(Activity activity, int theme) {
+ ThemeManager.restartWithTheme(activity, theme, false);
+ }
+
+ /**
+ * Like {@link #restartWithTheme(Activity, int)}, but if third arg is true -
+ * restart activity regardless theme.
+ *
+ * @param activity Activity
+ * @param theme Theme flags for check
+ * @param force Force restart activity
+ */
+ public static void restartWithTheme(Activity activity, int theme, boolean force) {
+ if (theme < _START_RESOURCES_ID && theme > 0) {
+ if (ThemeManager._THEME_MODIFIER > 0) {
+ theme |= ThemeManager._THEME_MODIFIER;
+ }
+ theme &= ThemeManager._THEME_MASK;
+ }
+ if (force || ThemeManager.getTheme(activity) != theme) {
+ Intent intent = new Intent(activity.getIntent());
+ intent.setClass(activity, activity.getClass());
+ intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ if (theme > 0) {
+ intent.putExtra(ThemeManager._THEME_TAG, theme);
+ }
+ intent.putExtra(KEY_INSTANCE_STATE, activity.saveInstanceState());
+ intent.putExtra(KEY_CREATED_BY_THEME_MANAGER, true);
+ if (activity.isRestricted()) {
+ Application app = Application.getLastInstance();
+ if (app != null && !app.isRestricted()) {
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ app.superStartActivity(intent, -1, null);
+ }
+ } else {
+ if (!activity.isFinishing()) {
+ activity.finish();
+ activity.overridePendingTransition(0, 0);
+ }
+ if (activity instanceof SuperStartActivity) {
+ ((SuperStartActivity) activity).superStartActivity(intent,
+ -1, null);
+ } else {
+ activity.startActivity(intent);
+ }
+ }
+ }
+ }
+
+ /**
+ * Set default theme. May be theme resource instead flags, but it not
+ * recommend.
+ *
+ * @param theme Theme
+ * @see #modifyDefaultTheme(int)
+ * @see #modifyDefaultThemeClear(int)
+ * @see #getDefaultTheme()
+ */
+ public static void setDefaultTheme(int theme) {
+ ThemeManager._DEFAULT_THEME = theme;
+ if (theme < _START_RESOURCES_ID) {
+ ThemeManager._DEFAULT_THEME &= ThemeManager._THEME_MASK;
+ }
+ }
+
+ /**
+ * Set theme modifiers. See {@link #modify(int)}
+ *
+ * @param mod Modififers
+ * @see #modify(int)
+ */
+ public static void setModifier(int mod) {
+ ThemeManager._THEME_MODIFIER = mod & ThemeManager._THEME_MASK;
+ }
+
+ /**
+ * Set {@link ThemeGetter} instance for getting theme resources.
+ *
+ * @param themeGetter ThemeGetter
+ */
+ public static void setThemeGetter(ThemeGetter themeGetter) {
+ ThemeManager._THEME_GETTER = themeGetter;
+ }
+
+ /**
+ * Only for system use
+ */
+ public static void startActivity(Context context, Intent intent) {
+ ThemeManager.startActivity(context, intent, -1);
+ }
+
+ /**
+ * Only for system use
+ */
+ public static void startActivity(Context context, Intent intent,
+ Bundle options) {
+ ThemeManager.startActivity(context, intent, -1, options);
+ }
+
+ /**
+ * Only for system use
+ */
+ public static void startActivity(Context context, Intent intent,
+ int requestCode) {
+ ThemeManager.startActivity(context, intent, requestCode, null);
+ }
+
+ /**
+ * Only for system use
+ */
+ @SuppressLint("NewApi")
+ public static void startActivity(Context context, Intent intent,
+ int requestCode, Bundle options) {
+ final Activity activity = context instanceof Activity ? (Activity) context
+ : null;
+ if (activity != null) {
+ ThemeManager.cloneTheme(activity.getIntent(), intent, true);
+ }
+ if (context instanceof SuperStartActivity) {
+ ((SuperStartActivity) context).superStartActivity(intent,
+ requestCode, options);
+ } else {
+ if (activity != null) {
+ if (VERSION.SDK_INT >= 16) {
+ activity.startActivityForResult(intent, requestCode,
+ options);
+ } else {
+ activity.startActivityForResult(intent, requestCode);
+ }
+ } else {
+ if (VERSION.SDK_INT >= 16) {
+ context.startActivity(intent, options);
+ } else {
+ context.startActivity(intent);
+ }
+ }
+ }
+ }
+
+ public static void unregisterThemeSetter(ThemeSetter themeSetter) {
+ if (sThemeSetters == null || themeSetter == null) {
+ return;
+ }
+ sThemeSetters.remove(themeSetter);
+ }
+
+ private ThemeManager() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/AddonSherlock.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/AddonSherlock.java
new file mode 100644
index 0000000000..08adda05a4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/AddonSherlock.java
@@ -0,0 +1,239 @@
+
+package org.holoeverywhere.addon;
+
+import org.holoeverywhere.addon.IAddon.Addon;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.app.Application;
+
+import android.content.Context;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+
+import com.actionbarsherlock.ActionBarSherlock;
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.ActionBarSherlockCompat;
+import com.actionbarsherlock.internal.ActionBarSherlockNative;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.ActionMode.Callback;
+import com.actionbarsherlock.view.MenuInflater;
+
+@Addon(inhert = true, weight = 50)
+public class AddonSherlock extends IAddon {
+ public static class AddonSherlockA extends IAddonActivity {
+ private boolean mIgnoreNativeCreate = false;
+ private boolean mIgnoreNativePrepare = false;
+ private boolean mIgnoreNativeSelected = false;
+ private ActionBarSherlock mSherlock;
+
+ @Override
+ public boolean closeOptionsMenu() {
+ return getSherlock().dispatchCloseOptionsMenu();
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ return getSherlock().dispatchKeyEvent(event);
+ }
+
+ public ActionBar getActionBar() {
+ return getSherlock().getActionBar();
+ }
+
+ public MenuInflater getMenuInflater() {
+ return getSherlock().getMenuInflater();
+ }
+
+ protected ActionBarSherlock getSherlock() {
+ if (mSherlock == null) {
+ mSherlock = ActionBarSherlock.wrap(get(), ActionBarSherlock.FLAG_DELEGATE);
+ }
+ return mSherlock;
+ }
+
+ @Override
+ public boolean installDecorView(View view, LayoutParams params) {
+ getSherlock().setContentView(view, params);
+ return true;
+ }
+
+ @Override
+ public boolean invalidateOptionsMenu() {
+ getSherlock().dispatchInvalidateOptionsMenu();
+ return true;
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration oldConfig, Configuration newConfig) {
+ getSherlock().dispatchConfigurationChanged(newConfig);
+ }
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL
+ && !mIgnoreNativeCreate) {
+ mIgnoreNativeCreate = true;
+ boolean result = getSherlock().dispatchCreateOptionsMenu(menu);
+ mIgnoreNativeCreate = false;
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public void onDestroy() {
+ getSherlock().dispatchDestroy();
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL
+ && !mIgnoreNativeSelected) {
+ mIgnoreNativeSelected = true;
+ boolean result = getSherlock().dispatchOptionsItemSelected(item);
+ mIgnoreNativeSelected = false;
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onMenuOpened(int featureId, Menu menu) {
+ return getSherlock().dispatchMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public void onPanelClosed(int featureId, Menu menu) {
+ getSherlock().dispatchPanelClosed(featureId, menu);
+ }
+
+ @Override
+ public void onPause() {
+ getSherlock().dispatchPause();
+ }
+
+ @Override
+ public void onPostCreate(Bundle savedInstanceState) {
+ getSherlock().dispatchPostCreate(savedInstanceState);
+ }
+
+ @Override
+ public void onPostResume() {
+ getSherlock().dispatchPostResume();
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (featureId == Window.FEATURE_OPTIONS_PANEL
+ && !mIgnoreNativePrepare) {
+ mIgnoreNativePrepare = true;
+ boolean result = getSherlock().dispatchPrepareOptionsMenu(menu);
+ mIgnoreNativePrepare = false;
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public void onStop() {
+ getSherlock().dispatchStop();
+ }
+
+ @Override
+ public void onTitleChanged(CharSequence title, int color) {
+ getSherlock().dispatchTitleChanged(title, color);
+ }
+
+ @Override
+ public boolean openOptionsMenu() {
+ return getSherlock().dispatchOpenOptionsMenu();
+ }
+
+ @Override
+ public boolean requestWindowFeature(int featureId) {
+ return getSherlock().requestFeature(featureId);
+ }
+
+ public void setProgress(int progress) {
+ getSherlock().setProgress(progress);
+ }
+
+ public void setProgressBarIndeterminate(boolean indeterminate) {
+ getSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ public void setProgressBarIndeterminateVisibility(boolean visible) {
+ getSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ public void setProgressBarVisibility(boolean visible) {
+ getSherlock().setProgressBarVisibility(visible);
+ }
+
+ public void setSecondaryProgress(int secondaryProgress) {
+ getSherlock().setSecondaryProgress(secondaryProgress);
+ }
+
+ public void setUiOptions(int uiOptions) {
+ getSherlock().setUiOptions(uiOptions);
+ }
+
+ public void setUiOptions(int uiOptions, int mask) {
+ getSherlock().setUiOptions(uiOptions, mask);
+ }
+
+ public ActionMode startActionMode(Callback callback) {
+ return getSherlock().startActionMode(callback);
+ }
+ }
+
+ public static class AddonSherlockApplication extends IAddonApplication {
+ @Override
+ public void onCreate() {
+ ActionBarSherlock.unregisterImplementation(ActionBarSherlockNative.class);
+ ActionBarSherlock.unregisterImplementation(ActionBarSherlockCompat.class);
+ ActionBarSherlock.registerImplementation(HoloActionBarSherlockNative.class);
+ ActionBarSherlock.registerImplementation(HoloActionBarSherlockCompat.class);
+ }
+ }
+
+ @ActionBarSherlock.Implementation(api = 7)
+ private static class HoloActionBarSherlockCompat extends ActionBarSherlockCompat {
+ public HoloActionBarSherlockCompat(android.app.Activity activity, int flags) {
+ super(activity, flags);
+ }
+
+ @Override
+ protected Context getThemedContext() {
+ if (mActivity instanceof Activity) {
+ return ((Activity) mActivity).getSupportActionBarContext();
+ }
+ return super.getThemedContext();
+ }
+ }
+
+ @ActionBarSherlock.Implementation(api = 14)
+ private static class HoloActionBarSherlockNative extends ActionBarSherlockNative {
+ public HoloActionBarSherlockNative(android.app.Activity activity, int flags) {
+ super(activity, flags);
+ }
+
+ @Override
+ protected Context getThemedContext() {
+ if (mActivity instanceof Activity) {
+ return ((Activity) mActivity).getSupportActionBarContext();
+ }
+ return super.getThemedContext();
+ }
+ }
+
+ public AddonSherlock() {
+ register(Activity.class, AddonSherlockA.class);
+ register(Application.class, AddonSherlockApplication.class);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddon.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddon.java
new file mode 100644
index 0000000000..fa7383ae8d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddon.java
@@ -0,0 +1,99 @@
+
+package org.holoeverywhere.addon;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.util.WeaklyMap;
+
+public abstract class IAddon {
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE)
+ public @interface Addon {
+ public boolean inhert() default false;
+
+ public int weight() default -1;
+ }
+
+ private static final Map<Class<? extends IAddon>, IAddon> sAddonsMap = new HashMap<Class<? extends IAddon>, IAddon>();
+
+ @SuppressWarnings("unchecked")
+ public static <T extends IAddon> T addon(Class<T> clazz) {
+ try {
+ T t = (T) sAddonsMap.get(clazz);
+ if (t == null) {
+ t = clazz.newInstance();
+ sAddonsMap.put(clazz, t);
+ }
+ return t;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static <T extends IAddon> T addon(String classname) {
+ Class<T> clazz = makeAddonClass(classname);
+ return addon(clazz);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T extends IAddon> Class<T> makeAddonClass(String classname) {
+ if (classname.contains(".")) {
+ try {
+ return (Class<T>) Class.forName(classname);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ return makeAddonClass(HoloEverywhere.PACKAGE + ".addon.Addon" + classname);
+ }
+ }
+
+ public static <T extends IAddon, Z extends IAddonBase<V>, V> Z obtain(Class<T> clazz, V object) {
+ return addon(clazz).obtain(object);
+ }
+
+ public static <T extends IAddon, Z extends IAddonBase<V>, V> Z obtain(String classname, V object) {
+ return addon(classname).obtain(object);
+ }
+
+ private final Map<Object, Object> mStatesMap = new WeaklyMap<Object, Object>();
+ private final Map<Class<?>, Class<? extends IAddonBase<?>>> mTypesMap = new HashMap<Class<?>, Class<? extends IAddonBase<?>>>();
+
+ @SuppressWarnings("unchecked")
+ public <T, V extends IAddonBase<T>> V obtain(T object) {
+ try {
+ V addon = (V) mStatesMap.get(object);
+ if (addon != null) {
+ return addon;
+ }
+ Class<?> clazz = object.getClass();
+ while (!mTypesMap.containsKey(clazz)) {
+ if (clazz == Object.class) {
+ // Nothing was found
+ return null;
+ }
+ clazz = clazz.getSuperclass();
+ }
+ addon = ((Class<V>) mTypesMap.get(clazz)).newInstance();
+ addon.attach(object, this);
+ mStatesMap.put(object, addon);
+ return addon;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public <T> void register(Class<T> clazz, Class<? extends IAddonBase<T>> addonClazz) {
+ mTypesMap.put(clazz, addonClazz);
+ }
+
+ public void unregister(Class<?> clazz) {
+ mTypesMap.remove(clazz);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonActivity.java
new file mode 100644
index 0000000000..ce841809d4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonActivity.java
@@ -0,0 +1,124 @@
+
+package org.holoeverywhere.addon;
+
+import org.holoeverywhere.app.Activity;
+
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+
+public abstract class IAddonActivity extends IAddonBase<Activity> {
+ public boolean closeOptionsMenu() {
+ return false;
+ }
+
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ return false;
+ }
+
+ public View findViewById(int id) {
+ return null;
+ }
+
+ public boolean installDecorView(View view, LayoutParams params) {
+ return false;
+ }
+
+ public boolean invalidateOptionsMenu() {
+ return false;
+ }
+
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ }
+
+ public void onConfigurationChanged(Configuration oldConfig, Configuration newConfig) {
+
+ }
+
+ public void onContentChanged() {
+
+ }
+
+ public void onCreate(Bundle savedInstanceState) {
+
+ }
+
+ public boolean onCreatePanelMenu(int featureId, android.view.Menu menu) {
+ return false;
+ }
+
+ public void onDestroy() {
+
+ }
+
+ public boolean onMenuItemSelected(int featureId, android.view.MenuItem item) {
+ return false;
+ }
+
+ public boolean onMenuOpened(int featureId, android.view.Menu menu) {
+ return false;
+ }
+
+ public void onNewIntent(Intent intent) {
+
+ }
+
+ public void onPanelClosed(int featureId, android.view.Menu menu) {
+
+ }
+
+ public void onPause() {
+
+ }
+
+ public void onPostCreate(Bundle savedInstanceState) {
+
+ }
+
+ public void onPostResume() {
+
+ }
+
+ public void onPreCreate(Bundle savedInstanceState) {
+
+ }
+
+ public boolean onPreparePanel(int featureId, View view, android.view.Menu menu) {
+ return false;
+ }
+
+ public void onRestart() {
+
+ }
+
+ public void onResume() {
+
+ }
+
+ public void onSaveInstanceState(Bundle outState) {
+
+ }
+
+ public void onStart() {
+
+ }
+
+ public void onStop() {
+
+ }
+
+ public void onTitleChanged(CharSequence title, int color) {
+
+ }
+
+ public boolean openOptionsMenu() {
+ return false;
+ }
+
+ public boolean requestWindowFeature(int featureId) {
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonApplication.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonApplication.java
new file mode 100644
index 0000000000..ecefc3d63a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonApplication.java
@@ -0,0 +1,14 @@
+
+package org.holoeverywhere.addon;
+
+import org.holoeverywhere.app.Application;
+
+public abstract class IAddonApplication extends IAddonBase<Application> {
+ public void onCreate() {
+
+ }
+
+ public void onPreCreate() {
+
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonAttacher.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonAttacher.java
new file mode 100644
index 0000000000..57c9ed2a3a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonAttacher.java
@@ -0,0 +1,66 @@
+
+package org.holoeverywhere.addon;
+
+import java.util.Collection;
+
+public interface IAddonAttacher<V extends IAddonBase<?>> {
+ public abstract static class AddonCallback<V> {
+ public boolean mStopped = false;
+
+ public boolean action(V addon) {
+ justAction(addon);
+ return false;
+ }
+
+ public void justAction(V addon) {
+
+ }
+
+ public void justPost() {
+
+ }
+
+ public boolean performAction(V addon) {
+ if (action(addon)) {
+ stop();
+ return true;
+ }
+ return false;
+ }
+
+ public boolean post() {
+ justPost();
+ return false;
+ }
+
+ public void pre() {
+
+ }
+
+ public void stop() {
+ mStopped = true;
+ }
+ }
+
+ public static class AttachException extends RuntimeException {
+ private static final long serialVersionUID = 4007240742116340485L;
+
+ public AttachException(Object object, Class<? extends IAddon> clazz) {
+ super("Couldn't attach addon " + clazz.getName() + " after init of object " + object);
+ }
+ }
+
+ public <T extends V> T addon(Class<? extends IAddon> clazz);
+
+ public void addon(Collection<Class<? extends IAddon>> classes);
+
+ public <T extends V> T addon(String classname);
+
+ public boolean isAddonAttached(Class<? extends IAddon> clazz);
+
+ public void lockAttaching();
+
+ public Collection<Class<? extends IAddon>> obtainAddonsList();
+
+ public boolean performAddonAction(AddonCallback<V> callback);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBase.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBase.java
new file mode 100644
index 0000000000..7daa1168b9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBase.java
@@ -0,0 +1,27 @@
+
+package org.holoeverywhere.addon;
+
+public abstract class IAddonBase<T> {
+ private T mObject;
+ private IAddon mParent;
+
+ public final void attach(T object, IAddon parent) {
+ if (mObject != null || object == null || mParent != null || parent == null) {
+ throw new IllegalStateException();
+ }
+ mParent = parent;
+ onAttach(mObject = object);
+ }
+
+ public T get() {
+ return mObject;
+ }
+
+ public final IAddon getParent() {
+ return mParent;
+ }
+
+ protected void onAttach(T object) {
+
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBasicAttacher.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBasicAttacher.java
new file mode 100644
index 0000000000..fae4291ed1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonBasicAttacher.java
@@ -0,0 +1,131 @@
+
+package org.holoeverywhere.addon;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.holoeverywhere.addon.IAddon.Addon;
+
+public final class IAddonBasicAttacher<V extends IAddonBase<Z>, Z> implements IAddonAttacher<V> {
+ private final class AddonComparator implements Comparator<V> {
+ @Override
+ public int compare(V lhs, V rhs) {
+ final int i1 = getWeight(lhs.getParent());
+ final int i2 = getWeight(rhs.getParent());
+ return i1 > i2 ? 1 : i1 < i2 ? -1 : 0;
+ }
+
+ private int getWeight(IAddon addon) {
+ if (addon.getClass().isAnnotationPresent(Addon.class)) {
+ return addon.getClass().getAnnotation(Addon.class).weight();
+ }
+ return -1;
+ }
+ }
+
+ private final Map<Class<? extends IAddon>, V> mAddons = new HashMap<Class<? extends IAddon>, V>();
+ private final Set<V> mAddonsList = new TreeSet<V>(new AddonComparator());
+ private boolean mLockAttaching = false;
+ private Z mObject;
+
+ public IAddonBasicAttacher(Z object) {
+ mObject = object;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T extends V> T addon(Class<? extends IAddon> clazz) {
+ T addon = (T) mAddons.get(clazz);
+ if (addon == null) {
+ if (mLockAttaching) {
+ throw new AttachException(mObject, clazz);
+ }
+ addon = IAddon.obtain(clazz, mObject);
+ if (addon == null) {
+ return null;
+ }
+ mAddons.put(clazz, addon);
+ mAddonsList.add(addon);
+ }
+ return addon;
+ }
+
+ @Override
+ public void addon(Collection<Class<? extends IAddon>> classes) {
+ if (classes == null) {
+ return;
+ }
+ for (Class<? extends IAddon> clazz : classes) {
+ addon(clazz);
+ }
+ }
+
+ @Override
+ public <T extends V> T addon(String classname) {
+ return addon(IAddon.makeAddonClass(classname));
+ }
+
+ public void inhert(Collection<Class<? extends IAddon>> sourceClasses) {
+ if (sourceClasses == null || sourceClasses.size() == 0) {
+ return;
+ }
+ List<Class<? extends IAddon>> classes = new ArrayList<Class<? extends IAddon>>();
+ for (Class<? extends IAddon> clazz : sourceClasses) {
+ if (!clazz.isAnnotationPresent(Addon.class)) {
+ continue;
+ }
+ Addon addon = clazz.getAnnotation(Addon.class);
+ if (addon.inhert()) {
+ classes.add(clazz);
+ }
+ }
+ addon(classes);
+ }
+
+ public void inhert(IAddonAttacher<?> attacher) {
+ inhert(attacher == null ? null : attacher.obtainAddonsList());
+ }
+
+ @Override
+ public boolean isAddonAttached(Class<? extends IAddon> clazz) {
+ return mAddons.containsKey(clazz);
+ }
+
+ @Override
+ public void lockAttaching() {
+ mLockAttaching = true;
+ }
+
+ @Override
+ public Collection<Class<? extends IAddon>> obtainAddonsList() {
+ return new ArrayList<Class<? extends IAddon>>(mAddons.keySet());
+ }
+
+ @Override
+ public boolean performAddonAction(AddonCallback<V> callback) {
+ if (mAddons.size() == 0) {
+ return false;
+ }
+ callback.pre();
+ boolean result = false;
+ for (V addon : mAddonsList) {
+ result = callback.performAction(addon);
+ if (callback.mStopped) {
+ return result;
+ }
+ }
+ return callback.post();
+ }
+
+ public void reset() {
+ mAddons.clear();
+ mAddonsList.clear();
+ mLockAttaching = false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonFragment.java
new file mode 100644
index 0000000000..e18fe69ab0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonFragment.java
@@ -0,0 +1,21 @@
+
+package org.holoeverywhere.addon;
+
+import org.holoeverywhere.app.Fragment;
+
+import android.os.Bundle;
+import android.view.View;
+
+public abstract class IAddonFragment extends IAddonBase<Fragment> {
+ public void onCreate(Bundle savedInstanceState) {
+
+ }
+
+ public void onPreCreate(Bundle savedInstanceState) {
+
+ }
+
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonThemes.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonThemes.java
new file mode 100644
index 0000000000..c6cd4d3603
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/addon/IAddonThemes.java
@@ -0,0 +1,136 @@
+
+package org.holoeverywhere.addon;
+
+import java.util.Map;
+
+import org.holoeverywhere.ThemeManager;
+import org.holoeverywhere.ThemeManager.ThemeSetter;
+import org.holoeverywhere.app.ContextThemeWrapperPlus;
+import org.holoeverywhere.util.WeaklyMap;
+
+import android.content.Context;
+
+public class IAddonThemes implements ThemeSetter {
+ private static final class AddonThemeWrapper extends ContextThemeWrapperPlus {
+ public AddonThemeWrapper(Context base, int themeres) {
+ super(base, themeres);
+ }
+ }
+
+ public interface ThemeResolver {
+ public int resolveThemeForContext(Context context, int invalidTheme);
+ }
+
+ private Map<Context, AddonThemeWrapper> mContexts;
+ private int mDarkTheme = -1;
+ private final ThemeResolver mDefaultThemeResolver = new ThemeResolver() {
+ @Override
+ public int resolveThemeForContext(Context context, int invalidTheme) {
+ int theme = ThemeManager.getThemeType(context);
+ if (theme == ThemeManager.INVALID) {
+ theme = invalidTheme & ThemeManager.getThemeMask();
+ if (theme == 0) {
+ theme = ThemeManager.DARK;
+ }
+ }
+ theme |= mThemeFlag;
+ return ThemeManager.getThemeResource(theme, false);
+ }
+ };
+
+ private int mLightTheme = -1;
+
+ private int mMixedTheme = -1;
+
+ private final int mThemeFlag;
+
+ public IAddonThemes() {
+ mThemeFlag = ThemeManager.makeNewFlag();
+ ThemeManager.registerThemeSetter(this);
+ }
+
+ public Context context(Context context) {
+ return context(context, ThemeManager.DARK);
+ }
+
+ public Context context(Context context, int invalidTheme) {
+ return context(context, invalidTheme, mDefaultThemeResolver);
+ }
+
+ public Context context(Context context, int invalidTheme, ThemeResolver themeResolver) {
+ if (context instanceof AddonThemeWrapper) {
+ return context;
+ }
+ AddonThemeWrapper wrapper = null;
+ if (mContexts != null) {
+ wrapper = mContexts.get(context);
+ }
+ if (wrapper == null) {
+ final int theme = themeResolver.resolveThemeForContext(context, invalidTheme);
+ if (theme <= 0) {
+ return null;
+ }
+ wrapper = new AddonThemeWrapper(context, theme);
+ if (mContexts == null) {
+ mContexts = new WeaklyMap<Context, AddonThemeWrapper>();
+ }
+ mContexts.put(context, wrapper);
+ }
+ return wrapper;
+ }
+
+ public int getDarkTheme() {
+ return mDarkTheme;
+ }
+
+ public int getLightTheme() {
+ return mLightTheme;
+ }
+
+ public int getMixedTheme() {
+ return mMixedTheme;
+ }
+
+ public int getThemeFlag() {
+ return mThemeFlag;
+ }
+
+ public void map(int darkTheme, int lightTheme, int mixedTheme) {
+ mDarkTheme = darkTheme;
+ mLightTheme = lightTheme;
+ mMixedTheme = mixedTheme;
+ setupThemes();
+ }
+
+ public void setDarkTheme(int darkTheme) {
+ mDarkTheme = darkTheme;
+ setupThemes();
+ }
+
+ public void setLightTheme(int lightTheme) {
+ mLightTheme = lightTheme;
+ setupThemes();
+ }
+
+ public void setMixedTheme(int mixedTheme) {
+ mMixedTheme = mixedTheme;
+ setupThemes();
+ }
+
+ @Override
+ public void setupThemes() {
+ ThemeManager.map(mThemeFlag | ThemeManager.DARK, mDarkTheme);
+ ThemeManager.map(mThemeFlag | ThemeManager.LIGHT, mLightTheme);
+ ThemeManager.map(mThemeFlag | ThemeManager.MIXED, mMixedTheme);
+ }
+
+ public Context unwrap(Context context) {
+ if (context == null) {
+ return null;
+ }
+ while (context instanceof AddonThemeWrapper) {
+ context = ((AddonThemeWrapper) context).getBaseContext();
+ }
+ return context;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Activity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Activity.java
new file mode 100644
index 0000000000..f07923a6b8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Activity.java
@@ -0,0 +1,596 @@
+
+package org.holoeverywhere.app;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Collection;
+
+import org.holoeverywhere.FontLoader;
+import org.holoeverywhere.ThemeManager;
+import org.holoeverywhere.addon.AddonSherlock;
+import org.holoeverywhere.addon.AddonSherlock.AddonSherlockA;
+import org.holoeverywhere.addon.IAddon;
+import org.holoeverywhere.addon.IAddonActivity;
+import org.holoeverywhere.addon.IAddonBasicAttacher;
+
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.os.Bundle;
+import android.support.v4.app._HoloActivity;
+import android.view.KeyEvent;
+import android.view.View;
+
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+
+public abstract class Activity extends _HoloActivity {
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE)
+ @Inherited
+ public static @interface Addons {
+ public String[] value();
+ }
+
+ private final class FindViewAction extends AddonCallback<IAddonActivity> {
+ private int mId;
+ private View mView;
+
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return (mView = addon.findViewById(mId)) != null;
+ }
+
+ @Override
+ public boolean post() {
+ return (mView = Activity.super.findViewById(mId)) != null;
+ }
+ }
+
+ private final class KeyEventAction extends AddonCallback<IAddonActivity> {
+ private KeyEvent mEvent;
+
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.dispatchKeyEvent(mEvent);
+ }
+
+ @Override
+ public boolean post() {
+ return Activity.super.dispatchKeyEvent(mEvent);
+ }
+ }
+
+ public static final String ADDON_ROBOGUICE = "Roboguice";
+ public static final String ADDON_SHERLOCK = "Sherlock";
+ public static final String ADDON_SLIDER = "Slider";
+ /**
+ * Use {@link #ADDON_SLIDER} instead
+ */
+ @Deprecated
+ public static final String ADDON_SLIDING_MENU = ADDON_SLIDER;
+ private final IAddonBasicAttacher<IAddonActivity, Activity> mAttacher =
+ new IAddonBasicAttacher<IAddonActivity, Activity>(this);
+ private boolean mCreatedByThemeManager = false;
+ private final FindViewAction mFindViewAction = new FindViewAction();
+ private boolean mFirstRun = true;
+ private final KeyEventAction mKeyEventAction = new KeyEventAction();
+
+ @Override
+ public <T extends IAddonActivity> T addon(Class<? extends IAddon> clazz) {
+ return mAttacher.addon(clazz);
+ }
+
+ @Override
+ public void addon(Collection<Class<? extends IAddon>> classes) {
+ mAttacher.addon(classes);
+ }
+
+ @Override
+ public <T extends IAddonActivity> T addon(String classname) {
+ return mAttacher.addon(classname);
+ }
+
+ public AddonSherlockA addonSherlock() {
+ return addon(AddonSherlock.class);
+ }
+
+ @Override
+ public void closeOptionsMenu() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.closeOptionsMenu();
+ }
+
+ @Override
+ public void justPost() {
+ Activity.super.closeOptionsMenu();
+ }
+ });
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ mKeyEventAction.mEvent = event;
+ return performAddonAction(mKeyEventAction);
+ }
+
+ @Override
+ public View findViewById(int id) {
+ mFindViewAction.mView = null;
+ mFindViewAction.mId = id;
+ performAddonAction(mFindViewAction);
+ return mFindViewAction.mView;
+ }
+
+ @Override
+ public ActionBar getSupportActionBar() {
+ return addonSherlock().getActionBar();
+ }
+
+ public Bundle instanceState(Bundle savedInstanceState) {
+ if (savedInstanceState != null) {
+ return savedInstanceState;
+ }
+ Bundle extras = getIntent().getExtras();
+ if (extras != null && extras.containsKey(ThemeManager.KEY_INSTANCE_STATE)) {
+ return extras.getBundle(ThemeManager.KEY_INSTANCE_STATE);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isAddonAttached(Class<? extends IAddon> clazz) {
+ return mAttacher.isAddonAttached(clazz);
+ }
+
+ public boolean isCreatedByThemeManager() {
+ return mCreatedByThemeManager;
+ }
+
+ public boolean isFirstRun() {
+ return mFirstRun;
+ }
+
+ @Override
+ public void lockAttaching() {
+ mAttacher.lockAttaching();
+ }
+
+ @Override
+ public Collection<Class<? extends IAddon>> obtainAddonsList() {
+ return mAttacher.obtainAddonsList();
+ }
+
+ @Override
+ public void onActionModeFinished(ActionMode mode) {
+ }
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {
+ }
+
+ @Override
+ protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onActivityResult(requestCode, resultCode, data);
+ }
+ });
+ }
+
+ @Override
+ public void onConfigurationChanged(final Configuration newConfig) {
+ final Configuration oldConfig = getResources().getConfiguration();
+ super.onConfigurationChanged(newConfig);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onConfigurationChanged(oldConfig, newConfig);
+ }
+ });
+ }
+
+ @Override
+ public void onContentChanged() {
+ super.onContentChanged();
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onContentChanged();
+ }
+ });
+ FontLoader.apply(getWindow().getDecorView());
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ mFirstRun = savedInstanceState == null;
+ final Bundle state = instanceState(savedInstanceState);
+ mCreatedByThemeManager = getIntent().getBooleanExtra(
+ ThemeManager.KEY_CREATED_BY_THEME_MANAGER, false);
+ if (mCreatedByThemeManager) {
+ mFirstRun = false;
+ }
+ mAttacher.inhert(getSupportApplication());
+ forceInit(state);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onPreCreate(state);
+ }
+ });
+ super.onCreate(state);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onCreate(state);
+ }
+ });
+ }
+
+ @Override
+ public final boolean onCreateOptionsMenu(android.view.Menu menu) {
+ return onCreateOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onCreatePanelMenu(final int featureId, final android.view.Menu menu) {
+ return performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.onCreatePanelMenu(featureId, menu);
+ }
+
+ @Override
+ public boolean post() {
+ return Activity.super.onCreatePanelMenu(featureId, menu);
+ }
+ });
+ }
+
+ @Override
+ protected void onDestroy() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onDestroy();
+ }
+ });
+ super.onDestroy();
+ }
+
+ @Override
+ public boolean onMenuItemSelected(final int featureId,
+ final android.view.MenuItem item) {
+ return performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.onMenuItemSelected(featureId, item);
+ }
+
+ @Override
+ public boolean post() {
+ return Activity.super.onMenuItemSelected(featureId, item);
+ }
+ });
+ }
+
+ @Override
+ public boolean onMenuOpened(final int featureId, final android.view.Menu menu) {
+ return performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.onMenuOpened(featureId, menu);
+ }
+
+ @Override
+ public boolean post() {
+ return Activity.super.onMenuOpened(featureId, menu);
+ }
+ });
+ }
+
+ @Override
+ protected void onNewIntent(final Intent intent) {
+ super.onNewIntent(intent);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onNewIntent(intent);
+ }
+ });
+ }
+
+ @Override
+ public final boolean onOptionsItemSelected(android.view.MenuItem item) {
+ return onOptionsItemSelected(new MenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ return false;
+ }
+
+ @Override
+ public void onPanelClosed(final int featureId, final android.view.Menu menu) {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onPanelClosed(featureId, menu);
+ }
+ });
+ super.onPanelClosed(featureId, menu);
+ }
+
+ @Override
+ protected void onPause() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onPause();
+ }
+ });
+ super.onPause();
+ }
+
+ @Override
+ protected void onPostCreate(Bundle sSavedInstanceState) {
+ final Bundle savedInstanceState = instanceState(sSavedInstanceState);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onPostCreate(savedInstanceState);
+ }
+ });
+ super.onPostCreate(savedInstanceState);
+ }
+
+ @Override
+ protected void onPostInit(Holo config, Bundle savedInstanceState) {
+ lockAttaching();
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onPostResume();
+ }
+ });
+ }
+
+ @Override
+ protected void onPreInit(Holo config, Bundle savedInstanceState) {
+ if (getClass().isAnnotationPresent(Addons.class)) {
+ for (String addon : getClass().getAnnotation(Addons.class).value()) {
+ if (ADDON_SHERLOCK.equals(addon)) {
+ config.requireSherlock = true;
+ } else if (ADDON_SLIDER.equals(addon)) {
+ config.requireSlider = true;
+ } else if (ADDON_ROBOGUICE.equals(addon)) {
+ config.requireRoboguice = true;
+ } else {
+ addon(addon);
+ }
+ }
+ }
+ }
+
+ @Override
+ public final boolean onPrepareOptionsMenu(android.view.Menu menu) {
+ return onPrepareOptionsMenu(new MenuWrapper(menu));
+ }
+
+ @Override
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ return true;
+ }
+
+ @Override
+ public boolean onPreparePanel(final int featureId, final View view,
+ final android.view.Menu menu) {
+ return performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.onPreparePanel(featureId, view, menu);
+ }
+
+ @Override
+ public boolean post() {
+ return Activity.super.onPreparePanel(featureId, view, menu);
+ }
+ });
+ }
+
+ @Override
+ protected void onRestart() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onRestart();
+ }
+ });
+ super.onRestart();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onResume();
+ }
+ });
+ }
+
+ @Override
+ protected void onSaveInstanceState(final Bundle outState) {
+ super.onSaveInstanceState(outState);
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onSaveInstanceState(outState);
+ }
+ });
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onStart();
+ }
+ });
+ }
+
+ @Override
+ protected void onStop() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onStop();
+ }
+ });
+ super.onStop();
+ }
+
+ @Override
+ protected void onTitleChanged(final CharSequence title, final int color) {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public void justAction(IAddonActivity addon) {
+ addon.onTitleChanged(title, color);
+ }
+ });
+ super.onTitleChanged(title, color);
+ }
+
+ @Override
+ public void openOptionsMenu() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.openOptionsMenu();
+ }
+
+ @Override
+ public void justPost() {
+ Activity.super.openOptionsMenu();
+ }
+ });
+ }
+
+ @Override
+ public boolean performAddonAction(AddonCallback<IAddonActivity> callback) {
+ return mAttacher.performAddonAction(callback);
+ }
+
+ @Override
+ public void requestWindowFeature(long featureIdLong) {
+ if (!super.isInited()) {
+ super.requestWindowFeature(featureIdLong);
+ return;
+ }
+ final int featureId = (int) featureIdLong;
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.requestWindowFeature(featureId);
+ }
+
+ @Override
+ public void justPost() {
+ requestWindowFeature(featureId);
+ }
+ });
+ }
+
+ public Bundle saveInstanceState() {
+ Bundle bundle = new Bundle(getClassLoader());
+ onSaveInstanceState(bundle);
+ return bundle.size() > 0 ? bundle : null;
+ }
+
+ @Override
+ public void setSupportProgress(int progress) {
+ addonSherlock().setProgress(progress);
+ }
+
+ @Override
+ public void setSupportProgressBarIndeterminate(boolean indeterminate) {
+ addonSherlock().setProgressBarIndeterminate(indeterminate);
+ }
+
+ @Override
+ public void setSupportProgressBarIndeterminateVisibility(boolean visible) {
+ addonSherlock().setProgressBarIndeterminateVisibility(visible);
+ }
+
+ @Override
+ public void setSupportProgressBarVisibility(boolean visible) {
+ addonSherlock().setProgressBarVisibility(visible);
+ }
+
+ @Override
+ public void setSupportSecondaryProgress(int secondaryProgress) {
+ addonSherlock().setSecondaryProgress(secondaryProgress);
+ }
+
+ public void setUiOptions(int uiOptions) {
+ if (isAddonAttached(AddonSherlock.class)) {
+ addonSherlock().setUiOptions(uiOptions);
+ } else if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+ getWindow().setUiOptions(uiOptions);
+ }
+ }
+
+ public void setUiOptions(int uiOptions, int mask) {
+ if (isAddonAttached(AddonSherlock.class)) {
+ addonSherlock().setUiOptions(uiOptions, mask);
+ } else if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+ getWindow().setUiOptions(uiOptions, mask);
+ }
+ }
+
+ @Override
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ return addonSherlock().startActionMode(callback);
+ }
+
+ @Override
+ public void supportInvalidateOptionsMenu() {
+ performAddonAction(new AddonCallback<IAddonActivity>() {
+ @Override
+ public boolean action(IAddonActivity addon) {
+ return addon.invalidateOptionsMenu();
+ }
+
+ @Override
+ public void justPost() {
+ Activity.super.supportInvalidateOptionsMenu();
+ }
+ });
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertActivity.java
new file mode 100644
index 0000000000..58dc288b90
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertActivity.java
@@ -0,0 +1,53 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.internal.AlertController;
+
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.view.KeyEvent;
+
+public abstract class AlertActivity extends Activity implements DialogInterface {
+ protected AlertController mAlert;
+ protected AlertController.AlertParams mAlertParams;
+
+ @Override
+ public void cancel() {
+ finish();
+ }
+
+ @Override
+ public void dismiss() {
+ if (!isFinishing()) {
+ finish();
+ }
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mAlert = new AlertController(this, this, getWindow());
+ mAlertParams = new AlertController.AlertParams(this);
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (mAlert.onKeyDown(keyCode, event)) {
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ @Override
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ if (mAlert.onKeyUp(keyCode, event)) {
+ return true;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+ protected void setupAlert() {
+ mAlertParams.apply(mAlert);
+ mAlert.installContent();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialog.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialog.java
new file mode 100644
index 0000000000..679a4a93a8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialog.java
@@ -0,0 +1,514 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.AlertController;
+import org.holoeverywhere.internal.AlertController.AlertDecorViewInstaller;
+import org.holoeverywhere.internal.AlertController.AlertParams;
+import org.holoeverywhere.internal.AlertController.AlertParams.OnPrepareListViewListener;
+import org.holoeverywhere.widget.Button;
+import org.holoeverywhere.widget.ListView;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.database.Cursor;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.os.Message;
+import android.util.TypedValue;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListAdapter;
+
+public class AlertDialog extends Dialog implements DialogInterface,
+ AlertDecorViewInstaller {
+ public static class Builder {
+ private static final Class<?>[] CONSTRUCTOR_SIGNATURE = {
+ Context.class, int.class
+ };
+ private Class<? extends AlertDialog> mDialogClass;
+ private final AlertController.AlertParams mParams;
+
+ public Builder(Context context) {
+ this(context, 0);
+ }
+
+ public Builder(Context context, int theme) {
+ mParams = new AlertParams(context, theme);
+ }
+
+ public Builder addButtonBehavior(int buttonBehavior) {
+ mParams.mButtonBehavior |= buttonBehavior;
+ return this;
+ }
+
+ public AlertDialog create() {
+ AlertDialog dialog = null;
+ if (mDialogClass != null) {
+ try {
+ dialog = mDialogClass.getConstructor(CONSTRUCTOR_SIGNATURE).newInstance(
+ mParams.mContext, mParams.mTheme);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ if (dialog == null) {
+ dialog = new AlertDialog(mParams.mContext, mParams.mTheme);
+ }
+ mParams.apply(dialog.mAlert);
+ dialog.setCancelable(mParams.mCancelable);
+ if (mParams.mCancelable) {
+ dialog.setCanceledOnTouchOutside(true);
+ }
+ if (mParams.mOnCancelListener != null) {
+ dialog.setOnCancelListener(mParams.mOnCancelListener);
+ }
+ if (mParams.mOnKeyListener != null) {
+ dialog.setOnKeyListener(mParams.mOnKeyListener);
+ }
+ if (mParams.mOnDismissListener != null) {
+ dialog.setOnDismissListener(mParams.mOnDismissListener);
+ }
+ return dialog;
+ }
+
+ public Context getContext() {
+ return mParams.mContext;
+ }
+
+ public Builder removeButtonBehavior(int buttonBehavior) {
+ mParams.mButtonBehavior |= buttonBehavior;
+ mParams.mButtonBehavior ^= buttonBehavior;
+ return this;
+ }
+
+ public Builder setAdapter(final ListAdapter adapter,
+ final OnClickListener listener) {
+ mParams.mAdapter = adapter;
+ mParams.mOnClickListener = listener;
+ return this;
+ }
+
+ public Builder setAlertDialogClass(Class<? extends AlertDialog> clazz) {
+ mDialogClass = clazz;
+ return this;
+ }
+
+ public Builder setBlockDismiss(boolean blockDismiss) {
+ return setButtonBehavior(blockDismiss ? 0 : DISMISS_ON_ALL);
+ }
+
+ public Builder setButtonBehavior(int buttonBehavior) {
+ mParams.mButtonBehavior = buttonBehavior;
+ return this;
+ }
+
+ public Builder setCancelable(boolean cancelable) {
+ mParams.mCancelable = cancelable;
+ return this;
+ }
+
+ public Builder setCheckedItem(int checkedItem) {
+ mParams.mCheckedItem = checkedItem;
+ return this;
+ }
+
+ public Builder setCursor(final Cursor cursor,
+ final OnClickListener listener, String labelColumn) {
+ mParams.mCursor = cursor;
+ mParams.mLabelColumn = labelColumn;
+ mParams.mOnClickListener = listener;
+ return this;
+ }
+
+ public Builder setCustomTitle(View customTitleView) {
+ mParams.mCustomTitleView = customTitleView;
+ return this;
+ }
+
+ public Builder setIcon(Drawable icon) {
+ mParams.mIcon = icon;
+ return this;
+ }
+
+ public Builder setIcon(int iconId) {
+ mParams.mIconId = iconId;
+ return this;
+ }
+
+ public Builder setIconAttribute(int attrId) {
+ TypedValue out = new TypedValue();
+ mParams.mContext.getTheme().resolveAttribute(attrId, out, true);
+ mParams.mIconId = out.resourceId;
+ return this;
+ }
+
+ public Builder setInverseBackgroundForced(boolean useInverseBackground) {
+ mParams.mForceInverseBackground = useInverseBackground;
+ return this;
+ }
+
+ public Builder setItems(CharSequence[] items,
+ final OnClickListener listener) {
+ mParams.mItems = items;
+ mParams.mOnClickListener = listener;
+ return this;
+ }
+
+ public Builder setItems(int itemsId, final OnClickListener listener) {
+ mParams.mItems = mParams.mContext.getResources().getTextArray(itemsId);
+ mParams.mOnClickListener = listener;
+ return this;
+ }
+
+ public Builder setMessage(CharSequence message) {
+ mParams.mMessage = message;
+ return this;
+ }
+
+ public Builder setMessage(int messageId) {
+ mParams.mMessage = mParams.mContext.getText(messageId);
+ return this;
+ }
+
+ public Builder setMultiChoiceItems(CharSequence[] items,
+ boolean[] checkedItems,
+ final OnMultiChoiceClickListener listener) {
+ mParams.mItems = items;
+ mParams.mOnCheckboxClickListener = listener;
+ mParams.mCheckedItems = checkedItems;
+ mParams.mIsMultiChoice = true;
+ return this;
+ }
+
+ public Builder setMultiChoiceItems(Cursor cursor,
+ String isCheckedColumn, String labelColumn,
+ final OnMultiChoiceClickListener listener) {
+ mParams.mCursor = cursor;
+ mParams.mOnCheckboxClickListener = listener;
+ mParams.mIsCheckedColumn = isCheckedColumn;
+ mParams.mLabelColumn = labelColumn;
+ mParams.mIsMultiChoice = true;
+ return this;
+ }
+
+ public Builder setMultiChoiceItems(int itemsId, boolean[] checkedItems,
+ final OnMultiChoiceClickListener listener) {
+ mParams.mItems = mParams.mContext.getResources().getTextArray(itemsId);
+ mParams.mOnCheckboxClickListener = listener;
+ mParams.mCheckedItems = checkedItems;
+ mParams.mIsMultiChoice = true;
+ return this;
+ }
+
+ public Builder setNegativeButton(CharSequence text,
+ final OnClickListener listener) {
+ mParams.mNegativeButtonText = text;
+ mParams.mNegativeButtonListener = listener;
+ return this;
+ }
+
+ public Builder setNegativeButton(int textId,
+ final OnClickListener listener) {
+ mParams.mNegativeButtonText = mParams.mContext.getText(textId);
+ mParams.mNegativeButtonListener = listener;
+ return this;
+ }
+
+ public Builder setNeutralButton(CharSequence text,
+ final OnClickListener listener) {
+ mParams.mNeutralButtonText = text;
+ mParams.mNeutralButtonListener = listener;
+ return this;
+ }
+
+ public Builder setNeutralButton(int textId,
+ final OnClickListener listener) {
+ mParams.mNeutralButtonText = mParams.mContext.getText(textId);
+ mParams.mNeutralButtonListener = listener;
+ return this;
+ }
+
+ public Builder setOnCancelListener(OnCancelListener onCancelListener) {
+ mParams.mOnCancelListener = onCancelListener;
+ return this;
+ }
+
+ public Builder setOnDismissListener(OnDismissListener onDismissListener) {
+ mParams.mOnDismissListener = onDismissListener;
+ return this;
+ }
+
+ public Builder setOnItemSelectedListener(
+ final AdapterView.OnItemSelectedListener listener) {
+ mParams.mOnItemSelectedListener = listener;
+ return this;
+ }
+
+ public Builder setOnKeyListener(OnKeyListener onKeyListener) {
+ mParams.mOnKeyListener = onKeyListener;
+ return this;
+ }
+
+ public Builder setOnPrepareListViewListener(
+ OnPrepareListViewListener listener) {
+ mParams.mOnPrepareListViewListener = listener;
+ return this;
+ }
+
+ public Builder setPositiveButton(CharSequence text,
+ final OnClickListener listener) {
+ mParams.mPositiveButtonText = text;
+ mParams.mPositiveButtonListener = listener;
+ return this;
+ }
+
+ public Builder setPositiveButton(int textId,
+ final OnClickListener listener) {
+ mParams.mPositiveButtonText = mParams.mContext.getText(textId);
+ mParams.mPositiveButtonListener = listener;
+ return this;
+ }
+
+ public Builder setSingleChoiceItems(CharSequence[] items,
+ int checkedItem, final OnClickListener listener) {
+ mParams.mItems = items;
+ mParams.mOnClickListener = listener;
+ mParams.mCheckedItem = checkedItem;
+ mParams.mIsSingleChoice = true;
+ return this;
+ }
+
+ public Builder setSingleChoiceItems(Cursor cursor, int checkedItem,
+ String labelColumn, final OnClickListener listener) {
+ mParams.mCursor = cursor;
+ mParams.mOnClickListener = listener;
+ mParams.mCheckedItem = checkedItem;
+ mParams.mLabelColumn = labelColumn;
+ mParams.mIsSingleChoice = true;
+ return this;
+ }
+
+ public Builder setSingleChoiceItems(int itemsId, int checkedItem,
+ final OnClickListener listener) {
+ mParams.mItems = mParams.mContext.getResources().getTextArray(itemsId);
+ mParams.mOnClickListener = listener;
+ mParams.mCheckedItem = checkedItem;
+ mParams.mIsSingleChoice = true;
+ return this;
+ }
+
+ public Builder setSingleChoiceItems(ListAdapter adapter,
+ int checkedItem, final OnClickListener listener) {
+ mParams.mAdapter = adapter;
+ mParams.mOnClickListener = listener;
+ mParams.mCheckedItem = checkedItem;
+ mParams.mIsSingleChoice = true;
+ return this;
+ }
+
+ public Builder setTheme(int theme) {
+ mParams.mTheme = theme;
+ return this;
+ }
+
+ public Builder setTitle(CharSequence title) {
+ mParams.mTitle = title;
+ return this;
+ }
+
+ public Builder setTitle(int titleId) {
+ mParams.mTitle = mParams.mContext.getText(titleId);
+ return this;
+ }
+
+ public Builder setView(View view) {
+ mParams.mView = view;
+ mParams.mViewSpacingSpecified = false;
+ return this;
+ }
+
+ public Builder setView(View view, int viewSpacingLeft,
+ int viewSpacingTop, int viewSpacingRight, int viewSpacingBottom) {
+ mParams.mView = view;
+ mParams.mViewSpacingSpecified = true;
+ mParams.mViewSpacingLeft = viewSpacingLeft;
+ mParams.mViewSpacingTop = viewSpacingTop;
+ mParams.mViewSpacingRight = viewSpacingRight;
+ mParams.mViewSpacingBottom = viewSpacingBottom;
+ return this;
+ }
+
+ public AlertDialog show() {
+ AlertDialog dialog = create();
+ dialog.show();
+ return dialog;
+ }
+ }
+
+ public static final int DISMISS_ON_ALL = 7; // DO_NEG | DO_NEU | DO_POS
+ public static final int DISMISS_ON_NEGATIVE = 1 << 0; // -BUTTON_NEGATIVE;
+ public static final int DISMISS_ON_NEUTRAL = 1 << 1; // -BUTTON_NEUTRAL;
+ public static final int DISMISS_ON_POSITIVE = 1 << 2; // -BUTTON_POSITIVE;
+
+ public static final int THEME_HOLO_DARK = 1;
+ public static final int THEME_HOLO_LIGHT = 2;
+
+ static int resolveDialogTheme(Context context, int resid) {
+ if (resid == AlertDialog.THEME_HOLO_DARK) {
+ return R.style.Holo_Theme_Dialog_Alert;
+ } else if (resid == AlertDialog.THEME_HOLO_LIGHT) {
+ return R.style.Holo_Theme_Dialog_Alert_Light;
+ } else if (resid >= 0x01000000) {
+ return resid;
+ } else {
+ TypedValue outValue = new TypedValue();
+ context.getTheme().resolveAttribute(R.attr.alertDialogTheme, outValue, true);
+ return outValue.resourceId;
+ }
+ }
+
+ private final AlertController mAlert;
+
+ protected AlertDialog(Context context) {
+ this(context, true, null, 0);
+ }
+
+ protected AlertDialog(Context context, boolean cancelable,
+ OnCancelListener cancelListener) {
+ this(context, cancelable, cancelListener, 0);
+ }
+
+ protected AlertDialog(Context context, boolean cancelable,
+ OnCancelListener cancelListener, int theme) {
+ super(context, AlertDialog.resolveDialogTheme(context, theme));
+ setCancelable(cancelable);
+ setOnCancelListener(cancelListener);
+ mAlert = new AlertController(getContext(), this, getWindow(), this);
+ }
+
+ protected AlertDialog(Context context, int theme) {
+ this(context, true, null, theme);
+ }
+
+ public Button getButton(int whichButton) {
+ return mAlert.getButton(whichButton);
+ }
+
+ public ListView getListView() {
+ return mAlert.getListView();
+ }
+
+ @Override
+ public void installDecorView(Context context, int layout) {
+ setContentView(layout);
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mAlert.installContent();
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (mAlert.onKeyDown(keyCode, event)) {
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ @Override
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ if (mAlert.onKeyUp(keyCode, event)) {
+ return true;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+ @Deprecated
+ public void setButton(CharSequence text, Message msg) {
+ setButton(DialogInterface.BUTTON_POSITIVE, text, msg);
+ }
+
+ @Deprecated
+ public void setButton(CharSequence text, final OnClickListener listener) {
+ setButton(DialogInterface.BUTTON_POSITIVE, text, listener);
+ }
+
+ public void setButton(int whichButton, CharSequence text, Message msg) {
+ mAlert.setButton(whichButton, text, null, msg);
+ }
+
+ public void setButton(int whichButton, CharSequence text,
+ OnClickListener listener) {
+ mAlert.setButton(whichButton, text, listener, null);
+ }
+
+ @Deprecated
+ public void setButton2(CharSequence text, Message msg) {
+ setButton(DialogInterface.BUTTON_NEGATIVE, text, msg);
+ }
+
+ @Deprecated
+ public void setButton2(CharSequence text, final OnClickListener listener) {
+ setButton(DialogInterface.BUTTON_NEGATIVE, text, listener);
+ }
+
+ @Deprecated
+ public void setButton3(CharSequence text, Message msg) {
+ setButton(DialogInterface.BUTTON_NEUTRAL, text, msg);
+ }
+
+ @Deprecated
+ public void setButton3(CharSequence text, final OnClickListener listener) {
+ setButton(DialogInterface.BUTTON_NEUTRAL, text, listener);
+ }
+
+ public void setButtonBehavior(int buttonBehavior) {
+ mAlert.setButtonBehavior(buttonBehavior);
+ }
+
+ public void setCustomTitle(View customTitleView) {
+ mAlert.setCustomTitle(customTitleView);
+ }
+
+ public void setIcon(Drawable icon) {
+ mAlert.setIcon(icon);
+ }
+
+ public void setIcon(int resId) {
+ mAlert.setIcon(resId);
+ }
+
+ public void setIconAttribute(int attrId) {
+ TypedValue out = new TypedValue();
+ getContext().getTheme().resolveAttribute(attrId, out, true);
+ mAlert.setIcon(out.resourceId);
+ }
+
+ public void setInverseBackgroundForced(boolean forceInverseBackground) {
+ mAlert.setInverseBackgroundForced(forceInverseBackground);
+ }
+
+ public void setMessage(CharSequence message) {
+ mAlert.setMessage(message);
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ super.setTitle(title);
+ mAlert.setTitle(title);
+ }
+
+ public void setView(View view) {
+ mAlert.setView(view);
+ }
+
+ public void setView(View view, int viewSpacingLeft, int viewSpacingTop,
+ int viewSpacingRight, int viewSpacingBottom) {
+ mAlert.setView(view, viewSpacingLeft, viewSpacingTop, viewSpacingRight,
+ viewSpacingBottom);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialogFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialogFragment.java
new file mode 100644
index 0000000000..47454cbf6c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/AlertDialogFragment.java
@@ -0,0 +1,21 @@
+
+package org.holoeverywhere.app;
+
+import android.os.Bundle;
+
+public class AlertDialogFragment extends DialogFragment {
+ public AlertDialogFragment() {
+ setDialogType(DialogType.AlertDialog);
+ }
+
+ protected void onCreateDialog(AlertDialog.Builder builder) {
+
+ }
+
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getSupportActivity());
+ onCreateDialog(builder);
+ return builder.create();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Application.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Application.java
new file mode 100644
index 0000000000..2ef3aab126
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Application.java
@@ -0,0 +1,198 @@
+
+package org.holoeverywhere.app;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.HoloEverywhere.PreferenceImpl;
+import org.holoeverywhere.IHolo;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.LayoutInflater.LayoutInflaterCreator;
+import org.holoeverywhere.SystemServiceManager;
+import org.holoeverywhere.SystemServiceManager.SuperSystemService;
+import org.holoeverywhere.ThemeManager;
+import org.holoeverywhere.ThemeManager.SuperStartActivity;
+import org.holoeverywhere.addon.AddonSherlock;
+import org.holoeverywhere.addon.IAddon;
+import org.holoeverywhere.addon.IAddonApplication;
+import org.holoeverywhere.addon.IAddonAttacher;
+import org.holoeverywhere.addon.IAddonBasicAttacher;
+import org.holoeverywhere.preference.PreferenceManagerHelper;
+import org.holoeverywhere.preference.SharedPreferences;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Build.VERSION;
+import android.os.Bundle;
+
+public class Application extends android.app.Application implements
+ IHolo, SuperStartActivity, SuperSystemService, IAddonAttacher<IAddonApplication> {
+ private static List<Class<? extends IAddon>> sInitialAddons;
+ private static Application sLastInstance;
+ static {
+ SystemServiceManager.register(LayoutInflaterCreator.class);
+ addInitialAddon(AddonSherlock.class);
+ }
+
+ public static void addInitialAddon(Class<? extends IAddon> clazz) {
+ if (sInitialAddons == null) {
+ sInitialAddons = new ArrayList<Class<? extends IAddon>>();
+ }
+ sInitialAddons.add(clazz);
+ }
+
+ public static Application getLastInstance() {
+ return Application.sLastInstance;
+ }
+
+ public static void init() {
+ }
+
+ private final IAddonBasicAttacher<IAddonApplication, Application> mAttacher =
+ new IAddonBasicAttacher<IAddonApplication, Application>(this);
+
+ public Application() {
+ Application.sLastInstance = this;
+ }
+
+ @Override
+ public <T extends IAddonApplication> T addon(Class<? extends IAddon> clazz) {
+ return mAttacher.addon(clazz);
+ }
+
+ @Override
+ public void addon(Collection<Class<? extends IAddon>> classes) {
+ mAttacher.addon(classes);
+ }
+
+ @Override
+ public <T extends IAddonApplication> T addon(String classname) {
+ return mAttacher.addon(classname);
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences() {
+ return PreferenceManagerHelper.getDefaultSharedPreferences(this);
+ }
+
+ @Override
+ public SharedPreferences getDefaultSharedPreferences(PreferenceImpl impl) {
+ return PreferenceManagerHelper.getDefaultSharedPreferences(this, impl);
+ }
+
+ @Override
+ public LayoutInflater getLayoutInflater() {
+ return LayoutInflater.from(this);
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(PreferenceImpl impl, String name, int mode) {
+ return PreferenceManagerHelper.wrap(this, impl, name, mode);
+ }
+
+ @Override
+ public SharedPreferences getSharedPreferences(String name, int mode) {
+ return PreferenceManagerHelper.wrap(this, name, mode);
+ }
+
+ @Override
+ public Application getSupportApplication() {
+ return this;
+ }
+
+ @Override
+ public Object getSystemService(String name) {
+ return SystemServiceManager.getSystemService(this, name);
+ }
+
+ @Override
+ public boolean isAddonAttached(Class<? extends IAddon> clazz) {
+ return mAttacher.isAddonAttached(clazz);
+ }
+
+ @Override
+ public void lockAttaching() {
+ mAttacher.lockAttaching();
+ }
+
+ @Override
+ public Collection<Class<? extends IAddon>> obtainAddonsList() {
+ return mAttacher.obtainAddonsList();
+ }
+
+ @Override
+ public void onCreate() {
+ addon(sInitialAddons);
+ performAddonAction(new AddonCallback<IAddonApplication>() {
+ @Override
+ public void justAction(IAddonApplication addon) {
+ addon.onPreCreate();
+ }
+ });
+ lockAttaching();
+ super.onCreate();
+ performAddonAction(new AddonCallback<IAddonApplication>() {
+ @Override
+ public void justAction(IAddonApplication addon) {
+ addon.onCreate();
+ }
+ });
+ }
+
+ @Override
+ public boolean performAddonAction(AddonCallback<IAddonApplication> callback) {
+ return mAttacher.performAddonAction(callback);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void startActivities(Intent[] intents) {
+ startActivities(intents, null);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void startActivities(Intent[] intents, Bundle options) {
+ for (Intent intent : intents) {
+ startActivity(intent, options);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void startActivity(Intent intent) {
+ startActivity(intent, null);
+ }
+
+ @Override
+ public void startActivity(Intent intent, Bundle options) {
+ if (HoloEverywhere.ALWAYS_USE_PARENT_THEME) {
+ ThemeManager.startActivity(this, intent, options);
+ } else {
+ superStartActivity(intent, -1, options);
+ }
+ }
+
+ public android.content.SharedPreferences superGetSharedPreferences(
+ String name, int mode) {
+ return super.getSharedPreferences(name, mode);
+ }
+
+ @Override
+ public Object superGetSystemService(String name) {
+ return super.getSystemService(name);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void superStartActivity(Intent intent, int requestCode,
+ Bundle options) {
+ if (VERSION.SDK_INT >= 16) {
+ super.startActivity(intent, options);
+ } else {
+ super.startActivity(intent);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ContextThemeWrapperPlus.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ContextThemeWrapperPlus.java
new file mode 100644
index 0000000000..974cab7d60
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ContextThemeWrapperPlus.java
@@ -0,0 +1,24 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.SystemServiceManager;
+import org.holoeverywhere.SystemServiceManager.SuperSystemService;
+
+import android.content.Context;
+import android.view.ContextThemeWrapper;
+
+public class ContextThemeWrapperPlus extends ContextThemeWrapper implements SuperSystemService {
+ public ContextThemeWrapperPlus(Context base, int themeres) {
+ super(base, themeres);
+ }
+
+ @Override
+ public Object getSystemService(String name) {
+ return SystemServiceManager.getSystemService(this, name);
+ }
+
+ @Override
+ public Object superGetSystemService(String name) {
+ return super.getSystemService(name);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DatePickerDialog.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DatePickerDialog.java
new file mode 100644
index 0000000000..f467d0b270
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DatePickerDialog.java
@@ -0,0 +1,125 @@
+
+package org.holoeverywhere.app;
+
+import java.util.Calendar;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.DatePicker;
+import org.holoeverywhere.widget.DatePicker.OnDateChangedListener;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.os.Bundle;
+import android.text.format.DateUtils;
+import android.view.View;
+
+public class DatePickerDialog extends AlertDialog implements OnClickListener,
+ OnDateChangedListener {
+ public interface OnDateSetListener {
+ void onDateSet(DatePicker view, int year, int monthOfYear,
+ int dayOfMonth);
+ }
+
+ private static final String DAY = "day";
+ private static final String MONTH = "month";
+ private static final String YEAR = "year";
+ private final Calendar mCalendar;
+ private final OnDateSetListener mCallBack;
+ private final DatePicker mDatePicker;
+
+ private boolean mTitleNeedsUpdate = true;
+
+ public DatePickerDialog(Context context, int theme,
+ OnDateSetListener callBack, int year, int monthOfYear,
+ int dayOfMonth) {
+ super(context, theme);
+ mCallBack = callBack;
+ mCalendar = Calendar.getInstance();
+ setButton(DialogInterface.BUTTON_POSITIVE,
+ getContext().getText(R.string.date_time_done), this);
+ setButton(DialogInterface.BUTTON_NEGATIVE,
+ getContext().getText(android.R.string.cancel), this);
+ setIcon(0);
+ LayoutInflater inflater = LayoutInflater.from(context);
+ View view = inflater.inflate(R.layout.date_picker_dialog, null);
+ setView(view);
+ mDatePicker = (DatePicker) view.findViewById(R.id.datePicker);
+ mDatePicker.init(year, monthOfYear, dayOfMonth, this);
+ updateTitle(year, monthOfYear, dayOfMonth);
+ }
+
+ public DatePickerDialog(Context context, OnDateSetListener callBack,
+ int year, int monthOfYear, int dayOfMonth) {
+ this(context, 0, callBack, year, monthOfYear, dayOfMonth);
+ }
+
+ public DatePicker getDatePicker() {
+ return mDatePicker;
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ tryNotifyDateSet();
+ }
+ }
+
+ @Override
+ public void onDateChanged(DatePicker view, int year, int month, int day) {
+ mDatePicker.init(year, month, day, this);
+ updateTitle(year, month, day);
+ }
+
+ @Override
+ public void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ int year = savedInstanceState.getInt(DatePickerDialog.YEAR);
+ int month = savedInstanceState.getInt(DatePickerDialog.MONTH);
+ int day = savedInstanceState.getInt(DatePickerDialog.DAY);
+ mDatePicker.init(year, month, day, this);
+ }
+
+ @Override
+ public Bundle onSaveInstanceState() {
+ Bundle state = super.onSaveInstanceState();
+ state.putInt(DatePickerDialog.YEAR, mDatePicker.getYear());
+ state.putInt(DatePickerDialog.MONTH, mDatePicker.getMonth());
+ state.putInt(DatePickerDialog.DAY, mDatePicker.getDayOfMonth());
+ return state;
+ }
+
+ private void tryNotifyDateSet() {
+ if (mCallBack != null) {
+ mDatePicker.clearFocus();
+ mCallBack.onDateSet(mDatePicker, mDatePicker.getYear(),
+ mDatePicker.getMonth(), mDatePicker.getDayOfMonth());
+ }
+ }
+
+ public void updateDate(int year, int monthOfYear, int dayOfMonth) {
+ mDatePicker.updateDate(year, monthOfYear, dayOfMonth);
+ }
+
+ private void updateTitle(int year, int month, int day) {
+ if (!mDatePicker.getCalendarViewShown()) {
+ mCalendar.set(Calendar.YEAR, year);
+ mCalendar.set(Calendar.MONTH, month);
+ mCalendar.set(Calendar.DAY_OF_MONTH, day);
+ String title = DateUtils.formatDateTime(getContext(),
+ mCalendar.getTimeInMillis(), DateUtils.FORMAT_SHOW_DATE
+ | DateUtils.FORMAT_SHOW_WEEKDAY
+ | DateUtils.FORMAT_SHOW_YEAR
+ | DateUtils.FORMAT_ABBREV_MONTH
+ | DateUtils.FORMAT_ABBREV_WEEKDAY);
+ setTitle(title);
+ mTitleNeedsUpdate = true;
+ } else {
+ if (mTitleNeedsUpdate) {
+ mTitleNeedsUpdate = false;
+ setTitle(R.string.date_picker_dialog_title);
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Dialog.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Dialog.java
new file mode 100644
index 0000000000..34bc1b8c7e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Dialog.java
@@ -0,0 +1,199 @@
+
+package org.holoeverywhere.app;
+
+import java.util.Map;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.WindowDecorView;
+import org.holoeverywhere.util.WeaklyMap;
+
+import android.content.Context;
+import android.util.TypedValue;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.Menu;
+import android.view.View;
+import android.view.ViewGroup.LayoutParams;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView.ContextMenuListenersProvider;
+import com.actionbarsherlock.internal.view.menu.ContextMenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.ContextMenuListener;
+import com.actionbarsherlock.internal.view.menu.ContextMenuWrapper;
+import com.actionbarsherlock.view.ContextMenu;
+import com.actionbarsherlock.view.MenuItem;
+
+public class Dialog extends android.app.Dialog implements ContextMenuListener,
+ ContextMenuListenersProvider {
+ private static final int checkTheme(Context context, int theme) {
+ if (theme >= 0x01000000) {
+ return theme;
+ }
+ TypedValue value = new TypedValue();
+ context.getTheme().resolveAttribute(R.attr.dialogTheme, value, true);
+ if (value.resourceId > 0) {
+ return value.resourceId;
+ }
+ return R.style.Holo_Theme_Dialog;
+ }
+
+ private Map<View, ContextMenuListener> mContextMenuListeners;
+ private WindowDecorView mDecorView;
+
+ public Dialog(Context context) {
+ this(context, 0);
+ }
+
+ public Dialog(Context context, boolean cancelable,
+ OnCancelListener cancelListener) {
+ this(context);
+ setCancelable(cancelable);
+ setOnCancelListener(cancelListener);
+ }
+
+ public Dialog(Context context, int theme) {
+ this(context, checkTheme(context, theme), -1);
+ setCancelable(true);
+ }
+
+ private Dialog(Context context, int theme, int fallback) {
+ super(new ContextThemeWrapperPlus(context, theme), theme);
+ }
+
+ @Override
+ public void addContentView(View view, LayoutParams params) {
+ if (requestDecorView(view, params, -1)) {
+ mDecorView.addView(view, params);
+ }
+ }
+
+ @Override
+ public ContextMenuListener getContextMenuListener(View view) {
+ if (mContextMenuListeners == null) {
+ return null;
+ }
+ return mContextMenuListeners.get(view);
+ }
+
+ @Override
+ public LayoutInflater getLayoutInflater() {
+ return LayoutInflater.from(getContext());
+ }
+
+ @Override
+ public final boolean onContextItemSelected(android.view.MenuItem item) {
+ return onContextItemSelected(new ContextMenuItemWrapper(item));
+ }
+
+ @Override
+ public boolean onContextItemSelected(MenuItem item) {
+ if (item instanceof ContextMenuItemWrapper) {
+ return super.onContextItemSelected(((ContextMenuItemWrapper) item)
+ .unwrap());
+ }
+ return false;
+ }
+
+ @Override
+ public void onContextMenuClosed(ContextMenu menu) {
+ if (menu instanceof ContextMenuWrapper) {
+ super.onContextMenuClosed(((ContextMenuWrapper) menu).unwrap());
+ }
+ }
+
+ @Override
+ public final void onContextMenuClosed(Menu menu) {
+ if (menu instanceof android.view.ContextMenu) {
+ onContextMenuClosed(new ContextMenuWrapper(
+ (android.view.ContextMenu) menu));
+ } else {
+ super.onContextMenuClosed(menu);
+ }
+ }
+
+ @Override
+ public final void onCreateContextMenu(android.view.ContextMenu menu,
+ View view, ContextMenuInfo menuInfo) {
+ onCreateContextMenu(new ContextMenuWrapper(menu), view, menuInfo);
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View view,
+ ContextMenuInfo menuInfo) {
+ if (menu instanceof ContextMenuWrapper) {
+ super.onCreateContextMenu(((ContextMenuWrapper) menu).unwrap(),
+ view, menuInfo);
+ }
+ }
+
+ @Override
+ public void registerForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.registerForContextMenu(view);
+ } else {
+ registerForContextMenu(view, this);
+ }
+ }
+
+ public void registerForContextMenu(View view, ContextMenuListener listener) {
+ if (mContextMenuListeners == null) {
+ mContextMenuListeners = new WeaklyMap<View, ContextMenuListener>();
+ }
+ mContextMenuListeners.put(view, listener);
+ }
+
+ private boolean requestDecorView(View view, LayoutParams params, int layoutRes) {
+ if (mDecorView != null) {
+ return true;
+ }
+ mDecorView = new WindowDecorView(getContext());
+ mDecorView.setId(android.R.id.content);
+ mDecorView.setProvider(this);
+ if (view != null) {
+ mDecorView.addView(view, params);
+ } else if (layoutRes > 0) {
+ getLayoutInflater().inflate(layoutRes, mDecorView, true);
+ }
+ getWindow().setContentView(mDecorView, new LayoutParams(
+ LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+ return false;
+ }
+
+ @Override
+ public void setCancelable(boolean flag) {
+ super.setCancelable(flag);
+ setCanceledOnTouchOutside(flag);
+ }
+
+ @Override
+ public void setContentView(int layoutResID) {
+ if (requestDecorView(null, null, layoutResID)) {
+ mDecorView.removeAllViewsInLayout();
+ getLayoutInflater().inflate(layoutResID, mDecorView, true);
+ }
+ }
+
+ @Override
+ public void setContentView(View view) {
+ setContentView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+ }
+
+ @Override
+ public void setContentView(View view, LayoutParams params) {
+ if (requestDecorView(view, params, -1)) {
+ mDecorView.removeAllViewsInLayout();
+ mDecorView.addView(view, params);
+ }
+ }
+
+ @Override
+ public void unregisterForContextMenu(View view) {
+ if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
+ super.unregisterForContextMenu(view);
+ } else {
+ if (mContextMenuListeners != null) {
+ mContextMenuListeners.remove(view);
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DialogFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DialogFragment.java
new file mode 100644
index 0000000000..a58bfc49e6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/DialogFragment.java
@@ -0,0 +1,406 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.LayoutInflater;
+
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentTransaction;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+public class DialogFragment extends Fragment implements
+ DialogInterface.OnCancelListener, DialogInterface.OnDismissListener {
+ public static final class DialogTransaction {
+ public String dialogTag;
+ public FragmentManager fragmentManager;
+ public int transactionId;
+ }
+
+ public static enum DialogType {
+ AlertDialog, Dialog
+ }
+
+ private static final String SAVED_BACK_STACK_ID = "android:backStackId";
+ private static final String SAVED_CANCELABLE = "android:cancelable";
+ private static final String SAVED_DIALOG_STATE_TAG = "android:savedDialogState";
+ private static final String SAVED_SHOWS_DIALOG = "android:showsDialog";
+ private static final String SAVED_STYLE = "android:style";
+ private static final String SAVED_THEME = "android:theme";
+ public static final int STYLE_NO_FRAME = 2;
+ public static final int STYLE_NO_INPUT = 3;
+ public static final int STYLE_NO_TITLE = 1;
+ public static final int STYLE_NORMAL = 0;
+
+ public static final <T extends DialogFragment> T findInstance(Activity activity, Class<T> clazz) {
+ return findInstance(activity, clazz, false);
+ }
+
+ public static final <T extends DialogFragment> T findInstance(Activity activity,
+ Class<T> clazz, boolean makeIfNeed) {
+ if (activity == null || clazz == null) {
+ throw new IllegalArgumentException("Activity of DialogFragment class is null");
+ }
+ return findInstance(activity.getSupportFragmentManager(), clazz, makeIfNeed);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static final <T extends DialogFragment> T findInstance(FragmentManager fm,
+ Class<T> clazz, boolean makeIfNeed) {
+ if (fm == null || clazz == null) {
+ throw new IllegalArgumentException("FragmentManager of DialogFragment class is null");
+ }
+ T fragment;
+ final String tag = makeTag(clazz);
+ try {
+ fragment = (T) fm.findFragmentByTag(tag);
+ if (fragment == null && makeIfNeed) {
+ fragment = Fragment.instantiate(clazz);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Error of finding DialogFragment instance", e);
+ }
+ return fragment;
+ }
+
+ private static final String makeTag(Class<? extends DialogFragment> clazz) {
+ return clazz.getName() + "@" + clazz.hashCode();
+ }
+
+ int mBackStackId = -1;
+ boolean mCancelable = true;
+ Dialog mDialog;
+ boolean mDismissed = true;
+ boolean mShownByMe;
+ boolean mShowsDialog = true;
+ int mStyle = STYLE_NORMAL;
+ int mTheme = 0;
+ private CharSequence mTitle;
+ boolean mViewDestroyed;
+ private DialogType type = DialogType.Dialog;
+
+ public void dismiss() {
+ dismissInternal(false);
+ }
+
+ public void dismissAllowingStateLoss() {
+ dismissInternal(true);
+ }
+
+ void dismissInternal(boolean allowStateLoss) {
+ if (mDismissed) {
+ return;
+ }
+ mDismissed = true;
+ mShownByMe = false;
+ if (mDialog != null) {
+ mDialog.dismiss();
+ mDialog = null;
+ }
+ mViewDestroyed = true;
+ if (mBackStackId >= 0) {
+ getFragmentManager().popBackStack(mBackStackId,
+ FragmentManager.POP_BACK_STACK_INCLUSIVE);
+ mBackStackId = -1;
+ } else {
+ FragmentTransaction ft = getFragmentManager().beginTransaction();
+ ft.remove(this);
+ if (allowStateLoss) {
+ ft.commitAllowingStateLoss();
+ } else {
+ ft.commit();
+ }
+ }
+ }
+
+ public Dialog getDialog() {
+ return mDialog;
+ }
+
+ public DialogType getDialogType() {
+ return type;
+ }
+
+ @Override
+ @Deprecated
+ public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
+ if (!mShowsDialog) {
+ return super.getLayoutInflater(savedInstanceState);
+ }
+ mDialog = onCreateDialog(savedInstanceState);
+ if (mTitle != null) {
+ mDialog.setTitle(mTitle);
+ mTitle = null;
+ }
+ switch (mStyle) {
+ case STYLE_NO_INPUT:
+ mDialog.getWindow().addFlags(
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
+ case STYLE_NO_FRAME:
+ case STYLE_NO_TITLE:
+ mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
+ }
+ if (mDialog != null) {
+ return LayoutInflater.from(mDialog.getContext());
+ }
+ return LayoutInflater.from(getActivity());
+ }
+
+ public boolean getShowsDialog() {
+ return mShowsDialog;
+ }
+
+ public int getTheme() {
+ return mTheme;
+ }
+
+ public boolean isCancelable() {
+ return mCancelable;
+ }
+
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+ if (!mShowsDialog) {
+ return;
+ }
+ View view = getView();
+ if (view != null) {
+ if (view.getParent() != null) {
+ throw new IllegalStateException(
+ "DialogFragment can not be attached to a container view");
+ }
+ if (mDialog instanceof AlertDialog) {
+ ((AlertDialog) mDialog).setView(view);
+ } else {
+ mDialog.setContentView(view);
+ }
+ }
+ mDialog.setOwnerActivity(getActivity());
+ mDialog.setCancelable(mCancelable);
+ mDialog.setOnCancelListener(this);
+ mDialog.setOnDismissListener(this);
+ if (savedInstanceState != null) {
+ Bundle dialogState = savedInstanceState
+ .getBundle(SAVED_DIALOG_STATE_TAG);
+ if (dialogState != null) {
+ mDialog.onRestoreInstanceState(dialogState);
+ }
+ }
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ if (!mShownByMe) {
+ mDismissed = false;
+ }
+ }
+
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mShowsDialog = getContainerId() == 0;
+ if (savedInstanceState != null) {
+ mStyle = savedInstanceState.getInt(SAVED_STYLE, STYLE_NORMAL);
+ mTheme = savedInstanceState.getInt(SAVED_THEME, 0);
+ mCancelable = savedInstanceState.getBoolean(SAVED_CANCELABLE, true);
+ mShowsDialog = savedInstanceState.getBoolean(SAVED_SHOWS_DIALOG,
+ mShowsDialog);
+ mBackStackId = savedInstanceState.getInt(SAVED_BACK_STACK_ID, -1);
+ }
+ }
+
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ switch (type) {
+ case AlertDialog:
+ return new AlertDialog(getActivity(), getTheme());
+ case Dialog:
+ default:
+ return new Dialog(getActivity(), getTheme());
+ }
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ if (mDialog != null) {
+ mViewDestroyed = true;
+ mDialog.dismiss();
+ mDialog = null;
+ }
+ }
+
+ @Override
+ public void onDetach() {
+ super.onDetach();
+ if (!mShownByMe && !mDismissed) {
+ mDismissed = true;
+ }
+ }
+
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ if (!mViewDestroyed) {
+ dismissInternal(true);
+ }
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ if (mDialog != null) {
+ Bundle dialogState = mDialog.onSaveInstanceState();
+ if (dialogState != null) {
+ outState.putBundle(SAVED_DIALOG_STATE_TAG, dialogState);
+ }
+ }
+ if (mStyle != STYLE_NORMAL) {
+ outState.putInt(SAVED_STYLE, mStyle);
+ }
+ if (mTheme != 0) {
+ outState.putInt(SAVED_THEME, mTheme);
+ }
+ if (!mCancelable) {
+ outState.putBoolean(SAVED_CANCELABLE, mCancelable);
+ }
+ if (!mShowsDialog) {
+ outState.putBoolean(SAVED_SHOWS_DIALOG, mShowsDialog);
+ }
+ if (mBackStackId != -1) {
+ outState.putInt(SAVED_BACK_STACK_ID, mBackStackId);
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ if (mDialog != null) {
+ mViewDestroyed = false;
+ mDialog.show();
+ }
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ if (mDialog != null) {
+ mDialog.hide();
+ }
+ }
+
+ public void setCancelable(boolean cancelable) {
+ mCancelable = cancelable;
+ if (mDialog != null) {
+ mDialog.setCancelable(cancelable);
+ }
+ }
+
+ public void setDialogType(DialogType type) {
+ this.type = type;
+ }
+
+ public void setShowsDialog(boolean showsDialog) {
+ mShowsDialog = showsDialog;
+ }
+
+ public void setStyle(int style, int theme) {
+ mStyle = style;
+ if (mStyle == STYLE_NO_FRAME || mStyle == STYLE_NO_INPUT) {
+ mTheme = android.R.style.Theme_Panel;
+ }
+ if (theme != 0) {
+ mTheme = theme;
+ }
+ }
+
+ public void setTitle(CharSequence title) {
+ if (mDialog != null) {
+ mDialog.setTitle(title);
+ } else {
+ mTitle = title;
+ }
+ }
+
+ public void setTitle(int resId) {
+ setTitle(getText(resId));
+ }
+
+ public DialogTransaction show() {
+ return show(getSupportFragmentManager());
+ }
+
+ public DialogTransaction show(Activity activity) {
+ return show(activity == null ? null : activity
+ .getSupportFragmentManager());
+ }
+
+ public DialogTransaction show(FragmentManager fm) {
+ return show(fm, fm == null ? null : fm.beginTransaction());
+ }
+
+ public DialogTransaction show(FragmentManager fm, FragmentTransaction ft) {
+ if (ft == null) {
+ if (fm == null) {
+ Activity activity = getSupportActivity();
+ if (activity == null) {
+ throw new RuntimeException(
+ "DialogFragment don't have any reference to Context or FragmentManager");
+ }
+ fm = activity.getSupportFragmentManager();
+ }
+ ft = fm.beginTransaction();
+ }
+ if (!mDismissed) {
+ dismiss();
+ }
+ DialogTransaction dialogTransaction = new DialogTransaction();
+ dialogTransaction.fragmentManager = fm;
+ dialogTransaction.dialogTag = makeTag(getClass());
+ dialogTransaction.transactionId = show(ft, dialogTransaction.dialogTag);
+ return dialogTransaction;
+ }
+
+ /**
+ * @deprecate This method was deprecated because there were problems at
+ * 2.1-2.3 on restore instance state when
+ * <code>tag == null</code>. Use {@link #show(FragmentManager)}
+ * instead.
+ * @see <a
+ * href="https://github.com/Prototik/HoloEverywhere/issues/298#issuecomment-13344718">DialogFragment#show
+ * deprecated</a>
+ */
+ @Deprecated
+ public int show(FragmentManager manager, String tag) {
+ return show(manager.beginTransaction(), tag);
+ }
+
+ public DialogTransaction show(FragmentTransaction ft) {
+ return show(null, ft);
+ }
+
+ /**
+ * @deprecate This method was deprecated because there were problems at
+ * 2.1-2.3 on restore instance state when
+ * <code>tag == null</code>. Use
+ * {@link #show(FragmentTransaction)} instead.
+ * @see <a
+ * href="https://github.com/Prototik/HoloEverywhere/issues/298#issuecomment-13344718">DialogFragment#show
+ * deprecated</a>
+ */
+ @Deprecated
+ public int show(FragmentTransaction transaction, String tag) {
+ mDismissed = false;
+ mShownByMe = true;
+ transaction.add(this, tag);
+ mViewDestroyed = false;
+ return mBackStackId = transaction.commit();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ExpandableListActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ExpandableListActivity.java
new file mode 100644
index 0000000000..ed88b31b4d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ExpandableListActivity.java
@@ -0,0 +1,104 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.ExpandableListView;
+
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnCreateContextMenuListener;
+import android.widget.ExpandableListAdapter;
+
+public abstract class ExpandableListActivity extends Activity implements
+ OnCreateContextMenuListener, ExpandableListView.OnChildClickListener,
+ ExpandableListView.OnGroupCollapseListener,
+ ExpandableListView.OnGroupExpandListener {
+ ExpandableListAdapter mAdapter;
+ boolean mFinishedStart = false;
+ ExpandableListView mList;
+
+ private void ensureList() {
+ if (mList != null) {
+ return;
+ }
+ setContentView(R.layout.expandable_list_content);
+ }
+
+ public ExpandableListAdapter getExpandableListAdapter() {
+ return mAdapter;
+ }
+
+ public ExpandableListView getExpandableListView() {
+ ensureList();
+ return mList;
+ }
+
+ public long getSelectedId() {
+ return mList.getSelectedId();
+ }
+
+ public long getSelectedPosition() {
+ return mList.getSelectedPosition();
+ }
+
+ @Override
+ public boolean onChildClick(ExpandableListView parent, View v,
+ int groupPosition, int childPosition, long id) {
+ return false;
+ }
+
+ @Override
+ public void onContentChanged() {
+ super.onContentChanged();
+ View emptyView = findViewById(R.id.empty);
+ mList = (ExpandableListView) findViewById(android.R.id.list);
+ if (mList == null) {
+ throw new RuntimeException(
+ "Your content must have a ExpandableListView whose id attribute is "
+ + "'android.R.id.list'");
+ }
+ if (emptyView != null) {
+ mList.setEmptyView(emptyView);
+ }
+ mList.setOnChildClickListener(this);
+ mList.setOnGroupExpandListener(this);
+ mList.setOnGroupCollapseListener(this);
+
+ if (mFinishedStart) {
+ setListAdapter(mAdapter);
+ }
+ mFinishedStart = true;
+ }
+
+ @Override
+ public void onGroupCollapse(int groupPosition) {
+ }
+
+ @Override
+ public void onGroupExpand(int groupPosition) {
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle state) {
+ ensureList();
+ super.onRestoreInstanceState(state);
+ }
+
+ public void setListAdapter(ExpandableListAdapter adapter) {
+ synchronized (this) {
+ ensureList();
+ mAdapter = adapter;
+ mList.setAdapter(adapter);
+ }
+ }
+
+ public boolean setSelectedChild(int groupPosition, int childPosition,
+ boolean shouldExpandGroup) {
+ return mList.setSelectedChild(groupPosition, childPosition,
+ shouldExpandGroup);
+ }
+
+ public void setSelectedGroup(int groupPosition) {
+ mList.setSelectedGroup(groupPosition);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Fragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Fragment.java
new file mode 100644
index 0000000000..94e0eb5fc0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/Fragment.java
@@ -0,0 +1,146 @@
+
+package org.holoeverywhere.app;
+
+import java.util.Collection;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.addon.IAddon;
+import org.holoeverywhere.addon.IAddonBasicAttacher;
+import org.holoeverywhere.addon.IAddonFragment;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v4.app._HoloFragment;
+import android.view.View;
+
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.ActionMode.Callback;
+
+public class Fragment extends _HoloFragment {
+ public static <T extends Fragment> T instantiate(Class<T> clazz) {
+ return instantiate(clazz, null);
+ }
+
+ public static <T extends Fragment> T instantiate(Class<T> clazz, Bundle args) {
+ try {
+ T fragment = clazz.newInstance();
+ if (args != null) {
+ args.setClassLoader(clazz.getClassLoader());
+ fragment.setArguments(args);
+ }
+ return fragment;
+ } catch (Exception e) {
+ throw new InstantiationException("Unable to instantiate fragment " + clazz
+ + ": make sure class name exists, is public, and has an"
+ + " empty constructor that is public", e);
+ }
+ }
+
+ @Deprecated
+ public static Fragment instantiate(Context context, String fname) {
+ return instantiate(context, fname, null);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Deprecated
+ public static Fragment instantiate(Context context, String fname, Bundle args) {
+ try {
+ return instantiate((Class<? extends Fragment>) Class.forName(fname, true,
+ context.getClassLoader()), args);
+ } catch (Exception e) {
+ throw new InstantiationException("Unable to instantiate fragment " + fname
+ + ": make sure class name exists, is public, and has an"
+ + " empty constructor that is public", e);
+ }
+ }
+
+ private final IAddonBasicAttacher<IAddonFragment, Fragment> mAttacher =
+ new IAddonBasicAttacher<IAddonFragment, Fragment>(this);
+
+ private LayoutInflater mLayoutInflater;
+
+ @Override
+ public <T extends IAddonFragment> T addon(Class<? extends IAddon> clazz) {
+ return mAttacher.addon(clazz);
+ }
+
+ @Override
+ public void addon(Collection<Class<? extends IAddon>> classes) {
+ mAttacher.addon(classes);
+ }
+
+ @Override
+ public <T extends IAddonFragment> T addon(String classname) {
+ return mAttacher.addon(classname);
+ }
+
+ @Override
+ public LayoutInflater getLayoutInflater() {
+ if (mLayoutInflater == null) {
+ mLayoutInflater = getSupportActivity().getLayoutInflater().
+ obtainFragmentChildInflater(this);
+ }
+ return mLayoutInflater;
+ }
+
+ @Override
+ public boolean isAddonAttached(Class<? extends IAddon> clazz) {
+ return mAttacher.isAddonAttached(clazz);
+ }
+
+ @Override
+ public void lockAttaching() {
+ mAttacher.lockAttaching();
+ }
+
+ @Override
+ public Collection<Class<? extends IAddon>> obtainAddonsList() {
+ return mAttacher.obtainAddonsList();
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ mAttacher.reset();
+ mAttacher.inhert(activity);
+ }
+
+ @Override
+ public void onCreate(final Bundle savedInstanceState) {
+ lockAttaching();
+ performAddonAction(new AddonCallback<IAddonFragment>() {
+ @Override
+ public void justAction(IAddonFragment addon) {
+ addon.onPreCreate(savedInstanceState);
+ }
+ });
+ super.onCreate(savedInstanceState);
+ performAddonAction(new AddonCallback<IAddonFragment>() {
+ @Override
+ public void justAction(IAddonFragment addon) {
+ addon.onCreate(savedInstanceState);
+ }
+ });
+ }
+
+ @Override
+ public void onViewCreated(final View view, final Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ performAddonAction(new AddonCallback<IAddonFragment>() {
+ @Override
+ public void justAction(IAddonFragment addon) {
+ addon.onViewCreated(view, savedInstanceState);
+ }
+ });
+ }
+
+ @Override
+ public boolean performAddonAction(AddonCallback<IAddonFragment> callback) {
+ return mAttacher.performAddonAction(callback);
+ }
+
+ @Override
+ public ActionMode startActionMode(Callback callback) {
+ return getSupportActivity().startActionMode(callback);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/GridFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/GridFragment.java
new file mode 100644
index 0000000000..fd5ed611be
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/GridFragment.java
@@ -0,0 +1,217 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.GridView;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.animation.AnimationUtils;
+import android.widget.AdapterView;
+import android.widget.ListAdapter;
+import android.widget.TextView;
+
+public class GridFragment extends Fragment {
+ private ListAdapter mAdapter;
+ private CharSequence mEmptyText;
+ private View mEmptyView;
+ private GridView mGrid;
+ private View mGridContainer;
+ private boolean mGridShown;
+ final private Handler mHandler = new Handler();
+ final private AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v, int position,
+ long id) {
+ onGridItemClick((GridView) parent, v, position, id);
+ }
+ };
+ private View mProgressContainer;
+ final private Runnable mRequestFocus = new Runnable() {
+ @Override
+ public void run() {
+ mGrid.focusableViewAvailable(mGrid);
+ }
+ };
+ private TextView mStandardEmptyView;
+
+ private void ensureGrid() {
+ if (mGrid != null) {
+ return;
+ }
+ View root = getView();
+ if (root == null) {
+ throw new IllegalStateException("Content view not yet created");
+ }
+ if (root instanceof GridView) {
+ mGrid = (GridView) root;
+ } else {
+ mStandardEmptyView = (TextView) root
+ .findViewById(R.id.internalEmpty);
+ if (mStandardEmptyView == null) {
+ mEmptyView = root.findViewById(android.R.id.empty);
+ } else {
+ mStandardEmptyView.setVisibility(View.GONE);
+ }
+ mProgressContainer = root.findViewById(R.id.progressContainer);
+ mGridContainer = root.findViewById(R.id.listContainer);
+ View rawGridVIew = root.findViewById(android.R.id.list);
+ if (!(rawGridVIew instanceof GridView)) {
+ if (rawGridVIew == null) {
+ throw new RuntimeException(
+ "Your content must have a GridVIew whose id attribute is "
+ + "'android.R.id.list'");
+ }
+ throw new RuntimeException(
+ "Content has view with id attribute 'android.R.id.list' "
+ + "that is not a GridVIew class");
+ }
+ mGrid = (GridView) rawGridVIew;
+ if (mEmptyView != null) {
+ mGrid.setEmptyView(mEmptyView);
+ } else if (mEmptyText != null) {
+ mStandardEmptyView.setText(mEmptyText);
+ mGrid.setEmptyView(mStandardEmptyView);
+ }
+ }
+ mGridShown = true;
+ mGrid.setOnItemClickListener(mOnClickListener);
+ if (mAdapter != null) {
+ ListAdapter adapter = mAdapter;
+ mAdapter = null;
+ setGridAdapter(adapter);
+ } else {
+ if (mProgressContainer != null) {
+ setGridShown(false, false);
+ }
+ }
+ mHandler.post(mRequestFocus);
+ }
+
+ protected View getEmptyView() {
+ return mEmptyView;
+ }
+
+ public GridView getGridView() {
+ ensureGrid();
+ return mGrid;
+ }
+
+ public ListAdapter getListAdapter() {
+ return mAdapter;
+ }
+
+ public long getSelectedItemId() {
+ ensureGrid();
+ return mGrid.getSelectedItemId();
+ }
+
+ public int getSelectedItemPosition() {
+ ensureGrid();
+ return mGrid.getSelectedItemPosition();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.grid_content, container, false);
+ }
+
+ @Override
+ public void onDestroyView() {
+ mHandler.removeCallbacks(mRequestFocus);
+ mGrid = null;
+ mGridShown = false;
+ mEmptyView = mProgressContainer = mGridContainer = null;
+ mStandardEmptyView = null;
+ super.onDestroyView();
+ }
+
+ public void onGridItemClick(GridView l, View v, int position, long id) {
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ ensureGrid();
+ }
+
+ public void setEmptyText(CharSequence text) {
+ ensureGrid();
+ if (mStandardEmptyView == null) {
+ throw new IllegalStateException(
+ "Can't be used with a custom content view");
+ }
+ mStandardEmptyView.setText(text);
+ if (mEmptyText == null) {
+ mGrid.setEmptyView(mStandardEmptyView);
+ }
+ mEmptyText = text;
+ }
+
+ public void setGridAdapter(ListAdapter adapter) {
+ boolean hadAdapter = mAdapter != null;
+ mAdapter = adapter;
+ if (mGrid != null) {
+ mGrid.setAdapter(adapter);
+ if (!mGridShown && !hadAdapter) {
+ // The list was hidden, and previously didn't have an
+ // adapter. It is now time to show it.
+ setGridShown(true, getView().getWindowToken() != null);
+ }
+ }
+ }
+
+ public void setGridShown(boolean shown) {
+ setGridShown(shown, true);
+ }
+
+ private void setGridShown(boolean shown, boolean animate) {
+ ensureGrid();
+ if (mProgressContainer == null) {
+ throw new IllegalStateException(
+ "Can't be used with a custom content view");
+ }
+ if (mGridShown == shown) {
+ return;
+ }
+ mGridShown = shown;
+ if (shown) {
+ if (animate) {
+ mProgressContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_out));
+ mGridContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_in));
+ } else {
+ mProgressContainer.clearAnimation();
+ mGridContainer.clearAnimation();
+ }
+ mProgressContainer.setVisibility(View.GONE);
+ mGridContainer.setVisibility(View.VISIBLE);
+ } else {
+ if (animate) {
+ mProgressContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_in));
+ mGridContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_out));
+ } else {
+ mProgressContainer.clearAnimation();
+ mGridContainer.clearAnimation();
+ }
+ mProgressContainer.setVisibility(View.VISIBLE);
+ mGridContainer.setVisibility(View.GONE);
+ }
+ }
+
+ public void setGridShownNoAnimation(boolean shown) {
+ setGridShown(shown, false);
+ }
+
+ public void setSelection(int position) {
+ ensureGrid();
+ mGrid.setSelection(position);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListActivity.java
new file mode 100644
index 0000000000..c4cd849c32
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListActivity.java
@@ -0,0 +1,106 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.ListView;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListAdapter;
+
+public abstract class ListActivity extends Activity {
+ protected ListAdapter mAdapter;
+ private boolean mFinishedStart = false;
+
+ private Handler mHandler = new Handler();
+ protected ListView mList;
+
+ private AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v, int position,
+ long id) {
+ onListItemClick((ListView) parent, v, position, id);
+ }
+ };
+
+ private Runnable mRequestFocus = new Runnable() {
+ @Override
+ public void run() {
+ mList.focusableViewAvailable(mList);
+ }
+ };
+
+ private void ensureList() {
+ if (mList != null) {
+ return;
+ }
+ setContentView(R.layout.list_content);
+ }
+
+ public ListAdapter getListAdapter() {
+ return mAdapter;
+ }
+
+ public ListView getListView() {
+ ensureList();
+ return mList;
+ }
+
+ public long getSelectedItemId() {
+ return mList.getSelectedItemId();
+ }
+
+ public int getSelectedItemPosition() {
+ return mList.getSelectedItemPosition();
+ }
+
+ @Override
+ public void onContentChanged() {
+ super.onContentChanged();
+ View emptyView = findViewById(android.R.id.empty);
+ mList = (ListView) findViewById(android.R.id.list);
+ if (mList == null) {
+ throw new RuntimeException(
+ "Your content must have a ListView whose id attribute is "
+ + "'android.R.id.list'");
+ }
+ if (emptyView != null) {
+ mList.setEmptyView(emptyView);
+ }
+ mList.setOnItemClickListener(mOnClickListener);
+ if (mFinishedStart) {
+ setListAdapter(mAdapter);
+ }
+ mHandler.post(mRequestFocus);
+ mFinishedStart = true;
+ }
+
+ @Override
+ protected void onDestroy() {
+ mHandler.removeCallbacks(mRequestFocus);
+ super.onDestroy();
+ }
+
+ protected void onListItemClick(ListView l, View v, int position, long id) {
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle state) {
+ ensureList();
+ super.onRestoreInstanceState(state);
+ }
+
+ public void setListAdapter(ListAdapter adapter) {
+ synchronized (this) {
+ ensureList();
+ mAdapter = adapter;
+ mList.setAdapter(adapter);
+ }
+ }
+
+ public void setSelection(int position) {
+ mList.setSelection(position);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListFragment.java
new file mode 100644
index 0000000000..15899d22c7
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ListFragment.java
@@ -0,0 +1,217 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.ListView;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.animation.AnimationUtils;
+import android.widget.AdapterView;
+import android.widget.ListAdapter;
+import android.widget.TextView;
+
+public class ListFragment extends Fragment {
+ private ListAdapter mAdapter;
+ private CharSequence mEmptyText;
+ private View mEmptyView;
+ final private Handler mHandler = new Handler();
+ private ListView mList;
+ private View mListContainer;
+ private boolean mListShown;
+ final private AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v, int position,
+ long id) {
+ onListItemClick((ListView) parent, v, position, id);
+ }
+ };
+ private View mProgressContainer;
+ final private Runnable mRequestFocus = new Runnable() {
+ @Override
+ public void run() {
+ mList.focusableViewAvailable(mList);
+ }
+ };
+ private TextView mStandardEmptyView;
+
+ private void ensureList() {
+ if (mList != null) {
+ return;
+ }
+ View root = getView();
+ if (root == null) {
+ throw new IllegalStateException("Content view not yet created");
+ }
+ if (root instanceof ListView) {
+ mList = (ListView) root;
+ } else {
+ mStandardEmptyView = (TextView) root
+ .findViewById(R.id.internalEmpty);
+ if (mStandardEmptyView == null) {
+ mEmptyView = root.findViewById(android.R.id.empty);
+ } else {
+ mStandardEmptyView.setVisibility(View.GONE);
+ }
+ mProgressContainer = root.findViewById(R.id.progressContainer);
+ mListContainer = root.findViewById(R.id.listContainer);
+ View rawListView = root.findViewById(android.R.id.list);
+ if (!(rawListView instanceof ListView)) {
+ if (rawListView == null) {
+ throw new RuntimeException(
+ "Your content must have a ListView whose id attribute is "
+ + "'android.R.id.list'");
+ }
+ throw new RuntimeException(
+ "Content has view with id attribute 'android.R.id.list' "
+ + "that is not a ListView class");
+ }
+ mList = (ListView) rawListView;
+ if (mEmptyView != null) {
+ mList.setEmptyView(mEmptyView);
+ } else if (mEmptyText != null) {
+ mStandardEmptyView.setText(mEmptyText);
+ mList.setEmptyView(mStandardEmptyView);
+ }
+ }
+ mListShown = true;
+ mList.setOnItemClickListener(mOnClickListener);
+ if (mAdapter != null) {
+ ListAdapter adapter = mAdapter;
+ mAdapter = null;
+ setListAdapter(adapter);
+ } else {
+ if (mProgressContainer != null) {
+ setListShown(false, false);
+ }
+ }
+ mHandler.post(mRequestFocus);
+ }
+
+ protected View getEmptyView() {
+ return mEmptyView;
+ }
+
+ public ListAdapter getListAdapter() {
+ return mAdapter;
+ }
+
+ public ListView getListView() {
+ ensureList();
+ return mList;
+ }
+
+ public long getSelectedItemId() {
+ ensureList();
+ return mList.getSelectedItemId();
+ }
+
+ public int getSelectedItemPosition() {
+ ensureList();
+ return mList.getSelectedItemPosition();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.list_content, container, false);
+ }
+
+ @Override
+ public void onDestroyView() {
+ mHandler.removeCallbacks(mRequestFocus);
+ mList = null;
+ mListShown = false;
+ mEmptyView = mProgressContainer = mListContainer = null;
+ mStandardEmptyView = null;
+ super.onDestroyView();
+ }
+
+ public void onListItemClick(ListView l, View v, int position, long id) {
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ ensureList();
+ }
+
+ public void setEmptyText(CharSequence text) {
+ ensureList();
+ if (mStandardEmptyView == null) {
+ throw new IllegalStateException(
+ "Can't be used with a custom content view");
+ }
+ mStandardEmptyView.setText(text);
+ if (mEmptyText == null) {
+ mList.setEmptyView(mStandardEmptyView);
+ }
+ mEmptyText = text;
+ }
+
+ public void setListAdapter(ListAdapter adapter) {
+ boolean hadAdapter = mAdapter != null;
+ mAdapter = adapter;
+ if (mList != null) {
+ mList.setAdapter(adapter);
+ if (!mListShown && !hadAdapter) {
+ // The list was hidden, and previously didn't have an
+ // adapter. It is now time to show it.
+ setListShown(true, getView().getWindowToken() != null);
+ }
+ }
+ }
+
+ public void setListShown(boolean shown) {
+ setListShown(shown, true);
+ }
+
+ private void setListShown(boolean shown, boolean animate) {
+ ensureList();
+ if (mProgressContainer == null) {
+ throw new IllegalStateException(
+ "Can't be used with a custom content view");
+ }
+ if (mListShown == shown) {
+ return;
+ }
+ mListShown = shown;
+ if (shown) {
+ if (animate) {
+ mProgressContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_out));
+ mListContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_in));
+ } else {
+ mProgressContainer.clearAnimation();
+ mListContainer.clearAnimation();
+ }
+ mProgressContainer.setVisibility(View.GONE);
+ mListContainer.setVisibility(View.VISIBLE);
+ } else {
+ if (animate) {
+ mProgressContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_in));
+ mListContainer.startAnimation(AnimationUtils.loadAnimation(
+ getActivity(), R.anim.fade_out));
+ } else {
+ mProgressContainer.clearAnimation();
+ mListContainer.clearAnimation();
+ }
+ mProgressContainer.setVisibility(View.VISIBLE);
+ mListContainer.setVisibility(View.GONE);
+ }
+ }
+
+ public void setListShownNoAnimation(boolean shown) {
+ setListShown(shown, false);
+ }
+
+ public void setSelection(int position) {
+ ensureList();
+ mList.setSelection(position);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ProgressDialog.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ProgressDialog.java
new file mode 100644
index 0000000000..b06fac0e0c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ProgressDialog.java
@@ -0,0 +1,314 @@
+
+package org.holoeverywhere.app;
+
+import java.text.NumberFormat;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.ProgressBar;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.style.StyleSpan;
+import android.view.View;
+import android.widget.TextView;
+
+public class ProgressDialog extends AlertDialog {
+ public static final int STYLE_HORIZONTAL = 1;
+ public static final int STYLE_SPINNER = 0;
+
+ public static ProgressDialog show(Context context, CharSequence title,
+ CharSequence message) {
+ return ProgressDialog.show(context, title, message, false);
+ }
+
+ public static ProgressDialog show(Context context, CharSequence title,
+ CharSequence message, boolean indeterminate) {
+ return ProgressDialog.show(context, title, message, indeterminate,
+ false, null);
+ }
+
+ public static ProgressDialog show(Context context, CharSequence title,
+ CharSequence message, boolean indeterminate, boolean cancelable) {
+ return ProgressDialog.show(context, title, message, indeterminate,
+ cancelable, null);
+ }
+
+ public static ProgressDialog show(Context context, CharSequence title,
+ CharSequence message, boolean indeterminate, boolean cancelable,
+ OnCancelListener cancelListener) {
+ ProgressDialog dialog = new ProgressDialog(context);
+ dialog.setTitle(title);
+ dialog.setMessage(message);
+ dialog.setIndeterminate(indeterminate);
+ dialog.setCancelable(cancelable);
+ dialog.setOnCancelListener(cancelListener);
+ dialog.show();
+ return dialog;
+ }
+
+ private boolean mHasStarted;
+ private int mIncrementBy;
+ private int mIncrementSecondaryBy;
+ private boolean mIndeterminate;
+ private Drawable mIndeterminateDrawable;
+ private int mMax;
+ private CharSequence mMessage;
+ private TextView mMessageView;
+ private ProgressBar mProgress;
+ private Drawable mProgressDrawable;
+ private TextView mProgressNumber;
+ private String mProgressNumberFormat;
+ private TextView mProgressPercent;
+ private NumberFormat mProgressPercentFormat;
+ private int mProgressStyle = ProgressDialog.STYLE_SPINNER;
+ private int mProgressVal;
+ private int mSecondaryProgressVal;
+ private Handler mViewUpdateHandler;
+
+ public ProgressDialog(Context context) {
+ super(context);
+ initFormats();
+ }
+
+ public ProgressDialog(Context context, int theme) {
+ super(context, theme);
+ initFormats();
+ }
+
+ public int getMax() {
+ if (mProgress != null) {
+ return mProgress.getMax();
+ }
+ return mMax;
+ }
+
+ public int getProgress() {
+ if (mProgress != null) {
+ return mProgress.getProgress();
+ }
+ return mProgressVal;
+ }
+
+ public int getSecondaryProgress() {
+ if (mProgress != null) {
+ return mProgress.getSecondaryProgress();
+ }
+ return mSecondaryProgressVal;
+ }
+
+ public void incrementProgressBy(int diff) {
+ if (mProgress != null) {
+ mProgress.incrementProgress(diff);
+ onProgressChanged();
+ } else {
+ mIncrementBy += diff;
+ }
+ }
+
+ public void incrementSecondaryProgressBy(int diff) {
+ if (mProgress != null) {
+ mProgress.incrementSecondaryProgress(diff);
+ onProgressChanged();
+ } else {
+ mIncrementSecondaryBy += diff;
+ }
+ }
+
+ private void initFormats() {
+ mProgressNumberFormat = "%1d/%2d";
+ mProgressPercentFormat = NumberFormat.getPercentInstance();
+ mProgressPercentFormat.setMaximumFractionDigits(0);
+ }
+
+ public boolean isIndeterminate() {
+ if (mProgress != null) {
+ return mProgress.isIndeterminate();
+ }
+ return mIndeterminate;
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ TypedArray a = getContext().obtainStyledAttributes(null,
+ R.styleable.AlertDialog, R.attr.alertDialogStyle,
+ R.style.Holo_AlertDialog);
+ View view;
+ if (mProgressStyle == ProgressDialog.STYLE_HORIZONTAL) {
+ mViewUpdateHandler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ super.handleMessage(msg);
+ int progress = mProgress.getProgress();
+ int max = mProgress.getMax();
+ if (mProgressNumberFormat != null) {
+ String format = mProgressNumberFormat;
+ mProgressNumber.setText(String.format(format, progress,
+ max));
+ } else {
+ mProgressNumber.setText("");
+ }
+ if (mProgressPercentFormat != null) {
+ double percent = (double) progress / (double) max;
+ SpannableString tmp = new SpannableString(
+ mProgressPercentFormat.format(percent));
+ tmp.setSpan(new StyleSpan(
+ android.graphics.Typeface.BOLD), 0, tmp
+ .length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ mProgressPercent.setText(tmp);
+ } else {
+ mProgressPercent.setText("");
+ }
+ }
+ };
+ view = getLayoutInflater().inflate(
+ a.getResourceId(
+ R.styleable.AlertDialog_horizontalProgressLayout,
+ R.layout.alert_dialog_progress_holo));
+ mProgress = (ProgressBar) view.findViewById(R.id.progress);
+ mProgressNumber = (TextView) view
+ .findViewById(R.id.progress_number);
+ mProgressPercent = (TextView) view
+ .findViewById(R.id.progress_percent);
+ } else {
+ view = getLayoutInflater().inflate(
+ a.getResourceId(R.styleable.AlertDialog_progressLayout,
+ R.layout.progress_dialog_holo));
+ mProgress = (ProgressBar) view.findViewById(R.id.progress);
+ mMessageView = (TextView) view.findViewById(R.id.message);
+ }
+ setView(view);
+ a.recycle();
+ if (mMax > 0) {
+ setMax(mMax);
+ }
+ if (mProgressVal > 0) {
+ setProgress(mProgressVal);
+ }
+ if (mSecondaryProgressVal > 0) {
+ setSecondaryProgress(mSecondaryProgressVal);
+ }
+ if (mIncrementBy > 0) {
+ incrementProgressBy(mIncrementBy);
+ }
+ if (mIncrementSecondaryBy > 0) {
+ incrementSecondaryProgressBy(mIncrementSecondaryBy);
+ }
+ if (mProgressDrawable != null) {
+ setProgressDrawable(mProgressDrawable);
+ }
+ if (mIndeterminateDrawable != null) {
+ setIndeterminateDrawable(mIndeterminateDrawable);
+ }
+ if (mMessage != null) {
+ setMessage(mMessage);
+ }
+ setIndeterminate(mIndeterminate);
+ onProgressChanged();
+ super.onCreate(savedInstanceState);
+ }
+
+ private void onProgressChanged() {
+ if (mProgressStyle == ProgressDialog.STYLE_HORIZONTAL) {
+ if (mViewUpdateHandler != null
+ && !mViewUpdateHandler.hasMessages(0)) {
+ mViewUpdateHandler.sendEmptyMessage(0);
+ }
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ mHasStarted = true;
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ mHasStarted = false;
+ }
+
+ public void setIndeterminate(boolean indeterminate) {
+ if (mProgress != null) {
+ mProgress.setIndeterminate(indeterminate);
+ } else {
+ mIndeterminate = indeterminate;
+ }
+ }
+
+ public void setIndeterminateDrawable(Drawable d) {
+ if (mProgress != null) {
+ mProgress.setIndeterminateDrawable(d);
+ } else {
+ mIndeterminateDrawable = d;
+ }
+ }
+
+ public void setMax(int max) {
+ if (mProgress != null) {
+ mProgress.setMax(max);
+ onProgressChanged();
+ } else {
+ mMax = max;
+ }
+ }
+
+ @Override
+ public void setMessage(CharSequence message) {
+ if (mProgress != null) {
+ if (mProgressStyle == ProgressDialog.STYLE_HORIZONTAL) {
+ super.setMessage(message);
+ } else {
+ mMessageView.setText(message);
+ }
+ } else {
+ mMessage = message;
+ }
+ }
+
+ public void setProgress(int value) {
+ if (mHasStarted) {
+ mProgress.setProgress(value);
+ onProgressChanged();
+ } else {
+ mProgressVal = value;
+ }
+ }
+
+ public void setProgressDrawable(Drawable d) {
+ if (mProgress != null) {
+ mProgress.setProgressDrawable(d);
+ } else {
+ mProgressDrawable = d;
+ }
+ }
+
+ public void setProgressNumberFormat(String format) {
+ mProgressNumberFormat = format;
+ onProgressChanged();
+ }
+
+ public void setProgressPercentFormat(NumberFormat format) {
+ mProgressPercentFormat = format;
+ onProgressChanged();
+ }
+
+ public void setProgressStyle(int style) {
+ mProgressStyle = style;
+ }
+
+ public void setSecondaryProgress(int secondaryProgress) {
+ if (mProgress != null) {
+ mProgress.setSecondaryProgress(secondaryProgress);
+ onProgressChanged();
+ } else {
+ mSecondaryProgressVal = secondaryProgress;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ResolverActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ResolverActivity.java
new file mode 100644
index 0000000000..6c38133d12
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/ResolverActivity.java
@@ -0,0 +1,703 @@
+
+package org.holoeverywhere.app;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.AlertController;
+import org.holoeverywhere.widget.Button;
+import org.holoeverywhere.widget.GridView;
+import org.holoeverywhere.widget.ListView;
+import org.holoeverywhere.widget.TextView;
+
+import android.app.ActivityManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
+import android.content.pm.LabeledIntent;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ResolveInfo;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.Build.VERSION;
+import android.os.Bundle;
+import android.os.PatternMatcher;
+import android.os.Process;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+
+public abstract class ResolverActivity extends AlertActivity implements
+ AdapterView.OnItemClickListener {
+ private final class DisplayResolveInfo {
+ Drawable displayIcon;
+ CharSequence displayLabel;
+ CharSequence extendedInfo;
+ Intent origIntent;
+ ResolveInfo ri;
+
+ DisplayResolveInfo(ResolveInfo pri, CharSequence pLabel,
+ CharSequence pInfo, Intent pOrigIntent) {
+ ri = pri;
+ displayLabel = pLabel;
+ extendedInfo = pInfo;
+ origIntent = pOrigIntent;
+ }
+ }
+
+ class ItemLongClickListener implements AdapterView.OnItemLongClickListener {
+ @Override
+ public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
+ ResolveInfo ri = mAdapter.resolveInfoForPosition(position);
+ showAppDetails(ri);
+ return true;
+ }
+ }
+
+ private final class ResolveListAdapter extends BaseAdapter {
+ private final List<ResolveInfo> mBaseResolveList;
+ private List<ResolveInfo> mCurrentResolveList;
+ private final LayoutInflater mInflater;
+ private final Intent[] mInitialIntents;
+ private final Intent mIntent;
+
+ private final int mLaunchedFromUid;
+ private List<DisplayResolveInfo> mList;
+
+ public ResolveListAdapter(Context context, Intent intent,
+ Intent[] initialIntents, List<ResolveInfo> rList, int launchedFromUid) {
+ mIntent = new Intent(intent);
+ mIntent.setComponent(null);
+ mInitialIntents = initialIntents;
+ mBaseResolveList = rList;
+ mLaunchedFromUid = launchedFromUid;
+ mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ rebuildList();
+ }
+
+ private final void bindView(View view, DisplayResolveInfo info) {
+ TextView text = (TextView) view.findViewById(android.R.id.text1);
+ TextView text2 = (TextView) view.findViewById(android.R.id.text2);
+ ImageView icon = (ImageView) view.findViewById(R.id.icon);
+ text.setText(info.displayLabel);
+ if (mShowExtended) {
+ text2.setVisibility(View.VISIBLE);
+ text2.setText(info.extendedInfo);
+ } else {
+ text2.setVisibility(View.GONE);
+ }
+ if (info.displayIcon == null) {
+ info.displayIcon = loadIconForResolveInfo(info.ri);
+ }
+ icon.setImageDrawable(info.displayIcon);
+ }
+
+ @Override
+ public int getCount() {
+ return mList != null ? mList.size() : 0;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return position;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View view;
+ if (convertView == null) {
+ view = mInflater.inflate(R.layout.resolve_list_item, parent, false);
+ ImageView icon = (ImageView) view.findViewById(R.id.icon);
+ ViewGroup.LayoutParams lp = icon.getLayoutParams();
+ lp.width = lp.height = mIconSize;
+ } else {
+ view = convertView;
+ }
+ bindView(view, mList.get(position));
+ return view;
+ }
+
+ public void handlePackagesChanged() {
+ final int oldItemCount = getCount();
+ rebuildList();
+ notifyDataSetChanged();
+ if (mList.size() == 0) {
+ finish();
+ }
+ final int newItemCount = getCount();
+ if (newItemCount != oldItemCount) {
+ resizeGrid();
+ }
+ }
+
+ public Intent intentForPosition(int position) {
+ if (mList == null) {
+ return null;
+ }
+ DisplayResolveInfo dri = mList.get(position);
+ Intent intent = new Intent(dri.origIntent != null
+ ? dri.origIntent : mIntent);
+ intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT
+ | Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
+ ActivityInfo ai = dri.ri.activityInfo;
+ intent.setComponent(new ComponentName(
+ ai.applicationInfo.packageName, ai.name));
+ return intent;
+ }
+
+ private void processGroup(List<ResolveInfo> rList, int start, int end, ResolveInfo ro,
+ CharSequence roLabel) {
+ int num = end - start + 1;
+ if (num == 1) {
+ mList.add(new DisplayResolveInfo(ro, roLabel, null, null));
+ } else {
+ mShowExtended = true;
+ boolean usePkg = false;
+ CharSequence startApp = ro.activityInfo.applicationInfo.loadLabel(mPm);
+ if (startApp == null) {
+ usePkg = true;
+ }
+ if (!usePkg) {
+ HashSet<CharSequence> duplicates =
+ new HashSet<CharSequence>();
+ duplicates.add(startApp);
+ for (int j = start + 1; j <= end; j++) {
+ ResolveInfo jRi = rList.get(j);
+ CharSequence jApp = jRi.activityInfo.applicationInfo.loadLabel(mPm);
+ if (jApp == null || duplicates.contains(jApp)) {
+ usePkg = true;
+ break;
+ } else {
+ duplicates.add(jApp);
+ }
+ }
+ duplicates.clear();
+ }
+ for (int k = start; k <= end; k++) {
+ ResolveInfo add = rList.get(k);
+ if (usePkg) {
+ mList.add(new DisplayResolveInfo(add, roLabel,
+ add.activityInfo.packageName, null));
+ } else {
+ mList.add(new DisplayResolveInfo(add, roLabel,
+ add.activityInfo.applicationInfo.loadLabel(mPm), null));
+ }
+ }
+ }
+ }
+
+ private void rebuildList() {
+ if (mBaseResolveList != null) {
+ mCurrentResolveList = mBaseResolveList;
+ } else {
+ mCurrentResolveList = mPm.queryIntentActivities(
+ mIntent, PackageManager.MATCH_DEFAULT_ONLY
+ | (mAlwaysUseOption ? PackageManager.GET_RESOLVED_FILTER : 0));
+ if (mCurrentResolveList != null) {
+ for (int i = mCurrentResolveList.size() - 1; i >= 0; i--) {
+ ActivityInfo ai = mCurrentResolveList.get(i).activityInfo;
+ int granted = checkComponentPermission(
+ ai.permission, mLaunchedFromUid,
+ ai.applicationInfo.uid, ai.exported);
+ if (granted != PackageManager.PERMISSION_GRANTED) {
+ mCurrentResolveList.remove(i);
+ }
+ }
+ }
+ }
+ int N;
+ if (mCurrentResolveList != null && (N = mCurrentResolveList.size()) > 0) {
+ ResolveInfo r0 = mCurrentResolveList.get(0);
+ for (int i = 1; i < N; i++) {
+ ResolveInfo ri = mCurrentResolveList.get(i);
+ if (r0.priority != ri.priority ||
+ r0.isDefault != ri.isDefault) {
+ while (i < N) {
+ mCurrentResolveList.remove(i);
+ N--;
+ }
+ }
+ }
+ if (N > 1) {
+ ResolveInfo.DisplayNameComparator rComparator =
+ new ResolveInfo.DisplayNameComparator(mPm);
+ Collections.sort(mCurrentResolveList, rComparator);
+ }
+ mList = new ArrayList<DisplayResolveInfo>();
+ if (mInitialIntents != null) {
+ for (Intent ii : mInitialIntents) {
+ if (ii == null) {
+ continue;
+ }
+ ActivityInfo ai = ii.resolveActivityInfo(
+ getPackageManager(), 0);
+ if (ai == null) {
+ Log.w("ResolverActivity", "No activity found for "
+ + ii);
+ continue;
+ }
+ ResolveInfo ri = new ResolveInfo();
+ ri.activityInfo = ai;
+ if (ii instanceof LabeledIntent) {
+ LabeledIntent li = (LabeledIntent) ii;
+ ri.resolvePackageName = li.getSourcePackage();
+ ri.labelRes = li.getLabelResource();
+ ri.nonLocalizedLabel = li.getNonLocalizedLabel();
+ ri.icon = li.getIconResource();
+ }
+ mList.add(new DisplayResolveInfo(ri,
+ ri.loadLabel(getPackageManager()), null, ii));
+ }
+ }
+ r0 = mCurrentResolveList.get(0);
+ int start = 0;
+ CharSequence r0Label = r0.loadLabel(mPm);
+ mShowExtended = false;
+ for (int i = 1; i < N; i++) {
+ if (r0Label == null) {
+ r0Label = r0.activityInfo.packageName;
+ }
+ ResolveInfo ri = mCurrentResolveList.get(i);
+ CharSequence riLabel = ri.loadLabel(mPm);
+ if (riLabel == null) {
+ riLabel = ri.activityInfo.packageName;
+ }
+ if (riLabel.equals(r0Label)) {
+ continue;
+ }
+ processGroup(mCurrentResolveList, start, i - 1, r0, r0Label);
+ r0 = ri;
+ r0Label = riLabel;
+ start = i;
+ }
+ processGroup(mCurrentResolveList, start, N - 1, r0, r0Label);
+ }
+ }
+
+ public ResolveInfo resolveInfoForPosition(int position) {
+ if (mList == null) {
+ return null;
+ }
+ return mList.get(position).ri;
+ }
+ }
+
+ public static final int FIRST_ISOLATED_UID = 99000;
+ public static final int LAST_ISOLATED_UID = 99999;
+ public static final int PER_USER_RANGE = 100000;
+ private static final String TAG = "ResolverActivity";
+
+ public static final int getAppId(int uid) {
+ return uid % PER_USER_RANGE;
+ }
+
+ public static final boolean isIsolated(int uid) {
+ if (uid > 0) {
+ final int appId = getAppId(uid);
+ return appId >= FIRST_ISOLATED_UID && appId <= LAST_ISOLATED_UID;
+ } else {
+ return false;
+ }
+ }
+
+ public static final boolean isSameApp(int uid1, int uid2) {
+ return getAppId(uid1) == getAppId(uid2);
+ }
+
+ private ResolveListAdapter mAdapter;
+ private Button mAlwaysButton;
+ private boolean mAlwaysUseOption;
+
+ private GridView mGrid;
+
+ private int mIconDpi;
+
+ private int mIconSize;
+
+ private int mLastSelected = GridView.INVALID_POSITION;
+
+ private int mLaunchedFromUid;
+
+ private int mMaxColumns;
+
+ private Button mOnceButton;
+
+ private PackageManager mPm;
+
+ private boolean mShowExtended;
+
+ public int checkComponentPermission(String permission, int uid,
+ int owningUid, boolean exported) {
+ if (uid == 0 || uid == Process.SYSTEM_UID) {
+ return PackageManager.PERMISSION_GRANTED;
+ }
+ if (isIsolated(uid)) {
+ return PackageManager.PERMISSION_DENIED;
+ }
+ if (owningUid >= 0 && isSameApp(uid, owningUid)) {
+ return PackageManager.PERMISSION_GRANTED;
+ }
+ if (!exported) {
+ Log.w(TAG, "Permission denied: checkComponentPermission() owningUid=" + owningUid);
+ return PackageManager.PERMISSION_DENIED;
+ }
+ if (permission == null) {
+ return PackageManager.PERMISSION_GRANTED;
+ }
+ // TODO try {
+ // return AppGlobals.getPackageManager()
+ // .checkUidPermission(permission, uid);
+ // } catch (RemoteException e) {
+ // Log.e(TAG, "PackageManager is dead?!?", e);
+ // }
+ // return PackageManager.PERMISSION_DENIED;
+ return PackageManager.PERMISSION_GRANTED;
+ }
+
+ Drawable getIcon(Resources res, int resId) {
+ try {
+ if (VERSION.SDK_INT >= 15) {
+ return res.getDrawableForDensity(resId, mIconDpi);
+ } else {
+ return res.getDrawable(resId);
+ }
+ } catch (Resources.NotFoundException e) {
+ return null;
+ }
+ }
+
+ private int getLauncherLargeIconDensity(ActivityManager am) {
+ if (VERSION.SDK_INT >= 11) {
+ return am.getLauncherLargeIconDensity();
+ }
+ final Resources res = getResources();
+ final int density = res.getDisplayMetrics().densityDpi;
+ final Configuration conf = res.getConfiguration();
+ final int sw;
+ if (VERSION.SDK_INT >= 13) {
+ sw = conf.smallestScreenWidthDp;
+ } else {
+ final DisplayMetrics metrics = res.getDisplayMetrics();
+ sw = (int) (Math.min(metrics.widthPixels, metrics.heightPixels) / metrics.density);
+ }
+ if (sw < 600) {
+ return density;
+ }
+ switch (density) {
+ case DisplayMetrics.DENSITY_LOW:
+ return DisplayMetrics.DENSITY_MEDIUM;
+ case DisplayMetrics.DENSITY_MEDIUM:
+ return DisplayMetrics.DENSITY_HIGH;
+ case DisplayMetrics.DENSITY_TV:
+ return DisplayMetrics.DENSITY_XHIGH;
+ case DisplayMetrics.DENSITY_HIGH:
+ return DisplayMetrics.DENSITY_XHIGH;
+ case DisplayMetrics.DENSITY_XHIGH:
+ return DisplayMetrics.DENSITY_XXHIGH;
+ case DisplayMetrics.DENSITY_XXHIGH:
+ return DisplayMetrics.DENSITY_XHIGH * 2;
+ default:
+ return (int) (density * 1.5f + .5f);
+ }
+ }
+
+ private int getLauncherLargeIconSize(ActivityManager am) {
+ if (VERSION.SDK_INT >= 11) {
+ return am.getLauncherLargeIconSize();
+ }
+ final Resources res = getResources();
+ final int size = res.getDimensionPixelSize(android.R.dimen.app_icon_size);
+ final Configuration conf = res.getConfiguration();
+ final int sw;
+ if (VERSION.SDK_INT >= 13) {
+ sw = conf.smallestScreenWidthDp;
+ } else {
+ final DisplayMetrics metrics = res.getDisplayMetrics();
+ sw = (int) (Math.min(metrics.widthPixels, metrics.heightPixels) / metrics.density);
+ }
+ if (sw < 600) {
+ return size;
+ }
+ final int density = res.getDisplayMetrics().densityDpi;
+ switch (density) {
+ case DisplayMetrics.DENSITY_LOW:
+ return size * DisplayMetrics.DENSITY_MEDIUM / DisplayMetrics.DENSITY_LOW;
+ case DisplayMetrics.DENSITY_MEDIUM:
+ return size * DisplayMetrics.DENSITY_HIGH / DisplayMetrics.DENSITY_MEDIUM;
+ case DisplayMetrics.DENSITY_TV:
+ return size * DisplayMetrics.DENSITY_XHIGH / DisplayMetrics.DENSITY_HIGH;
+ case DisplayMetrics.DENSITY_HIGH:
+ return size * DisplayMetrics.DENSITY_XHIGH / DisplayMetrics.DENSITY_HIGH;
+ case DisplayMetrics.DENSITY_XHIGH:
+ return size * DisplayMetrics.DENSITY_XXHIGH / DisplayMetrics.DENSITY_XHIGH;
+ case DisplayMetrics.DENSITY_XXHIGH:
+ return size * DisplayMetrics.DENSITY_XHIGH * 2 / DisplayMetrics.DENSITY_XXHIGH;
+ default:
+ return (int) (size * 1.5f + .5f);
+ }
+ }
+
+ Drawable loadIconForResolveInfo(ResolveInfo ri) {
+ Drawable dr;
+ try {
+ if (ri.resolvePackageName != null && ri.icon != 0) {
+ dr = getIcon(mPm.getResourcesForApplication(ri.resolvePackageName), ri.icon);
+ if (dr != null) {
+ return dr;
+ }
+ }
+ final int iconRes = ri.getIconResource();
+ if (iconRes != 0) {
+ dr = getIcon(mPm.getResourcesForApplication(ri.activityInfo.packageName), iconRes);
+ if (dr != null) {
+ return dr;
+ }
+ }
+ } catch (NameNotFoundException e) {
+ Log.e(TAG, "Couldn't find resources for package", e);
+ }
+ return ri.loadIcon(mPm);
+ }
+
+ private Intent makeMyIntent() {
+ Intent intent = new Intent(getIntent());
+ intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ return intent;
+ }
+
+ public void onButtonClick(View v) {
+ final int id = v.getId();
+ startSelected(mGrid.getCheckedItemPosition(), id == R.id.button_always);
+ dismiss();
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ onCreate(savedInstanceState, makeMyIntent(),
+ getResources().getText(R.string.whichApplication),
+ null, null, true);
+ }
+
+ protected void onCreate(Bundle savedInstanceState, Intent intent,
+ CharSequence title, Intent[] initialIntents, List<ResolveInfo> rList,
+ boolean alwaysUseOption) {
+ super.onCreate(savedInstanceState);
+ try {
+ mLaunchedFromUid = getPackageManager().getApplicationInfo(getPackageName(), 0).uid;
+ } catch (NameNotFoundException e) {
+ e.printStackTrace();
+ mLaunchedFromUid = -1;
+ }
+ mPm = getPackageManager();
+ mAlwaysUseOption = alwaysUseOption;
+ mMaxColumns = getResources().getInteger(R.integer.config_maxResolverActivityColumns);
+ intent.setComponent(null);
+ AlertController.AlertParams ap = mAlertParams;
+ ap.mTitle = title;
+ final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
+ mIconDpi = getLauncherLargeIconDensity(am);
+ mIconSize = getLauncherLargeIconSize(am);
+ mAdapter = new ResolveListAdapter(this, intent, initialIntents, rList,
+ mLaunchedFromUid);
+ int count = mAdapter.getCount();
+ if (mLaunchedFromUid < 0 || isIsolated(mLaunchedFromUid)) {
+ finish();
+ return;
+ } else if (count > 1) {
+ ap.mView = getLayoutInflater().inflate(R.layout.resolver_grid, null);
+ mGrid = (GridView) ap.mView.findViewById(R.id.resolver_grid);
+ mGrid.setAdapter(mAdapter);
+ mGrid.setOnItemClickListener(this);
+ mGrid.setOnItemLongClickListener(new ItemLongClickListener());
+ if (alwaysUseOption) {
+ mGrid.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+ }
+ resizeGrid();
+ } else if (count == 1) {
+ startActivity(mAdapter.intentForPosition(0));
+ finish();
+ return;
+ } else {
+ ap.mMessage = getResources().getText(R.string.noApplications);
+ }
+ setupAlert();
+ if (alwaysUseOption) {
+ final ViewGroup buttonLayout = (ViewGroup) findViewById(R.id.button_bar);
+ if (buttonLayout != null) {
+ buttonLayout.setVisibility(View.VISIBLE);
+ mAlwaysButton = (Button) buttonLayout.findViewById(R.id.button_always);
+ mOnceButton = (Button) buttonLayout.findViewById(R.id.button_once);
+ } else {
+ mAlwaysUseOption = false;
+ }
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ protected void onIntentSelected(ResolveInfo ri, Intent intent, boolean alwaysCheck) {
+ if (alwaysCheck) {
+ IntentFilter filter = new IntentFilter();
+ if (intent.getAction() != null) {
+ filter.addAction(intent.getAction());
+ }
+ Set<String> categories = intent.getCategories();
+ if (categories != null) {
+ for (String cat : categories) {
+ filter.addCategory(cat);
+ }
+ }
+ filter.addCategory(Intent.CATEGORY_DEFAULT);
+ int cat = ri.match & IntentFilter.MATCH_CATEGORY_MASK;
+ Uri data = intent.getData();
+ if (cat == IntentFilter.MATCH_CATEGORY_TYPE) {
+ String mimeType = intent.resolveType(this);
+ if (mimeType != null) {
+ try {
+ filter.addDataType(mimeType);
+ } catch (IntentFilter.MalformedMimeTypeException e) {
+ Log.w("ResolverActivity", e);
+ filter = null;
+ }
+ }
+ }
+ if (data != null && data.getScheme() != null) {
+ if (cat != IntentFilter.MATCH_CATEGORY_TYPE
+ || !"file".equals(data.getScheme())
+ && !"content".equals(data.getScheme())) {
+ filter.addDataScheme(data.getScheme());
+ Iterator<IntentFilter.AuthorityEntry> aIt = ri.filter.authoritiesIterator();
+ if (aIt != null) {
+ while (aIt.hasNext()) {
+ IntentFilter.AuthorityEntry a = aIt.next();
+ if (a.match(data) >= 0) {
+ int port = a.getPort();
+ filter.addDataAuthority(a.getHost(),
+ port >= 0 ? Integer.toString(port) : null);
+ break;
+ }
+ }
+ }
+ Iterator<PatternMatcher> pIt = ri.filter.pathsIterator();
+ if (pIt != null) {
+ String path = data.getPath();
+ while (path != null && pIt.hasNext()) {
+ PatternMatcher p = pIt.next();
+ if (p.match(path)) {
+ filter.addDataPath(p.getPath(), p.getType());
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (filter != null) {
+ final int N = mAdapter.mList.size();
+ ComponentName[] set = new ComponentName[N];
+ int bestMatch = 0;
+ for (int i = 0; i < N; i++) {
+ ResolveInfo r = mAdapter.mList.get(i).ri;
+ set[i] = new ComponentName(r.activityInfo.packageName,
+ r.activityInfo.name);
+ if (r.match > bestMatch) {
+ bestMatch = r.match;
+ }
+ }
+ try {
+ getPackageManager().addPreferredActivity(filter, bestMatch, set,
+ intent.getComponent());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ if (intent != null) {
+ startActivity(intent);
+ }
+ }
+
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ final int checkedPos = mGrid.getCheckedItemPosition();
+ final boolean hasValidSelection = checkedPos != AdapterView.INVALID_POSITION;
+ if (mAlwaysUseOption && (!hasValidSelection || mLastSelected != checkedPos)) {
+ mAlwaysButton.setEnabled(hasValidSelection);
+ mOnceButton.setEnabled(hasValidSelection);
+ if (hasValidSelection) {
+ mGrid.smoothScrollToPosition(checkedPos);
+ }
+ mLastSelected = checkedPos;
+ } else {
+ startSelected(position, false);
+ }
+ }
+
+ @Override
+ protected void onRestart() {
+ super.onRestart();
+ mAdapter.handlePackagesChanged();
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ if (mAlwaysUseOption) {
+ final int checkedPos = mGrid.getCheckedItemPosition();
+ final boolean enabled = checkedPos != AdapterView.INVALID_POSITION;
+ mLastSelected = checkedPos;
+ mAlwaysButton.setEnabled(enabled);
+ mOnceButton.setEnabled(enabled);
+ if (enabled) {
+ mGrid.setSelection(checkedPos);
+ }
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
+ if (!isChangingConfigurations()) {
+ finish();
+ }
+ }
+ }
+
+ void resizeGrid() {
+ final int itemCount = mAdapter.getCount();
+ mGrid.setNumColumns(Math.min(itemCount, mMaxColumns));
+ }
+
+ void showAppDetails(ResolveInfo ri) {
+ Intent in = new Intent().setAction("android.settings.APPLICATION_DETAILS_SETTINGS")
+ .setData(Uri.fromParts("package", ri.activityInfo.packageName, null))
+ .addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+ startActivity(in);
+ }
+
+ void startSelected(int which, boolean always) {
+ ResolveInfo ri = mAdapter.resolveInfoForPosition(which);
+ Intent intent = mAdapter.intentForPosition(which);
+ onIntentSelected(ri, intent, always);
+ finish();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeActivity.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeActivity.java
new file mode 100644
index 0000000000..7acd0c94e0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeActivity.java
@@ -0,0 +1,156 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.ITabSwipe;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.FrameLayout;
+
+import android.os.Bundle;
+
+/**
+ * This activity class implement tabs + swipe navigation pattern<br />
+ * <br />
+ * Part of HoloEverywhere
+ */
+public abstract class TabSwipeActivity extends Activity implements
+ ITabSwipe<TabSwipeFragment.TabInfo> {
+ public static class InnerFragment extends TabSwipeFragment {
+ private TabSwipeActivity mActivity;
+ private boolean mTabsWasHandled = false;
+
+ @Override
+ protected void onHandleTabs() {
+ mTabsWasHandled = true;
+ if (mActivity != null) {
+ mActivity.onHandleTabs();
+ }
+ }
+
+ public void setActivity(TabSwipeActivity activity) {
+ if (activity == null) {
+ return;
+ }
+ mActivity = activity;
+ if (mTabsWasHandled) {
+ mActivity.onHandleTabs();
+ }
+ }
+ }
+
+ private int mCustomLayout = -1;
+
+ private InnerFragment mFragment;
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(CharSequence title,
+ Class<? extends Fragment> fragmentClass) {
+ return mFragment.addTab(title, fragmentClass);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(CharSequence title,
+ Class<? extends Fragment> fragmentClass, Bundle fragmentArguments) {
+ return mFragment.addTab(title, fragmentClass, fragmentArguments);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(int title,
+ Class<? extends Fragment> fragmentClass) {
+ return mFragment.addTab(title, fragmentClass);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(int title,
+ Class<? extends Fragment> fragmentClass, Bundle fragmentArguments) {
+ return mFragment.addTab(title, fragmentClass, fragmentArguments);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(
+ TabSwipeFragment.TabInfo tabInfo) {
+ return mFragment.addTab(tabInfo);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo addTab(
+ TabSwipeFragment.TabInfo tabInfo, int position) {
+ return mFragment.addTab(tabInfo, position);
+ }
+
+ @Override
+ public OnTabSelectedListener getOnTabSelectedListener() {
+ return mFragment.getOnTabSelectedListener();
+ }
+
+ @Override
+ public boolean isSmoothScroll() {
+ return mFragment.isSmoothScroll();
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mFragment = (InnerFragment) getSupportFragmentManager().findFragmentById(R.id.contentPanel);
+ if (mFragment == null) {
+ mFragment = new InnerFragment();
+ }
+ mFragment.setActivity(this);
+ if (mCustomLayout > 0) {
+ mFragment.setCustomLayout(mCustomLayout);
+ }
+ if (mFragment.isDetached()) {
+ FrameLayout layout = new FrameLayout(this);
+ layout.setId(R.id.contentPanel);
+ setContentView(layout);
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.contentPanel, mFragment).commit();
+ getSupportFragmentManager().executePendingTransactions();
+ }
+ }
+
+ /**
+ * Add your tabs here
+ */
+ protected abstract void onHandleTabs();
+
+ @Override
+ public void reloadTabs() {
+ mFragment.reloadTabs();
+ }
+
+ @Override
+ public void removeAllTabs() {
+ mFragment.removeAllTabs();
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo removeTab(int position) {
+ return mFragment.removeTab(position);
+ }
+
+ @Override
+ public TabSwipeFragment.TabInfo removeTab(
+ TabSwipeFragment.TabInfo tabInfo) {
+ return mFragment.removeTab(tabInfo);
+ }
+
+ @Override
+ public void setCurrentTab(int position) {
+ mFragment.setCurrentTab(position);
+ }
+
+ @Override
+ public void setCustomLayout(int customLayout) {
+ mCustomLayout = customLayout;
+ }
+
+ @Override
+ public void setOnTabSelectedListener(OnTabSelectedListener onTabSelectedListener) {
+ mFragment.setOnTabSelectedListener(onTabSelectedListener);
+ }
+
+ @Override
+ public void setSmoothScroll(boolean smoothScroll) {
+ mFragment.setSmoothScroll(smoothScroll);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeFragment.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeFragment.java
new file mode 100644
index 0000000000..705a33b1c2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TabSwipeFragment.java
@@ -0,0 +1,305 @@
+
+package org.holoeverywhere.app;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.holoeverywhere.ITabSwipe;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.TabSwipeFragment.TabInfo;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentStatePagerAdapter;
+import android.support.v4.app.FragmentTransaction;
+import android.support.v4.view.ViewPager;
+import android.support.v4.view.ViewPager.OnPageChangeListener;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.app.ActionBar.Tab;
+import com.actionbarsherlock.app.ActionBar.TabListener;
+
+/**
+ * This fragment class implement tabs + swipe navigation pattern<br />
+ * <br />
+ * Part of HoloEverywhere
+ */
+public abstract class TabSwipeFragment extends Fragment implements ITabSwipe<TabInfo> {
+ public static class TabInfo implements ITabSwipe.TabInfo {
+ public Bundle fragmentArguments;
+ public Class<? extends Fragment> fragmentClass;
+ public CharSequence title;
+
+ @Override
+ public Bundle getFragmentArguments() {
+ return fragmentArguments;
+ }
+
+ @Override
+ public Class<? extends Fragment> getFragmentClass() {
+ return fragmentClass;
+ }
+
+ @Override
+ public CharSequence getTitle() {
+ return title;
+ }
+
+ @Override
+ public void setFragmentArguments(Bundle fragmentArguments) {
+ this.fragmentArguments = fragmentArguments;
+ }
+
+ @Override
+ public void setFragmentClass(Class<? extends Fragment> fragmentClass) {
+ this.fragmentClass = fragmentClass;
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ this.title = title;
+ }
+ }
+
+ private final class TabSwipeAdapter extends FragmentStatePagerAdapter implements
+ OnPageChangeListener, TabListener {
+ public TabSwipeAdapter() {
+ super(getChildFragmentManager());
+ }
+
+ @Override
+ public int getCount() {
+ return mTabs.size();
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+ final TabInfo info = mTabs.get(position);
+ return Fragment.instantiate(info.fragmentClass, info.fragmentArguments);
+ }
+
+ @Override
+ public void onPageScrolled(int position, float percent, int pixels) {
+ // Do nothing
+ }
+
+ @Override
+ public void onPageScrollStateChanged(int scrollState) {
+ // Do nothing
+ }
+
+ @Override
+ public void onPageSelected(int position) {
+ dispatchTabSelected(position);
+ }
+
+ @Override
+ public void onTabReselected(Tab tab, FragmentTransaction ft) {
+ // Do nothing
+ }
+
+ @Override
+ public void onTabSelected(Tab tab, FragmentTransaction ft) {
+ dispatchTabSelected(tab.getPosition());
+ }
+
+ @Override
+ public void onTabUnselected(Tab tab, FragmentTransaction ft) {
+ // Do nothing
+ }
+ }
+
+ private TabSwipeAdapter mAdapter;
+ private int mCustomLayout = -1;
+ private OnTabSelectedListener mOnTabSelectedListener;
+ private int mPrevNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD;
+ private boolean mSmoothScroll = true;
+ private List<TabInfo> mTabs = new ArrayList<TabInfo>();
+
+ private ViewPager mViewPager;
+
+ @Override
+ public TabInfo addTab(CharSequence title, Class<? extends Fragment> fragmentClass) {
+ return addTab(title, fragmentClass, null);
+ }
+
+ @Override
+ public TabInfo addTab(CharSequence title, Class<? extends Fragment> fragmentClass,
+ Bundle fragmentArguments) {
+ TabInfo info = new TabInfo();
+ info.title = title;
+ info.fragmentClass = fragmentClass;
+ info.fragmentArguments = fragmentArguments;
+ return addTab(info);
+ }
+
+ @Override
+ public TabInfo addTab(int title, Class<? extends Fragment> fragmentClass) {
+ return addTab(getText(title), fragmentClass, null);
+ }
+
+ @Override
+ public TabInfo addTab(int title, Class<? extends Fragment> fragmentClass,
+ Bundle fragmentArguments) {
+ return addTab(getText(title), fragmentClass, fragmentArguments);
+ }
+
+ @Override
+ public TabInfo addTab(TabInfo tabInfo) {
+ mTabs.add(tabInfo);
+ getSupportActionBar().addTab(makeActionBarTab(tabInfo));
+ notifyChanged();
+ return tabInfo;
+ }
+
+ @Override
+ public TabInfo addTab(TabInfo tabInfo, int position) {
+ mTabs.add(position, tabInfo);
+ getSupportActionBar().addTab(makeActionBarTab(tabInfo), position);
+ notifyChanged();
+ return tabInfo;
+ }
+
+ private void dispatchTabSelected(int position) {
+ boolean notify = false;
+ if (mViewPager.getCurrentItem() != position) {
+ mViewPager.setCurrentItem(position, mSmoothScroll);
+ notify = true;
+ }
+ if (getSupportActionBar().getSelectedNavigationIndex() != position) {
+ getSupportActionBar().selectTab(getSupportActionBar().getTabAt(position));
+ notify = true;
+ }
+ if (notify) {
+ onTabSelected(position);
+ }
+ }
+
+ @Override
+ public OnTabSelectedListener getOnTabSelectedListener() {
+ return mOnTabSelectedListener;
+ }
+
+ @Override
+ public boolean isSmoothScroll() {
+ return mSmoothScroll;
+ }
+
+ protected Tab makeActionBarTab(TabInfo tabInfo) {
+ Tab tab = getSupportActionBar().newTab();
+ tab.setText(tabInfo.title);
+ tab.setTabListener(mAdapter);
+ return tab;
+ }
+
+ private void notifyChanged() {
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ return inflater.inflate(mCustomLayout > 0 ? mCustomLayout : R.layout.tab_swipe, container,
+ false);
+ }
+
+ @Override
+ public void onDestroyView() {
+ getSupportActionBar().removeAllTabs();
+ getSupportActionBar().setNavigationMode(mPrevNavigationMode);
+ super.onDestroyView();
+ }
+
+ /**
+ * Add your tabs here
+ */
+ protected abstract void onHandleTabs();
+
+ public void onTabSelected(int position) {
+ if (mOnTabSelectedListener != null) {
+ mOnTabSelectedListener.onTabSelected(position);
+ }
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ mViewPager = (ViewPager) view.findViewById(R.id.tabSwipePager);
+ if (mViewPager == null) {
+ throw new IllegalStateException(
+ "Add ViewPager to your custom layout with id @id/tabSwipePager");
+ }
+ if (getSupportActionBar().getTabCount() > 0) {
+ throw new IllegalStateException(
+ "TabSwipeFragment doesn't support multitabbed fragments");
+ }
+ mAdapter = new TabSwipeAdapter();
+ onHandleTabs();
+ mViewPager.setAdapter(mAdapter);
+ mViewPager.setOnPageChangeListener(mAdapter);
+ mPrevNavigationMode = getSupportActionBar().getNavigationMode();
+ getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+ }
+
+ @Override
+ public void reloadTabs() {
+ removeAllTabs();
+ onHandleTabs();
+ }
+
+ @Override
+ public void removeAllTabs() {
+ getSupportActionBar().removeAllTabs();
+ mTabs.clear();
+ notifyChanged();
+ }
+
+ @Override
+ public TabInfo removeTab(int position) {
+ TabInfo tabInfo = mTabs.remove(position);
+ getSupportActionBar().removeTabAt(position);
+ notifyChanged();
+ return tabInfo;
+ }
+
+ @Override
+ public TabInfo removeTab(TabInfo tabInfo) {
+ for (int i = 0; i < mTabs.size(); i++) {
+ if (mTabs.get(i) == tabInfo) {
+ return removeTab(i);
+ }
+ }
+ return tabInfo;
+ }
+
+ @Override
+ public void setCurrentTab(int position) {
+ dispatchTabSelected(Math.min(0, Math.max(position, mTabs.size() - 1)));
+ }
+
+ /**
+ * If you want custom layout for this activity - call this method before
+ * super.onCreate<br />
+ * Your layout should be contains ViewPager with id @id/tabSwipePager
+ */
+ @Override
+ public void setCustomLayout(int customLayout) {
+ mCustomLayout = customLayout;
+ }
+
+ @Override
+ public void setOnTabSelectedListener(OnTabSelectedListener onTabSelectedListener) {
+ mOnTabSelectedListener = onTabSelectedListener;
+ }
+
+ /**
+ * Smooth scroll of ViewPager when user click on tab
+ */
+ @Override
+ public void setSmoothScroll(boolean smoothScroll) {
+ mSmoothScroll = smoothScroll;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TimePickerDialog.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TimePickerDialog.java
new file mode 100644
index 0000000000..c61325ba5c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/app/TimePickerDialog.java
@@ -0,0 +1,99 @@
+
+package org.holoeverywhere.app;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.TimePicker;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.os.Bundle;
+import android.view.View;
+
+public class TimePickerDialog extends AlertDialog implements OnClickListener,
+ TimePicker.OnTimeChangedListener {
+ public interface OnTimeSetListener {
+ public void onTimeSet(TimePicker view, int hourOfDay, int minute);
+ }
+
+ private static final String HOUR = "hour";
+ private static final String IS_24_HOUR = "is24hour";
+ private static final String MINUTE = "minute";
+
+ private final OnTimeSetListener mCallback;
+ int mInitialHourOfDay, mInitialMinute;
+
+ boolean mIs24HourView;
+ private final TimePicker mTimePicker;
+
+ public TimePickerDialog(Context context, int theme,
+ OnTimeSetListener callBack, int hourOfDay, int minute,
+ boolean is24HourView) {
+ super(context, theme);
+ mCallback = callBack;
+ mInitialHourOfDay = hourOfDay;
+ mInitialMinute = minute;
+ mIs24HourView = is24HourView;
+ setIcon(0);
+ setTitle(R.string.time_picker_dialog_title);
+ Context themeContext = getContext();
+ setButton(DialogInterface.BUTTON_POSITIVE,
+ themeContext.getText(R.string.date_time_set), this);
+ setButton(DialogInterface.BUTTON_NEGATIVE,
+ themeContext.getText(android.R.string.cancel),
+ (OnClickListener) null);
+ View view = LayoutInflater.inflate(themeContext,
+ R.layout.time_picker_dialog);
+ setView(view);
+ mTimePicker = (TimePicker) view.findViewById(R.id.timePicker);
+ mTimePicker.setIs24HourView(mIs24HourView);
+ mTimePicker.setCurrentHour(mInitialHourOfDay);
+ mTimePicker.setCurrentMinute(mInitialMinute);
+ mTimePicker.setOnTimeChangedListener(this);
+ }
+
+ public TimePickerDialog(Context context, OnTimeSetListener callBack,
+ int hourOfDay, int minute, boolean is24HourView) {
+ this(context, 0, callBack, hourOfDay, minute, is24HourView);
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (mCallback != null) {
+ mTimePicker.clearFocus();
+ mCallback.onTimeSet(mTimePicker, mTimePicker.getCurrentHour(),
+ mTimePicker.getCurrentMinute());
+ }
+ }
+
+ @Override
+ public void onRestoreInstanceState(Bundle savedInstanceState) {
+ super.onRestoreInstanceState(savedInstanceState);
+ int hour = savedInstanceState.getInt(TimePickerDialog.HOUR);
+ int minute = savedInstanceState.getInt(TimePickerDialog.MINUTE);
+ mTimePicker.setIs24HourView(savedInstanceState
+ .getBoolean(TimePickerDialog.IS_24_HOUR));
+ mTimePicker.setCurrentHour(hour);
+ mTimePicker.setCurrentMinute(minute);
+ }
+
+ @Override
+ public Bundle onSaveInstanceState() {
+ Bundle state = super.onSaveInstanceState();
+ state.putInt(TimePickerDialog.HOUR, mTimePicker.getCurrentHour());
+ state.putInt(TimePickerDialog.MINUTE, mTimePicker.getCurrentMinute());
+ state.putBoolean(TimePickerDialog.IS_24_HOUR,
+ mTimePicker.is24HourView());
+ return state;
+ }
+
+ @Override
+ public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
+ }
+
+ public void updateTime(int hourOfDay, int minutOfHour) {
+ mTimePicker.setCurrentHour(hourOfDay);
+ mTimePicker.setCurrentMinute(minutOfHour);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/ColorDrawable.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/ColorDrawable.java
new file mode 100644
index 0000000000..39db52525f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/ColorDrawable.java
@@ -0,0 +1,138 @@
+
+package org.holoeverywhere.drawable;
+
+import java.io.IOException;
+
+import org.holoeverywhere.R;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.PixelFormat;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+
+public class ColorDrawable extends android.graphics.drawable.ColorDrawable {
+ final static class ColorState extends ConstantState {
+ int mBaseColor;
+ int mChangingConfigurations;
+ int mUseColor;
+
+ ColorState(ColorState state) {
+ if (state != null) {
+ mBaseColor = state.mBaseColor;
+ mUseColor = state.mUseColor;
+ }
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return mChangingConfigurations;
+ }
+
+ @Override
+ public Drawable newDrawable() {
+ return new ColorDrawable(this);
+ }
+
+ @Override
+ public Drawable newDrawable(Resources res) {
+ return new ColorDrawable(this);
+ }
+ }
+
+ private final Paint mPaint = new Paint();
+ private ColorState mState;
+
+ public ColorDrawable() {
+ this(null);
+ }
+
+ private ColorDrawable(ColorState state) {
+ mState = new ColorState(state);
+ }
+
+ public ColorDrawable(int color) {
+ this(null);
+ setColor(color);
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (mState.mUseColor >>> 24 != 0) {
+ mPaint.setColor(mState.mUseColor);
+ canvas.drawRect(getBounds(), mPaint);
+ }
+ }
+
+ @Override
+ public int getAlpha() {
+ return mState.mUseColor >>> 24;
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return super.getChangingConfigurations() | mState.mChangingConfigurations;
+ }
+
+ @Override
+ public int getColor() {
+ return mState.mUseColor;
+ }
+
+ @Override
+ public ConstantState getConstantState() {
+ mState.mChangingConfigurations = getChangingConfigurations();
+ return mState;
+ }
+
+ @Override
+ public int getOpacity() {
+ switch (mState.mUseColor >>> 24) {
+ case 255:
+ return PixelFormat.OPAQUE;
+ case 0:
+ return PixelFormat.TRANSPARENT;
+ }
+ return PixelFormat.TRANSLUCENT;
+ }
+
+ @Override
+ public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ super.inflate(r, parser, attrs);
+ TypedArray a = r.obtainAttributes(attrs, R.styleable.ColorDrawable);
+ int color = mState.mBaseColor;
+ color = a.getColor(R.styleable.ColorDrawable_android_color, color);
+ mState.mBaseColor = mState.mUseColor = color;
+ a.recycle();
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ alpha += alpha >> 7;
+ int baseAlpha = mState.mBaseColor >>> 24;
+ int useAlpha = baseAlpha * alpha >> 8;
+ int oldUseColor = mState.mUseColor;
+ mState.mUseColor = mState.mBaseColor << 8 >>> 8 | useAlpha << 24;
+ if (oldUseColor != mState.mUseColor) {
+ invalidateSelf();
+ }
+ }
+
+ @Override
+ public void setColor(int color) {
+ if (mState.mBaseColor != color || mState.mUseColor != color) {
+ invalidateSelf();
+ mState.mBaseColor = mState.mUseColor = color;
+ }
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter colorFilter) {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableCompat.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableCompat.java
new file mode 100644
index 0000000000..0d29fa1f16
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableCompat.java
@@ -0,0 +1,172 @@
+
+package org.holoeverywhere.drawable;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.graphics.BitmapFactory;
+import android.graphics.drawable.Drawable;
+import android.support.v4.util.LongSparseArray;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+import android.util.Xml;
+
+public final class DrawableCompat {
+ private static final Map<String, Class<? extends Drawable>> CLASS_MAP = new HashMap<String, Class<? extends Drawable>>();
+ private static final LongSparseArray<WeakReference<Drawable.ConstantState>> sDrawableCache = new LongSparseArray<WeakReference<Drawable.ConstantState>>();
+
+ static {
+ CLASS_MAP.put("rotate", RotateDrawable.class);
+ CLASS_MAP.put("layer-list", LayerDrawable.class);
+ CLASS_MAP.put("selector", StateListDrawable.class);
+ CLASS_MAP.put("color", ColorDrawable.class);
+ }
+
+ public static Drawable createFromPath(String pathName) {
+ return Drawable.createFromPath(pathName);
+ }
+
+ public static Drawable createFromResourceStream(Resources res, TypedValue value,
+ InputStream is, String srcName) {
+ return createFromResourceStream(res, value, is, srcName, null);
+ }
+
+ public static Drawable createFromResourceStream(Resources res, TypedValue value,
+ InputStream is, String srcName, BitmapFactory.Options opts) {
+ return Drawable.createFromResourceStream(res, value, is, srcName, opts);
+ }
+
+ public static Drawable createFromStream(InputStream is, String srcName) {
+ return createFromResourceStream(null, null, is, srcName, null);
+ }
+
+ public static Drawable createFromXml(Resources r, XmlPullParser parser)
+ throws XmlPullParserException, IOException {
+ AttributeSet attrs = Xml.asAttributeSet(parser);
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG &&
+ type != XmlPullParser.END_DOCUMENT) {
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new XmlPullParserException("No start tag found");
+ }
+ Drawable drawable = createFromXmlInner(r, parser, attrs);
+ if (drawable == null) {
+ throw new RuntimeException("Unknown initial tag: " + parser.getName());
+ }
+ return drawable;
+ }
+
+ public static Drawable createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ Drawable drawable = null;
+ final String name = parser.getName();
+ try {
+ Class<? extends Drawable> clazz = CLASS_MAP.get(name);
+ if (clazz != null) {
+ drawable = clazz.newInstance();
+ } else if (name.indexOf('.') > 0) {
+ drawable = (Drawable) Class.forName(name).newInstance();
+ }
+ } catch (Exception e) {
+ throw new XmlPullParserException("Error while inflating drawable resource", parser, e);
+ }
+ if (drawable == null) {
+ return Drawable.createFromXmlInner(r, parser, attrs);
+ }
+ drawable.inflate(r, parser, attrs);
+ return drawable;
+ }
+
+ private static Drawable getCachedDrawable(long key, Resources res) {
+ WeakReference<Drawable.ConstantState> wr = sDrawableCache.get(key);
+ if (wr != null) {
+ Drawable.ConstantState entry = wr.get();
+ if (entry != null) {
+ return entry.newDrawable(res);
+ } else {
+ sDrawableCache.delete(key);
+ }
+ }
+ return null;
+ }
+
+ public static Drawable getDrawable(Resources res, int resid) {
+ TypedValue value = new TypedValue();
+ res.getValue(resid, value, true);
+ return loadDrawable(res, value);
+ }
+
+ public static Drawable getDrawable(TypedArray array, int index) {
+ TypedValue value = new TypedValue();
+ array.getValue(index, value);
+ return loadDrawable(array.getResources(), value);
+ }
+
+ public static Drawable loadDrawable(Resources res, TypedValue value)
+ throws NotFoundException {
+ if (value == null || value.resourceId <= 0) {
+ return null;
+ }
+ final long key = (long) value.assetCookie << 32 | value.data;
+ Drawable dr = getCachedDrawable(key, res);
+ if (dr != null) {
+ return dr;
+ }
+ Drawable.ConstantState cs = null;
+ if (value.string == null) {
+ throw new NotFoundException("Resource is not a Drawable (color or path): " + value);
+ }
+ String file = value.string.toString();
+ if (file.endsWith(".xml")) {
+ try {
+ XmlResourceParser rp = res.getAssets().openXmlResourceParser(value.assetCookie,
+ file);
+ dr = DrawableCompat.createFromXml(res, rp);
+ rp.close();
+ } catch (Exception e) {
+ NotFoundException rnf = new NotFoundException(
+ "File " + file + " from drawable resource ID #0x"
+ + Integer.toHexString(value.resourceId));
+ rnf.initCause(e);
+ throw rnf;
+ }
+
+ } else {
+ try {
+ InputStream is = res.getAssets().openNonAssetFd(value.assetCookie, file)
+ .createInputStream();
+ dr = DrawableCompat.createFromResourceStream(res, value, is, file, null);
+ is.close();
+ } catch (Exception e) {
+ NotFoundException rnf = new NotFoundException("File " + file
+ + " from drawable resource ID #0x"
+ + Integer.toHexString(value.resourceId));
+ rnf.initCause(e);
+ throw rnf;
+ }
+ }
+ if (dr != null) {
+ dr.setChangingConfigurations(value.changingConfigurations);
+ cs = dr.getConstantState();
+ if (cs != null) {
+ sDrawableCache.put(key, new WeakReference<Drawable.ConstantState>(cs));
+ }
+ }
+ return dr;
+ }
+
+ private DrawableCompat() {
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableContainer.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableContainer.java
new file mode 100644
index 0000000000..aa2360bfac
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/DrawableContainer.java
@@ -0,0 +1,643 @@
+
+package org.holoeverywhere.drawable;
+
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.SystemClock;
+
+public class DrawableContainer extends Drawable implements Drawable.Callback {
+ public abstract static class DrawableContainerState extends ConstantState {
+ boolean mCanConstantState;
+ int mChangingConfigurations;
+ boolean mCheckedConstantState;
+ int mChildrenChangingConfigurations;
+ boolean mComputedConstantSize = false;
+ int mConstantHeight;
+ int mConstantMinimumHeight;
+ int mConstantMinimumWidth;
+ Rect mConstantPadding = null;
+ boolean mConstantSize = false;
+ int mConstantWidth;
+ boolean mDither = DEFAULT_DITHER;
+ Drawable[] mDrawables;
+ int mEnterFadeDuration;
+ int mExitFadeDuration;
+ boolean mHaveOpacity = false;
+ boolean mHaveStateful = false;
+ int mNumChildren;
+ int mOpacity;
+ final DrawableContainer mOwner;
+ boolean mPaddingChecked = false;
+ boolean mStateful;
+ boolean mVariablePadding = false;
+
+ DrawableContainerState(DrawableContainerState orig, DrawableContainer owner,
+ Resources res) {
+ mOwner = owner;
+ if (orig != null) {
+ mChangingConfigurations = orig.mChangingConfigurations;
+ mChildrenChangingConfigurations = orig.mChildrenChangingConfigurations;
+ final Drawable[] origDr = orig.mDrawables;
+ mDrawables = new Drawable[origDr.length];
+ mNumChildren = orig.mNumChildren;
+ final int N = mNumChildren;
+ for (int i = 0; i < N; i++) {
+ if (res != null) {
+ mDrawables[i] = origDr[i].getConstantState().newDrawable(res);
+ } else {
+ mDrawables[i] = origDr[i].getConstantState().newDrawable();
+ }
+ mDrawables[i].setCallback(owner);
+ }
+ mCheckedConstantState = mCanConstantState = true;
+ mVariablePadding = orig.mVariablePadding;
+ if (orig.mConstantPadding != null) {
+ mConstantPadding = new Rect(orig.mConstantPadding);
+ }
+ mConstantSize = orig.mConstantSize;
+ mComputedConstantSize = orig.mComputedConstantSize;
+ mConstantWidth = orig.mConstantWidth;
+ mConstantHeight = orig.mConstantHeight;
+ mHaveOpacity = orig.mHaveOpacity;
+ mOpacity = orig.mOpacity;
+ mHaveStateful = orig.mHaveStateful;
+ mStateful = orig.mStateful;
+ mDither = orig.mDither;
+ mEnterFadeDuration = orig.mEnterFadeDuration;
+ mExitFadeDuration = orig.mExitFadeDuration;
+ } else {
+ mDrawables = new Drawable[10];
+ mNumChildren = 0;
+ mCheckedConstantState = mCanConstantState = false;
+ }
+ }
+
+ public final int addChild(Drawable dr) {
+ final int pos = mNumChildren;
+ if (pos >= mDrawables.length) {
+ growArray(pos, pos + 10);
+ }
+ dr.setVisible(false, true);
+ dr.setCallback(mOwner);
+ mDrawables[pos] = dr;
+ mNumChildren++;
+ mChildrenChangingConfigurations |= dr.getChangingConfigurations();
+ mHaveOpacity = false;
+ mHaveStateful = false;
+ mConstantPadding = null;
+ mPaddingChecked = false;
+ mComputedConstantSize = false;
+ return pos;
+ }
+
+ public synchronized boolean canConstantState() {
+ if (!mCheckedConstantState) {
+ mCanConstantState = true;
+ final int N = mNumChildren;
+ for (int i = 0; i < N; i++) {
+ if (mDrawables[i].getConstantState() == null) {
+ mCanConstantState = false;
+ break;
+ }
+ }
+ mCheckedConstantState = true;
+ }
+ return mCanConstantState;
+ }
+
+ protected void computeConstantSize() {
+ mComputedConstantSize = true;
+ final int N = getChildCount();
+ final Drawable[] drawables = mDrawables;
+ mConstantWidth = mConstantHeight = -1;
+ mConstantMinimumWidth = mConstantMinimumHeight = 0;
+ for (int i = 0; i < N; i++) {
+ Drawable dr = drawables[i];
+ int s = dr.getIntrinsicWidth();
+ if (s > mConstantWidth) {
+ mConstantWidth = s;
+ }
+ s = dr.getIntrinsicHeight();
+ if (s > mConstantHeight) {
+ mConstantHeight = s;
+ }
+ s = dr.getMinimumWidth();
+ if (s > mConstantMinimumWidth) {
+ mConstantMinimumWidth = s;
+ }
+ s = dr.getMinimumHeight();
+ if (s > mConstantMinimumHeight) {
+ mConstantMinimumHeight = s;
+ }
+ }
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return mChangingConfigurations;
+ }
+
+ public final int getChildCount() {
+ return mNumChildren;
+ }
+
+ public final Drawable[] getChildren() {
+ return mDrawables;
+ }
+
+ public final int getConstantHeight() {
+ if (!mComputedConstantSize) {
+ computeConstantSize();
+ }
+
+ return mConstantHeight;
+ }
+
+ public final int getConstantMinimumHeight() {
+ if (!mComputedConstantSize) {
+ computeConstantSize();
+ }
+
+ return mConstantMinimumHeight;
+ }
+
+ public final int getConstantMinimumWidth() {
+ if (!mComputedConstantSize) {
+ computeConstantSize();
+ }
+
+ return mConstantMinimumWidth;
+ }
+
+ public final Rect getConstantPadding() {
+ if (mVariablePadding) {
+ return null;
+ }
+ if (mConstantPadding != null || mPaddingChecked) {
+ return mConstantPadding;
+ }
+ Rect r = null;
+ final Rect t = new Rect();
+ final int N = getChildCount();
+ final Drawable[] drawables = mDrawables;
+ for (int i = 0; i < N; i++) {
+ if (drawables[i].getPadding(t)) {
+ if (r == null) {
+ r = new Rect(0, 0, 0, 0);
+ }
+ if (t.left > r.left) {
+ r.left = t.left;
+ }
+ if (t.top > r.top) {
+ r.top = t.top;
+ }
+ if (t.right > r.right) {
+ r.right = t.right;
+ }
+ if (t.bottom > r.bottom) {
+ r.bottom = t.bottom;
+ }
+ }
+ }
+ mPaddingChecked = true;
+ return mConstantPadding = r;
+ }
+
+ public final int getConstantWidth() {
+ if (!mComputedConstantSize) {
+ computeConstantSize();
+ }
+ return mConstantWidth;
+ }
+
+ public final int getEnterFadeDuration() {
+ return mEnterFadeDuration;
+ }
+
+ public final int getExitFadeDuration() {
+ return mExitFadeDuration;
+ }
+
+ public final int getOpacity() {
+ if (mHaveOpacity) {
+ return mOpacity;
+ }
+ final int N = getChildCount();
+ final Drawable[] drawables = mDrawables;
+ int op = N > 0 ? drawables[0].getOpacity() : PixelFormat.TRANSPARENT;
+ for (int i = 1; i < N; i++) {
+ op = Drawable.resolveOpacity(op, drawables[i].getOpacity());
+ }
+ mOpacity = op;
+ mHaveOpacity = true;
+ return op;
+ }
+
+ public void growArray(int oldSize, int newSize) {
+ Drawable[] newDrawables = new Drawable[newSize];
+ System.arraycopy(mDrawables, 0, newDrawables, 0, oldSize);
+ mDrawables = newDrawables;
+ }
+
+ public final boolean isConstantSize() {
+ return mConstantSize;
+ }
+
+ public final boolean isStateful() {
+ if (mHaveStateful) {
+ return mStateful;
+ }
+ boolean stateful = false;
+ final int N = getChildCount();
+ for (int i = 0; i < N; i++) {
+ if (mDrawables[i].isStateful()) {
+ stateful = true;
+ break;
+ }
+ }
+ mStateful = stateful;
+ mHaveStateful = true;
+ return stateful;
+ }
+
+ public final void setConstantSize(boolean constant) {
+ mConstantSize = constant;
+ }
+
+ public final void setEnterFadeDuration(int duration) {
+ mEnterFadeDuration = duration;
+ }
+
+ public final void setExitFadeDuration(int duration) {
+ mExitFadeDuration = duration;
+ }
+
+ public final void setVariablePadding(boolean variable) {
+ mVariablePadding = variable;
+ }
+ }
+
+ private static final boolean DEFAULT_DITHER = true;
+ private int mAlpha = 0xFF;
+ private Runnable mAnimationRunnable;
+ private ColorFilter mColorFilter;
+ private int mCurIndex = -1;
+ private Drawable mCurrDrawable;
+ private DrawableContainerState mDrawableContainerState;
+ private long mEnterAnimationEnd;
+ private long mExitAnimationEnd;
+ private Drawable mLastDrawable;
+ private boolean mMutated;
+
+ void animate(boolean schedule) {
+ final long now = SystemClock.uptimeMillis();
+ boolean animating = false;
+ if (mCurrDrawable != null) {
+ if (mEnterAnimationEnd != 0) {
+ if (mEnterAnimationEnd <= now) {
+ mCurrDrawable.setAlpha(mAlpha);
+ mEnterAnimationEnd = 0;
+ } else {
+ int animAlpha = (int) ((mEnterAnimationEnd - now) * 255)
+ / mDrawableContainerState.mEnterFadeDuration;
+ mCurrDrawable.setAlpha((255 - animAlpha) * mAlpha / 255);
+ animating = true;
+ }
+ }
+ } else {
+ mEnterAnimationEnd = 0;
+ }
+ if (mLastDrawable != null) {
+ if (mExitAnimationEnd != 0) {
+ if (mExitAnimationEnd <= now) {
+ mLastDrawable.setVisible(false, false);
+ mLastDrawable = null;
+ mExitAnimationEnd = 0;
+ } else {
+ int animAlpha = (int) ((mExitAnimationEnd - now) * 255)
+ / mDrawableContainerState.mExitFadeDuration;
+ mLastDrawable.setAlpha(animAlpha * mAlpha / 255);
+ animating = true;
+ }
+ }
+ } else {
+ mExitAnimationEnd = 0;
+ }
+ if (schedule && animating) {
+ scheduleSelf(mAnimationRunnable, now + 1000 / 60);
+ }
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (mCurrDrawable != null) {
+ mCurrDrawable.draw(canvas);
+ }
+ if (mLastDrawable != null) {
+ mLastDrawable.draw(canvas);
+ }
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return super.getChangingConfigurations()
+ | mDrawableContainerState.mChangingConfigurations
+ | mDrawableContainerState.mChildrenChangingConfigurations;
+ }
+
+ @Override
+ public ConstantState getConstantState() {
+ if (mDrawableContainerState.canConstantState()) {
+ mDrawableContainerState.mChangingConfigurations = getChangingConfigurations();
+ return mDrawableContainerState;
+ }
+ return null;
+ }
+
+ @Override
+ public Drawable getCurrent() {
+ return mCurrDrawable;
+ }
+
+ @Override
+ public int getIntrinsicHeight() {
+ if (mDrawableContainerState.isConstantSize()) {
+ return mDrawableContainerState.getConstantHeight();
+ }
+ return mCurrDrawable != null ? mCurrDrawable.getIntrinsicHeight() : -1;
+ }
+
+ @Override
+ public int getIntrinsicWidth() {
+ if (mDrawableContainerState.isConstantSize()) {
+ return mDrawableContainerState.getConstantWidth();
+ }
+ return mCurrDrawable != null ? mCurrDrawable.getIntrinsicWidth() : -1;
+ }
+
+ @Override
+ public int getMinimumHeight() {
+ if (mDrawableContainerState.isConstantSize()) {
+ return mDrawableContainerState.getConstantMinimumHeight();
+ }
+ return mCurrDrawable != null ? mCurrDrawable.getMinimumHeight() : 0;
+ }
+
+ @Override
+ public int getMinimumWidth() {
+ if (mDrawableContainerState.isConstantSize()) {
+ return mDrawableContainerState.getConstantMinimumWidth();
+ }
+ return mCurrDrawable != null ? mCurrDrawable.getMinimumWidth() : 0;
+ }
+
+ @Override
+ public int getOpacity() {
+ return mCurrDrawable == null || !mCurrDrawable.isVisible() ? PixelFormat.TRANSPARENT :
+ mDrawableContainerState.getOpacity();
+ }
+
+ @Override
+ public boolean getPadding(Rect padding) {
+ final Rect r = mDrawableContainerState.getConstantPadding();
+ if (r != null) {
+ padding.set(r);
+ return true;
+ }
+ if (mCurrDrawable != null) {
+ return mCurrDrawable.getPadding(padding);
+ } else {
+ return super.getPadding(padding);
+ }
+ }
+
+ @Override
+ public void invalidateDrawable(Drawable who) {
+ if (who == mCurrDrawable && getCallback() != null) {
+ getCallback().invalidateDrawable(this);
+ }
+ }
+
+ @Override
+ public boolean isStateful() {
+ return mDrawableContainerState.isStateful();
+ }
+
+ @Override
+ public void jumpToCurrentState() {
+ boolean changed = false;
+ if (mLastDrawable != null) {
+ mLastDrawable.jumpToCurrentState();
+ mLastDrawable = null;
+ changed = true;
+ }
+ if (mCurrDrawable != null) {
+ mCurrDrawable.jumpToCurrentState();
+ mCurrDrawable.setAlpha(mAlpha);
+ }
+ if (mExitAnimationEnd != 0) {
+ mExitAnimationEnd = 0;
+ changed = true;
+ }
+ if (mEnterAnimationEnd != 0) {
+ mEnterAnimationEnd = 0;
+ changed = true;
+ }
+ if (changed) {
+ invalidateSelf();
+ }
+ }
+
+ @Override
+ public Drawable mutate() {
+ if (!mMutated && super.mutate() == this) {
+ final int N = mDrawableContainerState.getChildCount();
+ final Drawable[] drawables = mDrawableContainerState.getChildren();
+ for (int i = 0; i < N; i++) {
+ if (drawables[i] != null) {
+ drawables[i].mutate();
+ }
+ }
+ mMutated = true;
+ }
+ return this;
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ if (mLastDrawable != null) {
+ mLastDrawable.setBounds(bounds);
+ }
+ if (mCurrDrawable != null) {
+ mCurrDrawable.setBounds(bounds);
+ }
+ }
+
+ @Override
+ protected boolean onLevelChange(int level) {
+ if (mLastDrawable != null) {
+ return mLastDrawable.setLevel(level);
+ }
+ if (mCurrDrawable != null) {
+ return mCurrDrawable.setLevel(level);
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean onStateChange(int[] state) {
+ if (mLastDrawable != null) {
+ return mLastDrawable.setState(state);
+ }
+ if (mCurrDrawable != null) {
+ return mCurrDrawable.setState(state);
+ }
+ return false;
+ }
+
+ @Override
+ public void scheduleDrawable(Drawable who, Runnable what, long when) {
+ if (who == mCurrDrawable && getCallback() != null) {
+ getCallback().scheduleDrawable(this, what, when);
+ }
+ }
+
+ public boolean selectDrawable(int idx) {
+ if (idx == mCurIndex) {
+ return false;
+ }
+ final long now = SystemClock.uptimeMillis();
+ if (mDrawableContainerState.mExitFadeDuration > 0) {
+ if (mLastDrawable != null) {
+ mLastDrawable.setVisible(false, false);
+ }
+ if (mCurrDrawable != null) {
+ mLastDrawable = mCurrDrawable;
+ mExitAnimationEnd = now + mDrawableContainerState.mExitFadeDuration;
+ } else {
+ mLastDrawable = null;
+ mExitAnimationEnd = 0;
+ }
+ } else if (mCurrDrawable != null) {
+ mCurrDrawable.setVisible(false, false);
+ }
+
+ if (idx >= 0 && idx < mDrawableContainerState.mNumChildren) {
+ Drawable d = mDrawableContainerState.mDrawables[idx];
+ mCurrDrawable = d;
+ mCurIndex = idx;
+ if (d != null) {
+ if (mDrawableContainerState.mEnterFadeDuration > 0) {
+ mEnterAnimationEnd = now + mDrawableContainerState.mEnterFadeDuration;
+ } else {
+ d.setAlpha(mAlpha);
+ }
+ d.setVisible(isVisible(), true);
+ d.setDither(mDrawableContainerState.mDither);
+ d.setColorFilter(mColorFilter);
+ d.setState(getState());
+ d.setLevel(getLevel());
+ d.setBounds(getBounds());
+ }
+ } else {
+ mCurrDrawable = null;
+ mCurIndex = -1;
+ }
+
+ if (mEnterAnimationEnd != 0 || mExitAnimationEnd != 0) {
+ if (mAnimationRunnable == null) {
+ mAnimationRunnable = new Runnable() {
+ @Override
+ public void run() {
+ animate(true);
+ invalidateSelf();
+ }
+ };
+ } else {
+ unscheduleSelf(mAnimationRunnable);
+ }
+ animate(true);
+ }
+
+ invalidateSelf();
+
+ return true;
+ }
+
+ /**
+ * TODO
+ *
+ * @Override public Insets getLayoutInsets() { return (mCurrDrawable ==
+ * null) ? Insets.NONE : mCurrDrawable.getLayoutInsets(); }
+ */
+
+ @Override
+ public void setAlpha(int alpha) {
+ if (mAlpha != alpha) {
+ mAlpha = alpha;
+ if (mCurrDrawable != null) {
+ if (mEnterAnimationEnd == 0) {
+ mCurrDrawable.setAlpha(alpha);
+ } else {
+ animate(false);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ if (mColorFilter != cf) {
+ mColorFilter = cf;
+ if (mCurrDrawable != null) {
+ mCurrDrawable.setColorFilter(cf);
+ }
+ }
+ }
+
+ protected void setConstantState(DrawableContainerState state)
+ {
+ mDrawableContainerState = state;
+ }
+
+ @Override
+ public void setDither(boolean dither) {
+ if (mDrawableContainerState.mDither != dither) {
+ mDrawableContainerState.mDither = dither;
+ if (mCurrDrawable != null) {
+ mCurrDrawable.setDither(mDrawableContainerState.mDither);
+ }
+ }
+ }
+
+ public void setEnterFadeDuration(int ms) {
+ mDrawableContainerState.mEnterFadeDuration = ms;
+ }
+
+ public void setExitFadeDuration(int ms) {
+ mDrawableContainerState.mExitFadeDuration = ms;
+ }
+
+ @Override
+ public boolean setVisible(boolean visible, boolean restart) {
+ boolean changed = super.setVisible(visible, restart);
+ if (mLastDrawable != null) {
+ mLastDrawable.setVisible(visible, restart);
+ }
+ if (mCurrDrawable != null) {
+ mCurrDrawable.setVisible(visible, restart);
+ }
+ return changed;
+ }
+
+ @Override
+ public void unscheduleDrawable(Drawable who, Runnable what) {
+ if (who == mCurrDrawable && getCallback() != null) {
+ getCallback().unscheduleDrawable(this, what);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/LayerDrawable.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/LayerDrawable.java
new file mode 100644
index 0000000000..c663f2feb6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/LayerDrawable.java
@@ -0,0 +1,584 @@
+
+package org.holoeverywhere.drawable;
+
+import java.io.IOException;
+
+import org.holoeverywhere.R;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.util.AttributeSet;
+import android.view.View;
+
+public class LayerDrawable extends Drawable implements Drawable.Callback {
+ static class ChildDrawable {
+ public Drawable mDrawable;
+ public int mId;
+ public int mInsetL, mInsetT, mInsetR, mInsetB;
+ }
+
+ static class LayerState extends ConstantState {
+ private boolean mCanConstantState;
+ int mChangingConfigurations;
+ private boolean mCheckedConstantState;
+ ChildDrawable[] mChildren;
+ int mChildrenChangingConfigurations;
+ private boolean mHaveOpacity = false;
+ private boolean mHaveStateful = false;
+ int mNum;
+ private int mOpacity;
+ private boolean mStateful;
+
+ LayerState(LayerState orig, LayerDrawable owner, Resources res) {
+ if (orig != null) {
+ final ChildDrawable[] origChildDrawable = orig.mChildren;
+ final int N = orig.mNum;
+ mNum = N;
+ mChildren = new ChildDrawable[N];
+ mChangingConfigurations = orig.mChangingConfigurations;
+ mChildrenChangingConfigurations = orig.mChildrenChangingConfigurations;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = mChildren[i] = new ChildDrawable();
+ final ChildDrawable or = origChildDrawable[i];
+ if (res != null) {
+ r.mDrawable = or.mDrawable.getConstantState().newDrawable(res);
+ } else {
+ r.mDrawable = or.mDrawable.getConstantState().newDrawable();
+ }
+ r.mDrawable.setCallback(owner);
+ r.mInsetL = or.mInsetL;
+ r.mInsetT = or.mInsetT;
+ r.mInsetR = or.mInsetR;
+ r.mInsetB = or.mInsetB;
+ r.mId = or.mId;
+ }
+ mHaveOpacity = orig.mHaveOpacity;
+ mOpacity = orig.mOpacity;
+ mHaveStateful = orig.mHaveStateful;
+ mStateful = orig.mStateful;
+ mCheckedConstantState = mCanConstantState = true;
+ } else {
+ mNum = 0;
+ mChildren = null;
+ }
+ }
+
+ public boolean canConstantState() {
+ if (!mCheckedConstantState && mChildren != null) {
+ mCanConstantState = true;
+ final int N = mNum;
+ for (int i = 0; i < N; i++) {
+ if (mChildren[i].mDrawable.getConstantState() == null) {
+ mCanConstantState = false;
+ break;
+ }
+ }
+ mCheckedConstantState = true;
+ }
+ return mCanConstantState;
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return mChangingConfigurations;
+ }
+
+ public final int getOpacity() {
+ if (mHaveOpacity) {
+ return mOpacity;
+ }
+ final int N = mNum;
+ int op = N > 0 ? mChildren[0].mDrawable.getOpacity() : PixelFormat.TRANSPARENT;
+ for (int i = 1; i < N; i++) {
+ op = Drawable.resolveOpacity(op, mChildren[i].mDrawable.getOpacity());
+ }
+ mOpacity = op;
+ mHaveOpacity = true;
+ return op;
+ }
+
+ public final boolean isStateful() {
+ if (mHaveStateful) {
+ return mStateful;
+ }
+ boolean stateful = false;
+ final int N = mNum;
+ for (int i = 0; i < N; i++) {
+ if (mChildren[i].mDrawable.isStateful()) {
+ stateful = true;
+ break;
+ }
+ }
+ mStateful = stateful;
+ mHaveStateful = true;
+ return stateful;
+ }
+
+ @Override
+ public Drawable newDrawable() {
+ return new LayerDrawable(this, null);
+ }
+
+ @Override
+ public Drawable newDrawable(Resources res) {
+ return new LayerDrawable(this, res);
+ }
+ }
+
+ LayerState mLayerState;
+ private boolean mMutated;
+ private int mOpacityOverride = PixelFormat.UNKNOWN;
+ private int[] mPaddingB;
+ private int[] mPaddingL;
+ private int[] mPaddingR;
+
+ private int[] mPaddingT;
+
+ private final Rect mTmpRect = new Rect();
+
+ LayerDrawable() {
+ this((LayerState) null, null);
+ }
+
+ public LayerDrawable(Drawable[] layers) {
+ this(layers, null);
+ }
+
+ LayerDrawable(Drawable[] layers, LayerState state) {
+ this(state, null);
+ int length = layers.length;
+ ChildDrawable[] r = new ChildDrawable[length];
+
+ for (int i = 0; i < length; i++) {
+ r[i] = new ChildDrawable();
+ r[i].mDrawable = layers[i];
+ layers[i].setCallback(this);
+ mLayerState.mChildrenChangingConfigurations |= layers[i].getChangingConfigurations();
+ }
+ mLayerState.mNum = length;
+ mLayerState.mChildren = r;
+
+ ensurePadding();
+ }
+
+ LayerDrawable(LayerState state, Resources res) {
+ LayerState as = createConstantState(state, res);
+ mLayerState = as;
+ if (as.mNum > 0) {
+ ensurePadding();
+ }
+ }
+
+ private void addLayer(Drawable layer, int id, int left, int top, int right, int bottom) {
+ final LayerState st = mLayerState;
+ int N = st.mChildren != null ? st.mChildren.length : 0;
+ int i = st.mNum;
+ if (i >= N) {
+ ChildDrawable[] nu = new ChildDrawable[N + 10];
+ if (i > 0) {
+ System.arraycopy(st.mChildren, 0, nu, 0, i);
+ }
+ st.mChildren = nu;
+ }
+ mLayerState.mChildrenChangingConfigurations |= layer.getChangingConfigurations();
+ ChildDrawable childDrawable = new ChildDrawable();
+ st.mChildren[i] = childDrawable;
+ childDrawable.mId = id;
+ childDrawable.mDrawable = layer;
+ childDrawable.mInsetL = left;
+ childDrawable.mInsetT = top;
+ childDrawable.mInsetR = right;
+ childDrawable.mInsetB = bottom;
+ st.mNum++;
+ layer.setCallback(this);
+ }
+
+ LayerState createConstantState(LayerState state, Resources res) {
+ return new LayerState(state, this, res);
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.draw(canvas);
+ }
+ }
+
+ private void ensurePadding() {
+ final int N = mLayerState.mNum;
+ if (mPaddingL != null && mPaddingL.length >= N) {
+ return;
+ }
+ mPaddingL = new int[N];
+ mPaddingT = new int[N];
+ mPaddingR = new int[N];
+ mPaddingB = new int[N];
+ }
+
+ public Drawable findDrawableByLayerId(int id) {
+ final ChildDrawable[] layers = mLayerState.mChildren;
+ for (int i = mLayerState.mNum - 1; i >= 0; i--) {
+ if (layers[i].mId == id) {
+ return layers[i].mDrawable;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public Callback getCallback() {
+ if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
+ return super.getCallback();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return super.getChangingConfigurations()
+ | mLayerState.mChangingConfigurations
+ | mLayerState.mChildrenChangingConfigurations;
+ }
+
+ @Override
+ public ConstantState getConstantState() {
+ if (mLayerState.canConstantState()) {
+ mLayerState.mChangingConfigurations = getChangingConfigurations();
+ return mLayerState;
+ }
+ return null;
+ }
+
+ public Drawable getDrawable(int index) {
+ return mLayerState.mChildren[index].mDrawable;
+ }
+
+ public int getId(int index) {
+ return mLayerState.mChildren[index].mId;
+ }
+
+ @Override
+ public int getIntrinsicHeight() {
+ int height = -1;
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ int padT = 0, padB = 0;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = array[i];
+ int h = r.mDrawable.getIntrinsicHeight() + r.mInsetT + r.mInsetB + +padT + padB;
+ if (h > height) {
+ height = h;
+ }
+ padT += mPaddingT[i];
+ padB += mPaddingB[i];
+ }
+ return height;
+ }
+
+ @Override
+ public int getIntrinsicWidth() {
+ int width = -1;
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ int padL = 0, padR = 0;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = array[i];
+ int w = r.mDrawable.getIntrinsicWidth()
+ + r.mInsetL + r.mInsetR + padL + padR;
+ if (w > width) {
+ width = w;
+ }
+ padL += mPaddingL[i];
+ padR += mPaddingR[i];
+ }
+ return width;
+ }
+
+ public int getNumberOfLayers() {
+ return mLayerState.mNum;
+ }
+
+ @Override
+ public int getOpacity() {
+ if (mOpacityOverride != PixelFormat.UNKNOWN) {
+ return mOpacityOverride;
+ }
+ return mLayerState.getOpacity();
+ }
+
+ @Override
+ public boolean getPadding(Rect padding) {
+ padding.left = 0;
+ padding.top = 0;
+ padding.right = 0;
+ padding.bottom = 0;
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ reapplyPadding(i, array[i]);
+ padding.left += mPaddingL[i];
+ padding.top += mPaddingT[i];
+ padding.right += mPaddingR[i];
+ padding.bottom += mPaddingB[i];
+ }
+ return true;
+ }
+
+ @Override
+ public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ super.inflate(r, parser, attrs);
+ int type;
+ TypedArray a = r.obtainAttributes(attrs, R.styleable.LayerDrawable);
+ mOpacityOverride = a.getInt(R.styleable.LayerDrawable_android_opacity,
+ PixelFormat.UNKNOWN);
+ a.recycle();
+ final int innerDepth = parser.getDepth() + 1;
+ int depth;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && ((depth = parser.getDepth()) >= innerDepth || type != XmlPullParser.END_TAG)) {
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+ if (depth > innerDepth || !parser.getName().equals("item")) {
+ continue;
+ }
+ a = r.obtainAttributes(attrs, R.styleable.LayerDrawableItem);
+ int left = a.getDimensionPixelOffset(R.styleable.LayerDrawableItem_android_left, 0);
+ int top = a.getDimensionPixelOffset(R.styleable.LayerDrawableItem_android_top, 0);
+ int right = a.getDimensionPixelOffset(R.styleable.LayerDrawableItem_android_right, 0);
+ int bottom = a.getDimensionPixelOffset(R.styleable.LayerDrawableItem_android_bottom, 0);
+ int drawableRes = a.getResourceId(R.styleable.LayerDrawableItem_android_drawable, 0);
+ int id = a.getResourceId(R.styleable.LayerDrawableItem_android_id, View.NO_ID);
+ a.recycle();
+ Drawable dr;
+ if (drawableRes != 0) {
+ dr = DrawableCompat.getDrawable(r, drawableRes);
+ } else {
+ while ((type = parser.next()) == XmlPullParser.TEXT) {
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new XmlPullParserException(parser.getPositionDescription()
+ + ": <item> tag requires a 'drawable' attribute or "
+ + "child tag defining a drawable");
+ }
+ dr = DrawableCompat.createFromXmlInner(r, parser, attrs);
+ }
+ addLayer(dr, id, left, top, right, bottom);
+ }
+ ensurePadding();
+ onStateChange(getState());
+ }
+
+ @Override
+ public void invalidateDrawable(Drawable who) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.invalidateDrawable(this);
+ }
+ }
+
+ @Override
+ public boolean isStateful() {
+ return mLayerState.isStateful();
+ }
+
+ @Override
+ public Drawable mutate() {
+ if (!mMutated && super.mutate() == this) {
+ if (!mLayerState.canConstantState()) {
+ throw new IllegalStateException("One or more children of this LayerDrawable does " +
+ "not have constant state; this drawable cannot be mutated.");
+ }
+ mLayerState = new LayerState(mLayerState, this, null);
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.mutate();
+ }
+ mMutated = true;
+ }
+ return this;
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ int padL = 0, padT = 0, padR = 0, padB = 0;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = array[i];
+ r.mDrawable.setBounds(bounds.left + r.mInsetL + padL,
+ bounds.top + r.mInsetT + padT,
+ bounds.right - r.mInsetR - padR,
+ bounds.bottom - r.mInsetB - padB);
+ padL += mPaddingL[i];
+ padR += mPaddingR[i];
+ padT += mPaddingT[i];
+ padB += mPaddingB[i];
+ }
+ }
+
+ @Override
+ protected boolean onLevelChange(int level) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ boolean paddingChanged = false;
+ boolean changed = false;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = array[i];
+ if (r.mDrawable.setLevel(level)) {
+ changed = true;
+ }
+ if (reapplyPadding(i, r)) {
+ paddingChanged = true;
+ }
+ }
+ if (paddingChanged) {
+ onBoundsChange(getBounds());
+ }
+ return changed;
+ }
+
+ @Override
+ protected boolean onStateChange(int[] state) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ boolean paddingChanged = false;
+ boolean changed = false;
+ for (int i = 0; i < N; i++) {
+ final ChildDrawable r = array[i];
+ if (r.mDrawable.setState(state)) {
+ changed = true;
+ }
+ if (reapplyPadding(i, r)) {
+ paddingChanged = true;
+ }
+ }
+ if (paddingChanged) {
+ onBoundsChange(getBounds());
+ }
+ if (changed) {
+ invalidateSelf();
+ }
+ return changed;
+ }
+
+ private boolean reapplyPadding(int i, ChildDrawable r) {
+ final Rect rect = mTmpRect;
+ r.mDrawable.getPadding(rect);
+ if (rect.left != mPaddingL[i] || rect.top != mPaddingT[i] ||
+ rect.right != mPaddingR[i] || rect.bottom != mPaddingB[i]) {
+ mPaddingL[i] = rect.left;
+ mPaddingT[i] = rect.top;
+ mPaddingR[i] = rect.right;
+ mPaddingB[i] = rect.bottom;
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void scheduleDrawable(Drawable who, Runnable what, long when) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.scheduleDrawable(this, what, when);
+ }
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.setAlpha(alpha);
+ }
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.setColorFilter(cf);
+ }
+ }
+
+ @Override
+ public void setDither(boolean dither) {
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.setDither(dither);
+ }
+ }
+
+ public boolean setDrawableByLayerId(int id, Drawable drawable) {
+ final ChildDrawable[] layers = mLayerState.mChildren;
+ for (int i = mLayerState.mNum - 1; i >= 0; i--) {
+ if (layers[i].mId == id) {
+ if (layers[i].mDrawable != null) {
+ if (drawable != null) {
+ Rect bounds = layers[i].mDrawable.getBounds();
+ drawable.setBounds(bounds);
+ }
+ layers[i].mDrawable.setCallback(null);
+ }
+ if (drawable != null) {
+ drawable.setCallback(this);
+ }
+ layers[i].mDrawable = drawable;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public void setId(int index, int id) {
+ mLayerState.mChildren[index].mId = id;
+ }
+
+ public void setLayerInset(int index, int l, int t, int r, int b) {
+ ChildDrawable childDrawable = mLayerState.mChildren[index];
+ childDrawable.mInsetL = l;
+ childDrawable.mInsetT = t;
+ childDrawable.mInsetR = r;
+ childDrawable.mInsetB = b;
+ }
+
+ public void setOpacity(int opacity) {
+ mOpacityOverride = opacity;
+ }
+
+ @Override
+ public boolean setVisible(boolean visible, boolean restart) {
+ boolean changed = super.setVisible(visible, restart);
+ final ChildDrawable[] array = mLayerState.mChildren;
+ final int N = mLayerState.mNum;
+ for (int i = 0; i < N; i++) {
+ array[i].mDrawable.setVisible(visible, restart);
+ }
+ return changed;
+ }
+
+ @Override
+ public void unscheduleDrawable(Drawable who, Runnable what) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.unscheduleDrawable(this, what);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/RotateDrawable.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/RotateDrawable.java
new file mode 100644
index 0000000000..9c7ae86411
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/RotateDrawable.java
@@ -0,0 +1,300 @@
+
+package org.holoeverywhere.drawable;
+
+import java.io.IOException;
+
+import org.holoeverywhere.R;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.TypedValue;
+
+public class RotateDrawable extends Drawable implements Drawable.Callback {
+ /**
+ * <p>
+ * Represents the state of a rotation for a given drawable. The same rotate
+ * drawable can be invoked with different states to drive several rotations
+ * at the same time.
+ * </p>
+ */
+ final static class RotateState extends Drawable.ConstantState {
+ private boolean mCanConstantState;
+
+ int mChangingConfigurations;
+
+ private boolean mCheckedConstantState;
+ float mCurrentDegrees;
+ Drawable mDrawable;
+ float mFromDegrees;
+
+ float mPivotX;
+ boolean mPivotXRel;
+
+ float mPivotY;
+
+ boolean mPivotYRel;
+ float mToDegrees;
+
+ public RotateState(RotateState source, RotateDrawable owner, Resources res) {
+ if (source != null) {
+ if (res != null) {
+ mDrawable = source.mDrawable.getConstantState().newDrawable(res);
+ } else {
+ mDrawable = source.mDrawable.getConstantState().newDrawable();
+ }
+ mDrawable.setCallback(owner);
+ mPivotXRel = source.mPivotXRel;
+ mPivotX = source.mPivotX;
+ mPivotYRel = source.mPivotYRel;
+ mPivotY = source.mPivotY;
+ mFromDegrees = mCurrentDegrees = source.mFromDegrees;
+ mToDegrees = source.mToDegrees;
+ mCanConstantState = mCheckedConstantState = true;
+ }
+ }
+
+ public boolean canConstantState() {
+ if (!mCheckedConstantState) {
+ mCanConstantState = mDrawable.getConstantState() != null;
+ mCheckedConstantState = true;
+ }
+
+ return mCanConstantState;
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return mChangingConfigurations;
+ }
+
+ @Override
+ public Drawable newDrawable() {
+ return new RotateDrawable(this, null);
+ }
+
+ @Override
+ public Drawable newDrawable(Resources res) {
+ return new RotateDrawable(this, res);
+ }
+ }
+
+ private static final float MAX_LEVEL = 10000.0f;
+ private boolean mMutated;
+
+ private RotateState mState;
+
+ public RotateDrawable() {
+ this(null, null);
+ }
+
+ private RotateDrawable(RotateState rotateState, Resources res) {
+ mState = new RotateState(rotateState, this, res);
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ int saveCount = canvas.save();
+ Rect bounds = mState.mDrawable.getBounds();
+ int w = bounds.right - bounds.left;
+ int h = bounds.bottom - bounds.top;
+ final RotateState st = mState;
+ float px = st.mPivotXRel ? w * st.mPivotX : st.mPivotX;
+ float py = st.mPivotYRel ? h * st.mPivotY : st.mPivotY;
+ canvas.rotate(st.mCurrentDegrees, px + bounds.left, py + bounds.top);
+ st.mDrawable.draw(canvas);
+ canvas.restoreToCount(saveCount);
+ }
+
+ @Override
+ public int getChangingConfigurations() {
+ return super.getChangingConfigurations()
+ | mState.mChangingConfigurations
+ | mState.mDrawable.getChangingConfigurations();
+ }
+
+ @Override
+ public ConstantState getConstantState() {
+ if (mState.canConstantState()) {
+ mState.mChangingConfigurations = getChangingConfigurations();
+ return mState;
+ }
+ return null;
+ }
+
+ public Drawable getDrawable() {
+ return mState.mDrawable;
+ }
+
+ @Override
+ public int getIntrinsicHeight() {
+ return mState.mDrawable.getIntrinsicHeight();
+ }
+
+ @Override
+ public int getIntrinsicWidth() {
+ return mState.mDrawable.getIntrinsicWidth();
+ }
+
+ @Override
+ public int getOpacity() {
+ return mState.mDrawable.getOpacity();
+ }
+
+ @Override
+ public boolean getPadding(Rect padding) {
+ return mState.mDrawable.getPadding(padding);
+ }
+
+ @Override
+ public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ super.inflate(r, parser, attrs);
+ TypedArray a = r.obtainAttributes(attrs,
+ R.styleable.RotateDrawable);
+ super.setVisible(a.getBoolean(R.styleable.RotateDrawable_android_visible, true), false);
+ TypedValue tv = a.peekValue(R.styleable.RotateDrawable_android_pivotX);
+ boolean pivotXRel;
+ float pivotX;
+ if (tv == null) {
+ pivotXRel = true;
+ pivotX = 0.5f;
+ } else {
+ pivotXRel = tv.type == TypedValue.TYPE_FRACTION;
+ pivotX = pivotXRel ? tv.getFraction(1.0f, 1.0f) : tv.getFloat();
+ }
+ tv = a.peekValue(R.styleable.RotateDrawable_android_pivotY);
+ boolean pivotYRel;
+ float pivotY;
+ if (tv == null) {
+ pivotYRel = true;
+ pivotY = 0.5f;
+ } else {
+ pivotYRel = tv.type == TypedValue.TYPE_FRACTION;
+ pivotY = pivotYRel ? tv.getFraction(1.0f, 1.0f) : tv.getFloat();
+ }
+ float fromDegrees = a.getFloat(R.styleable.RotateDrawable_android_fromDegrees, 0.0f);
+ float toDegrees = a.getFloat(R.styleable.RotateDrawable_android_toDegrees, 360.0f);
+ int res = a.getResourceId(R.styleable.RotateDrawable_android_drawable, 0);
+ Drawable drawable = null;
+ if (res > 0) {
+ drawable = r.getDrawable(res);
+ }
+ a.recycle();
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT &&
+ (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+
+ if ((drawable = Drawable.createFromXmlInner(r, parser, attrs)) == null) {
+ Log.w("drawable", "Bad element under <rotate>: "
+ + parser.getName());
+ }
+ }
+
+ if (drawable == null) {
+ Log.w("drawable", "No drawable specified for <rotate>");
+ }
+
+ mState.mDrawable = drawable;
+ mState.mPivotXRel = pivotXRel;
+ mState.mPivotX = pivotX;
+ mState.mPivotYRel = pivotYRel;
+ mState.mPivotY = pivotY;
+ mState.mFromDegrees = mState.mCurrentDegrees = fromDegrees;
+ mState.mToDegrees = toDegrees;
+
+ if (drawable != null) {
+ drawable.setCallback(this);
+ }
+ }
+
+ @Override
+ public void invalidateDrawable(Drawable who) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.invalidateDrawable(this);
+ }
+ }
+
+ @Override
+ public boolean isStateful() {
+ return mState.mDrawable.isStateful();
+ }
+
+ @Override
+ public Drawable mutate() {
+ if (!mMutated && super.mutate() == this) {
+ mState.mDrawable.mutate();
+ mMutated = true;
+ }
+ return this;
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ mState.mDrawable.setBounds(bounds.left, bounds.top,
+ bounds.right, bounds.bottom);
+ }
+
+ @Override
+ protected boolean onLevelChange(int level) {
+ mState.mDrawable.setLevel(level);
+ onBoundsChange(getBounds());
+ mState.mCurrentDegrees = mState.mFromDegrees +
+ (mState.mToDegrees - mState.mFromDegrees) *
+ (level / MAX_LEVEL);
+ invalidateSelf();
+ return true;
+ }
+
+ @Override
+ protected boolean onStateChange(int[] state) {
+ boolean changed = mState.mDrawable.setState(state);
+ onBoundsChange(getBounds());
+ return changed;
+ }
+
+ @Override
+ public void scheduleDrawable(Drawable who, Runnable what, long when) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.scheduleDrawable(this, what, when);
+ }
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ mState.mDrawable.setAlpha(alpha);
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ mState.mDrawable.setColorFilter(cf);
+ }
+
+ @Override
+ public boolean setVisible(boolean visible, boolean restart) {
+ mState.mDrawable.setVisible(visible, restart);
+ return super.setVisible(visible, restart);
+ }
+
+ @Override
+ public void unscheduleDrawable(Drawable who, Runnable what) {
+ final Callback callback = getCallback();
+ if (callback != null) {
+ callback.unscheduleDrawable(this, what);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/StateListDrawable.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/StateListDrawable.java
new file mode 100644
index 0000000000..e584fafa3d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/drawable/StateListDrawable.java
@@ -0,0 +1,236 @@
+
+package org.holoeverywhere.drawable;
+
+import java.io.IOException;
+
+import org.holoeverywhere.R;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.StateSet;
+
+public class StateListDrawable extends DrawableContainer {
+ static final class StateListState extends DrawableContainerState {
+ int[][] mStateSets;
+
+ StateListState(StateListState orig, StateListDrawable owner, Resources res) {
+ super(orig, owner, res);
+
+ if (orig != null) {
+ mStateSets = orig.mStateSets;
+ } else {
+ mStateSets = new int[getChildren().length][];
+ }
+ }
+
+ int addStateSet(int[] stateSet, Drawable drawable) {
+ final int pos = addChild(drawable);
+ mStateSets[pos] = stateSet;
+ return pos;
+ }
+
+ @Override
+ public void growArray(int oldSize, int newSize) {
+ super.growArray(oldSize, newSize);
+ final int[][] newStateSets = new int[newSize][];
+ System.arraycopy(mStateSets, 0, newStateSets, 0, oldSize);
+ mStateSets = newStateSets;
+ }
+
+ private int indexOfStateSet(int[] stateSet) {
+ final int[][] stateSets = mStateSets;
+ final int N = getChildCount();
+ for (int i = 0; i < N; i++) {
+ if (StateSet.stateSetMatches(stateSets[i], stateSet)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ @Override
+ public Drawable newDrawable() {
+ return new StateListDrawable(this, null);
+ }
+
+ @Override
+ public Drawable newDrawable(Resources res) {
+ return new StateListDrawable(this, res);
+ }
+ }
+
+ private static final boolean DEFAULT_DITHER = true;
+ private boolean mMutated;
+ private final StateListState mStateListState;
+
+ public StateListDrawable() {
+ this(null, null);
+ }
+
+ private StateListDrawable(StateListState state, Resources res) {
+ StateListState as = new StateListState(state, this, res);
+ mStateListState = as;
+ setConstantState(as);
+ onStateChange(getState());
+ }
+
+ public void addState(int[] stateSet, Drawable drawable) {
+ if (drawable != null) {
+ mStateListState.addStateSet(stateSet, drawable);
+ // in case the new state matches our current state...
+ onStateChange(getState());
+ }
+ }
+
+ /**
+ * Gets the number of states contained in this drawable.
+ *
+ * @return The number of states contained in this drawable.
+ * @hide pending API council
+ * @see #getStateSet(int)
+ * @see #getStateDrawable(int)
+ */
+ public int getStateCount() {
+ return mStateListState.getChildCount();
+ }
+
+ /**
+ * Gets the drawable at an index.
+ *
+ * @param index The index of the drawable.
+ * @return The drawable at the index.
+ * @hide pending API council
+ * @see #getStateCount()
+ * @see #getStateSet(int)
+ */
+ public Drawable getStateDrawable(int index) {
+ return mStateListState.getChildren()[index];
+ }
+
+ /**
+ * Gets the index of the drawable with the provided state set.
+ *
+ * @param stateSet the state set to look up
+ * @return the index of the provided state set, or -1 if not found
+ * @hide pending API council
+ * @see #getStateDrawable(int)
+ * @see #getStateSet(int)
+ */
+ public int getStateDrawableIndex(int[] stateSet) {
+ return mStateListState.indexOfStateSet(stateSet);
+ }
+
+ StateListState getStateListState() {
+ return mStateListState;
+ }
+
+ /**
+ * Gets the state set at an index.
+ *
+ * @param index The index of the state set.
+ * @return The state set at the index.
+ * @hide pending API council
+ * @see #getStateCount()
+ * @see #getStateDrawable(int)
+ */
+ public int[] getStateSet(int index) {
+ return mStateListState.mStateSets[index];
+ }
+
+ @Override
+ public void inflate(Resources r, XmlPullParser parser,
+ AttributeSet attrs)
+ throws XmlPullParserException, IOException {
+ TypedArray a = r.obtainAttributes(attrs,
+ R.styleable.StateListDrawable);
+ super.setVisible(a.getBoolean(R.styleable.StateListDrawable_android_visible, true), false);
+ mStateListState.setVariablePadding(a.getBoolean(
+ R.styleable.StateListDrawable_android_variablePadding, false));
+ mStateListState.setConstantSize(a.getBoolean(
+ R.styleable.StateListDrawable_android_constantSize, false));
+ mStateListState.setEnterFadeDuration(a.getInt(
+ R.styleable.StateListDrawable_android_enterFadeDuration, 0));
+ mStateListState.setExitFadeDuration(a.getInt(
+ R.styleable.StateListDrawable_android_exitFadeDuration, 0));
+ setDither(a.getBoolean(R.styleable.StateListDrawable_android_dither, DEFAULT_DITHER));
+ a.recycle();
+ int type;
+ final int innerDepth = parser.getDepth() + 1;
+ int depth;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && ((depth = parser.getDepth()) >= innerDepth
+ || type != XmlPullParser.END_TAG)) {
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+ if (depth > innerDepth || !parser.getName().equals("item")) {
+ continue;
+ }
+ int drawableRes = 0;
+ int i;
+ int j = 0;
+ final int numAttrs = attrs.getAttributeCount();
+ int[] states = new int[numAttrs];
+ for (i = 0; i < numAttrs; i++) {
+ final int stateResId = attrs.getAttributeNameResource(i);
+ if (stateResId == 0) {
+ break;
+ }
+ if (stateResId == android.R.attr.drawable) {
+ drawableRes = attrs.getAttributeResourceValue(i, 0);
+ } else {
+ states[j++] = attrs.getAttributeBooleanValue(i, false)
+ ? stateResId
+ : -stateResId;
+ }
+ }
+ states = StateSet.trimStateSet(states, j);
+ Drawable dr;
+ if (drawableRes != 0) {
+ dr = DrawableCompat.getDrawable(r, drawableRes);
+ } else {
+ while ((type = parser.next()) == XmlPullParser.TEXT) {
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new XmlPullParserException(
+ parser.getPositionDescription()
+ + ": <item> tag requires a 'drawable' attribute or "
+ + "child tag defining a drawable");
+ }
+ dr = DrawableCompat.createFromXmlInner(r, parser, attrs);
+ }
+ mStateListState.addStateSet(states, dr);
+ }
+ onStateChange(getState());
+ }
+
+ @Override
+ public boolean isStateful() {
+ return true;
+ }
+
+ @Override
+ public Drawable mutate() {
+ if (!mMutated && super.mutate() == this) {
+ mStateListState.mStateSets = mStateListState.mStateSets.clone();
+ mMutated = true;
+ }
+ return this;
+ }
+
+ @Override
+ protected boolean onStateChange(int[] stateSet) {
+ int idx = mStateListState.indexOfStateSet(stateSet);
+ if (idx < 0) {
+ idx = mStateListState.indexOfStateSet(StateSet.WILD_CARD);
+ }
+ if (selectDrawable(idx)) {
+ return true;
+ }
+ return super.onStateChange(stateSet);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/AlertController.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/AlertController.java
new file mode 100644
index 0000000000..e17e1d5d4b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/AlertController.java
@@ -0,0 +1,811 @@
+
+package org.holoeverywhere.internal;
+
+import java.lang.ref.WeakReference;
+
+import org.holoeverywhere.ArrayAdapter;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.AlertDialog;
+import org.holoeverywhere.widget.Button;
+import org.holoeverywhere.widget.CheckedTextView;
+import org.holoeverywhere.widget.FrameLayout;
+import org.holoeverywhere.widget.LinearLayout;
+import org.holoeverywhere.widget.ListView;
+import org.holoeverywhere.widget.TextView;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.res.TypedArray;
+import android.database.Cursor;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v4.widget.CursorAdapter;
+import android.support.v4.widget.SimpleCursorAdapter;
+import android.text.TextUtils;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.FrameLayout.LayoutParams;
+import android.widget.ImageView;
+import android.widget.ListAdapter;
+import android.widget.ScrollView;
+
+public class AlertController {
+ public static interface AlertDecorViewInstaller {
+ public void installDecorView(Context context, int layout);
+ }
+
+ public static class AlertParams {
+ public interface OnPrepareListViewListener {
+ void onPrepareListView(ListView listView);
+ }
+
+ public ListAdapter mAdapter;
+ public int mButtonBehavior = AlertDialog.DISMISS_ON_ALL;
+ public boolean mCancelable;
+ public int mCheckedItem = -1;
+ public boolean[] mCheckedItems;
+ public final Context mContext;
+ public Cursor mCursor;
+ public View mCustomTitleView;
+ public boolean mForceInverseBackground;
+ public Drawable mIcon;
+ public int mIconId = 0;
+ public final LayoutInflater mInflater;
+ public String mIsCheckedColumn;
+ public boolean mIsMultiChoice;
+ public boolean mIsSingleChoice;
+ public CharSequence[] mItems;
+ public String mLabelColumn;
+ public CharSequence mMessage;
+ public DialogInterface.OnClickListener mNegativeButtonListener;
+ public CharSequence mNegativeButtonText;
+ public DialogInterface.OnClickListener mNeutralButtonListener;
+ public CharSequence mNeutralButtonText;
+ public DialogInterface.OnCancelListener mOnCancelListener;
+ public DialogInterface.OnMultiChoiceClickListener mOnCheckboxClickListener;
+ public DialogInterface.OnClickListener mOnClickListener;
+ public DialogInterface.OnDismissListener mOnDismissListener;
+ public AdapterView.OnItemSelectedListener mOnItemSelectedListener;
+ public DialogInterface.OnKeyListener mOnKeyListener;
+ public OnPrepareListViewListener mOnPrepareListViewListener;
+ public DialogInterface.OnClickListener mPositiveButtonListener;
+ public CharSequence mPositiveButtonText;
+ public int mTheme;
+ public CharSequence mTitle;
+ public View mView;
+ public int mViewSpacingBottom;
+ public int mViewSpacingLeft;
+ public int mViewSpacingRight;
+ public boolean mViewSpacingSpecified = false;
+ public int mViewSpacingTop;
+
+ public AlertParams(Context context) {
+ this(context, 0);
+ }
+
+ public AlertParams(Context context, int theme) {
+ mContext = context;
+ mTheme = theme;
+ mCancelable = true;
+ mInflater = LayoutInflater.from(context);
+ }
+
+ public void apply(AlertController dialog) {
+ if (mCustomTitleView != null) {
+ dialog.setCustomTitle(mCustomTitleView);
+ } else {
+ if (mTitle != null) {
+ dialog.setTitle(mTitle);
+ }
+ if (mIcon != null) {
+ dialog.setIcon(mIcon);
+ }
+ if (mIconId >= 0) {
+ dialog.setIcon(mIconId);
+ }
+ }
+ if (mMessage != null) {
+ dialog.setMessage(mMessage);
+ }
+ if (mPositiveButtonText != null) {
+ dialog.setButton(DialogInterface.BUTTON_POSITIVE,
+ mPositiveButtonText, mPositiveButtonListener, null);
+ }
+ if (mNegativeButtonText != null) {
+ dialog.setButton(DialogInterface.BUTTON_NEGATIVE,
+ mNegativeButtonText, mNegativeButtonListener, null);
+ }
+ if (mNeutralButtonText != null) {
+ dialog.setButton(DialogInterface.BUTTON_NEUTRAL,
+ mNeutralButtonText, mNeutralButtonListener, null);
+ }
+ dialog.setButtonBehavior(mButtonBehavior);
+ if (mForceInverseBackground) {
+ dialog.setInverseBackgroundForced(true);
+ }
+ if (mItems != null || mCursor != null || mAdapter != null) {
+ createListView(dialog);
+ }
+ if (mView != null) {
+ if (mViewSpacingSpecified) {
+ dialog.setView(mView, mViewSpacingLeft, mViewSpacingTop,
+ mViewSpacingRight, mViewSpacingBottom);
+ } else {
+ dialog.setView(mView);
+ }
+ }
+ }
+
+ private void createListView(final AlertController dialog) {
+ final ListView listView = (ListView) mInflater
+ .inflate(dialog.mListLayout, null);
+ ListAdapter adapter;
+ if (mIsMultiChoice) {
+ if (mCursor == null) {
+ adapter = new ArrayAdapter<CharSequence>(mContext,
+ dialog.mMultiChoiceItemLayout, android.R.id.text1, mItems) {
+ @Override
+ public View getView(int position, View convertView,
+ ViewGroup parent) {
+ View view = super.getView(position, convertView,
+ parent);
+ if (mCheckedItems != null) {
+ boolean isItemChecked = mCheckedItems[position];
+ if (isItemChecked) {
+ listView.setItemChecked(position, true);
+ }
+ }
+ return view;
+ }
+ };
+ } else {
+ adapter = new CursorAdapter(mContext, mCursor, false) {
+ private final int mIsCheckedIndex;
+ private final int mLabelIndex;
+
+ {
+ final Cursor cursor = getCursor();
+ mLabelIndex = cursor
+ .getColumnIndexOrThrow(mLabelColumn);
+ mIsCheckedIndex = cursor
+ .getColumnIndexOrThrow(mIsCheckedColumn);
+ }
+
+ @Override
+ public void bindView(View view, Context context,
+ Cursor cursor) {
+ CheckedTextView text = (CheckedTextView) view
+ .findViewById(android.R.id.text1);
+ text.setText(cursor.getString(mLabelIndex));
+ listView.setItemChecked(cursor.getPosition(),
+ cursor.getInt(mIsCheckedIndex) == 1);
+ }
+
+ @Override
+ public View newView(Context context, Cursor cursor,
+ ViewGroup parent) {
+ return mInflater.inflate(
+ dialog.mMultiChoiceItemLayout, parent,
+ false);
+ }
+
+ };
+ }
+ } else {
+ int layout = mIsSingleChoice ? dialog.mSingleChoiceItemLayout
+ : dialog.mListItemLayout;
+ if (mCursor == null) {
+ adapter = mAdapter != null ? mAdapter
+ : new ArrayAdapter<CharSequence>(mContext, layout,
+ android.R.id.text1, mItems);
+ } else {
+ adapter = new SimpleCursorAdapter(mContext, layout,
+ mCursor, new String[] {
+ mLabelColumn
+ },
+ new int[] {
+ android.R.id.text1
+ },
+ CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
+ }
+ }
+ if (mOnPrepareListViewListener != null) {
+ mOnPrepareListViewListener.onPrepareListView(listView);
+ }
+ dialog.mAdapter = adapter;
+ dialog.mCheckedItem = mCheckedItem;
+ if (mOnClickListener != null) {
+ listView.setOnItemClickListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v,
+ int position, long id) {
+ mOnClickListener.onClick(dialog.mDialogInterface,
+ position);
+ if (!mIsSingleChoice) {
+ dialog.mDialogInterface.dismiss();
+ }
+ }
+ });
+ } else if (mOnCheckboxClickListener != null) {
+ listView.setOnItemClickListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v,
+ int position, long id) {
+ if (mCheckedItems != null) {
+ mCheckedItems[position] = listView
+ .isItemChecked(position);
+ }
+ mOnCheckboxClickListener.onClick(
+ dialog.mDialogInterface, position,
+ listView.isItemChecked(position));
+ }
+ });
+ }
+ if (mOnItemSelectedListener != null) {
+ listView.setOnItemSelectedListener(mOnItemSelectedListener);
+ }
+ if (mIsSingleChoice) {
+ listView.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
+ } else if (mIsMultiChoice) {
+ listView.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
+ }
+ dialog.mListView = listView;
+ }
+ }
+
+ private static final class ButtonHandler extends Handler {
+ private static final int MSG_DISMISS_DIALOG = 1;
+ private WeakReference<DialogInterface> mDialog;
+
+ public ButtonHandler(DialogInterface dialog) {
+ mDialog = new WeakReference<DialogInterface>(dialog);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case DialogInterface.BUTTON_POSITIVE:
+ case DialogInterface.BUTTON_NEGATIVE:
+ case DialogInterface.BUTTON_NEUTRAL:
+ ((DialogInterface.OnClickListener) msg.obj).onClick(
+ mDialog.get(), msg.what);
+ break;
+
+ case MSG_DISMISS_DIALOG:
+ ((DialogInterface) msg.obj).dismiss();
+ }
+ }
+ }
+
+ static boolean canTextInput(View v) {
+ if (v.onCheckIsTextEditor()) {
+ return true;
+ }
+ if (!(v instanceof ViewGroup)) {
+ return false;
+ }
+ ViewGroup vg = (ViewGroup) v;
+ int i = vg.getChildCount();
+ while (i > 0) {
+ i--;
+ v = vg.getChildAt(i);
+ if (AlertController.canTextInput(v)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean shouldCenterSingleButton(Context context) {
+ TypedValue outValue = new TypedValue();
+ context.getTheme().resolveAttribute(R.attr.alertDialogCenterButtons,
+ outValue, true);
+ return outValue.data != 0;
+ }
+
+ private ListAdapter mAdapter;
+ private int mAlertDialogLayout;
+ private int mButtonBehavior = AlertDialog.DISMISS_ON_ALL;
+ private View.OnClickListener mButtonHandler = new View.OnClickListener() {
+ private boolean needToDismiss(int flag) {
+ return (mButtonBehavior & flag) == flag;
+ }
+
+ @Override
+ public void onClick(View v) {
+ int button;
+ if (v == mButtonPositive) {
+ button = DialogInterface.BUTTON_POSITIVE;
+ } else if (v == mButtonNegative) {
+ button = DialogInterface.BUTTON_NEGATIVE;
+ } else if (v == mButtonNeutral) {
+ button = DialogInterface.BUTTON_NEUTRAL;
+ } else {
+ return;
+ }
+ boolean dismiss = false;
+ switch (button) {
+ case DialogInterface.BUTTON_POSITIVE:
+ send(mButtonPositiveMessage);
+ dismiss = needToDismiss(AlertDialog.DISMISS_ON_POSITIVE);
+ break;
+ case DialogInterface.BUTTON_NEGATIVE:
+ send(mButtonNegativeMessage);
+ dismiss = needToDismiss(AlertDialog.DISMISS_ON_NEGATIVE);
+ break;
+ case DialogInterface.BUTTON_NEUTRAL:
+ send(mButtonNeutralMessage);
+ dismiss = needToDismiss(AlertDialog.DISMISS_ON_NEUTRAL);
+ break;
+ }
+ if (dismiss) {
+ mHandler.obtainMessage(ButtonHandler.MSG_DISMISS_DIALOG,
+ mDialogInterface).sendToTarget();
+ }
+ }
+
+ private void send(Message m) {
+ if (m == null) {
+ return;
+ }
+ Message.obtain(m).sendToTarget();
+ }
+ };
+ private Button mButtonNegative;
+ private Message mButtonNegativeMessage;
+ private CharSequence mButtonNegativeText;
+ private Button mButtonNeutral;
+ private Message mButtonNeutralMessage;
+ private CharSequence mButtonNeutralText;
+ private Button mButtonPositive;
+ private Message mButtonPositiveMessage;
+ private CharSequence mButtonPositiveText;
+ private int mCheckedItem = -1;
+ private final Context mContext;
+ private View mCustomTitleView;
+ private final AlertDecorViewInstaller mDecorViewInstaller;
+ private final DialogInterface mDialogInterface;
+ private boolean mForceInverseBackground;
+ private Handler mHandler;
+ private Drawable mIcon;
+ private int mIconId = -1;
+ private ImageView mIconView;
+ private int mListItemLayout;
+ private int mListLayout;
+ private ListView mListView;
+ private CharSequence mMessage;
+ private TextView mMessageView;
+ private int mMultiChoiceItemLayout;
+ private ScrollView mScrollView;
+ private int mSingleChoiceItemLayout;
+ private CharSequence mTitle;
+ private TextView mTitleView;
+ private View mView;
+ private int mViewSpacingBottom;
+ private int mViewSpacingLeft;
+ private int mViewSpacingRight;
+ private boolean mViewSpacingSpecified = false;
+ private int mViewSpacingTop;
+ private final Window mWindow;
+
+ public AlertController(Context context, DialogInterface di, Window window) {
+ this(context, di, window, null);
+ }
+
+ public AlertController(Context context, DialogInterface di, Window window,
+ AlertDecorViewInstaller decorViewInstaller) {
+ mDecorViewInstaller = decorViewInstaller;
+ mContext = context;
+ mDialogInterface = di;
+ mWindow = window;
+ mHandler = new ButtonHandler(di);
+ TypedArray a = context.obtainStyledAttributes(null,
+ R.styleable.AlertDialog, R.attr.alertDialogStyle,
+ R.style.Holo_AlertDialog);
+ mAlertDialogLayout = a.getResourceId(R.styleable.AlertDialog_layout,
+ R.layout.alert_dialog_holo);
+ mListLayout = a.getResourceId(R.styleable.AlertDialog_listLayout,
+ R.layout.select_dialog_holo);
+ mMultiChoiceItemLayout = a.getResourceId(
+ R.styleable.AlertDialog_multiChoiceItemLayout,
+ R.layout.select_dialog_multichoice_holo);
+ mSingleChoiceItemLayout = a.getResourceId(
+ R.styleable.AlertDialog_singleChoiceItemLayout,
+ R.layout.select_dialog_singlechoice_holo);
+ mListItemLayout = a.getResourceId(
+ R.styleable.AlertDialog_listItemLayout,
+ R.layout.select_dialog_item_holo);
+ a.recycle();
+ }
+
+ private void centerButton(Button button) {
+ LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) button
+ .getLayoutParams();
+ params.gravity = Gravity.CENTER_HORIZONTAL;
+ params.weight = 0.5f;
+ button.setLayoutParams(params);
+ View leftSpacer = mWindow.findViewById(R.id.leftSpacer);
+ if (leftSpacer != null) {
+ leftSpacer.setVisibility(View.VISIBLE);
+ }
+ View rightSpacer = mWindow.findViewById(R.id.rightSpacer);
+ if (rightSpacer != null) {
+ rightSpacer.setVisibility(View.VISIBLE);
+ }
+ }
+
+ public Button getButton(int whichButton) {
+ switch (whichButton) {
+ case DialogInterface.BUTTON_POSITIVE:
+ return mButtonPositive;
+ case DialogInterface.BUTTON_NEGATIVE:
+ return mButtonNegative;
+ case DialogInterface.BUTTON_NEUTRAL:
+ return mButtonNeutral;
+ default:
+ return null;
+ }
+ }
+
+ public ListView getListView() {
+ return mListView;
+ }
+
+ public void installContent() {
+ mWindow.requestFeature(Window.FEATURE_NO_TITLE);
+ if (mView == null || !AlertController.canTextInput(mView)) {
+ mWindow.setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+ WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+ }
+ if (mDecorViewInstaller == null) {
+ mWindow.setContentView(LayoutInflater.inflate(mWindow.getContext(),
+ mAlertDialogLayout));
+ } else {
+ mDecorViewInstaller.installDecorView(mContext, mAlertDialogLayout);
+ }
+ setupView();
+ }
+
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ return mScrollView != null && mScrollView.executeKeyEvent(event);
+ }
+
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ return mScrollView != null && mScrollView.executeKeyEvent(event);
+ }
+
+ private void setBackground(LinearLayout topPanel,
+ LinearLayout contentPanel, View customPanel, boolean hasButtons,
+ TypedArray a, boolean hasTitle, View buttonPanel) {
+ int fullDark = a.getResourceId(R.styleable.AlertDialog_fullDark,
+ R.drawable.dialog_full_holo_dark);
+ int topDark = a.getResourceId(R.styleable.AlertDialog_topDark,
+ R.drawable.dialog_top_holo_dark);
+ int centerDark = a.getResourceId(R.styleable.AlertDialog_centerDark,
+ R.drawable.dialog_middle_holo_dark);
+ int bottomDark = a.getResourceId(R.styleable.AlertDialog_bottomDark,
+ R.drawable.dialog_bottom_holo_dark);
+ int fullBright = a.getResourceId(R.styleable.AlertDialog_fullBright,
+ R.drawable.dialog_full_holo_dark);
+ int topBright = a.getResourceId(R.styleable.AlertDialog_topBright,
+ R.drawable.dialog_top_holo_dark);
+ int centerBright = a.getResourceId(
+ R.styleable.AlertDialog_centerBright,
+ R.drawable.dialog_middle_holo_dark);
+ int bottomBright = a.getResourceId(
+ R.styleable.AlertDialog_bottomBright,
+ R.drawable.dialog_bottom_holo_dark);
+ int bottomMedium = a.getResourceId(
+ R.styleable.AlertDialog_bottomMedium,
+ R.drawable.dialog_bottom_holo_dark);
+ View[] views = new View[4];
+ boolean[] light = new boolean[4];
+ View lastView = null;
+ boolean lastLight = false;
+
+ int pos = 0;
+ if (hasTitle) {
+ views[pos] = topPanel;
+ light[pos] = false;
+ pos++;
+ }
+ views[pos] = contentPanel.getVisibility() == View.GONE ? null
+ : contentPanel;
+ light[pos] = mListView != null;
+ pos++;
+ if (customPanel != null) {
+ views[pos] = customPanel;
+ light[pos] = mForceInverseBackground;
+ pos++;
+ }
+ if (hasButtons) {
+ views[pos] = buttonPanel;
+ light[pos] = true;
+ }
+ boolean setView = false;
+ for (pos = 0; pos < views.length; pos++) {
+ View v = views[pos];
+ if (v == null) {
+ continue;
+ }
+ if (lastView != null) {
+ if (!setView) {
+ lastView.setBackgroundResource(lastLight ? topBright
+ : topDark);
+ } else {
+ lastView.setBackgroundResource(lastLight ? centerBright
+ : centerDark);
+ }
+ setView = true;
+ }
+ lastView = v;
+ lastLight = light[pos];
+ }
+ if (lastView != null) {
+ if (setView) {
+ lastView.setBackgroundResource(lastLight ? hasButtons ? bottomMedium
+ : bottomBright
+ : bottomDark);
+ } else {
+ lastView.setBackgroundResource(lastLight ? fullBright
+ : fullDark);
+ }
+ }
+ if (mListView != null && mAdapter != null) {
+ mListView.setAdapter(mAdapter);
+ if (mCheckedItem > -1) {
+ mListView.setItemChecked(mCheckedItem, true);
+ mListView.setSelection(mCheckedItem);
+ }
+ }
+ }
+
+ public void setButton(int whichButton, CharSequence text,
+ DialogInterface.OnClickListener listener, Message msg) {
+ if (msg == null && listener != null) {
+ msg = mHandler.obtainMessage(whichButton, listener);
+ }
+ switch (whichButton) {
+ case DialogInterface.BUTTON_POSITIVE:
+ mButtonPositiveText = text;
+ mButtonPositiveMessage = msg;
+ break;
+ case DialogInterface.BUTTON_NEGATIVE:
+ mButtonNegativeText = text;
+ mButtonNegativeMessage = msg;
+ break;
+ case DialogInterface.BUTTON_NEUTRAL:
+ mButtonNeutralText = text;
+ mButtonNeutralMessage = msg;
+ break;
+ default:
+ throw new IllegalArgumentException("Button does not exist");
+ }
+ }
+
+ public void setButtonBehavior(int buttonBehavior) {
+ mButtonBehavior = buttonBehavior;
+ }
+
+ public void setCustomTitle(View customTitleView) {
+ mCustomTitleView = customTitleView;
+ }
+
+ public void setIcon(Drawable icon) {
+ mIcon = icon;
+ if (mIconView != null && mIcon != null) {
+ mIconView.setImageDrawable(icon);
+ }
+ }
+
+ public void setIcon(int resId) {
+ mIconId = resId;
+ if (mIconView != null) {
+ if (resId > 0) {
+ mIconView.setImageResource(mIconId);
+ } else if (resId == 0) {
+ mIconView.setVisibility(View.GONE);
+ }
+ }
+ }
+
+ public void setInverseBackgroundForced(boolean forceInverseBackground) {
+ mForceInverseBackground = forceInverseBackground;
+ }
+
+ public void setMessage(CharSequence message) {
+ mMessage = message;
+ if (mMessageView != null) {
+ mMessageView.setText(message);
+ }
+ }
+
+ public void setTitle(CharSequence title) {
+ mTitle = title;
+ if (mTitleView != null) {
+ mTitleView.setText(title);
+ }
+ }
+
+ private boolean setupButtons() {
+ int BIT_BUTTON_POSITIVE = 1;
+ int BIT_BUTTON_NEGATIVE = 2;
+ int BIT_BUTTON_NEUTRAL = 4;
+ int whichButtons = 0;
+ mButtonPositive = (Button) mWindow.findViewById(R.id.button1);
+ mButtonPositive.setOnClickListener(mButtonHandler);
+ if (TextUtils.isEmpty(mButtonPositiveText)) {
+ mButtonPositive.setVisibility(View.GONE);
+ } else {
+ mButtonPositive.setText(mButtonPositiveText);
+ mButtonPositive.setVisibility(View.VISIBLE);
+ whichButtons = whichButtons | BIT_BUTTON_POSITIVE;
+ }
+ mButtonNegative = (Button) mWindow.findViewById(R.id.button2);
+ mButtonNegative.setOnClickListener(mButtonHandler);
+ if (TextUtils.isEmpty(mButtonNegativeText)) {
+ mButtonNegative.setVisibility(View.GONE);
+ } else {
+ mButtonNegative.setText(mButtonNegativeText);
+ mButtonNegative.setVisibility(View.VISIBLE);
+
+ whichButtons = whichButtons | BIT_BUTTON_NEGATIVE;
+ }
+ mButtonNeutral = (Button) mWindow.findViewById(R.id.button3);
+ mButtonNeutral.setOnClickListener(mButtonHandler);
+ if (TextUtils.isEmpty(mButtonNeutralText)) {
+ mButtonNeutral.setVisibility(View.GONE);
+ } else {
+ mButtonNeutral.setText(mButtonNeutralText);
+ mButtonNeutral.setVisibility(View.VISIBLE);
+
+ whichButtons = whichButtons | BIT_BUTTON_NEUTRAL;
+ }
+ if (AlertController.shouldCenterSingleButton(mContext)) {
+ if (whichButtons == BIT_BUTTON_POSITIVE) {
+ centerButton(mButtonPositive);
+ } else if (whichButtons == BIT_BUTTON_NEGATIVE) {
+ centerButton(mButtonNeutral);
+ } else if (whichButtons == BIT_BUTTON_NEUTRAL) {
+ centerButton(mButtonNeutral);
+ }
+ }
+ return whichButtons != 0;
+ }
+
+ private void setupContent(LinearLayout contentPanel) {
+ mScrollView = (ScrollView) mWindow.findViewById(R.id.scrollView);
+ mScrollView.setFocusable(false);
+ mMessageView = (TextView) mWindow.findViewById(R.id.message);
+ if (mMessageView == null) {
+ return;
+ }
+ if (mMessage != null) {
+ mMessageView.setText(mMessage);
+ } else {
+ mMessageView.setVisibility(View.GONE);
+ mScrollView.removeView(mMessageView);
+ if (mListView != null) {
+ contentPanel.removeView(mWindow.findViewById(R.id.scrollView));
+ contentPanel.addView(mListView, new LinearLayout.LayoutParams(
+ android.view.ViewGroup.LayoutParams.MATCH_PARENT,
+ android.view.ViewGroup.LayoutParams.MATCH_PARENT));
+ contentPanel.setLayoutParams(new LinearLayout.LayoutParams(
+ android.view.ViewGroup.LayoutParams.MATCH_PARENT, 0,
+ 1.0f));
+ } else {
+ contentPanel.setVisibility(View.GONE);
+ }
+ }
+ }
+
+ private boolean setupTitle(LinearLayout topPanel) {
+ boolean hasTitle = true;
+ if (mCustomTitleView != null) {
+ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+
+ topPanel.addView(mCustomTitleView, 0, lp);
+ View titleTemplate = mWindow.findViewById(R.id.title_template);
+ titleTemplate.setVisibility(View.GONE);
+ } else {
+ final boolean hasTextTitle = !TextUtils.isEmpty(mTitle);
+ mIconView = (ImageView) mWindow.findViewById(R.id.icon);
+ if (hasTextTitle) {
+ mTitleView = (TextView) mWindow.findViewById(R.id.alertTitle);
+ mTitleView.setText(mTitle);
+ if (mIconId > 0) {
+ mIconView.setImageResource(mIconId);
+ } else if (mIcon != null) {
+ mIconView.setImageDrawable(mIcon);
+ } else if (mIconId == 0) {
+ mTitleView.setPadding(mIconView.getPaddingLeft(),
+ mIconView.getPaddingTop(),
+ mIconView.getPaddingRight(),
+ mIconView.getPaddingBottom());
+ mIconView.setVisibility(View.GONE);
+ }
+ } else {
+ View titleTemplate = mWindow.findViewById(R.id.title_template);
+ titleTemplate.setVisibility(View.GONE);
+ mIconView.setVisibility(View.GONE);
+ topPanel.setVisibility(View.GONE);
+ hasTitle = false;
+ }
+ }
+ return hasTitle;
+ }
+
+ private void setupView() {
+ LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel);
+ setupContent(contentPanel);
+ boolean hasButtons = setupButtons();
+ LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel);
+ TypedArray a = mContext.obtainStyledAttributes(null,
+ R.styleable.AlertDialog, R.attr.alertDialogStyle, R.style.Holo_AlertDialog);
+ boolean hasTitle = setupTitle(topPanel);
+ View buttonPanel = mWindow.findViewById(R.id.buttonPanel);
+ if (!hasButtons) {
+ buttonPanel.setVisibility(View.GONE);
+ // mWindow.setCloseOnTouchOutsideIfNotSet(true);
+ }
+ FrameLayout customPanel = null;
+ if (mView != null) {
+ customPanel = (FrameLayout) mWindow.findViewById(R.id.customPanel);
+ FrameLayout custom = (FrameLayout) mWindow.findViewById(R.id.custom);
+ custom.addView(mView, new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ if (mViewSpacingSpecified) {
+ custom.setPadding(mViewSpacingLeft, mViewSpacingTop,
+ mViewSpacingRight, mViewSpacingBottom);
+ }
+ if (mListView != null) {
+ ((LinearLayout.LayoutParams) customPanel.getLayoutParams()).weight = 0;
+ }
+ } else {
+ mWindow.findViewById(R.id.customPanel).setVisibility(View.GONE);
+ }
+
+ if (hasTitle) {
+ View divider = null;
+ if (mMessage != null || mView != null || mListView != null) {
+ divider = mWindow.findViewById(R.id.titleDivider);
+ } else {
+ divider = mWindow.findViewById(R.id.titleDividerTop);
+ }
+
+ if (divider != null) {
+ divider.setVisibility(View.VISIBLE);
+ }
+ }
+ setBackground(topPanel, contentPanel, customPanel, hasButtons, a,
+ hasTitle, buttonPanel);
+ a.recycle();
+ }
+
+ public void setView(View view) {
+ mView = view;
+ mViewSpacingSpecified = false;
+ }
+
+ public void setView(View view, int viewSpacingLeft, int viewSpacingTop,
+ int viewSpacingRight, int viewSpacingBottom) {
+ mView = view;
+ mViewSpacingSpecified = true;
+ mViewSpacingLeft = viewSpacingLeft;
+ mViewSpacingTop = viewSpacingTop;
+ mViewSpacingRight = viewSpacingRight;
+ mViewSpacingBottom = viewSpacingBottom;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/DialogTitle.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/DialogTitle.java
new file mode 100644
index 0000000000..a266ce4da2
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/DialogTitle.java
@@ -0,0 +1,53 @@
+
+package org.holoeverywhere.internal;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.TextView;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.text.Layout;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+
+public class DialogTitle extends TextView {
+ public DialogTitle(Context context) {
+ super(context);
+ }
+
+ public DialogTitle(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public DialogTitle(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ final Layout layout = getLayout();
+ if (layout != null) {
+ final int lineCount = layout.getLineCount();
+ if (lineCount > 0) {
+ final int ellipsisCount = layout
+ .getEllipsisCount(lineCount - 1);
+ if (ellipsisCount > 0) {
+ setSingleLine(false);
+ setMaxLines(2);
+ final TypedArray a = getContext().obtainStyledAttributes(
+ null, R.styleable.TextAppearance,
+ android.R.attr.textAppearanceMedium,
+ R.style.Holo_TextAppearance_Medium);
+ final int textSize = a.getDimensionPixelSize(
+ R.styleable.TextAppearance_android_textSize, 0);
+ if (textSize != 0) {
+ setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
+ }
+ a.recycle();
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/GenericInflater.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/GenericInflater.java
new file mode 100644
index 0000000000..bdd63461b1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/GenericInflater.java
@@ -0,0 +1,278 @@
+
+package org.holoeverywhere.internal;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.Context;
+import android.content.res.XmlResourceParser;
+import android.util.AttributeSet;
+import android.util.Xml;
+import android.view.InflateException;
+
+public abstract class GenericInflater<T, P extends GenericInflater.Parent<T>> {
+ public interface Factory<T> {
+ public T onCreateItem(String name, Context context, AttributeSet attrs);
+ }
+
+ public interface Parent<T> {
+ public void addItemFromInflater(T child);
+ }
+
+ private static final HashMap<Class<?>, Constructor<?>> sConstructorMap = new HashMap<Class<?>, Constructor<?>>();
+ private ClassLoader mClassLoader;
+ protected final Object[] mConstructorArgs = new Object[2];
+ protected final Class<?>[] mConstructorSignature = new Class<?>[] {
+ Context.class, AttributeSet.class
+ };
+ private final Context mContext;
+ private final List<Factory<T>> mFactoryList;
+ private final List<String> mPackages = new ArrayList<String>();
+
+ protected GenericInflater(Context context) {
+ mContext = context;
+ mFactoryList = new ArrayList<Factory<T>>();
+ }
+
+ protected GenericInflater(GenericInflater<T, P> original, Context newContext) {
+ mContext = newContext;
+ mFactoryList = new ArrayList<Factory<T>>(original.mFactoryList);
+ }
+
+ public void addFactory(Factory<T> factory) {
+ mFactoryList.add(factory);
+ }
+
+ public abstract GenericInflater<T, P> cloneInContext(Context newContext);
+
+ @SuppressWarnings("unchecked")
+ public final T createItem(String name, String prefix, AttributeSet attrs)
+ throws ClassNotFoundException, InflateException {
+ if (prefix != null) {
+ name = prefix + name;
+ }
+ Constructor<?> constructor = GenericInflater.sConstructorMap.get(name);
+ try {
+ if (constructor == null) {
+ if (mClassLoader == null) {
+ mClassLoader = getClassLoader();
+ if (mClassLoader == null) {
+ mClassLoader = mContext.getClassLoader();
+ }
+ }
+ Class<?> clazz = mClassLoader.loadClass(name);
+ constructor = findConstructor(clazz);
+ GenericInflater.sConstructorMap.put(clazz, constructor);
+ }
+ return (T) constructor.newInstance(obtainConstructorArgs(name, attrs,
+ constructor));
+ } catch (NoSuchMethodException e) {
+ InflateException ie = new InflateException(
+ attrs.getPositionDescription() + ": Error inflating class " + name);
+ ie.initCause(e);
+ throw ie;
+ } catch (Exception e) {
+ InflateException ie = new InflateException(
+ attrs.getPositionDescription() + ": Error inflating class "
+ + constructor.toString());
+ ie.initCause(e);
+ throw ie;
+ }
+ }
+
+ private final T createItemFromTag(XmlPullParser parser, String name,
+ AttributeSet attrs) {
+ try {
+ T item = null;
+ for (Factory<T> factory : mFactoryList) {
+ try {
+ item = factory.onCreateItem(name, mContext, attrs);
+ if (item != null) {
+ break;
+ }
+ } catch (Exception e) {
+ }
+ }
+ if (item == null) {
+ if (name.indexOf('.') < 0) {
+ item = onCreateItem(name, attrs);
+ } else {
+ item = createItem(name, null, attrs);
+ }
+ }
+ return item;
+ } catch (InflateException e) {
+ throw e;
+ } catch (ClassNotFoundException e) {
+ InflateException ie = new InflateException(
+ attrs.getPositionDescription() + ": Error inflating class "
+ + name);
+ ie.initCause(e);
+ throw ie;
+ } catch (Exception e) {
+ InflateException ie = new InflateException(
+ attrs.getPositionDescription() + ": Error inflating class "
+ + name);
+ ie.initCause(e);
+ throw ie;
+ }
+ }
+
+ protected Constructor<?> findConstructor(Class<?> clazz)
+ throws NoSuchMethodException {
+ return clazz.getConstructor(mConstructorSignature);
+ }
+
+ public ClassLoader getClassLoader() {
+ return mClassLoader;
+ }
+
+ public Context getContext() {
+ return mContext;
+ }
+
+ @Deprecated
+ public final Factory<T> getFactory() {
+ return getFactory(0);
+ }
+
+ public final Factory<T> getFactory(int position) {
+ return mFactoryList.get(position);
+ }
+
+ public final int getFactoryCount() {
+ return mFactoryList.size();
+ }
+
+ public T inflate(int resource) {
+ return inflate(resource, null, false);
+ }
+
+ public T inflate(int resource, P root) {
+ return inflate(resource, root, root != null);
+ }
+
+ public T inflate(int resource, P root, boolean attachToRoot) {
+ XmlResourceParser parser = getContext().getResources().getXml(resource);
+ try {
+ return inflate(parser, root, attachToRoot);
+ } finally {
+ parser.close();
+ }
+ }
+
+ public T inflate(XmlPullParser parser) {
+ return inflate(parser, null, false);
+ }
+
+ public T inflate(XmlPullParser parser, P root) {
+ return inflate(parser, root, root != null);
+ }
+
+ @SuppressWarnings("unchecked")
+ public synchronized T inflate(XmlPullParser parser, P root, boolean attachToRoot) {
+ final AttributeSet attrs = Xml.asAttributeSet(parser);
+ T result = (T) root;
+ try {
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG
+ && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new InflateException(parser.getPositionDescription()
+ + ": No start tag found!");
+ }
+ T xmlRoot = createItemFromTag(parser, parser.getName(), attrs);
+ result = (T) onMergeRoots(root, attachToRoot, (P) xmlRoot);
+ rInflate(parser, result, attrs);
+ } catch (InflateException e) {
+ throw e;
+ } catch (XmlPullParserException e) {
+ InflateException ex = new InflateException(e.getMessage());
+ ex.initCause(e);
+ throw ex;
+ } catch (IOException e) {
+ InflateException ex = new InflateException(
+ parser.getPositionDescription() + ": " + e.getMessage());
+ ex.initCause(e);
+ throw ex;
+ }
+ return result;
+ }
+
+ protected Object[] obtainConstructorArgs(String name, AttributeSet attrs,
+ Constructor<?> constructor) {
+ final Object[] args = mConstructorArgs;
+ args[0] = mContext;
+ args[1] = attrs;
+ return args;
+ }
+
+ protected boolean onCreateCustomFromTag(XmlPullParser parser, T parent,
+ final AttributeSet attrs) throws XmlPullParserException {
+ return false;
+ }
+
+ protected T onCreateItem(String name, AttributeSet attrs)
+ throws ClassNotFoundException {
+ for (String sPackage : mPackages) {
+ return createItem(name, sPackage + ".", attrs);
+ }
+ return null;
+ }
+
+ protected P onMergeRoots(P givenRoot, boolean attachToGivenRoot, P xmlRoot) {
+ return xmlRoot;
+ }
+
+ public void registerPackage(String name) {
+ name = Package.getPackage(name).getName();
+ if (!mPackages.contains(name)) {
+ mPackages.add(name);
+ }
+ }
+
+ public void removeFactory(Factory<T> factory) {
+ mFactoryList.remove(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void rInflate(XmlPullParser parser, T parent,
+ final AttributeSet attrs) throws XmlPullParserException,
+ IOException {
+ final int depth = parser.getDepth();
+ int type;
+ while (((type = parser.next()) != XmlPullParser.END_TAG || parser
+ .getDepth() > depth) && type != XmlPullParser.END_DOCUMENT) {
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+ if (onCreateCustomFromTag(parser, parent, attrs)) {
+ continue;
+ }
+ String name = parser.getName();
+ T item = createItemFromTag(parser, name, attrs);
+ ((P) parent).addItemFromInflater(item);
+ rInflate(parser, item, attrs);
+ }
+ }
+
+ public void setClassLoader(ClassLoader classLoader) {
+ mClassLoader = classLoader;
+ }
+
+ public void setFactory(Factory<T> factory) {
+ mFactoryList.add(0, factory);
+ }
+
+ public void unregisterPackage(String string) {
+ mPackages.remove(string);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/NumberPickerEditText.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/NumberPickerEditText.java
new file mode 100644
index 0000000000..2a0d6fe739
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/NumberPickerEditText.java
@@ -0,0 +1,22 @@
+
+package org.holoeverywhere.internal;
+
+import org.holoeverywhere.widget.EditText;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.inputmethod.EditorInfo;
+
+public class NumberPickerEditText extends EditText {
+ public NumberPickerEditText(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void onEditorAction(int actionCode) {
+ super.onEditorAction(actionCode);
+ if (actionCode == EditorInfo.IME_ACTION_DONE) {
+ clearFocus();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/WindowDecorView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/WindowDecorView.java
new file mode 100644
index 0000000000..0d7042de8e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/WindowDecorView.java
@@ -0,0 +1,163 @@
+
+package org.holoeverywhere.internal;
+
+import static android.view.View.MeasureSpec.AT_MOST;
+import static android.view.View.MeasureSpec.EXACTLY;
+
+import org.holoeverywhere.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Rect;
+import android.util.DisplayMetrics;
+import android.util.TypedValue;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuDecorView;
+
+public class WindowDecorView extends ContextMenuDecorView {
+ private TypedValue mFixedHeightMajor;
+ private TypedValue mFixedHeightMinor;
+ private TypedValue mFixedWidthMajor;
+ private TypedValue mFixedWidthMinor;
+ private TypedValue mMinHeightMajor;
+ private TypedValue mMinHeightMinor;
+ private TypedValue mMinWidthMajor;
+ private TypedValue mMinWidthMinor;
+
+ public WindowDecorView(Context context) {
+ super(context);
+ TypedArray a = context.obtainStyledAttributes(R.styleable.WindowSizes);
+ if (a.hasValue(R.styleable.WindowSizes_windowMinWidthMajor)) {
+ a.getValue(R.styleable.WindowSizes_windowMinWidthMajor,
+ mMinWidthMajor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowMinWidthMinor)) {
+ a.getValue(R.styleable.WindowSizes_windowMinWidthMinor,
+ mMinWidthMinor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowMinHeightMajor)) {
+ a.getValue(R.styleable.WindowSizes_windowMinHeightMajor,
+ mMinHeightMajor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowMinHeightMinor)) {
+ a.getValue(R.styleable.WindowSizes_windowMinHeightMinor,
+ mMinHeightMinor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowFixedWidthMajor)) {
+ a.getValue(R.styleable.WindowSizes_windowFixedWidthMajor,
+ mFixedWidthMajor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowFixedWidthMinor)) {
+ a.getValue(R.styleable.WindowSizes_windowFixedWidthMinor,
+ mFixedWidthMinor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowFixedHeightMajor)) {
+ a.getValue(R.styleable.WindowSizes_windowFixedHeightMajor,
+ mFixedHeightMajor = new TypedValue());
+ }
+ if (a.hasValue(R.styleable.WindowSizes_windowFixedHeightMinor)) {
+ a.getValue(R.styleable.WindowSizes_windowFixedHeightMinor,
+ mFixedHeightMinor = new TypedValue());
+ }
+ a.recycle();
+ }
+
+ @Override
+ protected boolean fitSystemWindows(Rect insets) {
+ int left = Math.max(getPaddingLeft(), insets.left);
+ int top = Math.max(getPaddingTop(), insets.top);
+ int right = Math.max(getPaddingRight(), insets.right);
+ int bottom = Math.max(getPaddingBottom(), insets.bottom);
+ setPadding(left, top, right, bottom);
+ return true;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
+ final boolean isPortrait = metrics.widthPixels < metrics.heightPixels;
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ boolean fixedWidth = false, fixedHeight = false;
+ if (widthMode == AT_MOST) {
+ final TypedValue tvw = isPortrait ? mFixedWidthMinor : mFixedWidthMajor;
+ if (tvw != null && tvw.type != TypedValue.TYPE_NULL) {
+ final int w;
+ if (tvw.type == TypedValue.TYPE_DIMENSION) {
+ w = (int) tvw.getDimension(metrics);
+ } else if (tvw.type == TypedValue.TYPE_FRACTION) {
+ w = (int) tvw.getFraction(metrics.widthPixels, metrics.widthPixels);
+ } else {
+ w = 0;
+ }
+ if (w > 0) {
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(
+ Math.min(w, MeasureSpec.getSize(widthMeasureSpec)), EXACTLY);
+ fixedWidth = true;
+ }
+ }
+ }
+ if (heightMode == AT_MOST) {
+ final TypedValue tvh = isPortrait ? mFixedHeightMajor : mFixedHeightMinor;
+ if (tvh != null && tvh.type != TypedValue.TYPE_NULL) {
+ final int h;
+ if (tvh.type == TypedValue.TYPE_DIMENSION) {
+ h = (int) tvh.getDimension(metrics);
+ } else if (tvh.type == TypedValue.TYPE_FRACTION) {
+ h = (int) tvh.getFraction(metrics.heightPixels, metrics.heightPixels);
+ } else {
+ h = 0;
+ }
+ if (h > 0) {
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(
+ Math.min(h, MeasureSpec.getSize(heightMeasureSpec)), EXACTLY);
+ fixedHeight = true;
+ }
+ }
+ }
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ int width = getMeasuredWidth();
+ int height = getMeasuredHeight();
+ boolean measure = false;
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(width, EXACTLY);
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, EXACTLY);
+ if (!fixedWidth && widthMode == AT_MOST) {
+ final TypedValue tv = isPortrait ? mMinWidthMinor : mMinWidthMajor;
+ if (tv != null && tv.type != TypedValue.TYPE_NULL) {
+ final int min;
+ if (tv.type == TypedValue.TYPE_DIMENSION) {
+ min = (int) tv.getDimension(metrics);
+ } else if (tv.type == TypedValue.TYPE_FRACTION) {
+ min = (int) tv.getFraction(metrics.widthPixels, metrics.widthPixels);
+ } else {
+ min = 0;
+ }
+
+ if (width < min) {
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(min, EXACTLY);
+ measure = true;
+ }
+ }
+ }
+ if (!fixedHeight && heightMode == AT_MOST) {
+ final TypedValue tv = isPortrait ? mMinHeightMinor : mMinHeightMajor;
+ if (tv != null && tv.type != TypedValue.TYPE_NULL) {
+ final int min;
+ if (tv.type == TypedValue.TYPE_DIMENSION) {
+ min = (int) tv.getDimension(metrics);
+ } else if (tv.type == TypedValue.TYPE_FRACTION) {
+ min = (int) tv.getFraction(metrics.heightPixels, metrics.heightPixels);
+ } else {
+ min = 0;
+ }
+ if (height < min) {
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(min, EXACTLY);
+ measure = true;
+ }
+ }
+ }
+ if (measure) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_View.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_View.java
new file mode 100644
index 0000000000..3754d77544
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_View.java
@@ -0,0 +1,236 @@
+
+package org.holoeverywhere.internal;
+
+import org.holoeverywhere.IHoloActivity;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.view.accessibility.AccessibilityEventSource;
+
+import com.actionbarsherlock.view.ActionMode;
+
+public class _View extends android.view.View implements Drawable.Callback,
+ KeyEvent.Callback, AccessibilityEventSource {
+ public static final int[] PRESSED_STATE_SET, SUPPORT_EMPTY_STATE_SET,
+ SUPPORT_WINDOW_FOCUSED_STATE_SET, SUPPORT_SELECTED_STATE_SET,
+ SUPPORT_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_FOCUSED_STATE_SET,
+ SUPPORT_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_FOCUSED_SELECTED_STATE_SET,
+ SUPPORT_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_ENABLED_STATE_SET,
+ SUPPORT_ENABLED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_ENABLED_SELECTED_STATE_SET,
+ SUPPORT_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_ENABLED_FOCUSED_STATE_SET,
+ SUPPORT_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_ENABLED_FOCUSED_SELECTED_STATE_SET,
+ SUPPORT_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_STATE_SET, SUPPORT_PRESSED_SELECTED_STATE_SET,
+ SUPPORT_PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_FOCUSED_SELECTED_STATE_SET,
+ SUPPORT_PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_SELECTED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET,
+ SUPPORT_PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET;
+
+ static final int VIEW_STATE_ACCELERATED = 1 << 6;
+ static final int VIEW_STATE_ACTIVATED = 1 << 5;
+ static final int VIEW_STATE_DRAG_CAN_ACCEPT = 1 << 8;
+ static final int VIEW_STATE_DRAG_HOVERED = 1 << 9;
+ static final int VIEW_STATE_ENABLED = 1 << 3;
+ static final int VIEW_STATE_FOCUSED = 1 << 2;
+ static final int VIEW_STATE_HOVERED = 1 << 7;
+ static final int VIEW_STATE_PRESSED = 1 << 4;
+ static final int VIEW_STATE_SELECTED = 1 << 1;
+ private static final int[][] VIEW_STATE_SETS;
+
+ static final int VIEW_STATE_WINDOW_FOCUSED = 1;
+
+ private static final int[] ViewDrawableStates = {
+ android.R.attr.state_pressed, android.R.attr.state_focused,
+ android.R.attr.state_selected, android.R.attr.state_window_focused,
+ android.R.attr.state_enabled, android.R.attr.state_activated,
+ android.R.attr.state_accelerated, android.R.attr.state_hovered,
+ android.R.attr.state_drag_can_accept,
+ android.R.attr.state_drag_hovered
+ };
+ static final int[] Z_VIEW_STATE_IDS = new int[] {
+ android.R.attr.state_window_focused,
+ _View.VIEW_STATE_WINDOW_FOCUSED, android.R.attr.state_selected,
+ _View.VIEW_STATE_SELECTED, android.R.attr.state_focused,
+ _View.VIEW_STATE_FOCUSED, android.R.attr.state_enabled,
+ _View.VIEW_STATE_ENABLED, android.R.attr.state_pressed,
+ _View.VIEW_STATE_PRESSED, android.R.attr.state_activated,
+ _View.VIEW_STATE_ACTIVATED, android.R.attr.state_accelerated,
+ _View.VIEW_STATE_ACCELERATED, android.R.attr.state_hovered,
+ _View.VIEW_STATE_HOVERED, android.R.attr.state_drag_can_accept,
+ _View.VIEW_STATE_DRAG_CAN_ACCEPT,
+ android.R.attr.state_drag_hovered, _View.VIEW_STATE_DRAG_HOVERED
+ };
+
+ static {
+ if (_View.Z_VIEW_STATE_IDS.length / 2 != _View.ViewDrawableStates.length) {
+ throw new IllegalStateException(
+ "VIEW_STATE_IDs array length does not match ViewDrawableStates style array");
+ }
+ int[] orderedIds = new int[_View.Z_VIEW_STATE_IDS.length];
+ for (int i = 0; i < _View.ViewDrawableStates.length; i++) {
+ int viewState = _View.ViewDrawableStates[i];
+ for (int j = 0; j < _View.Z_VIEW_STATE_IDS.length; j += 2) {
+ if (_View.Z_VIEW_STATE_IDS[j] == viewState) {
+ orderedIds[i * 2] = viewState;
+ orderedIds[i * 2 + 1] = _View.Z_VIEW_STATE_IDS[j + 1];
+ }
+ }
+ }
+ final int NUM_BITS = _View.Z_VIEW_STATE_IDS.length / 2;
+ VIEW_STATE_SETS = new int[1 << NUM_BITS][];
+ for (int i = 0; i < _View.VIEW_STATE_SETS.length; i++) {
+ int numBits = Integer.bitCount(i);
+ int[] set = new int[numBits];
+ int pos = 0;
+ for (int j = 0; j < orderedIds.length; j += 2) {
+ if ((i & orderedIds[j + 1]) != 0) {
+ set[pos++] = orderedIds[j];
+ }
+ }
+ _View.VIEW_STATE_SETS[i] = set;
+ }
+
+ SUPPORT_EMPTY_STATE_SET = _View.VIEW_STATE_SETS[0];
+ SUPPORT_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED];
+ SUPPORT_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED];
+ SUPPORT_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED];
+ SUPPORT_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_FOCUSED];
+ SUPPORT_FOCUSED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_FOCUSED];
+ SUPPORT_FOCUSED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED];
+ SUPPORT_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED | _View.VIEW_STATE_FOCUSED];
+ SUPPORT_ENABLED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_FOCUSED | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_FOCUSED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED | _View.VIEW_STATE_ENABLED];
+ SUPPORT_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED];
+
+ SUPPORT_PRESSED_STATE_SET = PRESSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_FOCUSED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_FOCUSED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_ENABLED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_ENABLED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_ENABLED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_ENABLED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED
+ | _View.VIEW_STATE_PRESSED];
+ SUPPORT_PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET = _View.VIEW_STATE_SETS[_View.VIEW_STATE_WINDOW_FOCUSED
+ | _View.VIEW_STATE_SELECTED
+ | _View.VIEW_STATE_FOCUSED
+ | _View.VIEW_STATE_ENABLED | _View.VIEW_STATE_PRESSED];
+ }
+
+ public static int supportResolveSize(int size, int measureSpec) {
+ return _View.supportResolveSizeAndState(size, measureSpec, 0)
+ & android.view.View.MEASURED_SIZE_MASK;
+ }
+
+ public static int supportResolveSizeAndState(int size, int measureSpec,
+ int childMeasuredState) {
+ int result = size;
+ int specMode = MeasureSpec.getMode(measureSpec);
+ int specSize = MeasureSpec.getSize(measureSpec);
+ switch (specMode) {
+ case MeasureSpec.UNSPECIFIED:
+ result = size;
+ break;
+ case MeasureSpec.AT_MOST:
+ if (specSize < size) {
+ result = specSize | android.view.View.MEASURED_STATE_TOO_SMALL;
+ } else {
+ result = size;
+ }
+ break;
+ case MeasureSpec.EXACTLY:
+ result = specSize;
+ break;
+ }
+ return result | childMeasuredState
+ & android.view.View.MEASURED_STATE_MASK;
+ }
+
+ public _View(Context context) {
+ super(context);
+ }
+
+ public _View(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public _View(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ public int getMeasuredStateInt() {
+ return getMeasuredWidth()
+ & android.view.View.MEASURED_STATE_MASK
+ | getMeasuredHeight() >> android.view.View.MEASURED_HEIGHT_STATE_SHIFT
+ & android.view.View.MEASURED_STATE_MASK >> android.view.View.MEASURED_HEIGHT_STATE_SHIFT;
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback actionModeCallback) {
+ return ((IHoloActivity) getContext())
+ .startActionMode(actionModeCallback);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_ViewGroup.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_ViewGroup.java
new file mode 100644
index 0000000000..e1df16d7a5
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/internal/_ViewGroup.java
@@ -0,0 +1,52 @@
+
+package org.holoeverywhere.internal;
+
+import org.holoeverywhere.IHoloActivity;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityManager;
+
+import com.actionbarsherlock.view.ActionMode;
+
+public abstract class _ViewGroup extends ViewGroup {
+ public static final int ACCESSIBILITY_FOCUS_BACKWARD = View.FOCUS_BACKWARD | 0x00000002;
+ public static final int ACCESSIBILITY_FOCUS_FORWARD = View.FOCUS_FORWARD | 0x00000002;
+ public static final int FLAG_DISALLOW_INTERCEPT = 0x80000;
+ public static final int FOCUS_ACCESSIBILITY = 0x00001000;
+ public static final int FOCUSABLES_ACCESSIBILITY = 0x00000002;
+
+ public static boolean isAccessibilityManagerEnabled(Context context) {
+ boolean enabled = false;
+ try {
+ enabled = ((AccessibilityManager) context
+ .getSystemService(Context.ACCESSIBILITY_SERVICE))
+ .isEnabled();
+ } catch (Exception e) {
+ }
+ return enabled;
+ }
+
+ public _ViewGroup(Context context) {
+ this(context, null);
+ }
+
+ public _ViewGroup(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public _ViewGroup(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ public boolean isAccessibilityManagerEnabled() {
+ return _ViewGroup.isAccessibilityManagerEnabled(getContext());
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback actionModeCallback) {
+ return ((IHoloActivity) getContext())
+ .startActionMode(actionModeCallback);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/PreferenceManagerHelper.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/PreferenceManagerHelper.java
new file mode 100644
index 0000000000..bc4400b1d8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/PreferenceManagerHelper.java
@@ -0,0 +1,70 @@
+
+package org.holoeverywhere.preference;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.HoloEverywhere.PreferenceImpl;
+
+import android.content.Context;
+import android.util.Log;
+
+public class PreferenceManagerHelper {
+ static interface PreferenceManagerImpl {
+ SharedPreferences getDefaultSharedPreferences(Context context, PreferenceImpl impl);
+
+ int obtainThemeTag();
+
+ SharedPreferences wrap(Context context, PreferenceImpl impl, String name, int mode);
+ }
+
+ private static PreferenceManagerImpl IMPL;
+ static {
+ try {
+ Class<?> clazz = Class
+ .forName(HoloEverywhere.PACKAGE + ".preference._PreferenceManagerImpl");
+ IMPL = (PreferenceManagerImpl) clazz.newInstance();
+ } catch (Exception e) {
+ IMPL = null;
+ if (HoloEverywhere.DEBUG) {
+ Log.w("HoloEverywhere",
+ "Cannot find PreferenceManager class. Preference framework are disabled.",
+ e);
+ }
+ }
+ }
+
+ private static void checkImpl() {
+ if (IMPL == null) {
+ throw new UnsatisfiedLinkError("HoloEverywhere: PreferenceFramework not found");
+ }
+ }
+
+ public static SharedPreferences getDefaultSharedPreferences(Context context) {
+ return getDefaultSharedPreferences(context, HoloEverywhere.PREFERENCE_IMPL);
+ }
+
+ public static SharedPreferences getDefaultSharedPreferences(Context context,
+ PreferenceImpl impl) {
+ checkImpl();
+ return IMPL.getDefaultSharedPreferences(context, impl);
+ }
+
+ public static int obtainThemeTag() {
+ checkImpl();
+ return IMPL.obtainThemeTag();
+ }
+
+ public static SharedPreferences wrap(Context context, PreferenceImpl impl, String name,
+ int mode) {
+ checkImpl();
+ return IMPL.wrap(context, impl, name, mode);
+ }
+
+ public static SharedPreferences wrap(Context context, String name,
+ int mode) {
+ return wrap(context, HoloEverywhere.PREFERENCE_IMPL, name, mode);
+ }
+
+ private PreferenceManagerHelper() {
+
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/SharedPreferences.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/SharedPreferences.java
new file mode 100644
index 0000000000..edd1f772e8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/preference/SharedPreferences.java
@@ -0,0 +1,154 @@
+
+package org.holoeverywhere.preference;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import android.os.Bundle;
+
+public interface SharedPreferences extends android.content.SharedPreferences {
+ public static interface Editor extends
+ android.content.SharedPreferences.Editor {
+ @Override
+ public void apply();
+
+ @Override
+ public Editor clear();
+
+ @Override
+ public boolean commit();
+
+ public Editor putBoolean(int id, boolean value);
+
+ @Override
+ public Editor putBoolean(String key, boolean value);
+
+ public Editor putFloat(int id, float value);
+
+ @Override
+ public Editor putFloat(String key, float value);
+
+ public Editor putFloatSet(int id, Set<Float> value);
+
+ public Editor putFloatSet(String key, Set<Float> value);
+
+ public Editor putInt(int id, int value);
+
+ @Override
+ public Editor putInt(String key, int value);
+
+ public Editor putIntSet(int id, Set<Integer> value);
+
+ public Editor putIntSet(String key, Set<Integer> value);
+
+ public Editor putJSONArray(int id, JSONArray value);
+
+ public Editor putJSONArray(String key, JSONArray value);
+
+ public Editor putJSONObject(int id, JSONObject value);
+
+ public Editor putJSONObject(String key, JSONObject value);
+
+ public Editor putLong(int id, long value);
+
+ @Override
+ public Editor putLong(String key, long value);
+
+ public Editor putLongSet(int id, Set<Long> value);
+
+ public Editor putLongSet(String key, Set<Long> value);
+
+ public Editor putString(int id, String value);
+
+ @Override
+ public Editor putString(String key, String value);
+
+ public Editor putStringSet(int id, Set<String> value);
+
+ @Override
+ public Editor putStringSet(String key, Set<String> value);
+
+ public Editor remove(int id);
+
+ @Override
+ public Editor remove(String key);
+ }
+
+ public static interface OnSharedPreferenceChangeListener {
+ public void onSharedPreferenceChanged(SharedPreferences prefs, String key);
+ }
+
+ public boolean contains(int id);
+
+ @Override
+ public boolean contains(String key);
+
+ @Override
+ public Editor edit();
+
+ @Override
+ public Map<String, ?> getAll();
+
+ public boolean getBoolean(int id, boolean defValue);
+
+ @Override
+ public boolean getBoolean(String key, boolean defValue);
+
+ public float getFloat(int id, float defValue);
+
+ @Override
+ public float getFloat(String key, float defValue);
+
+ public Set<Float> getFloatSet(int id, Set<Float> defValue);
+
+ public Set<Float> getFloatSet(String key, Set<Float> defValue);
+
+ public int getInt(int id, int defValue);
+
+ @Override
+ public int getInt(String key, int defValue);
+
+ public Set<Integer> getIntSet(int id, Set<Integer> defValue);
+
+ public Set<Integer> getIntSet(String key, Set<Integer> defValue);
+
+ public JSONArray getJSONArray(int id, JSONArray defValue);
+
+ public JSONArray getJSONArray(String key, JSONArray defValue);
+
+ public JSONObject getJSONObject(int id, JSONObject defValue);
+
+ public JSONObject getJSONObject(String key, JSONObject defValue);
+
+ public long getLong(int id, long defValue);
+
+ @Override
+ public long getLong(String key, long defValue);
+
+ public Set<Long> getLongSet(int id, Set<Long> defValue);
+
+ public Set<Long> getLongSet(String key, Set<Long> defValue);
+
+ public String getString(int id, String defValue);
+
+ @Override
+ public String getString(String key, String defValue);
+
+ public Set<String> getStringSet(int id, Set<String> defValue);
+
+ @Override
+ public Set<String> getStringSet(String key, Set<String> defValue);
+
+ public String makeNameById(int id);
+
+ public void registerOnSharedPreferenceChangeListener(
+ OnSharedPreferenceChangeListener listener);
+
+ public void setDefaultValues(Bundle bundle);
+
+ public void unregisterOnSharedPreferenceChangeListener(
+ OnSharedPreferenceChangeListener listener);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/AllCapsTransformationMethod.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/AllCapsTransformationMethod.java
new file mode 100644
index 0000000000..9e52afaed9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/AllCapsTransformationMethod.java
@@ -0,0 +1,35 @@
+
+package org.holoeverywhere.text;
+
+import java.util.Locale;
+
+import android.content.Context;
+import android.graphics.Rect;
+import android.view.View;
+
+public class AllCapsTransformationMethod implements TransformationMethod {
+ private boolean mEnabled;
+ private Locale mLocale;
+
+ public AllCapsTransformationMethod(Context context) {
+ mLocale = context.getResources().getConfiguration().locale;
+ }
+
+ @Override
+ public CharSequence getTransformation(CharSequence source, View view) {
+ if (mEnabled) {
+ return source != null ? source.toString().toUpperCase(mLocale) : null;
+ }
+ return source;
+ }
+
+ @Override
+ public void onFocusChanged(View view, CharSequence sourceText, boolean focused, int direction,
+ Rect previouslyFocusedRect) {
+ }
+
+ @Override
+ public void setLengthChangesAllowed(boolean allowLengthChanges) {
+ mEnabled = allowLengthChanges;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/TransformationMethod.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/TransformationMethod.java
new file mode 100644
index 0000000000..16abdad771
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/text/TransformationMethod.java
@@ -0,0 +1,17 @@
+
+package org.holoeverywhere.text;
+
+import android.graphics.Rect;
+import android.view.View;
+
+public interface TransformationMethod extends android.text.method.TransformationMethod {
+ @Override
+ public CharSequence getTransformation(CharSequence source, View view);
+
+ @Override
+ public void onFocusChanged(View view, CharSequence sourceText,
+ boolean focused, int direction,
+ Rect previouslyFocusedRect);
+
+ public void setLengthChangesAllowed(boolean allowLengthChanges);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ArrayUtils.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ArrayUtils.java
new file mode 100644
index 0000000000..d806ec5992
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ArrayUtils.java
@@ -0,0 +1,187 @@
+
+package org.holoeverywhere.util;
+
+import java.lang.reflect.Array;
+
+public class ArrayUtils {
+ private static final int CACHE_SIZE = 73;
+ private static Object[] EMPTY = new Object[0];
+ private static Object[] sCache = new Object[ArrayUtils.CACHE_SIZE];
+
+ @SuppressWarnings("unchecked")
+ public static <T> T[] appendElement(Class<T> kind, T[] array, T element) {
+ final T[] result;
+ final int end;
+ if (array != null) {
+ end = array.length;
+ result = (T[]) Array.newInstance(kind, end + 1);
+ System.arraycopy(array, 0, result, 0, end);
+ } else {
+ end = 0;
+ result = (T[]) Array.newInstance(kind, 1);
+ }
+ result[end] = element;
+ return result;
+ }
+
+ public static int[] appendInt(int[] cur, int val) {
+ if (cur == null) {
+ return new int[] {
+ val
+ };
+ }
+ final int N = cur.length;
+ for (int i = 0; i < N; i++) {
+ if (cur[i] == val) {
+ return cur;
+ }
+ }
+ int[] ret = new int[N + 1];
+ System.arraycopy(cur, 0, ret, 0, N);
+ ret[N] = val;
+ return ret;
+ }
+
+ public static boolean contains(int[] array, int value) {
+ for (int element : array) {
+ if (element == value) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static <T> boolean contains(T[] array, T value) {
+ for (T element : array) {
+ if (element == null) {
+ if (value == null) {
+ return true;
+ }
+ } else {
+ if (value != null && element.equals(value)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T[] emptyArray(Class<T> kind) {
+ if (kind == Object.class) {
+ return (T[]) ArrayUtils.EMPTY;
+ }
+ int bucket = (System.identityHashCode(kind) / 8 & 0x7FFFFFFF)
+ % ArrayUtils.CACHE_SIZE;
+ Object cache = ArrayUtils.sCache[bucket];
+ if (cache == null || cache.getClass().getComponentType() != kind) {
+ cache = Array.newInstance(kind, 0);
+ ArrayUtils.sCache[bucket] = cache;
+ }
+ return (T[]) cache;
+ }
+
+ public static boolean equals(byte[] array1, byte[] array2, int length) {
+ if (array1 == array2) {
+ return true;
+ }
+ if (array1 == null || array2 == null || array1.length < length
+ || array2.length < length) {
+ return false;
+ }
+ for (int i = 0; i < length; i++) {
+ if (array1[i] != array2[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static int idealBooleanArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need);
+ }
+
+ public static int idealByteArraySize(int need) {
+ for (int i = 4; i < 32; i++) {
+ if (need <= (1 << i) - 12) {
+ return (1 << i) - 12;
+ }
+ }
+
+ return need;
+ }
+
+ public static int idealCharArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 2) / 2;
+ }
+
+ public static int idealFloatArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 4) / 4;
+ }
+
+ public static int idealIntArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 4) / 4;
+ }
+
+ public static int idealLongArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 8) / 8;
+ }
+
+ public static int idealObjectArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 4) / 4;
+ }
+
+ public static int idealShortArraySize(int need) {
+ return ArrayUtils.idealByteArraySize(need * 2) / 2;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T[] removeElement(Class<T> kind, T[] array, T element) {
+ if (array != null) {
+ final int length = array.length;
+ for (int i = 0; i < length; i++) {
+ if (array[i] == element) {
+ if (length == 1) {
+ return null;
+ }
+ T[] result = (T[]) Array.newInstance(kind, length - 1);
+ System.arraycopy(array, 0, result, 0, i);
+ System.arraycopy(array, i + 1, result, i, length - i - 1);
+ return result;
+ }
+ }
+ }
+ return array;
+ }
+
+ public static int[] removeInt(int[] cur, int val) {
+ if (cur == null) {
+ return null;
+ }
+ final int N = cur.length;
+ for (int i = 0; i < N; i++) {
+ if (cur[i] == val) {
+ int[] ret = new int[N - 1];
+ if (i > 0) {
+ System.arraycopy(cur, 0, ret, 0, i);
+ }
+ if (i < N - 1) {
+ System.arraycopy(cur, i + 1, ret, i, N - i - 1);
+ }
+ return ret;
+ }
+ }
+ return cur;
+ }
+
+ public static long total(long[] array) {
+ long total = 0;
+ for (long value : array) {
+ total += value;
+ }
+ return total;
+ }
+
+ private ArrayUtils() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Arrays.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Arrays.java
new file mode 100644
index 0000000000..5459b41ae1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Arrays.java
@@ -0,0 +1,27 @@
+
+package org.holoeverywhere.util;
+
+import java.lang.reflect.Array;
+
+public class Arrays {
+ @SuppressWarnings("unchecked")
+ public static <T> T[] copyOfRange(T[] original, int from, int to) {
+ return Arrays.copyOfRange(original, from, to,
+ (Class<T[]>) original.getClass());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T, U> T[] copyOfRange(U[] original, int from, int to,
+ Class<? extends T[]> newType) {
+ int newSize = to - from;
+ if (newSize < 0) {
+ throw new IllegalArgumentException(from + " > " + to);
+ }
+ T[] copy = (Object) newType == (Object) Object[].class ? (T[]) new Object[newSize]
+ : (T[]) Array.newInstance(newType.getComponentType(), newSize);
+ System.arraycopy(original, from, copy, 0,
+ Math.min(original.length - from, newSize));
+ return copy;
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/CharSequences.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/CharSequences.java
new file mode 100644
index 0000000000..797ee16b31
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/CharSequences.java
@@ -0,0 +1,89 @@
+
+package org.holoeverywhere.util;
+
+public class CharSequences {
+ public static int compareToIgnoreCase(CharSequence me, CharSequence another) {
+ int myLen = me.length(), anotherLen = another.length();
+ int myPos = 0, anotherPos = 0, result;
+ int end = myLen < anotherLen ? myLen : anotherLen;
+ while (myPos < end) {
+ if ((result = Character.toLowerCase(me.charAt(myPos++))
+ - Character.toLowerCase(another.charAt(anotherPos++))) != 0) {
+ return result;
+ }
+ }
+ return myLen - anotherLen;
+ }
+
+ public static boolean equals(CharSequence a, CharSequence b) {
+ if (a.length() != b.length()) {
+ return false;
+ }
+ int length = a.length();
+ for (int i = 0; i < length; i++) {
+ if (a.charAt(i) != b.charAt(i)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static CharSequence forAsciiBytes(final byte[] bytes) {
+ return new CharSequence() {
+ @Override
+ public char charAt(int index) {
+ return (char) bytes[index];
+ }
+
+ @Override
+ public int length() {
+ return bytes.length;
+ }
+
+ @Override
+ public CharSequence subSequence(int start, int end) {
+ return CharSequences.forAsciiBytes(bytes, start, end);
+ }
+
+ @Override
+ public String toString() {
+ return new String(bytes);
+ }
+ };
+ }
+
+ public static CharSequence forAsciiBytes(final byte[] bytes,
+ final int start, final int end) {
+ CharSequences.validate(start, end, bytes.length);
+ return new CharSequence() {
+ @Override
+ public char charAt(int index) {
+ return (char) bytes[index + start];
+ }
+
+ @Override
+ public int length() {
+ return end - start;
+ }
+
+ @Override
+ public CharSequence subSequence(int newStart, int newEnd) {
+ newStart -= start;
+ newEnd -= start;
+ CharSequences.validate(newStart, newEnd, length());
+ return CharSequences.forAsciiBytes(bytes, newStart, newEnd);
+ }
+
+ @Override
+ public String toString() {
+ return new String(bytes, start, length());
+ }
+ };
+ }
+
+ static void validate(int start, int end, int length) {
+ if (start < 0 || end < 0 || end > length || start > end) {
+ throw new IndexOutOfBoundsException();
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FastXmlSerializer.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FastXmlSerializer.java
new file mode 100644
index 0000000000..4f7f702dde
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FastXmlSerializer.java
@@ -0,0 +1,385 @@
+
+package org.holoeverywhere.util;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.nio.charset.CoderResult;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
+
+import org.xmlpull.v1.XmlSerializer;
+
+public class FastXmlSerializer implements XmlSerializer {
+ private static final int BUFFER_LEN = 8192;
+
+ private static final String ESCAPE_TABLE[] = new String[] {
+ null, null,
+ null, null, null, null, null, null, // 0-7
+ null, null, null, null, null, null, null, null, // 8-15
+ null, null, null, null, null, null, null, null, // 16-23
+ null, null, null, null, null, null, null, null, // 24-31
+ null, null, "&quot;", null, null, null, "&amp;", null, // 32-39
+ null, null, null, null, null, null, null, null, // 40-47
+ null, null, null, null, null, null, null, null, // 48-55
+ null, null, null, null, "&lt;", null, "&gt;", null, // 56-63
+ };
+
+ private ByteBuffer mBytes = ByteBuffer
+ .allocate(FastXmlSerializer.BUFFER_LEN);
+ private CharsetEncoder mCharset;
+
+ private boolean mInTag;
+
+ private OutputStream mOutputStream;
+ private int mPos;
+ private final char[] mText = new char[FastXmlSerializer.BUFFER_LEN];
+
+ private Writer mWriter;
+
+ private void append(char c) throws IOException {
+ int pos = mPos;
+ if (pos >= FastXmlSerializer.BUFFER_LEN - 1) {
+ flush();
+ pos = mPos;
+ }
+ mText[pos] = c;
+ mPos = pos + 1;
+ }
+
+ private void append(char[] buf, int i, final int length) throws IOException {
+ if (length > FastXmlSerializer.BUFFER_LEN) {
+ final int end = i + length;
+ while (i < end) {
+ int next = i + FastXmlSerializer.BUFFER_LEN;
+ append(buf, i, next < end ? FastXmlSerializer.BUFFER_LEN : end
+ - i);
+ i = next;
+ }
+ return;
+ }
+ int pos = mPos;
+ if (pos + length > FastXmlSerializer.BUFFER_LEN) {
+ flush();
+ pos = mPos;
+ }
+ System.arraycopy(buf, i, mText, pos, length);
+ mPos = pos + length;
+ }
+
+ private void append(String str) throws IOException {
+ append(str, 0, str.length());
+ }
+
+ private void append(String str, int i, final int length) throws IOException {
+ if (length > FastXmlSerializer.BUFFER_LEN) {
+ final int end = i + length;
+ while (i < end) {
+ int next = i + FastXmlSerializer.BUFFER_LEN;
+ append(str, i, next < end ? FastXmlSerializer.BUFFER_LEN : end
+ - i);
+ i = next;
+ }
+ return;
+ }
+ int pos = mPos;
+ if (pos + length > FastXmlSerializer.BUFFER_LEN) {
+ flush();
+ pos = mPos;
+ }
+ str.getChars(i, i + length, mText, pos);
+ mPos = pos + length;
+ }
+
+ @Override
+ public XmlSerializer attribute(String namespace, String name, String value)
+ throws IOException, IllegalArgumentException, IllegalStateException {
+ append(' ');
+ if (namespace != null) {
+ append(namespace);
+ append(':');
+ }
+ append(name);
+ append("=\"");
+
+ escapeAndAppendString(value);
+ append('"');
+ return this;
+ }
+
+ @Override
+ public void cdsect(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void comment(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void docdecl(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void endDocument() throws IOException, IllegalArgumentException,
+ IllegalStateException {
+ flush();
+ }
+
+ @Override
+ public XmlSerializer endTag(String namespace, String name)
+ throws IOException, IllegalArgumentException, IllegalStateException {
+ if (mInTag) {
+ append(" />\n");
+ } else {
+ append("</");
+ if (namespace != null) {
+ append(namespace);
+ append(':');
+ }
+ append(name);
+ append(">\n");
+ }
+ mInTag = false;
+ return this;
+ }
+
+ @Override
+ public void entityRef(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ private void escapeAndAppendString(char[] buf, int start, int len)
+ throws IOException {
+ final char NE = (char) FastXmlSerializer.ESCAPE_TABLE.length;
+ final String[] escapes = FastXmlSerializer.ESCAPE_TABLE;
+ int end = start + len;
+ int lastPos = start;
+ int pos;
+ for (pos = start; pos < end; pos++) {
+ char c = buf[pos];
+ if (c >= NE) {
+ continue;
+ }
+ String escape = escapes[c];
+ if (escape == null) {
+ continue;
+ }
+ if (lastPos < pos) {
+ append(buf, lastPos, pos - lastPos);
+ }
+ lastPos = pos + 1;
+ append(escape);
+ }
+ if (lastPos < pos) {
+ append(buf, lastPos, pos - lastPos);
+ }
+ }
+
+ private void escapeAndAppendString(final String string) throws IOException {
+ final int N = string.length();
+ final char NE = (char) FastXmlSerializer.ESCAPE_TABLE.length;
+ final String[] escapes = FastXmlSerializer.ESCAPE_TABLE;
+ int lastPos = 0;
+ int pos;
+ for (pos = 0; pos < N; pos++) {
+ char c = string.charAt(pos);
+ if (c >= NE) {
+ continue;
+ }
+ String escape = escapes[c];
+ if (escape == null) {
+ continue;
+ }
+ if (lastPos < pos) {
+ append(string, lastPos, pos - lastPos);
+ }
+ lastPos = pos + 1;
+ append(escape);
+ }
+ if (lastPos < pos) {
+ append(string, lastPos, pos - lastPos);
+ }
+ }
+
+ @Override
+ public void flush() throws IOException {
+ // Log.i("PackageManager", "flush mPos=" + mPos);
+ if (mPos > 0) {
+ if (mOutputStream != null) {
+ CharBuffer charBuffer = CharBuffer.wrap(mText, 0, mPos);
+ CoderResult result = mCharset.encode(charBuffer, mBytes, true);
+ while (true) {
+ if (result.isError()) {
+ throw new IOException(result.toString());
+ } else if (result.isOverflow()) {
+ flushBytes();
+ result = mCharset.encode(charBuffer, mBytes, true);
+ continue;
+ }
+ break;
+ }
+ flushBytes();
+ mOutputStream.flush();
+ } else {
+ mWriter.write(mText, 0, mPos);
+ mWriter.flush();
+ }
+ mPos = 0;
+ }
+ }
+
+ private void flushBytes() throws IOException {
+ int position;
+ if ((position = mBytes.position()) > 0) {
+ mBytes.flip();
+ mOutputStream.write(mBytes.array(), 0, position);
+ mBytes.clear();
+ }
+ }
+
+ @Override
+ public int getDepth() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean getFeature(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getName() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getNamespace() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getPrefix(String namespace, boolean generatePrefix)
+ throws IllegalArgumentException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Object getProperty(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void ignorableWhitespace(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void processingInstruction(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setFeature(String name, boolean state)
+ throws IllegalArgumentException, IllegalStateException {
+ if (name.equals("http://xmlpull.org/v1/doc/features.html#indent-output")) {
+ return;
+ }
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setOutput(OutputStream os, String encoding) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ if (os == null) {
+ throw new IllegalArgumentException();
+ }
+ try {
+ mCharset = Charset.forName(encoding).newEncoder();
+ } catch (IllegalCharsetNameException e) {
+ throw (UnsupportedEncodingException) new UnsupportedEncodingException(
+ encoding).initCause(e);
+ } catch (UnsupportedCharsetException e) {
+ throw (UnsupportedEncodingException) new UnsupportedEncodingException(
+ encoding).initCause(e);
+ }
+ mOutputStream = os;
+ }
+
+ @Override
+ public void setOutput(Writer writer) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ mWriter = writer;
+ }
+
+ @Override
+ public void setPrefix(String prefix, String namespace) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setProperty(String name, Object value)
+ throws IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void startDocument(String encoding, Boolean standalone)
+ throws IOException, IllegalArgumentException, IllegalStateException {
+ append("<?xml version='1.0' encoding='utf-8' standalone='"
+ + (standalone ? "yes" : "no") + "' ?>\n");
+ }
+
+ @Override
+ public XmlSerializer startTag(String namespace, String name)
+ throws IOException, IllegalArgumentException, IllegalStateException {
+ if (mInTag) {
+ append(">\n");
+ }
+ append('<');
+ if (namespace != null) {
+ append(namespace);
+ append(':');
+ }
+ append(name);
+ mInTag = true;
+ return this;
+ }
+
+ @Override
+ public XmlSerializer text(char[] buf, int start, int len)
+ throws IOException, IllegalArgumentException, IllegalStateException {
+ if (mInTag) {
+ append(">");
+ mInTag = false;
+ }
+ escapeAndAppendString(buf, start, len);
+ return this;
+ }
+
+ @Override
+ public XmlSerializer text(String text) throws IOException,
+ IllegalArgumentException, IllegalStateException {
+ if (mInTag) {
+ append(">");
+ mInTag = false;
+ }
+ escapeAndAppendString(text);
+ return this;
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FinitePool.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FinitePool.java
new file mode 100644
index 0000000000..d05a0aefdc
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/FinitePool.java
@@ -0,0 +1,61 @@
+
+package org.holoeverywhere.util;
+
+import android.util.Log;
+
+public class FinitePool<T extends Poolable<T>> implements Pool<T> {
+ private static final String TAG = "FinitePool";
+ private final boolean mInfinite;
+ private final int mLimit;
+ private final PoolableManager<T> mManager;
+ private int mPoolCount;
+ private T mRoot;
+
+ public FinitePool(PoolableManager<T> manager) {
+ mManager = manager;
+ mLimit = 0;
+ mInfinite = true;
+ }
+
+ public FinitePool(PoolableManager<T> manager, int limit) {
+ if (limit <= 0) {
+ throw new IllegalArgumentException("The pool limit must be > 0");
+ }
+ mManager = manager;
+ mLimit = limit;
+ mInfinite = false;
+ }
+
+ @Override
+ public T acquire() {
+ T element;
+ if (mRoot != null) {
+ element = mRoot;
+ mRoot = element.getNextPoolable();
+ mPoolCount--;
+ } else {
+ element = mManager.newInstance();
+ }
+ if (element != null) {
+ element.setNextPoolable(null);
+ element.setPooled(false);
+ mManager.onAcquired(element);
+ }
+ return element;
+ }
+
+ @Override
+ public void release(T element) {
+ if (!element.isPooled()) {
+ if (mInfinite || mPoolCount < mLimit) {
+ mPoolCount++;
+ element.setNextPoolable(mRoot);
+ element.setPooled(true);
+ mRoot = element;
+ }
+ mManager.onReleased(element);
+ } else {
+ Log.w(FinitePool.TAG, "Element is already in pool: " + element);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pair.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pair.java
new file mode 100644
index 0000000000..55ddf5b1bb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pair.java
@@ -0,0 +1,42 @@
+
+package org.holoeverywhere.util;
+
+public class Pair<F, S> {
+ public static <A, B> Pair<A, B> create(A a, B b) {
+ return new Pair<A, B>(a, b);
+ }
+
+ public final F first;
+
+ public final S second;
+
+ public Pair(F first, S second) {
+ this.first = first;
+ this.second = second;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Pair)) {
+ return false;
+ }
+ try {
+ Pair<F, S> other = (Pair<F, S>) o;
+ return first.equals(other.first) && second.equals(other.second);
+ } catch (ClassCastException e) {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + first.hashCode();
+ result = 31 * result + second.hashCode();
+ return result;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pool.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pool.java
new file mode 100644
index 0000000000..c57138026d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pool.java
@@ -0,0 +1,8 @@
+
+package org.holoeverywhere.util;
+
+public interface Pool<T extends Poolable<T>> {
+ public abstract T acquire();
+
+ public abstract void release(T element);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Poolable.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Poolable.java
new file mode 100644
index 0000000000..e979dd2e73
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Poolable.java
@@ -0,0 +1,12 @@
+
+package org.holoeverywhere.util;
+
+public interface Poolable<T> {
+ T getNextPoolable();
+
+ boolean isPooled();
+
+ void setNextPoolable(T element);
+
+ void setPooled(boolean isPooled);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/PoolableManager.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/PoolableManager.java
new file mode 100644
index 0000000000..108ab8129e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/PoolableManager.java
@@ -0,0 +1,10 @@
+
+package org.holoeverywhere.util;
+
+public interface PoolableManager<T extends Poolable<T>> {
+ T newInstance();
+
+ void onAcquired(T element);
+
+ void onReleased(T element);
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pools.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pools.java
new file mode 100644
index 0000000000..3560910891
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/Pools.java
@@ -0,0 +1,26 @@
+
+package org.holoeverywhere.util;
+
+public class Pools {
+ public static <T extends Poolable<T>> Pool<T> finitePool(
+ PoolableManager<T> manager, int limit) {
+ return new FinitePool<T>(manager, limit);
+ }
+
+ public static <T extends Poolable<T>> Pool<T> simplePool(
+ PoolableManager<T> manager) {
+ return new FinitePool<T>(manager);
+ }
+
+ public static <T extends Poolable<T>> Pool<T> synchronizedPool(Pool<T> pool) {
+ return new SynchronizedPool<T>(pool);
+ }
+
+ public static <T extends Poolable<T>> Pool<T> synchronizedPool(
+ Pool<T> pool, Object lock) {
+ return new SynchronizedPool<T>(pool, lock);
+ }
+
+ private Pools() {
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ReflectHelper.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ReflectHelper.java
new file mode 100644
index 0000000000..c1b22859c6
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/ReflectHelper.java
@@ -0,0 +1,38 @@
+
+package org.holoeverywhere.util;
+
+import java.lang.reflect.Method;
+
+public final class ReflectHelper {
+
+ private static Class<?>[] classess(Object[] args) {
+ Class<?>[] result = new Class<?>[args.length];
+ for (int i = 0; i < args.length; i++) {
+ Object z = args[i];
+ if (z != null) {
+ result[i] = z.getClass();
+ }
+ }
+ return result;
+ }
+
+ public static <Result> Result invoke(Object object, String methodName,
+ Class<Result> result, boolean superClass, Object... args) {
+ try {
+ Class<?>[] argsClasses = ReflectHelper.classess(args);
+ Method method = (superClass ? object.getClass().getSuperclass()
+ : object.getClass()).getMethod(methodName, argsClasses);
+ method.setAccessible(true);
+ Object r = method.invoke(object, args);
+ return result != null ? result.cast(r) : null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ public static <Result> Result invoke(Object object, String methodName,
+ Class<Result> result, Object... args) {
+ return ReflectHelper.invoke(object, methodName, result, false, args);
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseArray.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseArray.java
new file mode 100644
index 0000000000..828a66f1cb
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseArray.java
@@ -0,0 +1,230 @@
+
+package org.holoeverywhere.util;
+
+public class SparseArray<E> implements Cloneable {
+ private static final Object DELETED = new Object();
+
+ private static int binarySearch(int[] a, int start, int len, int key) {
+ int high = start + len, low = start - 1, guess;
+ while (high - low > 1) {
+ guess = (high + low) / 2;
+ if (a[guess] < key) {
+ low = guess;
+ } else {
+ high = guess;
+ }
+ }
+ if (high == start + len) {
+ return ~(start + len);
+ } else if (a[high] == key) {
+ return high;
+ } else {
+ return ~high;
+ }
+ }
+
+ private boolean mGarbage = false;
+ private int[] mKeys;
+ private int mSize;
+
+ private Object[] mValues;
+
+ public SparseArray() {
+ this(10);
+ }
+
+ public SparseArray(int initialCapacity) {
+ initialCapacity = ArrayUtils.idealIntArraySize(initialCapacity);
+ mKeys = new int[initialCapacity];
+ mValues = new Object[initialCapacity];
+ mSize = 0;
+ }
+
+ public void append(int key, E value) {
+ if (mSize != 0 && key <= mKeys[mSize - 1]) {
+ put(key, value);
+ return;
+ }
+ if (mGarbage && mSize >= mKeys.length) {
+ gc();
+ }
+ int pos = mSize;
+ if (pos >= mKeys.length) {
+ int n = ArrayUtils.idealIntArraySize(pos + 1);
+ int[] nkeys = new int[n];
+ Object[] nvalues = new Object[n];
+ System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
+ System.arraycopy(mValues, 0, nvalues, 0, mValues.length);
+ mKeys = nkeys;
+ mValues = nvalues;
+ }
+ mKeys[pos] = key;
+ mValues[pos] = value;
+ mSize = pos + 1;
+ }
+
+ public void clear() {
+ int n = mSize;
+ Object[] values = mValues;
+ for (int i = 0; i < n; i++) {
+ values[i] = null;
+ }
+ mSize = 0;
+ mGarbage = false;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public SparseArray<E> clone() {
+ SparseArray<E> clone = null;
+ try {
+ clone = (SparseArray<E>) super.clone();
+ clone.mKeys = mKeys.clone();
+ clone.mValues = mValues.clone();
+ } catch (CloneNotSupportedException cnse) {
+ }
+ return clone;
+ }
+
+ public void delete(int key) {
+ int i = SparseArray.binarySearch(mKeys, 0, mSize, key);
+
+ if (i >= 0) {
+ if (mValues[i] != SparseArray.DELETED) {
+ mValues[i] = SparseArray.DELETED;
+ mGarbage = true;
+ }
+ }
+ }
+
+ private void gc() {
+ int n = mSize;
+ int o = 0;
+ int[] keys = mKeys;
+ Object[] values = mValues;
+ for (int i = 0; i < n; i++) {
+ Object val = values[i];
+ if (val != SparseArray.DELETED) {
+ if (i != o) {
+ keys[o] = keys[i];
+ values[o] = val;
+ values[i] = null;
+ }
+ o++;
+ }
+ }
+ mGarbage = false;
+ mSize = o;
+ }
+
+ public E get(int key) {
+ return get(key, null);
+ }
+
+ @SuppressWarnings("unchecked")
+ public E get(int key, E valueIfKeyNotFound) {
+ int i = SparseArray.binarySearch(mKeys, 0, mSize, key);
+
+ if (i < 0 || mValues[i] == SparseArray.DELETED) {
+ return valueIfKeyNotFound;
+ } else {
+ return (E) mValues[i];
+ }
+ }
+
+ public int indexOfKey(int key) {
+ if (mGarbage) {
+ gc();
+ }
+ return SparseArray.binarySearch(mKeys, 0, mSize, key);
+ }
+
+ public int indexOfValue(E value) {
+ if (mGarbage) {
+ gc();
+ }
+ for (int i = 0; i < mSize; i++) {
+ if (mValues[i] == value) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public int keyAt(int index) {
+ if (mGarbage) {
+ gc();
+ }
+ return mKeys[index];
+ }
+
+ public void put(int key, E value) {
+ int i = SparseArray.binarySearch(mKeys, 0, mSize, key);
+ if (i >= 0) {
+ mValues[i] = value;
+ } else {
+ i = ~i;
+ if (i < mSize && mValues[i] == SparseArray.DELETED) {
+ mKeys[i] = key;
+ mValues[i] = value;
+ return;
+ }
+ if (mGarbage && mSize >= mKeys.length) {
+ gc();
+ i = ~SparseArray.binarySearch(mKeys, 0, mSize, key);
+ }
+ if (mSize >= mKeys.length) {
+ int n = ArrayUtils.idealIntArraySize(mSize + 1);
+ int[] nkeys = new int[n];
+ Object[] nvalues = new Object[n];
+ System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
+ System.arraycopy(mValues, 0, nvalues, 0, mValues.length);
+ mKeys = nkeys;
+ mValues = nvalues;
+ }
+ if (mSize - i != 0) {
+ System.arraycopy(mKeys, i, mKeys, i + 1, mSize - i);
+ System.arraycopy(mValues, i, mValues, i + 1, mSize - i);
+ }
+ mKeys[i] = key;
+ mValues[i] = value;
+ mSize++;
+ }
+ }
+
+ public void remove(int key) {
+ delete(key);
+ }
+
+ public void removeAt(int index) {
+ if (mValues[index] != SparseArray.DELETED) {
+ mValues[index] = SparseArray.DELETED;
+ mGarbage = true;
+ }
+ }
+
+ public void setValueAt(int index, E value) {
+ if (mGarbage) {
+ gc();
+ }
+
+ mValues[index] = value;
+ }
+
+ public int size() {
+ if (mGarbage) {
+ gc();
+ }
+
+ return mSize;
+ }
+
+ @SuppressWarnings("unchecked")
+ public E valueAt(int index) {
+ if (mGarbage) {
+ gc();
+ }
+
+ return (E) mValues[index];
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseIntArray.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseIntArray.java
new file mode 100644
index 0000000000..5e25b39e0d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SparseIntArray.java
@@ -0,0 +1,197 @@
+
+package org.holoeverywhere.util;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class SparseIntArray implements Cloneable, Parcelable {
+ public static final Creator<SparseIntArray> CREATOR = new Creator<SparseIntArray>() {
+ @Override
+ public SparseIntArray createFromParcel(Parcel source) {
+ final int size = source.readInt();
+ SparseIntArray array = new SparseIntArray(size);
+ array.mSize = size;
+ array.mKeys = source.createIntArray();
+ array.mValues = source.createIntArray();
+ return array;
+ }
+
+ @Override
+ public SparseIntArray[] newArray(int size) {
+ return new SparseIntArray[size];
+ }
+ };
+
+ private static int binarySearch(int[] a, int start, int len, int key) {
+ int high = start + len, low = start - 1, guess;
+ while (high - low > 1) {
+ guess = (high + low) / 2;
+ if (a[guess] < key) {
+ low = guess;
+ } else {
+ high = guess;
+ }
+ }
+ if (high == start + len) {
+ return ~(start + len);
+ } else if (a[high] == key) {
+ return high;
+ } else {
+ return ~high;
+ }
+ }
+
+ private int[] mKeys;
+
+ private int mSize;
+
+ private int[] mValues;
+
+ public SparseIntArray() {
+ this(10);
+ }
+
+ public SparseIntArray(int initialCapacity) {
+ initialCapacity = ArrayUtils.idealIntArraySize(initialCapacity);
+ mKeys = new int[initialCapacity];
+ mValues = new int[initialCapacity];
+ mSize = 0;
+ }
+
+ public SparseIntArray(SparseIntArray arrayForCopy) {
+ if (arrayForCopy == null) {
+ int initialCapacity = ArrayUtils.idealIntArraySize(10);
+ mKeys = new int[initialCapacity];
+ mValues = new int[initialCapacity];
+ mSize = 0;
+ } else {
+ mKeys = arrayForCopy.mKeys.clone();
+ mValues = arrayForCopy.mValues.clone();
+ }
+ }
+
+ public void append(int key, int value) {
+ if (mSize != 0 && key <= mKeys[mSize - 1]) {
+ put(key, value);
+ return;
+ }
+ int pos = mSize;
+ if (pos >= mKeys.length) {
+ int n = ArrayUtils.idealIntArraySize(pos + 1);
+ int[] nkeys = new int[n];
+ int[] nvalues = new int[n];
+ System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
+ System.arraycopy(mValues, 0, nvalues, 0, mValues.length);
+ mKeys = nkeys;
+ mValues = nvalues;
+ }
+ mKeys[pos] = key;
+ mValues[pos] = value;
+ mSize = pos + 1;
+ }
+
+ public void clear() {
+ mSize = 0;
+ }
+
+ @Override
+ public SparseIntArray clone() {
+ SparseIntArray clone = null;
+ try {
+ clone = (SparseIntArray) super.clone();
+ clone.mKeys = mKeys.clone();
+ clone.mValues = mValues.clone();
+ clone.mSize = mSize;
+ } catch (CloneNotSupportedException cnse) {
+ }
+ return clone;
+ }
+
+ public void delete(int key) {
+ int i = binarySearch(mKeys, 0, mSize, key);
+ if (i >= 0) {
+ removeAt(i);
+ }
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public int get(int key) {
+ return get(key, 0);
+ }
+
+ public int get(int key, int valueIfKeyNotFound) {
+ int i = binarySearch(mKeys, 0, mSize, key);
+ if (i < 0) {
+ return valueIfKeyNotFound;
+ } else {
+ return mValues[i];
+ }
+ }
+
+ public int indexOfKey(int key) {
+ return binarySearch(mKeys, 0, mSize, key);
+ }
+
+ public int indexOfValue(int value) {
+ for (int i = 0; i < mSize; i++) {
+ if (mValues[i] == value) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public int keyAt(int index) {
+ return mKeys[index];
+ }
+
+ public void put(int key, int value) {
+ int i = binarySearch(mKeys, 0, mSize, key);
+ if (i >= 0) {
+ mValues[i] = value;
+ } else {
+ i = ~i;
+ if (mSize >= mKeys.length) {
+ int n = ArrayUtils.idealIntArraySize(mSize + 1);
+ int[] nkeys = new int[n];
+ int[] nvalues = new int[n];
+ System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
+ System.arraycopy(mValues, 0, nvalues, 0, mValues.length);
+ mKeys = nkeys;
+ mValues = nvalues;
+ }
+ if (mSize - i != 0) {
+ System.arraycopy(mKeys, i, mKeys, i + 1, mSize - i);
+ System.arraycopy(mValues, i, mValues, i + 1, mSize - i);
+ }
+ mKeys[i] = key;
+ mValues[i] = value;
+ mSize++;
+ }
+ }
+
+ public void removeAt(int index) {
+ System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1));
+ System.arraycopy(mValues, index + 1, mValues, index, mSize - (index + 1));
+ mSize--;
+ }
+
+ public int size() {
+ return mSize;
+ }
+
+ public int valueAt(int index) {
+ return mValues[index];
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mSize);
+ dest.writeIntArray(mKeys);
+ dest.writeIntArray(mValues);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SynchronizedPool.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SynchronizedPool.java
new file mode 100644
index 0000000000..d0875d828a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/SynchronizedPool.java
@@ -0,0 +1,31 @@
+
+package org.holoeverywhere.util;
+
+public class SynchronizedPool<T extends Poolable<T>> implements Pool<T> {
+ private final Object mLock;
+ private final Pool<T> mPool;
+
+ public SynchronizedPool(Pool<T> pool) {
+ mPool = pool;
+ mLock = this;
+ }
+
+ public SynchronizedPool(Pool<T> pool, Object lock) {
+ mPool = pool;
+ mLock = lock;
+ }
+
+ @Override
+ public T acquire() {
+ synchronized (mLock) {
+ return mPool.acquire();
+ }
+ }
+
+ @Override
+ public void release(T element) {
+ synchronized (mLock) {
+ mPool.release(element);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/WeaklyMap.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/WeaklyMap.java
new file mode 100644
index 0000000000..26e6fa7fc4
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/WeaklyMap.java
@@ -0,0 +1,183 @@
+
+package org.holoeverywhere.util;
+
+import java.lang.ref.WeakReference;
+import java.util.AbstractCollection;
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.WeakHashMap;
+
+public class WeaklyMap<K, V> extends AbstractMap<K, V> {
+ private static final class WeaklyEntry<K, V> implements Entry<K, V> {
+ private final Entry<K, WeaklyReference<V>> mEntry;
+
+ public WeaklyEntry(Entry<K, WeaklyReference<V>> entry) {
+ mEntry = entry;
+ }
+
+ @Override
+ public K getKey() {
+ return mEntry.getKey();
+ }
+
+ @Override
+ public V getValue() {
+ final WeaklyReference<V> ref = mEntry.getValue();
+ return ref == null ? null : ref.get();
+ }
+
+ @Override
+ public V setValue(V object) {
+ final WeaklyReference<V> ref = mEntry.setValue(new WeaklyReference<V>(object));
+ return ref == null ? null : ref.get();
+ }
+ }
+
+ private static final class WeaklyReference<T> extends WeakReference<T> {
+ public WeaklyReference(T r) {
+ super(r);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof WeaklyReference)) {
+ return false;
+ }
+ final Object o1 = ((WeaklyReference<?>) o).get();
+ final Object o2 = get();
+ return o1 != null && o2 != null && o1 == o2;
+ }
+ }
+
+ private final WeakHashMap<K, WeaklyReference<V>> mMap;
+
+ public WeaklyMap() {
+ mMap = new WeakHashMap<K, WeaklyReference<V>>();
+ }
+
+ @Override
+ public void clear() {
+ mMap.clear();
+ }
+
+ @Override
+ public boolean containsKey(Object key) {
+ return mMap.containsKey(key);
+ }
+
+ @Override
+ public boolean containsValue(Object value) {
+ return mMap.containsValue(new WeaklyReference<Object>(value));
+ }
+
+ @Override
+ public Set<Entry<K, V>> entrySet() {
+ final Set<Entry<K, WeaklyReference<V>>> entrySet = mMap.entrySet();
+ return new AbstractSet<Entry<K, V>>() {
+ @Override
+ public Iterator<Entry<K, V>> iterator() {
+ final Iterator<Entry<K, WeaklyReference<V>>> iterator = entrySet.iterator();
+ return new Iterator<Entry<K, V>>() {
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public Entry<K, V> next() {
+ return new WeaklyEntry<K, V>(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ };
+ }
+
+ @Override
+ public int size() {
+ return entrySet.size();
+ }
+ };
+ }
+
+ @Override
+ public V get(Object key) {
+ WeaklyReference<V> ref = mMap.get(key);
+ return ref == null ? null : ref.get();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return mMap.isEmpty();
+ }
+
+ @Override
+ public Set<K> keySet() {
+ return mMap.keySet();
+ }
+
+ @Override
+ public V put(K key, V value) {
+ WeaklyReference<V> ref = mMap.put(key, new WeaklyReference<V>(value));
+ return ref == null ? null : ref.get();
+ }
+
+ @Override
+ public void putAll(Map<? extends K, ? extends V> map) {
+ for (Entry<? extends K, ? extends V> entry : map.entrySet()) {
+ mMap.put(entry.getKey(), new WeaklyReference<V>(entry.getValue()));
+ }
+ }
+
+ @Override
+ public V remove(Object key) {
+ WeaklyReference<V> ref = mMap.remove(key);
+ return ref == null ? null : ref.get();
+ }
+
+ @Override
+ public int size() {
+ return mMap.size();
+ }
+
+ @Override
+ public Collection<V> values() {
+ final Collection<WeaklyReference<V>> values = mMap.values();
+ return new AbstractCollection<V>() {
+ @Override
+ public Iterator<V> iterator() {
+ final Iterator<WeaklyReference<V>> iterator = values.iterator();
+ return new Iterator<V>() {
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public V next() {
+ WeaklyReference<V> ref = iterator.next();
+ return ref == null ? null : ref.get();
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ };
+ }
+
+ @Override
+ public int size() {
+ return values.size();
+ }
+ };
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/XmlUtils.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/XmlUtils.java
new file mode 100644
index 0000000000..8141c1f3c9
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/util/XmlUtils.java
@@ -0,0 +1,658 @@
+
+package org.holoeverywhere.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
+import android.util.Xml;
+
+@SuppressWarnings({
+ "rawtypes", "unchecked"
+})
+public class XmlUtils {
+
+ public static final void beginDocument(XmlPullParser parser,
+ String firstElementName) throws XmlPullParserException, IOException {
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG
+ && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+
+ if (type != XmlPullParser.START_TAG) {
+ throw new XmlPullParserException("No start tag found");
+ }
+
+ if (!parser.getName().equals(firstElementName)) {
+ throw new XmlPullParserException("Unexpected start tag: found "
+ + parser.getName() + ", expected " + firstElementName);
+ }
+ }
+
+ public static final boolean convertValueToBoolean(CharSequence value,
+ boolean defaultValue) {
+ boolean result = false;
+
+ if (null == value) {
+ return defaultValue;
+ }
+
+ if (value.equals("1") || value.equals("true") || value.equals("TRUE")) {
+ result = true;
+ }
+
+ return result;
+ }
+
+ public static final int convertValueToInt(CharSequence charSeq,
+ int defaultValue) {
+ if (null == charSeq) {
+ return defaultValue;
+ }
+
+ String nm = charSeq.toString();
+
+ int sign = 1;
+ int index = 0;
+ int len = nm.length();
+ int base = 10;
+
+ if ('-' == nm.charAt(0)) {
+ sign = -1;
+ index++;
+ }
+
+ if ('0' == nm.charAt(index)) {
+ // Quick check for a zero by itself
+ if (index == len - 1) {
+ return 0;
+ }
+
+ char c = nm.charAt(index + 1);
+
+ if ('x' == c || 'X' == c) {
+ index += 2;
+ base = 16;
+ } else {
+ index++;
+ base = 8;
+ }
+ } else if ('#' == nm.charAt(index)) {
+ index++;
+ base = 16;
+ }
+
+ return Integer.parseInt(nm.substring(index), base) * sign;
+ }
+
+ public static final int convertValueToList(CharSequence value,
+ String[] options, int defaultValue) {
+ if (null != value) {
+ for (int i = 0; i < options.length; i++) {
+ if (value.equals(options[i])) {
+ return i;
+ }
+ }
+ }
+
+ return defaultValue;
+ }
+
+ public static final int convertValueToUnsignedInt(String value,
+ int defaultValue) {
+ if (null == value) {
+ return defaultValue;
+ }
+
+ return XmlUtils.parseUnsignedIntAttribute(value);
+ }
+
+ public static final void nextElement(XmlPullParser parser)
+ throws XmlPullParserException, IOException {
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG
+ && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ }
+
+ public static boolean nextElementWithin(XmlPullParser parser, int outerDepth)
+ throws IOException, XmlPullParserException {
+ for (;;) {
+ int type = parser.next();
+ if (type == XmlPullParser.END_DOCUMENT
+ || type == XmlPullParser.END_TAG
+ && parser.getDepth() == outerDepth) {
+ return false;
+ }
+ if (type == XmlPullParser.START_TAG
+ && parser.getDepth() == outerDepth + 1) {
+ return true;
+ }
+ }
+ }
+
+ public static final int parseUnsignedIntAttribute(CharSequence charSeq) {
+ String value = charSeq.toString();
+
+ int index = 0;
+ int len = value.length();
+ int base = 10;
+
+ if ('0' == value.charAt(index)) {
+ // Quick check for zero by itself
+ if (index == len - 1) {
+ return 0;
+ }
+
+ char c = value.charAt(index + 1);
+
+ if ('x' == c || 'X' == c) { // check for hex
+ index += 2;
+ base = 16;
+ } else { // check for octal
+ index++;
+ base = 8;
+ }
+ } else if ('#' == value.charAt(index)) {
+ index++;
+ base = 16;
+ }
+
+ return (int) Long.parseLong(value.substring(index), base);
+ }
+
+ public static final ArrayList readListXml(InputStream in)
+ throws XmlPullParserException, java.io.IOException {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(in, null);
+ return (ArrayList) XmlUtils.readValueXml(parser, new String[1]);
+ }
+
+ public static final HashMap readMapXml(InputStream in)
+ throws XmlPullParserException, java.io.IOException {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(in, null);
+ return (HashMap) XmlUtils.readValueXml(parser, new String[1]);
+ }
+
+ public static final HashSet readSetXml(InputStream in)
+ throws XmlPullParserException, java.io.IOException {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(in, null);
+ return (HashSet) XmlUtils.readValueXml(parser, new String[1]);
+ }
+
+ public static final int[] readThisIntArrayXml(XmlPullParser parser,
+ String endTag, String[] name) throws XmlPullParserException,
+ java.io.IOException {
+
+ int num;
+ try {
+ num = Integer.parseInt(parser.getAttributeValue(null, "num"));
+ } catch (NullPointerException e) {
+ throw new XmlPullParserException("Need num attribute in byte-array");
+ } catch (NumberFormatException e) {
+ throw new XmlPullParserException(
+ "Not a number in num attribute in byte-array");
+ }
+
+ int[] array = new int[num];
+ int i = 0;
+
+ int eventType = parser.getEventType();
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ if (parser.getName().equals("item")) {
+ try {
+ array[i] = Integer.parseInt(parser.getAttributeValue(
+ null, "value"));
+ } catch (NullPointerException e) {
+ throw new XmlPullParserException(
+ "Need value attribute in item");
+ } catch (NumberFormatException e) {
+ throw new XmlPullParserException(
+ "Not a number in value attribute in item");
+ }
+ } else {
+ throw new XmlPullParserException("Expected item tag at: "
+ + parser.getName());
+ }
+ } else if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals(endTag)) {
+ return array;
+ } else if (parser.getName().equals("item")) {
+ i++;
+ } else {
+ throw new XmlPullParserException("Expected " + endTag
+ + " end tag at: " + parser.getName());
+ }
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ throw new XmlPullParserException("Document ended before " + endTag
+ + " end tag");
+ }
+
+ public static final ArrayList readThisListXml(XmlPullParser parser,
+ String endTag, String[] name) throws XmlPullParserException,
+ java.io.IOException {
+ ArrayList list = new ArrayList();
+
+ int eventType = parser.getEventType();
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ Object val = XmlUtils.readThisValueXml(parser, name);
+ list.add(val);
+ // System.out.println("Adding to list: " + val);
+ } else if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals(endTag)) {
+ return list;
+ }
+ throw new XmlPullParserException("Expected " + endTag
+ + " end tag at: " + parser.getName());
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ throw new XmlPullParserException("Document ended before " + endTag
+ + " end tag");
+ }
+
+ public static final HashMap readThisMapXml(XmlPullParser parser,
+ String endTag, String[] name) throws XmlPullParserException,
+ java.io.IOException {
+ HashMap map = new HashMap();
+
+ int eventType = parser.getEventType();
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ Object val = XmlUtils.readThisValueXml(parser, name);
+ if (name[0] != null) {
+ map.put(name[0], val);
+ } else {
+ throw new XmlPullParserException(
+ "Map value without name attribute: "
+ + parser.getName());
+ }
+ } else if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals(endTag)) {
+ return map;
+ }
+ throw new XmlPullParserException("Expected " + endTag
+ + " end tag at: " + parser.getName());
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ throw new XmlPullParserException("Document ended before " + endTag
+ + " end tag");
+ }
+
+ public static final HashSet readThisSetXml(XmlPullParser parser,
+ String endTag, String[] name) throws XmlPullParserException,
+ java.io.IOException {
+ HashSet set = new HashSet();
+
+ int eventType = parser.getEventType();
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ Object val = XmlUtils.readThisValueXml(parser, name);
+ set.add(val);
+ // System.out.println("Adding to set: " + val);
+ } else if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals(endTag)) {
+ return set;
+ }
+ throw new XmlPullParserException("Expected " + endTag
+ + " end tag at: " + parser.getName());
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ throw new XmlPullParserException("Document ended before " + endTag
+ + " end tag");
+ }
+
+ private static final Object readThisValueXml(XmlPullParser parser,
+ String[] name) throws XmlPullParserException, java.io.IOException {
+ final String valueName = parser.getAttributeValue(null, "name");
+ final String tagName = parser.getName();
+ Object res;
+
+ if (tagName.equals("null")) {
+ res = null;
+ } else if (tagName.equals("string")) {
+ String value = "";
+ int eventType;
+ while ((eventType = parser.next()) != XmlPullParser.END_DOCUMENT) {
+ if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals("string")) {
+ name[0] = valueName;
+ // System.out.println("Returning value for " + valueName
+ // + ": " + value);
+ return value;
+ }
+ throw new XmlPullParserException(
+ "Unexpected end tag in <string>: "
+ + parser.getName());
+ } else if (eventType == XmlPullParser.TEXT) {
+ value += parser.getText();
+ } else if (eventType == XmlPullParser.START_TAG) {
+ throw new XmlPullParserException(
+ "Unexpected start tag in <string>: "
+ + parser.getName());
+ }
+ }
+ throw new XmlPullParserException(
+ "Unexpected end of document in <string>");
+ } else if (tagName.equals("int")) {
+ res = Integer.parseInt(parser.getAttributeValue(null, "value"));
+ } else if (tagName.equals("long")) {
+ res = Long.valueOf(parser.getAttributeValue(null, "value"));
+ } else if (tagName.equals("float")) {
+ res = Float.valueOf(parser.getAttributeValue(null, "value"));
+ } else if (tagName.equals("double")) {
+ res = Double.valueOf(parser.getAttributeValue(null, "value"));
+ } else if (tagName.equals("boolean")) {
+ res = Boolean.valueOf(parser.getAttributeValue(null, "value"));
+ } else if (tagName.equals("int-array")) {
+ parser.next();
+ res = XmlUtils.readThisIntArrayXml(parser, "int-array", name);
+ name[0] = valueName;
+ return res;
+ } else if (tagName.equals("map")) {
+ parser.next();
+ res = XmlUtils.readThisMapXml(parser, "map", name);
+ name[0] = valueName;
+ return res;
+ } else if (tagName.equals("list")) {
+ parser.next();
+ res = XmlUtils.readThisListXml(parser, "list", name);
+ name[0] = valueName;
+ return res;
+ } else if (tagName.equals("set")) {
+ parser.next();
+ res = XmlUtils.readThisSetXml(parser, "set", name);
+ name[0] = valueName;
+ return res;
+ } else {
+ throw new XmlPullParserException("Unknown tag: " + tagName);
+ }
+
+ int eventType;
+ while ((eventType = parser.next()) != XmlPullParser.END_DOCUMENT) {
+ if (eventType == XmlPullParser.END_TAG) {
+ if (parser.getName().equals(tagName)) {
+ name[0] = valueName;
+ return res;
+ }
+ throw new XmlPullParserException("Unexpected end tag in <"
+ + tagName + ">: " + parser.getName());
+ } else if (eventType == XmlPullParser.TEXT) {
+ throw new XmlPullParserException("Unexpected text in <"
+ + tagName + ">: " + parser.getName());
+ } else if (eventType == XmlPullParser.START_TAG) {
+ throw new XmlPullParserException("Unexpected start tag in <"
+ + tagName + ">: " + parser.getName());
+ }
+ }
+ throw new XmlPullParserException("Unexpected end of document in <"
+ + tagName + ">");
+ }
+
+ public static final Object readValueXml(XmlPullParser parser, String[] name)
+ throws XmlPullParserException, java.io.IOException {
+ int eventType = parser.getEventType();
+ do {
+ if (eventType == XmlPullParser.START_TAG) {
+ return XmlUtils.readThisValueXml(parser, name);
+ } else if (eventType == XmlPullParser.END_TAG) {
+ throw new XmlPullParserException("Unexpected end tag at: "
+ + parser.getName());
+ } else if (eventType == XmlPullParser.TEXT) {
+ throw new XmlPullParserException("Unexpected text: "
+ + parser.getText());
+ }
+ eventType = parser.next();
+ } while (eventType != XmlPullParser.END_DOCUMENT);
+
+ throw new XmlPullParserException("Unexpected end of document");
+ }
+
+ public static void skipCurrentTag(XmlPullParser parser)
+ throws XmlPullParserException, IOException {
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ }
+ }
+
+ public static final void writeByteArrayXml(byte[] val, String name,
+ XmlSerializer out) throws XmlPullParserException,
+ java.io.IOException {
+
+ if (val == null) {
+ out.startTag(null, "null");
+ out.endTag(null, "null");
+ return;
+ }
+
+ out.startTag(null, "byte-array");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+
+ final int N = val.length;
+ out.attribute(null, "num", Integer.toString(N));
+
+ StringBuilder sb = new StringBuilder(val.length * 2);
+ for (int i = 0; i < N; i++) {
+ int b = val[i];
+ int h = b >> 4;
+ sb.append(h >= 10 ? 'a' + h - 10 : '0' + h);
+ h = b & 0xff;
+ sb.append(h >= 10 ? 'a' + h - 10 : '0' + h);
+ }
+
+ out.text(sb.toString());
+
+ out.endTag(null, "byte-array");
+ }
+
+ public static final void writeIntArrayXml(int[] val, String name,
+ XmlSerializer out) throws XmlPullParserException,
+ java.io.IOException {
+
+ if (val == null) {
+ out.startTag(null, "null");
+ out.endTag(null, "null");
+ return;
+ }
+
+ out.startTag(null, "int-array");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+
+ final int N = val.length;
+ out.attribute(null, "num", Integer.toString(N));
+
+ for (int i = 0; i < N; i++) {
+ out.startTag(null, "item");
+ out.attribute(null, "value", Integer.toString(val[i]));
+ out.endTag(null, "item");
+ }
+
+ out.endTag(null, "int-array");
+ }
+
+ public static final void writeListXml(List val, OutputStream out)
+ throws XmlPullParserException, java.io.IOException {
+ XmlSerializer serializer = Xml.newSerializer();
+ serializer.setOutput(out, "utf-8");
+ serializer.startDocument(null, true);
+ serializer.setFeature(
+ "http://xmlpull.org/v1/doc/features.html#indent-output", true);
+ XmlUtils.writeListXml(val, null, serializer);
+ serializer.endDocument();
+ }
+
+ public static final void writeListXml(List val, String name,
+ XmlSerializer out) throws XmlPullParserException,
+ java.io.IOException {
+ if (val == null) {
+ out.startTag(null, "null");
+ out.endTag(null, "null");
+ return;
+ }
+
+ out.startTag(null, "list");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+
+ int N = val.size();
+ int i = 0;
+ while (i < N) {
+ XmlUtils.writeValueXml(val.get(i), null, out);
+ i++;
+ }
+
+ out.endTag(null, "list");
+ }
+
+ public static final void writeMapXml(Map val, OutputStream out)
+ throws XmlPullParserException, java.io.IOException {
+ XmlSerializer serializer = new FastXmlSerializer();
+ serializer.setOutput(out, "utf-8");
+ serializer.startDocument(null, true);
+ serializer.setFeature(
+ "http://xmlpull.org/v1/doc/features.html#indent-output", true);
+ XmlUtils.writeMapXml(val, null, serializer);
+ serializer.endDocument();
+ }
+
+ public static final void writeMapXml(Map val, String name, XmlSerializer out)
+ throws XmlPullParserException, java.io.IOException {
+ if (val == null) {
+ out.startTag(null, "null");
+ out.endTag(null, "null");
+ return;
+ }
+
+ Set s = val.entrySet();
+ Iterator i = s.iterator();
+
+ out.startTag(null, "map");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+
+ while (i.hasNext()) {
+ Map.Entry e = (Map.Entry) i.next();
+ XmlUtils.writeValueXml(e.getValue(), (String) e.getKey(), out);
+ }
+
+ out.endTag(null, "map");
+ }
+
+ public static final void writeSetXml(Set val, String name, XmlSerializer out)
+ throws XmlPullParserException, java.io.IOException {
+ if (val == null) {
+ out.startTag(null, "null");
+ out.endTag(null, "null");
+ return;
+ }
+
+ out.startTag(null, "set");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+
+ for (Object v : val) {
+ XmlUtils.writeValueXml(v, null, out);
+ }
+
+ out.endTag(null, "set");
+ }
+
+ public static final void writeValueXml(Object v, String name,
+ XmlSerializer out) throws XmlPullParserException,
+ java.io.IOException {
+ String typeStr;
+ if (v == null) {
+ out.startTag(null, "null");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+ out.endTag(null, "null");
+ return;
+ } else if (v instanceof String) {
+ out.startTag(null, "string");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+ out.text(v.toString());
+ out.endTag(null, "string");
+ return;
+ } else if (v instanceof Integer) {
+ typeStr = "int";
+ } else if (v instanceof Long) {
+ typeStr = "long";
+ } else if (v instanceof Float) {
+ typeStr = "float";
+ } else if (v instanceof Double) {
+ typeStr = "double";
+ } else if (v instanceof Boolean) {
+ typeStr = "boolean";
+ } else if (v instanceof byte[]) {
+ XmlUtils.writeByteArrayXml((byte[]) v, name, out);
+ return;
+ } else if (v instanceof int[]) {
+ XmlUtils.writeIntArrayXml((int[]) v, name, out);
+ return;
+ } else if (v instanceof Map) {
+ XmlUtils.writeMapXml((Map) v, name, out);
+ return;
+ } else if (v instanceof List) {
+ XmlUtils.writeListXml((List) v, name, out);
+ return;
+ } else if (v instanceof Set) {
+ XmlUtils.writeSetXml((Set) v, name, out);
+ return;
+ } else if (v instanceof CharSequence) {
+ out.startTag(null, "string");
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+ out.text(v.toString());
+ out.endTag(null, "string");
+ return;
+ } else {
+ throw new RuntimeException("writeValueXml: unable to write value "
+ + v);
+ }
+
+ out.startTag(null, typeStr);
+ if (name != null) {
+ out.attribute(null, "name", name);
+ }
+ out.attribute(null, "value", v.toString());
+ out.endTag(null, typeStr);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSeekBar.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSeekBar.java
new file mode 100644
index 0000000000..350a95b858
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSeekBar.java
@@ -0,0 +1,414 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal._View;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.ViewConfiguration;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+public abstract class AbsSeekBar extends ProgressBar {
+ private static final int NO_ALPHA = 0xFF;
+ private float mDisabledAlpha;
+ private boolean mIsDragging;
+ boolean mIsUserSeekable = true;
+ private int mKeyProgressIncrement = 1;
+ private int mScaledTouchSlop;
+ private Drawable mThumb;
+ private int mThumbOffset;
+ private float mTouchDownX;
+ float mTouchProgressOffset;
+
+ public AbsSeekBar(Context context) {
+ super(context);
+ }
+
+ public AbsSeekBar(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public AbsSeekBar(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.SeekBar, defStyle, 0);
+ Drawable thumb = a.getDrawable(R.styleable.SeekBar_android_thumb);
+ setThumb(thumb);
+ int thumbOffset = a.getDimensionPixelOffset(
+ R.styleable.SeekBar_android_thumbOffset, getThumbOffset());
+ setThumbOffset(thumbOffset);
+ mDisabledAlpha = a.getFloat(R.styleable.SeekBar_android_disabledAlpha,
+ 0.5f);
+ a.recycle();
+ mScaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+ }
+
+ private void attemptClaimDrag() {
+ if (getParent() != null) {
+ getParent().requestDisallowInterceptTouchEvent(true);
+ }
+ }
+
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ Drawable progressDrawable = getProgressDrawable();
+ if (progressDrawable != null) {
+ progressDrawable.setAlpha(isEnabled() ? AbsSeekBar.NO_ALPHA
+ : (int) (AbsSeekBar.NO_ALPHA * mDisabledAlpha));
+ }
+ if (mThumb != null && mThumb.isStateful()) {
+ int[] state = getDrawableState();
+ mThumb.setState(state);
+ }
+ }
+
+ public int getKeyProgressIncrement() {
+ return mKeyProgressIncrement;
+ }
+
+ public Drawable getThumb() {
+ return mThumb;
+ }
+
+ public int getThumbOffset() {
+ return mThumbOffset;
+ }
+
+ public boolean isInScrollingContainer() {
+ return false;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void jumpDrawablesToCurrentState() {
+ super.jumpDrawablesToCurrentState();
+ if (mThumb != null) {
+ mThumb.jumpToCurrentState();
+ }
+ }
+
+ @Override
+ protected synchronized void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ if (mThumb != null) {
+ canvas.save();
+ canvas.translate(getPaddingLeft() - mThumbOffset, getPaddingTop());
+ mThumb.draw(canvas);
+ canvas.restore();
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(AbsSeekBar.class.getName());
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(AbsSeekBar.class.getName());
+ if (isEnabled()) {
+ final int progress = getProgress();
+ if (progress > 0) {
+ info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD);
+ }
+ if (progress < getMax()) {
+ info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);
+ }
+ }
+ }
+
+ void onKeyChange() {
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (isEnabled()) {
+ int progress = getProgress();
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_LEFT:
+ if (progress <= 0) {
+ break;
+ }
+ setProgress(progress - mKeyProgressIncrement, true);
+ onKeyChange();
+ return true;
+ case KeyEvent.KEYCODE_DPAD_RIGHT:
+ if (progress >= getMax()) {
+ break;
+ }
+ setProgress(progress + mKeyProgressIncrement, true);
+ onKeyChange();
+ return true;
+ }
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ @Override
+ protected synchronized void onMeasure(int widthMeasureSpec,
+ int heightMeasureSpec) {
+ Drawable d = getCurrentDrawable();
+ int thumbHeight = mThumb == null ? 0 : mThumb.getIntrinsicHeight();
+ int dw = 0;
+ int dh = 0;
+ if (d != null) {
+ dw = Math
+ .max(mMinWidth, Math.min(mMaxWidth, d.getIntrinsicWidth()));
+ dh = Math.max(mMinHeight,
+ Math.min(mMaxHeight, d.getIntrinsicHeight()));
+ dh = Math.max(thumbHeight, dh);
+ }
+ dw += getPaddingLeft() + getPaddingRight();
+ dh += getPaddingTop() + getPaddingBottom();
+ setMeasuredDimension(
+ _View.supportResolveSizeAndState(dw, widthMeasureSpec, 0),
+ _View.supportResolveSizeAndState(dh, heightMeasureSpec, 0));
+ }
+
+ @Override
+ public void onProgressRefresh(float scale, boolean fromUser) {
+ super.onProgressRefresh(scale, fromUser);
+ Drawable thumb = mThumb;
+ if (thumb != null) {
+ setThumbPos(getWidth(), thumb, scale, Integer.MIN_VALUE);
+ invalidate();
+ }
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ updateThumbPos(w, h);
+ }
+
+ void onStartTrackingTouch() {
+ mIsDragging = true;
+ }
+
+ void onStopTrackingTouch() {
+ mIsDragging = false;
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (!mIsUserSeekable || !isEnabled()) {
+ return false;
+ }
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ if (isInScrollingContainer()) {
+ mTouchDownX = event.getX();
+ } else {
+ setPressed(true);
+ if (mThumb != null) {
+ invalidate(mThumb.getBounds());
+ }
+ onStartTrackingTouch();
+ trackTouchEvent(event);
+ attemptClaimDrag();
+ }
+ break;
+ case MotionEvent.ACTION_MOVE:
+ if (mIsDragging) {
+ trackTouchEvent(event);
+ } else {
+ final float x = event.getX();
+ if (Math.abs(x - mTouchDownX) > mScaledTouchSlop) {
+ setPressed(true);
+ if (mThumb != null) {
+ invalidate(mThumb.getBounds());
+ }
+ onStartTrackingTouch();
+ trackTouchEvent(event);
+ attemptClaimDrag();
+ }
+ }
+ break;
+ case MotionEvent.ACTION_UP:
+ if (mIsDragging) {
+ trackTouchEvent(event);
+ onStopTrackingTouch();
+ setPressed(false);
+ } else {
+ onStartTrackingTouch();
+ trackTouchEvent(event);
+ onStopTrackingTouch();
+ }
+ invalidate();
+ break;
+ case MotionEvent.ACTION_CANCEL:
+ if (mIsDragging) {
+ onStopTrackingTouch();
+ setPressed(false);
+ }
+ invalidate();
+ break;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean performAccessibilityAction(int action, Bundle arguments) {
+ if (super.performAccessibilityAction(action, arguments)) {
+ return true;
+ }
+ if (!isEnabled()) {
+ return false;
+ }
+ final int progress = getProgress();
+ final int increment = Math.max(1, Math.round((float) getMax() / 5));
+ switch (action) {
+ case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD: {
+ if (progress <= 0) {
+ return false;
+ }
+ setProgress(progress - increment, true);
+ onKeyChange();
+ return true;
+ }
+ case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD: {
+ if (progress >= getMax()) {
+ return false;
+ }
+ setProgress(progress + increment, true);
+ onKeyChange();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void setKeyProgressIncrement(int increment) {
+ mKeyProgressIncrement = increment < 0 ? -increment : increment;
+ }
+
+ @Override
+ public synchronized void setMax(int max) {
+ super.setMax(max);
+ if (mKeyProgressIncrement == 0 || getMax() / mKeyProgressIncrement > 20) {
+ setKeyProgressIncrement(Math.max(1,
+ Math.round((float) getMax() / 20)));
+ }
+ }
+
+ public void setThumb(Drawable thumb) {
+ boolean needUpdate;
+ if (mThumb != null && thumb != mThumb) {
+ mThumb.setCallback(null);
+ needUpdate = true;
+ } else {
+ needUpdate = false;
+ }
+ if (thumb != null) {
+ thumb.setCallback(this);
+ mThumbOffset = thumb.getIntrinsicWidth() / 2;
+ if (needUpdate
+ && (thumb.getIntrinsicWidth() != mThumb.getIntrinsicWidth() || thumb
+ .getIntrinsicHeight() != mThumb
+ .getIntrinsicHeight())) {
+ requestLayout();
+ }
+ }
+ mThumb = thumb;
+ invalidate();
+ if (needUpdate) {
+ updateThumbPos(getWidth(), getHeight());
+ if (thumb != null && thumb.isStateful()) {
+ int[] state = getDrawableState();
+ thumb.setState(state);
+ }
+ }
+ }
+
+ public void setThumbOffset(int thumbOffset) {
+ mThumbOffset = thumbOffset;
+ invalidate();
+ }
+
+ private void setThumbPos(int w, Drawable thumb, float scale, int gap) {
+ int available = w - getPaddingLeft() - getPaddingRight();
+ int thumbWidth = thumb.getIntrinsicWidth();
+ int thumbHeight = thumb.getIntrinsicHeight();
+ available -= thumbWidth;
+ available += mThumbOffset * 2;
+ int thumbPos = (int) (scale * available);
+ int topBound, bottomBound;
+ if (gap == Integer.MIN_VALUE) {
+ Rect oldBounds = thumb.getBounds();
+ topBound = oldBounds.top;
+ bottomBound = oldBounds.bottom;
+ } else {
+ topBound = gap;
+ bottomBound = gap + thumbHeight;
+ }
+ thumb.setBounds(thumbPos, topBound, thumbPos + thumbWidth, bottomBound);
+ }
+
+ private void trackTouchEvent(MotionEvent event) {
+ final int width = getWidth();
+ final int available = width - getPaddingLeft() - getPaddingRight();
+ int x = (int) event.getX();
+ float scale;
+ float progress = 0;
+ if (x < getPaddingLeft()) {
+ scale = 0.0f;
+ } else if (x > width - getPaddingRight()) {
+ scale = 1.0f;
+ } else {
+ scale = (float) (x - getPaddingLeft()) / (float) available;
+ progress = mTouchProgressOffset;
+ }
+ final int max = getMax();
+ progress += scale * max;
+ setProgress((int) progress, true);
+ }
+
+ private void updateThumbPos(int w, int h) {
+ Drawable d = getCurrentDrawable();
+ Drawable thumb = mThumb;
+ int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight();
+ int trackHeight = Math.min(mMaxHeight, h - getPaddingTop()
+ - getPaddingBottom());
+ int max = getMax();
+ float scale = max > 0 ? (float) getProgress() / (float) max : 0;
+ if (thumbHeight > trackHeight) {
+ if (thumb != null) {
+ setThumbPos(w, thumb, scale, 0);
+ }
+ int gapForCenteringTrack = (thumbHeight - trackHeight) / 2;
+ if (d != null) {
+ d.setBounds(0, gapForCenteringTrack, w - getPaddingRight()
+ - getPaddingLeft(), h - getPaddingBottom()
+ - gapForCenteringTrack - getPaddingTop());
+ }
+ } else {
+ if (d != null) {
+ d.setBounds(0, 0, w - getPaddingRight() - getPaddingLeft(), h
+ - getPaddingBottom() - getPaddingTop());
+ }
+ int gap = (trackHeight - thumbHeight) / 2;
+ if (thumb != null) {
+ setThumbPos(w, thumb, scale, gap);
+ }
+ }
+ }
+
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ return who == mThumb || super.verifyDrawable(who);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSpinner.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSpinner.java
new file mode 100644
index 0000000000..b789140d86
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AbsSpinner.java
@@ -0,0 +1,382 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.ArrayAdapter;
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.os.Build.VERSION;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.SpinnerAdapter;
+
+public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> {
+ class RecycleBin {
+ private final SparseArray<View> mScrapHeap = new SparseArray<View>();
+
+ void clear() {
+ final SparseArray<View> scrapHeap = mScrapHeap;
+ final int count = scrapHeap.size();
+ for (int i = 0; i < count; i++) {
+ final View view = scrapHeap.valueAt(i);
+ if (view != null) {
+ removeDetachedView(view, true);
+ }
+ }
+ scrapHeap.clear();
+ }
+
+ View get(int position) {
+ View result = mScrapHeap.get(position);
+ if (result != null) {
+ mScrapHeap.delete(position);
+ }
+ return result;
+ }
+
+ public void put(int position, View v) {
+ mScrapHeap.put(position, v);
+ }
+ }
+
+ static class SavedState extends BaseSavedState {
+ public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {
+ @Override
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ int position;
+
+ long selectedId;
+
+ private SavedState(Parcel in) {
+ super(in);
+ selectedId = in.readLong();
+ position = in.readInt();
+ }
+
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ @Override
+ public String toString() {
+ return "AbsSpinner.SavedState{"
+ + Integer.toHexString(System.identityHashCode(this))
+ + " selectedId=" + selectedId + " position=" + position
+ + "}";
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeLong(selectedId);
+ out.writeInt(position);
+ }
+ }
+
+ SpinnerAdapter mAdapter;
+ private DataSetObserver mDataSetObserver;
+ int mHeightMeasureSpec;
+ final RecycleBin mRecycler = new RecycleBin();
+ int mSelectionBottomPadding = 0;
+ int mSelectionLeftPadding = 0;
+ int mSelectionRightPadding = 0;
+ int mSelectionTopPadding = 0;
+ final Rect mSpinnerPadding = new Rect();
+
+ private Rect mTouchFrame;
+
+ int mWidthMeasureSpec;
+
+ public AbsSpinner(Context context) {
+ super(context);
+ initAbsSpinner();
+ }
+
+ public AbsSpinner(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public AbsSpinner(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ initAbsSpinner();
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.AbsSpinner, defStyle, 0);
+ CharSequence[] entries = a
+ .getTextArray(R.styleable.AbsSpinner_android_entries);
+ if (entries != null) {
+ ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(
+ context, R.layout.simple_spinner_item, entries);
+ adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item);
+ setAdapter(adapter);
+ }
+ a.recycle();
+ }
+
+ @Override
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
+ return new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+
+ @Override
+ public SpinnerAdapter getAdapter() {
+ return mAdapter;
+ }
+
+ int getChildHeight(View child) {
+ return child.getMeasuredHeight();
+ }
+
+ int getChildWidth(View child) {
+ return child.getMeasuredWidth();
+ }
+
+ @Override
+ public int getCount() {
+ return mItemCount;
+ }
+
+ @Override
+ public View getSelectedView() {
+ if (mItemCount > 0 && mSelectedPosition >= 0) {
+ return getChildAt(mSelectedPosition - mFirstPosition);
+ } else {
+ return null;
+ }
+ }
+
+ private void initAbsSpinner() {
+ setFocusable(true);
+ setWillNotDraw(false);
+ }
+
+ abstract void layout(int delta, boolean animate);
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(AbsSpinner.class.getName());
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(AbsSpinner.class.getName());
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ int widthSize;
+ int heightSize;
+ mSpinnerPadding.left = getPaddingLeft() > mSelectionLeftPadding ? getPaddingLeft()
+ : mSelectionLeftPadding;
+ mSpinnerPadding.top = getPaddingTop() > mSelectionTopPadding ? getPaddingTop()
+ : mSelectionTopPadding;
+ mSpinnerPadding.right = getPaddingRight() > mSelectionRightPadding ? getPaddingRight()
+ : mSelectionRightPadding;
+ mSpinnerPadding.bottom = getPaddingBottom() > mSelectionBottomPadding ? getPaddingBottom()
+ : mSelectionBottomPadding;
+ if (mDataChanged) {
+ handleDataChanged();
+ }
+ int preferredHeight = 0;
+ int preferredWidth = 0;
+ boolean needsMeasuring = true;
+ int selectedPosition = getSelectedItemPosition();
+ if (selectedPosition >= 0 && mAdapter != null
+ && selectedPosition < mAdapter.getCount()) {
+ View view = mRecycler.get(selectedPosition);
+ if (view == null) {
+ view = mAdapter.getView(selectedPosition, null, this);
+ if (VERSION.SDK_INT >= 16
+ && view.getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+ view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+ }
+ }
+ if (view != null) {
+ mRecycler.put(selectedPosition, view);
+ }
+ if (view != null) {
+ if (view.getLayoutParams() == null) {
+ mBlockLayoutRequests = true;
+ view.setLayoutParams(generateDefaultLayoutParams());
+ mBlockLayoutRequests = false;
+ }
+ measureChild(view, widthMeasureSpec, heightMeasureSpec);
+ preferredHeight = getChildHeight(view) + mSpinnerPadding.top
+ + mSpinnerPadding.bottom;
+ preferredWidth = getChildWidth(view) + mSpinnerPadding.left
+ + mSpinnerPadding.right;
+ needsMeasuring = false;
+ }
+ }
+ if (needsMeasuring) {
+ preferredHeight = mSpinnerPadding.top + mSpinnerPadding.bottom;
+ if (widthMode == MeasureSpec.UNSPECIFIED) {
+ preferredWidth = mSpinnerPadding.left + mSpinnerPadding.right;
+ }
+ }
+ preferredHeight = Math
+ .max(preferredHeight, getSuggestedMinimumHeight());
+ preferredWidth = Math.max(preferredWidth, getSuggestedMinimumWidth());
+ heightSize = org.holoeverywhere.internal._View
+ .supportResolveSizeAndState(preferredHeight, heightMeasureSpec,
+ 0);
+ widthSize = org.holoeverywhere.internal._View
+ .supportResolveSizeAndState(preferredWidth, widthMeasureSpec, 0);
+ setMeasuredDimension(widthSize, heightSize);
+ mHeightMeasureSpec = heightMeasureSpec;
+ mWidthMeasureSpec = widthMeasureSpec;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+
+ super.onRestoreInstanceState(ss.getSuperState());
+
+ if (ss.selectedId >= 0) {
+ mDataChanged = true;
+ mNeedSync = true;
+ mSyncRowId = ss.selectedId;
+ mSyncPosition = ss.position;
+ mSyncMode = AdapterView.SYNC_SELECTED_POSITION;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState ss = new SavedState(superState);
+ ss.selectedId = getSelectedItemId();
+ if (ss.selectedId >= 0) {
+ ss.position = getSelectedItemPosition();
+ } else {
+ ss.position = AdapterView.INVALID_POSITION;
+ }
+ return ss;
+ }
+
+ public int pointToPosition(int x, int y) {
+ Rect frame = mTouchFrame;
+ if (frame == null) {
+ mTouchFrame = new Rect();
+ frame = mTouchFrame;
+ }
+ final int count = getChildCount();
+ for (int i = count - 1; i >= 0; i--) {
+ View child = getChildAt(i);
+ if (child.getVisibility() == View.VISIBLE) {
+ child.getHitRect(frame);
+ if (frame.contains(x, y)) {
+ return mFirstPosition + i;
+ }
+ }
+ }
+ return AdapterView.INVALID_POSITION;
+ }
+
+ void recycleAllViews() {
+ final int childCount = getChildCount();
+ final AbsSpinner.RecycleBin recycleBin = mRecycler;
+ final int position = mFirstPosition;
+ for (int i = 0; i < childCount; i++) {
+ View v = getChildAt(i);
+ int index = position + i;
+ recycleBin.put(index, v);
+ }
+ }
+
+ @Override
+ public void requestLayout() {
+ if (!mBlockLayoutRequests) {
+ super.requestLayout();
+ }
+ }
+
+ void resetList() {
+ mDataChanged = false;
+ mNeedSync = false;
+ removeAllViewsInLayout();
+ mOldSelectedPosition = AdapterView.INVALID_POSITION;
+ mOldSelectedRowId = AdapterView.INVALID_ROW_ID;
+ setSelectedPositionInt(AdapterView.INVALID_POSITION);
+ setNextSelectedPositionInt(AdapterView.INVALID_POSITION);
+ invalidate();
+ }
+
+ @Override
+ public void setAdapter(SpinnerAdapter adapter) {
+ if (null != mAdapter) {
+ mAdapter.unregisterDataSetObserver(mDataSetObserver);
+ resetList();
+ }
+ mAdapter = adapter;
+ mOldSelectedPosition = AdapterView.INVALID_POSITION;
+ mOldSelectedRowId = AdapterView.INVALID_ROW_ID;
+ if (mAdapter != null) {
+ mOldItemCount = mItemCount;
+ mItemCount = mAdapter.getCount();
+ checkFocus();
+ mDataSetObserver = new AdapterDataSetObserver();
+ mAdapter.registerDataSetObserver(mDataSetObserver);
+ int position = mItemCount > 0 ? 0 : AdapterView.INVALID_POSITION;
+ setSelectedPositionInt(position);
+ setNextSelectedPositionInt(position);
+ if (mItemCount == 0) {
+ checkSelectionChanged();
+ }
+ } else {
+ checkFocus();
+ resetList();
+ checkSelectionChanged();
+ }
+ requestLayout();
+ }
+
+ @Override
+ public void setSelection(int position) {
+ setNextSelectedPositionInt(position);
+ requestLayout();
+ invalidate();
+ }
+
+ public void setSelection(int position, boolean animate) {
+ boolean shouldAnimate = animate && mFirstPosition <= position
+ && position <= mFirstPosition + getChildCount() - 1;
+ setSelectionInt(position, shouldAnimate);
+ }
+
+ void setSelectionInt(int position, boolean animate) {
+ if (position != mOldSelectedPosition) {
+ mBlockLayoutRequests = true;
+ int delta = position - mSelectedPosition;
+ setNextSelectedPositionInt(position);
+ layout(delta, animate);
+ mBlockLayoutRequests = false;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AdapterView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AdapterView.java
new file mode 100644
index 0000000000..cb4c10703c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AdapterView.java
@@ -0,0 +1,677 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.internal._ViewGroup;
+import org.holoeverywhere.util.ReflectHelper;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.database.DataSetObserver;
+import android.os.Build.VERSION;
+import android.os.Parcelable;
+import android.os.SystemClock;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.view.SoundEffectConstants;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.Adapter;
+
+public abstract class AdapterView<T extends Adapter> extends _ViewGroup {
+ class AdapterDataSetObserver extends DataSetObserver {
+ private Parcelable mInstanceState = null;
+
+ public void clearSavedState() {
+ mInstanceState = null;
+ }
+
+ @Override
+ public void onChanged() {
+ mDataChanged = true;
+ mOldItemCount = mItemCount;
+ mItemCount = getAdapter().getCount();
+ if (AdapterView.this.getAdapter().hasStableIds()
+ && mInstanceState != null && mOldItemCount == 0
+ && mItemCount > 0) {
+ onRestoreInstanceState(mInstanceState);
+ mInstanceState = null;
+ } else {
+ rememberSyncState();
+ }
+ checkFocus();
+ requestLayout();
+ }
+
+ @Override
+ public void onInvalidated() {
+ mDataChanged = true;
+ if (AdapterView.this.getAdapter().hasStableIds()) {
+ mInstanceState = onSaveInstanceState();
+ }
+ mOldItemCount = mItemCount;
+ mItemCount = 0;
+ mSelectedPosition = AdapterView.INVALID_POSITION;
+ mSelectedRowId = AdapterView.INVALID_ROW_ID;
+ mNextSelectedPosition = AdapterView.INVALID_POSITION;
+ mNextSelectedRowId = AdapterView.INVALID_ROW_ID;
+ mNeedSync = false;
+ checkFocus();
+ requestLayout();
+ }
+ }
+
+ public interface OnItemClickListener {
+ void onItemClick(AdapterView<?> parent, View view, int position, long id);
+ }
+
+ public interface OnItemLongClickListener {
+ boolean onItemLongClick(AdapterView<?> parent, View view, int position,
+ long id);
+ }
+
+ public interface OnItemSelectedListener {
+ void onItemSelected(AdapterView<?> parent, View view, int position,
+ long id);
+
+ void onNothingSelected(AdapterView<?> parent);
+ }
+
+ private class SelectionNotifier implements Runnable {
+ @Override
+ public void run() {
+ if (mDataChanged) {
+ if (getAdapter() != null) {
+ post(this);
+ }
+ } else {
+ fireOnSelected();
+ performAccessibilityActionsOnSelected();
+ }
+ }
+ }
+
+ public static final int INVALID_POSITION = -1;
+ public static final long INVALID_ROW_ID = Long.MIN_VALUE;
+ public static final int ITEM_VIEW_TYPE_HEADER_OR_FOOTER = -2;
+ public static final int ITEM_VIEW_TYPE_IGNORE = -1;
+ static final int SYNC_FIRST_POSITION = 1;
+ static final int SYNC_MAX_DURATION_MILLIS = 100;
+ static final int SYNC_SELECTED_POSITION = 0;
+ boolean mBlockLayoutRequests = false;
+ boolean mDataChanged;
+ private boolean mDesiredFocusableInTouchModeState;
+ private boolean mDesiredFocusableState;
+ private View mEmptyView;
+ @ViewDebug.ExportedProperty(category = "scrolling")
+ int mFirstPosition = 0;
+ boolean mInLayout = false;
+ @ViewDebug.ExportedProperty(category = "list")
+ int mItemCount;
+ private int mLayoutHeight;
+ boolean mNeedSync = false;
+ @ViewDebug.ExportedProperty(category = "list")
+ int mNextSelectedPosition = AdapterView.INVALID_POSITION;
+ long mNextSelectedRowId = AdapterView.INVALID_ROW_ID;
+ int mOldItemCount;
+ int mOldSelectedPosition = AdapterView.INVALID_POSITION;
+ long mOldSelectedRowId = AdapterView.INVALID_ROW_ID;
+ OnItemClickListener mOnItemClickListener;
+ OnItemLongClickListener mOnItemLongClickListener;
+ OnItemSelectedListener mOnItemSelectedListener;
+ @ViewDebug.ExportedProperty(category = "list")
+ int mSelectedPosition = AdapterView.INVALID_POSITION;
+ long mSelectedRowId = AdapterView.INVALID_ROW_ID;
+
+ private SelectionNotifier mSelectionNotifier;
+
+ int mSpecificTop;
+
+ long mSyncHeight;
+
+ int mSyncMode;
+
+ int mSyncPosition;
+
+ long mSyncRowId = AdapterView.INVALID_ROW_ID;
+
+ public AdapterView(Context context) {
+ super(context);
+ }
+
+ public AdapterView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @SuppressLint("NewApi")
+ public AdapterView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ if (VERSION.SDK_INT >= 16
+ && getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+ setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+ }
+ }
+
+ @Override
+ public void addView(View child) {
+ throw new UnsupportedOperationException(
+ "addView(View) is not supported in AdapterView");
+ }
+
+ @Override
+ public void addView(View child, int index) {
+ throw new UnsupportedOperationException(
+ "addView(View, int) is not supported in AdapterView");
+ }
+
+ @Override
+ public void addView(View child, int index, LayoutParams params) {
+ throw new UnsupportedOperationException(
+ "addView(View, int, LayoutParams) "
+ + "is not supported in AdapterView");
+ }
+
+ @Override
+ public void addView(View child, LayoutParams params) {
+ throw new UnsupportedOperationException("addView(View, LayoutParams) "
+ + "is not supported in AdapterView");
+ }
+
+ @Override
+ protected boolean canAnimate() {
+ return super.canAnimate() && mItemCount > 0;
+ }
+
+ void checkFocus() {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+ final boolean focusable = !empty || isInFilterMode();
+ super.setFocusableInTouchMode(focusable
+ && mDesiredFocusableInTouchModeState);
+ super.setFocusable(focusable && mDesiredFocusableState);
+ if (mEmptyView != null) {
+ updateEmptyStatus(adapter == null || adapter.isEmpty());
+ }
+ }
+
+ void checkSelectionChanged() {
+ if (mSelectedPosition != mOldSelectedPosition
+ || mSelectedRowId != mOldSelectedRowId) {
+ selectionChanged();
+ mOldSelectedPosition = mSelectedPosition;
+ mOldSelectedRowId = mSelectedRowId;
+ }
+ }
+
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ View selectedView = getSelectedView();
+ if (selectedView != null
+ && selectedView.getVisibility() == View.VISIBLE
+ && selectedView.dispatchPopulateAccessibilityEvent(event)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected void dispatchRestoreInstanceState(
+ SparseArray<Parcelable> container) {
+ dispatchThawSelfOnly(container);
+ }
+
+ @Override
+ protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {
+ dispatchFreezeSelfOnly(container);
+ }
+
+ int findSyncPosition() {
+ int count = mItemCount;
+ if (count == 0) {
+ return AdapterView.INVALID_POSITION;
+ }
+ long idToMatch = mSyncRowId;
+ int seed = mSyncPosition;
+ if (idToMatch == AdapterView.INVALID_ROW_ID) {
+ return AdapterView.INVALID_POSITION;
+ }
+ seed = Math.max(0, seed);
+ seed = Math.min(count - 1, seed);
+ long endTime = SystemClock.uptimeMillis()
+ + AdapterView.SYNC_MAX_DURATION_MILLIS;
+ long rowId;
+ int first = seed;
+ int last = seed;
+ boolean next = false;
+ boolean hitFirst;
+ boolean hitLast;
+ T adapter = getAdapter();
+ if (adapter == null) {
+ return AdapterView.INVALID_POSITION;
+ }
+ while (SystemClock.uptimeMillis() <= endTime) {
+ rowId = adapter.getItemId(seed);
+ if (rowId == idToMatch) {
+ return seed;
+ }
+ hitLast = last == count - 1;
+ hitFirst = first == 0;
+ if (hitLast && hitFirst) {
+ break;
+ }
+ if (hitFirst || next && !hitLast) {
+ last++;
+ seed = last;
+ next = false;
+ } else if (hitLast || !next && !hitFirst) {
+ first--;
+ seed = first;
+ next = true;
+ }
+ }
+ return AdapterView.INVALID_POSITION;
+ }
+
+ private void fireOnSelected() {
+ if (mOnItemSelectedListener == null) {
+ return;
+ }
+ final int selection = getSelectedItemPosition();
+ if (selection >= 0) {
+ View v = getSelectedView();
+ mOnItemSelectedListener.onItemSelected(this, v, selection,
+ getAdapter().getItemId(selection));
+ } else {
+ mOnItemSelectedListener.onNothingSelected(this);
+ }
+ }
+
+ public abstract T getAdapter();
+
+ @ViewDebug.CapturedViewProperty
+ public int getCount() {
+ return mItemCount;
+ }
+
+ public View getEmptyView() {
+ return mEmptyView;
+ }
+
+ public int getFirstVisiblePosition() {
+ return mFirstPosition;
+ }
+
+ public Object getItemAtPosition(int position) {
+ T adapter = getAdapter();
+ return adapter == null || position < 0 ? null : adapter
+ .getItem(position);
+ }
+
+ public long getItemIdAtPosition(int position) {
+ T adapter = getAdapter();
+ return adapter == null || position < 0 ? AdapterView.INVALID_ROW_ID
+ : adapter.getItemId(position);
+ }
+
+ public int getLastVisiblePosition() {
+ return mFirstPosition + getChildCount() - 1;
+ }
+
+ public final OnItemClickListener getOnItemClickListener() {
+ return mOnItemClickListener;
+ }
+
+ public final OnItemLongClickListener getOnItemLongClickListener() {
+ return mOnItemLongClickListener;
+ }
+
+ public final OnItemSelectedListener getOnItemSelectedListener() {
+ return mOnItemSelectedListener;
+ }
+
+ public int getPositionForView(View view) {
+ View listItem = view;
+ try {
+ View v;
+ while (!(v = (View) listItem.getParent()).equals(this)) {
+ listItem = v;
+ }
+ } catch (ClassCastException e) {
+ return AdapterView.INVALID_POSITION;
+ }
+ final int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ if (getChildAt(i).equals(listItem)) {
+ return mFirstPosition + i;
+ }
+ }
+ return AdapterView.INVALID_POSITION;
+ }
+
+ public Object getSelectedItem() {
+ T adapter = getAdapter();
+ int selection = getSelectedItemPosition();
+ if (adapter != null && adapter.getCount() > 0 && selection >= 0) {
+ return adapter.getItem(selection);
+ } else {
+ return null;
+ }
+ }
+
+ @ViewDebug.CapturedViewProperty
+ public long getSelectedItemId() {
+ return mNextSelectedRowId;
+ }
+
+ @ViewDebug.CapturedViewProperty
+ public int getSelectedItemPosition() {
+ return mNextSelectedPosition;
+ }
+
+ public abstract View getSelectedView();
+
+ void handleDataChanged() {
+ final int count = mItemCount;
+ boolean found = false;
+ if (count > 0) {
+ int newPos;
+ if (mNeedSync) {
+ mNeedSync = false;
+ newPos = findSyncPosition();
+ if (newPos >= 0) {
+ int selectablePos = lookForSelectablePosition(newPos, true);
+ if (selectablePos == newPos) {
+ setNextSelectedPositionInt(newPos);
+ found = true;
+ }
+ }
+ }
+ if (!found) {
+ newPos = getSelectedItemPosition();
+ if (newPos >= count) {
+ newPos = count - 1;
+ }
+ if (newPos < 0) {
+ newPos = 0;
+ }
+ int selectablePos = lookForSelectablePosition(newPos, true);
+ if (selectablePos < 0) {
+ selectablePos = lookForSelectablePosition(newPos, false);
+ }
+ if (selectablePos >= 0) {
+ setNextSelectedPositionInt(selectablePos);
+ checkSelectionChanged();
+ found = true;
+ }
+ }
+ }
+ if (!found) {
+ mSelectedPosition = AdapterView.INVALID_POSITION;
+ mSelectedRowId = AdapterView.INVALID_ROW_ID;
+ mNextSelectedPosition = AdapterView.INVALID_POSITION;
+ mNextSelectedRowId = AdapterView.INVALID_ROW_ID;
+ mNeedSync = false;
+ checkSelectionChanged();
+ }
+ ReflectHelper.invoke(this, "notifyAccessibilityStateChanged", null);
+ }
+
+ boolean isInFilterMode() {
+ return false;
+ }
+
+ private boolean isScrollableForAccessibility() {
+ T adapter = getAdapter();
+ if (adapter != null) {
+ final int itemCount = adapter.getCount();
+ return itemCount > 0
+ && (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
+ }
+ return false;
+ }
+
+ int lookForSelectablePosition(int position, boolean lookDown) {
+ return position;
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ removeCallbacks(mSelectionNotifier);
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(AdapterView.class.getName());
+ event.setScrollable(isScrollableForAccessibility());
+ View selectedView = getSelectedView();
+ if (selectedView != null) {
+ event.setEnabled(selectedView.isEnabled());
+ }
+ event.setCurrentItemIndex(getSelectedItemPosition());
+ event.setFromIndex(getFirstVisiblePosition());
+ event.setToIndex(getLastVisiblePosition());
+ event.setItemCount(getCount());
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(AdapterView.class.getName());
+ info.setScrollable(isScrollableForAccessibility());
+ View selectedView = getSelectedView();
+ if (selectedView != null) {
+ info.setEnabled(selectedView.isEnabled());
+ }
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right,
+ int bottom) {
+ mLayoutHeight = getHeight();
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public boolean onRequestSendAccessibilityEvent(View child,
+ AccessibilityEvent event) {
+ if (super.onRequestSendAccessibilityEvent(child, event)) {
+ AccessibilityEvent record = AccessibilityEvent.obtain();
+ onInitializeAccessibilityEvent(record);
+ child.dispatchPopulateAccessibilityEvent(record);
+ event.appendRecord(record);
+ return true;
+ }
+ return false;
+ }
+
+ private void performAccessibilityActionsOnSelected() {
+ if (!isAccessibilityManagerEnabled()) {
+ return;
+ }
+ final int position = getSelectedItemPosition();
+ if (position >= 0) {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ }
+ }
+
+ public boolean performItemClick(View view, int position, long id) {
+ if (mOnItemClickListener != null) {
+ playSoundEffect(SoundEffectConstants.CLICK);
+ if (view != null) {
+ view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
+ }
+ mOnItemClickListener.onItemClick(this, view, position, id);
+ return true;
+ }
+
+ return false;
+ }
+
+ void rememberSyncState() {
+ if (getChildCount() > 0) {
+ mNeedSync = true;
+ mSyncHeight = mLayoutHeight;
+ if (mSelectedPosition >= 0) {
+ View v = getChildAt(mSelectedPosition - mFirstPosition);
+ mSyncRowId = mNextSelectedRowId;
+ mSyncPosition = mNextSelectedPosition;
+ if (v != null) {
+ mSpecificTop = v.getTop();
+ }
+ mSyncMode = AdapterView.SYNC_SELECTED_POSITION;
+ } else {
+ View v = getChildAt(0);
+ T adapter = getAdapter();
+ if (mFirstPosition >= 0 && mFirstPosition < adapter.getCount()) {
+ mSyncRowId = adapter.getItemId(mFirstPosition);
+ } else {
+ mSyncRowId = View.NO_ID;
+ }
+ mSyncPosition = mFirstPosition;
+ if (v != null) {
+ mSpecificTop = v.getTop();
+ }
+ mSyncMode = AdapterView.SYNC_FIRST_POSITION;
+ }
+ }
+ }
+
+ @Override
+ public void removeAllViews() {
+ throw new UnsupportedOperationException(
+ "removeAllViews() is not supported in AdapterView");
+ }
+
+ @Override
+ public void removeView(View child) {
+ throw new UnsupportedOperationException(
+ "removeView(View) is not supported in AdapterView");
+ }
+
+ @Override
+ public void removeViewAt(int index) {
+ throw new UnsupportedOperationException(
+ "removeViewAt(int) is not supported in AdapterView");
+ }
+
+ void selectionChanged() {
+ if (mOnItemSelectedListener != null || isAccessibilityManagerEnabled()) {
+ if (mInLayout || mBlockLayoutRequests) {
+ if (mSelectionNotifier == null) {
+ mSelectionNotifier = new SelectionNotifier();
+ }
+ post(mSelectionNotifier);
+ } else {
+ fireOnSelected();
+ performAccessibilityActionsOnSelected();
+ }
+ }
+ }
+
+ public abstract void setAdapter(T adapter);
+
+ @SuppressLint("NewApi")
+ public void setEmptyView(View emptyView) {
+ mEmptyView = emptyView;
+ if (VERSION.SDK_INT >= 16
+ && emptyView != null
+ && emptyView.getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+ emptyView
+ .setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+ }
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.isEmpty();
+ updateEmptyStatus(empty);
+ }
+
+ @Override
+ public void setFocusable(boolean focusable) {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+ mDesiredFocusableState = focusable;
+ if (!focusable) {
+ mDesiredFocusableInTouchModeState = false;
+ }
+ super.setFocusable(focusable && (!empty || isInFilterMode()));
+ }
+
+ @Override
+ public void setFocusableInTouchMode(boolean focusable) {
+ final T adapter = getAdapter();
+ final boolean empty = adapter == null || adapter.getCount() == 0;
+
+ mDesiredFocusableInTouchModeState = focusable;
+ if (focusable) {
+ mDesiredFocusableState = true;
+ }
+
+ super.setFocusableInTouchMode(focusable && (!empty || isInFilterMode()));
+ }
+
+ void setNextSelectedPositionInt(int position) {
+ mNextSelectedPosition = position;
+ mNextSelectedRowId = getItemIdAtPosition(position);
+ if (mNeedSync && mSyncMode == AdapterView.SYNC_SELECTED_POSITION
+ && position >= 0) {
+ mSyncPosition = position;
+ mSyncRowId = mNextSelectedRowId;
+ }
+ }
+
+ @Override
+ public void setOnClickListener(OnClickListener l) {
+ throw new RuntimeException(
+ "Don't call setOnClickListener for an AdapterView. "
+ + "You probably want setOnItemClickListener instead");
+ }
+
+ public void setOnItemClickListener(OnItemClickListener listener) {
+ mOnItemClickListener = listener;
+ }
+
+ public void setOnItemLongClickListener(OnItemLongClickListener listener) {
+ if (!isLongClickable()) {
+ setLongClickable(true);
+ }
+ mOnItemLongClickListener = listener;
+ }
+
+ public void setOnItemSelectedListener(OnItemSelectedListener listener) {
+ mOnItemSelectedListener = listener;
+ }
+
+ void setSelectedPositionInt(int position) {
+ mSelectedPosition = position;
+ mSelectedRowId = getItemIdAtPosition(position);
+ }
+
+ public abstract void setSelection(int position);
+
+ private void updateEmptyStatus(boolean empty) {
+ if (isInFilterMode()) {
+ empty = false;
+ }
+ if (empty) {
+ if (mEmptyView != null) {
+ mEmptyView.setVisibility(View.VISIBLE);
+ setVisibility(View.GONE);
+ } else {
+ setVisibility(View.VISIBLE);
+ }
+ if (mDataChanged) {
+ this.onLayout(false, getLeft(), getTop(), getRight(),
+ getBottom());
+ }
+ } else {
+ if (mEmptyView != null) {
+ mEmptyView.setVisibility(View.GONE);
+ }
+ setVisibility(View.VISIBLE);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AutoCompleteTextView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AutoCompleteTextView.java
new file mode 100644
index 0000000000..8a2778b7d1
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/AutoCompleteTextView.java
@@ -0,0 +1,722 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.ArrayAdapter;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.text.Editable;
+import android.text.InputType;
+import android.text.Selection;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.view.inputmethod.CompletionInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.Filter;
+import android.widget.Filterable;
+import android.widget.ListAdapter;
+
+public class AutoCompleteTextView extends EditText implements
+ Filter.FilterListener {
+ private class DropDownItemClickListener implements
+ AdapterView.OnItemClickListener {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View v, int position,
+ long id) {
+ performCompletion(v, position, id);
+ }
+ }
+
+ private class MyWatcher implements TextWatcher {
+ @Override
+ public void afterTextChanged(Editable s) {
+ doAfterTextChanged();
+ }
+
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count,
+ int after) {
+ doBeforeTextChanged();
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before,
+ int count) {
+ }
+ }
+
+ private class PassThroughClickListener implements OnClickListener {
+ private View.OnClickListener mWrapped;
+
+ @Override
+ public void onClick(View v) {
+ onClickImpl();
+
+ if (mWrapped != null) {
+ mWrapped.onClick(v);
+ }
+ }
+ }
+
+ private class PopupDataSetObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ if (mAdapter != null) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ final ListAdapter adapter = mAdapter;
+ if (adapter != null) {
+ updateDropDownForFilter(adapter.getCount());
+ }
+ }
+ });
+ }
+ }
+ }
+
+ public interface Validator {
+ CharSequence fixText(CharSequence invalidText);
+
+ boolean isValid(CharSequence text);
+ }
+
+ static final int EXPAND_MAX = 3;
+ static final String TAG = "AutoCompleteTextView";
+ private ListAdapter mAdapter;
+ private boolean mBlockCompletion;
+ private int mDropDownAnchorId;
+ private boolean mDropDownDismissedOnCompletion = true;
+ private Filter mFilter;
+ private int mHintResource;
+ private CharSequence mHintText;
+ private TextView mHintView;
+ private AdapterView.OnItemClickListener mItemClickListener;
+ private AdapterView.OnItemSelectedListener mItemSelectedListener;
+ private int mLastKeyCode = KeyEvent.KEYCODE_UNKNOWN;
+ private PopupDataSetObserver mObserver;
+ private boolean mOpenBefore;
+
+ private PassThroughClickListener mPassThroughClickListener;
+
+ private ListPopupWindow mPopup;
+
+ private boolean mPopupCanBeUpdated = true;
+
+ private int mThreshold;
+
+ private Validator mValidator = null;
+
+ public AutoCompleteTextView(Context context) {
+ this(context, null);
+ }
+
+ public AutoCompleteTextView(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.autoCompleteTextViewStyle);
+ }
+
+ public AutoCompleteTextView(Context context, AttributeSet attrs,
+ int defStyle) {
+ super(context, attrs, defStyle);
+ mPopup = new ListPopupWindow(context, attrs,
+ R.attr.autoCompleteTextViewStyle);
+ mPopup.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+ mPopup.setPromptPosition(ListPopupWindow.POSITION_PROMPT_BELOW);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.AutoCompleteTextView, defStyle, 0);
+ mThreshold = a
+ .getInt(R.styleable.AutoCompleteTextView_android_completionThreshold,
+ 2);
+ mPopup.setListSelector(a
+ .getDrawable(R.styleable.AutoCompleteTextView_android_dropDownSelector));
+ mPopup.setVerticalOffset((int) a.getDimension(
+ R.styleable.AutoCompleteTextView_dropDownVerticalOffset, 0.0f));
+ mPopup.setHorizontalOffset((int) a
+ .getDimension(
+ R.styleable.AutoCompleteTextView_dropDownHorizontalOffset,
+ 0.0f));
+ mDropDownAnchorId = a.getResourceId(
+ R.styleable.AutoCompleteTextView_android_dropDownAnchor,
+ View.NO_ID);
+ mPopup.setWidth(a.getLayoutDimension(
+ R.styleable.AutoCompleteTextView_android_dropDownWidth,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ mPopup.setHeight(a.getLayoutDimension(
+ R.styleable.AutoCompleteTextView_android_dropDownHeight,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ mHintResource = a.getResourceId(
+ R.styleable.AutoCompleteTextView_android_completionHintView,
+ R.layout.simple_dropdown_hint);
+ mPopup.setOnItemClickListener(new DropDownItemClickListener());
+ setCompletionHint(a
+ .getText(R.styleable.AutoCompleteTextView_android_completionHint));
+ int inputType = getInputType();
+ if ((inputType & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_TEXT) {
+ inputType |= InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE;
+ setRawInputType(inputType);
+ }
+ CharSequence[] entries = null;
+ if (a.hasValue(R.styleable.AutoCompleteTextView_android_entries)) {
+ entries = a
+ .getTextArray(R.styleable.AutoCompleteTextView_android_entries);
+ }
+ a.recycle();
+ setFocusable(true);
+ addTextChangedListener(new MyWatcher());
+ mPassThroughClickListener = new PassThroughClickListener();
+ super.setOnClickListener(mPassThroughClickListener);
+ if (entries != null) {
+ onLoadEntries(entries);
+ }
+ }
+
+ private void buildImeCompletions() {
+ final ListAdapter adapter = mAdapter;
+ if (adapter != null) {
+ InputMethodManager imm = (InputMethodManager) getContext()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (imm != null) {
+ final int count = Math.min(adapter.getCount(), 20);
+ CompletionInfo[] completions = new CompletionInfo[count];
+ int realCount = 0;
+ for (int i = 0; i < count; i++) {
+ if (adapter.isEnabled(i)) {
+ Object item = adapter.getItem(i);
+ long id = adapter.getItemId(i);
+ completions[realCount] = new CompletionInfo(id,
+ realCount, convertSelectionToString(item));
+ realCount++;
+ }
+ }
+ if (realCount != count) {
+ CompletionInfo[] tmp = new CompletionInfo[realCount];
+ System.arraycopy(completions, 0, tmp, 0, realCount);
+ completions = tmp;
+ }
+
+ imm.displayCompletions(this, completions);
+ }
+ }
+ }
+
+ public void clearListSelection() {
+ mPopup.clearListSelection();
+ }
+
+ protected CharSequence convertSelectionToString(Object selectedItem) {
+ return mFilter.convertResultToString(selectedItem);
+ }
+
+ public void dismissDropDown() {
+ InputMethodManager imm = (InputMethodManager) getContext()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (imm != null) {
+ imm.displayCompletions(this, null);
+ }
+ mPopup.dismiss();
+ mPopupCanBeUpdated = false;
+ }
+
+ void doAfterTextChanged() {
+ if (mBlockCompletion) {
+ return;
+ }
+ if (mOpenBefore && !isPopupShowing()) {
+ return;
+ }
+ if (enoughToFilter()) {
+ if (mFilter != null) {
+ mPopupCanBeUpdated = true;
+ performFiltering(getText(), mLastKeyCode);
+ }
+ } else {
+ if (!mPopup.isDropDownAlwaysVisible()) {
+ dismissDropDown();
+ }
+ if (mFilter != null) {
+ mFilter.filter(null);
+ }
+ }
+ }
+
+ void doBeforeTextChanged() {
+ if (mBlockCompletion) {
+ return;
+ }
+ mOpenBefore = isPopupShowing();
+ }
+
+ public boolean enoughToFilter() {
+ return getText().length() >= mThreshold;
+ }
+
+ public void ensureImeVisible(boolean visible) {
+ mPopup.setInputMethodMode(visible ? ListPopupWindow.INPUT_METHOD_NEEDED
+ : ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
+ if (mPopup.isDropDownAlwaysVisible() || mFilter != null
+ && enoughToFilter()) {
+ showDropDown();
+ }
+ }
+
+ public ListAdapter getAdapter() {
+ return mAdapter;
+ }
+
+ public CharSequence getCompletionHint() {
+ return mHintText;
+ }
+
+ public int getDropDownAnchor() {
+ return mDropDownAnchorId;
+ }
+
+ public int getDropDownAnimationStyle() {
+ return mPopup.getAnimationStyle();
+ }
+
+ public Drawable getDropDownBackground() {
+ return mPopup.getBackground();
+ }
+
+ public int getDropDownHeight() {
+ return mPopup.getHeight();
+ }
+
+ public int getDropDownHorizontalOffset() {
+ return mPopup.getHorizontalOffset();
+ }
+
+ public int getDropDownVerticalOffset() {
+ return mPopup.getVerticalOffset();
+ }
+
+ public int getDropDownWidth() {
+ return mPopup.getWidth();
+ }
+
+ protected Filter getFilter() {
+ return mFilter;
+ }
+
+ public int getListSelection() {
+ return mPopup.getSelectedItemPosition();
+ }
+
+ public AdapterView.OnItemClickListener getOnItemClickListener() {
+ return mItemClickListener;
+ }
+
+ public AdapterView.OnItemSelectedListener getOnItemSelectedListener() {
+ return mItemSelectedListener;
+ }
+
+ public int getThreshold() {
+ return mThreshold;
+ }
+
+ public Validator getValidator() {
+ return mValidator;
+ }
+
+ public boolean isDropDownAlwaysVisible() {
+ return mPopup.isDropDownAlwaysVisible();
+ }
+
+ public boolean isDropDownDismissedOnCompletion() {
+ return mDropDownDismissedOnCompletion;
+ }
+
+ public boolean isInputMethodNotNeeded() {
+ return mPopup.getInputMethodMode() == ListPopupWindow.INPUT_METHOD_NOT_NEEDED;
+ }
+
+ public boolean isPerformingCompletion() {
+ return mBlockCompletion;
+ }
+
+ public boolean isPopupShowing() {
+ return mPopup.isShowing();
+ }
+
+ private void onClickImpl() {
+ if (isPopupShowing()) {
+ ensureImeVisible(true);
+ }
+ }
+
+ @Override
+ public void onCommitCompletion(CompletionInfo completion) {
+ if (isPopupShowing()) {
+ mPopup.performItemClick(completion.getPosition());
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ dismissDropDown();
+ super.onDetachedFromWindow();
+ }
+
+ @Override
+ protected void onDisplayHint(int hint) {
+ super.onDisplayHint(hint);
+ switch (hint) {
+ case INVISIBLE:
+ if (!mPopup.isDropDownAlwaysVisible()) {
+ dismissDropDown();
+ }
+ break;
+ }
+ }
+
+ @Override
+ public void onFilterComplete(int count) {
+ updateDropDownForFilter(count);
+ }
+
+ @Override
+ protected void onFocusChanged(boolean focused, int direction,
+ Rect previouslyFocusedRect) {
+ super.onFocusChanged(focused, direction, previouslyFocusedRect);
+ if (!focused) {
+ performValidation();
+ }
+ if (!focused && !mPopup.isDropDownAlwaysVisible()) {
+ dismissDropDown();
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (mPopup.onKeyDown(keyCode, event)) {
+ return true;
+ }
+ if (!isPopupShowing()) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_DOWN:
+ if (VERSION.SDK_INT < 11 || event.hasNoModifiers()) {
+ performValidation();
+ }
+ }
+ }
+ if (isPopupShowing() && keyCode == KeyEvent.KEYCODE_TAB
+ && (VERSION.SDK_INT < 11 || event.hasNoModifiers())) {
+ return true;
+ }
+ mLastKeyCode = keyCode;
+ boolean handled = super.onKeyDown(keyCode, event);
+ mLastKeyCode = KeyEvent.KEYCODE_UNKNOWN;
+ if (handled && isPopupShowing()) {
+ clearListSelection();
+ }
+ return handled;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+ if (VERSION.SDK_INT < 5) {
+ return false;
+ }
+ if (keyCode == KeyEvent.KEYCODE_BACK && isPopupShowing()
+ && !mPopup.isDropDownAlwaysVisible()) {
+ if (event.getAction() == KeyEvent.ACTION_DOWN
+ && event.getRepeatCount() == 0) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null) {
+ state.startTracking(event, this);
+ }
+ return true;
+ } else if (event.getAction() == KeyEvent.ACTION_UP) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null) {
+ state.handleUpEvent(event);
+ }
+ if (event.isTracking() && !event.isCanceled()) {
+ dismissDropDown();
+ return true;
+ }
+ }
+ }
+ return super.onKeyPreIme(keyCode, event);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ boolean consumed = mPopup.onKeyUp(keyCode, event);
+ if (consumed) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_ENTER:
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ case KeyEvent.KEYCODE_TAB:
+ if (VERSION.SDK_INT < 11 || event.hasNoModifiers()) {
+ performCompletion();
+ }
+ return true;
+ }
+ }
+ if (isPopupShowing() && keyCode == KeyEvent.KEYCODE_TAB
+ && (VERSION.SDK_INT < 11 || event.hasNoModifiers())) {
+ performCompletion();
+ return true;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+ protected void onLoadEntries(CharSequence[] entries) {
+ setAdapter(new ArrayAdapter<CharSequence>(getContext(),
+ R.layout.simple_dropdown_item_1line, entries));
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+ if (!hasWindowFocus && !mPopup.isDropDownAlwaysVisible()) {
+ dismissDropDown();
+ }
+ }
+
+ public void performCompletion() {
+ performCompletion(null, -1, -1);
+ }
+
+ private void performCompletion(View selectedView, int position, long id) {
+ if (isPopupShowing()) {
+ Object selectedItem;
+ if (position < 0) {
+ selectedItem = mPopup.getSelectedItem();
+ } else {
+ selectedItem = mAdapter.getItem(position);
+ }
+ if (selectedItem == null) {
+ Log.w(AutoCompleteTextView.TAG,
+ "performCompletion: no selected item");
+ return;
+ }
+ mBlockCompletion = true;
+ replaceText(convertSelectionToString(selectedItem));
+ mBlockCompletion = false;
+ if (mItemClickListener != null) {
+ final ListPopupWindow list = mPopup;
+ if (selectedView == null || position < 0) {
+ selectedView = list.getSelectedView();
+ position = list.getSelectedItemPosition();
+ id = list.getSelectedItemId();
+ }
+ mItemClickListener.onItemClick(list.getListView(),
+ selectedView, position, id);
+ }
+ }
+ if (mDropDownDismissedOnCompletion && !mPopup.isDropDownAlwaysVisible()) {
+ dismissDropDown();
+ }
+ }
+
+ protected void performFiltering(CharSequence text, int keyCode) {
+ mFilter.filter(text, this);
+ }
+
+ public void performValidation() {
+ if (mValidator == null) {
+ return;
+ }
+ CharSequence text = getText();
+ if (!TextUtils.isEmpty(text) && !mValidator.isValid(text)) {
+ setText(mValidator.fixText(text));
+ }
+ }
+
+ protected void replaceText(CharSequence text) {
+ clearComposingText();
+ setText(text);
+ Editable spannable = getText();
+ Selection.setSelection(spannable, spannable.length());
+ }
+
+ public <T extends ListAdapter & Filterable> void setAdapter(T adapter) {
+ if (mObserver == null) {
+ mObserver = new PopupDataSetObserver();
+ } else if (mAdapter != null) {
+ mAdapter.unregisterDataSetObserver(mObserver);
+ }
+ mAdapter = adapter;
+ if (mAdapter != null) {
+ mFilter = ((Filterable) mAdapter).getFilter();
+ adapter.registerDataSetObserver(mObserver);
+ } else {
+ mFilter = null;
+ }
+ mPopup.setAdapter(mAdapter);
+ }
+
+ public void setCompletionHint(CharSequence hint) {
+ mHintText = hint;
+ if (hint != null) {
+ if (mHintView == null) {
+ final TextView hintView = (TextView) LayoutInflater.inflate(
+ getContext(), mHintResource).findViewById(
+ android.R.id.text1);
+ hintView.setText(mHintText);
+ mHintView = hintView;
+ mPopup.setPromptView(hintView);
+ } else {
+ mHintView.setText(hint);
+ }
+ } else {
+ mPopup.setPromptView(null);
+ mHintView = null;
+ }
+ }
+
+ public void setDropDownAlwaysVisible(boolean dropDownAlwaysVisible) {
+ mPopup.setDropDownAlwaysVisible(dropDownAlwaysVisible);
+ }
+
+ public void setDropDownAnchor(int id) {
+ mDropDownAnchorId = id;
+ mPopup.setAnchorView(null);
+ }
+
+ public void setDropDownAnimationStyle(int animationStyle) {
+ mPopup.setAnimationStyle(animationStyle);
+ }
+
+ public void setDropDownBackgroundDrawable(Drawable d) {
+ mPopup.setBackgroundDrawable(d);
+ }
+
+ public void setDropDownBackgroundResource(int id) {
+ mPopup.setBackgroundDrawable(getResources().getDrawable(id));
+ }
+
+ public void setDropDownDismissedOnCompletion(
+ boolean dropDownDismissedOnCompletion) {
+ mDropDownDismissedOnCompletion = dropDownDismissedOnCompletion;
+ }
+
+ public void setDropDownHeight(int height) {
+ mPopup.setHeight(height);
+ }
+
+ public void setDropDownHorizontalOffset(int offset) {
+ mPopup.setHorizontalOffset(offset);
+ }
+
+ public void setDropDownVerticalOffset(int offset) {
+ mPopup.setVerticalOffset(offset);
+ }
+
+ public void setDropDownWidth(int width) {
+ mPopup.setWidth(width);
+ }
+
+ public void setForceIgnoreOutsideTouch(boolean forceIgnoreOutsideTouch) {
+ mPopup.setForceIgnoreOutsideTouch(forceIgnoreOutsideTouch);
+ }
+
+ @Override
+ protected boolean setFrame(final int l, int t, final int r, int b) {
+ boolean result = super.setFrame(l, t, r, b);
+ if (isPopupShowing()) {
+ showDropDown();
+ }
+ return result;
+ }
+
+ public void setListSelection(int position) {
+ mPopup.setSelection(position);
+ }
+
+ @Override
+ public void setOnClickListener(OnClickListener listener) {
+ mPassThroughClickListener.mWrapped = listener;
+ }
+
+ public void setOnItemClickListener(AdapterView.OnItemClickListener l) {
+ mItemClickListener = l;
+ }
+
+ public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener l) {
+ mItemSelectedListener = l;
+ }
+
+ public void setText(CharSequence text, boolean filter) {
+ if (filter) {
+ setText(text);
+ } else {
+ mBlockCompletion = true;
+ setText(text);
+ mBlockCompletion = false;
+ }
+ }
+
+ public void setThreshold(int threshold) {
+ if (threshold <= 0) {
+ threshold = 1;
+ }
+
+ mThreshold = threshold;
+ }
+
+ public void setValidator(Validator validator) {
+ mValidator = validator;
+ }
+
+ @SuppressLint("NewApi")
+ public void showDropDown() {
+ buildImeCompletions();
+ if (mPopup.getAnchorView() == null) {
+ if (mDropDownAnchorId != View.NO_ID) {
+ mPopup.setAnchorView(getRootView().findViewById(
+ mDropDownAnchorId));
+ } else {
+ mPopup.setAnchorView(this);
+ }
+ }
+ if (!isPopupShowing()) {
+ mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
+ mPopup.setListItemExpandMax(AutoCompleteTextView.EXPAND_MAX);
+ }
+ mPopup.show();
+ if (VERSION.SDK_INT >= 9) {
+ mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS);
+ }
+ }
+
+ public void showDropDownAfterLayout() {
+ mPopup.postShow();
+ }
+
+ private void updateDropDownForFilter(int count) {
+ if (getWindowVisibility() == View.GONE) {
+ return;
+ }
+ final boolean dropDownAlwaysVisible = mPopup.isDropDownAlwaysVisible();
+ final boolean enoughToFilter = enoughToFilter();
+ if ((count > 0 || dropDownAlwaysVisible) && enoughToFilter) {
+ if (hasFocus() && hasWindowFocus() && mPopupCanBeUpdated) {
+ showDropDown();
+ }
+ } else if (!dropDownAlwaysVisible && isPopupShowing()) {
+ dismissDropDown();
+ mPopupCanBeUpdated = true;
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/BaseExpandableListAdapter.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/BaseExpandableListAdapter.java
new file mode 100644
index 0000000000..e94a1c9c08
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/BaseExpandableListAdapter.java
@@ -0,0 +1,77 @@
+
+package org.holoeverywhere.widget;
+
+import android.database.DataSetObservable;
+import android.database.DataSetObserver;
+import android.widget.ExpandableListAdapter;
+
+public abstract class BaseExpandableListAdapter implements ExpandableListAdapter,
+ HeterogeneousExpandableList {
+ private final DataSetObservable mDataSetObservable = new DataSetObservable();
+
+ @Override
+ public boolean areAllItemsEnabled() {
+ return true;
+ }
+
+ @Override
+ public int getChildType(int groupPosition, int childPosition) {
+ return 0;
+ }
+
+ @Override
+ public int getChildTypeCount() {
+ return 1;
+ }
+
+ @Override
+ public long getCombinedChildId(long groupId, long childId) {
+ return 0x8000000000000000L | (groupId & 0x7FFFFFFF) << 32 | childId & 0xFFFFFFFF;
+ }
+
+ @Override
+ public long getCombinedGroupId(long groupId) {
+ return (groupId & 0x7FFFFFFF) << 32;
+ }
+
+ @Override
+ public int getGroupType(int groupPosition) {
+ return 0;
+ }
+
+ @Override
+ public int getGroupTypeCount() {
+ return 1;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return getGroupCount() == 0;
+ }
+
+ public void notifyDataSetChanged() {
+ mDataSetObservable.notifyChanged();
+ }
+
+ public void notifyDataSetInvalidated() {
+ mDataSetObservable.notifyInvalidated();
+ }
+
+ @Override
+ public void onGroupCollapsed(int groupPosition) {
+ }
+
+ @Override
+ public void onGroupExpanded(int groupPosition) {
+ }
+
+ @Override
+ public void registerDataSetObserver(DataSetObserver observer) {
+ mDataSetObservable.registerObserver(observer);
+ }
+
+ @Override
+ public void unregisterDataSetObserver(DataSetObserver observer) {
+ mDataSetObservable.unregisterObserver(observer);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Button.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Button.java
new file mode 100644
index 0000000000..4f57a73210
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Button.java
@@ -0,0 +1,84 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class Button extends android.widget.Button {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public Button(Context context) {
+ this(context, null);
+ }
+
+ public Button(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.buttonStyle);
+ }
+
+ public Button(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CalendarView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CalendarView.java
new file mode 100644
index 0000000000..4441869351
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CalendarView.java
@@ -0,0 +1,906 @@
+
+package org.holoeverywhere.widget;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+
+import org.holoeverywhere.FontLoader;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Paint.Align;
+import android.graphics.Paint.Style;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.text.TextUtils;
+import android.text.format.DateUtils;
+import android.util.AttributeSet;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.GestureDetector;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.BaseAdapter;
+
+public class CalendarView extends FrameLayout {
+ public interface OnDateChangeListener {
+ public void onSelectedDayChange(CalendarView view, int year, int month,
+ int dayOfMonth);
+ }
+
+ private class ScrollStateRunnable implements Runnable {
+ private int mNewState;
+ private AbsListView mView;
+
+ public void doScrollStateChange(AbsListView view, int scrollState) {
+ mView = view;
+ mNewState = scrollState;
+ removeCallbacks(this);
+ postDelayed(this, CalendarView.SCROLL_CHANGE_DELAY);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void run() {
+ mCurrentScrollState = mNewState;
+ if (mNewState == OnScrollListener.SCROLL_STATE_IDLE
+ && mPreviousScrollState != OnScrollListener.SCROLL_STATE_IDLE) {
+ View child = mView.getChildAt(0);
+ if (child == null) {
+ return;
+ }
+ int dist = child.getBottom() - mListScrollTopOffset;
+ if (dist > mListScrollTopOffset) {
+ int y = dist - (mIsScrollingUp ? child.getHeight() : 0);
+ if (VERSION.SDK_INT >= 11) {
+ mView.smoothScrollBy(y,
+ CalendarView.ADJUSTMENT_SCROLL_DURATION);
+ } else {
+ mView.scrollBy(0, y);
+ }
+ }
+ }
+ mPreviousScrollState = mNewState;
+ }
+ }
+
+ private class WeeksAdapter extends BaseAdapter implements OnTouchListener {
+ class CalendarGestureListener extends
+ GestureDetector.SimpleOnGestureListener {
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ return true;
+ }
+ }
+
+ private Context context;
+ private int mFocusedMonth;
+ private GestureDetector mGestureDetector;
+ private final Calendar mSelectedDate = Calendar.getInstance();
+ private int mSelectedWeek;
+ private int mTotalWeekCount;
+
+ public WeeksAdapter(Context context) {
+ this.context = context;
+ mGestureDetector = new GestureDetector(context,
+ new CalendarGestureListener());
+ init();
+ }
+
+ @Override
+ public int getCount() {
+ return mTotalWeekCount;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return null;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ public Calendar getSelectedDay() {
+ return mSelectedDate;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ WeekView weekView = null;
+ if (convertView != null) {
+ weekView = (WeekView) convertView;
+ } else {
+ weekView = new WeekView(context);
+ android.widget.AbsListView.LayoutParams params = new android.widget.AbsListView.LayoutParams(
+ android.view.ViewGroup.LayoutParams.WRAP_CONTENT,
+ android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
+ weekView.setLayoutParams(params);
+ weekView.setClickable(true);
+ weekView.setOnTouchListener(this);
+ }
+
+ int selectedWeekDay = mSelectedWeek == position ? mSelectedDate
+ .get(Calendar.DAY_OF_WEEK) : -1;
+ weekView.init(position, selectedWeekDay, mFocusedMonth);
+
+ return weekView;
+ }
+
+ private void init() {
+ mSelectedWeek = getWeeksSinceMinDate(mSelectedDate);
+ mTotalWeekCount = getWeeksSinceMinDate(mMaxDate);
+ if (mMinDate.get(Calendar.DAY_OF_WEEK) != mFirstDayOfWeek
+ || mMaxDate.get(Calendar.DAY_OF_WEEK) != mFirstDayOfWeek) {
+ mTotalWeekCount++;
+ }
+ }
+
+ private void onDateTapped(Calendar day) {
+ setSelectedDay(day);
+ setMonthDisplayed(day);
+ }
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (mListView.isEnabled() && mGestureDetector.onTouchEvent(event)) {
+ WeekView weekView = (WeekView) v;
+ if (!weekView.getDayFromLocation(event.getX(), mTempDate)) {
+ return true;
+ }
+ if (mTempDate.before(mMinDate) || mTempDate.after(mMaxDate)) {
+ return true;
+ }
+ onDateTapped(mTempDate);
+ return true;
+ }
+ return false;
+ }
+
+ public void setFocusMonth(int month) {
+ if (mFocusedMonth == month) {
+ return;
+ }
+ mFocusedMonth = month;
+ notifyDataSetChanged();
+ }
+
+ public void setSelectedDay(Calendar selectedDay) {
+ if (selectedDay.get(Calendar.DAY_OF_YEAR) == mSelectedDate
+ .get(Calendar.DAY_OF_YEAR)
+ && selectedDay.get(Calendar.YEAR) == mSelectedDate
+ .get(Calendar.YEAR)) {
+ return;
+ }
+ mSelectedDate.setTimeInMillis(selectedDay.getTimeInMillis());
+ mSelectedWeek = getWeeksSinceMinDate(mSelectedDate);
+ mFocusedMonth = mSelectedDate.get(Calendar.MONTH);
+ notifyDataSetChanged();
+ }
+ }
+
+ private class WeekView extends View {
+ private String[] mDayNumbers;
+ private final Paint mDrawPaint = new Paint();
+ private Calendar mFirstDay;
+ private boolean[] mFocusDay;
+ private boolean mHasSelectedDay = false;
+ private int mHeight;
+ private int mLastWeekDayMonth = -1;
+ private final Paint mMonthNumDrawPaint = new Paint();
+ private int mMonthOfFirstWeekDay = -1;
+ private int mNumCells;
+ private int mSelectedDay = -1;
+ private int mSelectedLeft = -1;
+ private int mSelectedRight = -1;
+ private final Rect mTempRect = new Rect();
+ private int mWeek = -1;
+ private int mWidth;
+
+ public WeekView(Context context) {
+ super(context);
+
+ mHeight = (mListView.getHeight() - mListView.getPaddingTop() - mListView
+ .getPaddingBottom()) / mShownWeekCount;
+ setPaintProperties();
+ }
+
+ private void drawBackground(Canvas canvas) {
+ if (!mHasSelectedDay) {
+ return;
+ }
+ mDrawPaint.setColor(mSelectedWeekBackgroundColor);
+ mTempRect.top = mWeekSeperatorLineWidth;
+ mTempRect.bottom = mHeight;
+ mTempRect.left = mShowWeekNumber ? mWidth / mNumCells : 0;
+ mTempRect.right = mSelectedLeft - 2;
+ canvas.drawRect(mTempRect, mDrawPaint);
+ mTempRect.left = mSelectedRight + 3;
+ mTempRect.right = mWidth;
+ canvas.drawRect(mTempRect, mDrawPaint);
+ }
+
+ private void drawSelectedDateVerticalBars(Canvas canvas) {
+ if (!mHasSelectedDay) {
+ return;
+ }
+ mSelectedDateVerticalBar.setBounds(mSelectedLeft
+ - mSelectedDateVerticalBarWidth / 2,
+ mWeekSeperatorLineWidth, mSelectedLeft
+ + mSelectedDateVerticalBarWidth / 2, mHeight);
+ mSelectedDateVerticalBar.draw(canvas);
+ mSelectedDateVerticalBar.setBounds(mSelectedRight
+ - mSelectedDateVerticalBarWidth / 2,
+ mWeekSeperatorLineWidth, mSelectedRight
+ + mSelectedDateVerticalBarWidth / 2, mHeight);
+ mSelectedDateVerticalBar.draw(canvas);
+ }
+
+ private void drawWeekNumbers(Canvas canvas) {
+ float textHeight = mDrawPaint.getTextSize();
+ int y = (int) ((mHeight + textHeight) / 2)
+ - mWeekSeperatorLineWidth;
+ int nDays = mNumCells;
+
+ mDrawPaint.setTextAlign(Align.CENTER);
+ int i = 0;
+ int divisor = 2 * nDays;
+ if (mShowWeekNumber) {
+ mDrawPaint.setColor(mWeekNumberColor);
+ int x = mWidth / divisor;
+ canvas.drawText(mDayNumbers[0], x, y, mDrawPaint);
+ i++;
+ }
+ for (; i < nDays; i++) {
+ mMonthNumDrawPaint
+ .setColor(mFocusDay[i] ? mFocusedMonthDateColor
+ : mUnfocusedMonthDateColor);
+ int x = (2 * i + 1) * mWidth / divisor;
+ canvas.drawText(mDayNumbers[i], x, y, mMonthNumDrawPaint);
+ }
+ }
+
+ private void drawWeekSeparators(Canvas canvas) {
+ int firstFullyVisiblePosition = mListView.getFirstVisiblePosition();
+ if (mListView.getChildAt(0).getTop() < 0) {
+ firstFullyVisiblePosition++;
+ }
+ if (firstFullyVisiblePosition == mWeek) {
+ return;
+ }
+ mDrawPaint.setColor(mWeekSeparatorLineColor);
+ mDrawPaint.setStrokeWidth(mWeekSeperatorLineWidth);
+ float x = mShowWeekNumber ? mWidth / mNumCells : 0;
+ canvas.drawLine(x, 0, mWidth, 0, mDrawPaint);
+ }
+
+ public boolean getDayFromLocation(float x, Calendar outCalendar) {
+ int dayStart = mShowWeekNumber ? mWidth / mNumCells : 0;
+ if (x < dayStart || x > mWidth) {
+ outCalendar.clear();
+ return false;
+ }
+ int dayPosition = (int) ((x - dayStart) * mDaysPerWeek / (mWidth - dayStart));
+ outCalendar.setTimeInMillis(mFirstDay.getTimeInMillis());
+ outCalendar.add(Calendar.DAY_OF_MONTH, dayPosition);
+ return true;
+ }
+
+ public Calendar getFirstDay() {
+ return mFirstDay;
+ }
+
+ public int getMonthOfFirstWeekDay() {
+ return mMonthOfFirstWeekDay;
+ }
+
+ public int getMonthOfLastWeekDay() {
+ return mLastWeekDayMonth;
+ }
+
+ public void init(int weekNumber, int selectedWeekDay, int focusedMonth) {
+ mSelectedDay = selectedWeekDay;
+ mHasSelectedDay = mSelectedDay != -1;
+ mNumCells = mShowWeekNumber ? mDaysPerWeek + 1 : mDaysPerWeek;
+ mWeek = weekNumber;
+ mTempDate.setTimeInMillis(mMinDate.getTimeInMillis());
+ mTempDate.add(Calendar.WEEK_OF_YEAR, mWeek);
+ mTempDate.setFirstDayOfWeek(mFirstDayOfWeek);
+ mDayNumbers = new String[mNumCells];
+ mFocusDay = new boolean[mNumCells];
+ int i = 0;
+ if (mShowWeekNumber) {
+ mDayNumbers[0] = Integer.toString(mTempDate
+ .get(Calendar.WEEK_OF_YEAR));
+ i++;
+ }
+ int diff = mFirstDayOfWeek - mTempDate.get(Calendar.DAY_OF_WEEK);
+ mTempDate.add(Calendar.DAY_OF_MONTH, diff);
+ mFirstDay = (Calendar) mTempDate.clone();
+ mMonthOfFirstWeekDay = mTempDate.get(Calendar.MONTH);
+ for (; i < mNumCells; i++) {
+ mFocusDay[i] = mTempDate.get(Calendar.MONTH) == focusedMonth;
+ if (mTempDate.before(mMinDate) || mTempDate.after(mMaxDate)) {
+ mDayNumbers[i] = "";
+ } else {
+ mDayNumbers[i] = Integer.toString(mTempDate
+ .get(Calendar.DAY_OF_MONTH));
+ }
+ mTempDate.add(Calendar.DAY_OF_MONTH, 1);
+ }
+ if (mTempDate.get(Calendar.DAY_OF_MONTH) == 1) {
+ mTempDate.add(Calendar.DAY_OF_MONTH, -1);
+ }
+ mLastWeekDayMonth = mTempDate.get(Calendar.MONTH);
+ updateSelectionPositions();
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ drawBackground(canvas);
+ drawWeekNumbers(canvas);
+ drawWeekSeparators(canvas);
+ drawSelectedDateVerticalBars(canvas);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), mHeight);
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ mWidth = w;
+ updateSelectionPositions();
+ }
+
+ private void setPaintProperties() {
+ mDrawPaint.setFakeBoldText(false);
+ mDrawPaint.setAntiAlias(true);
+ mDrawPaint.setTextSize(mDateTextSize);
+ mDrawPaint.setStyle(Style.FILL);
+
+ mMonthNumDrawPaint.setFakeBoldText(true);
+ mMonthNumDrawPaint.setAntiAlias(true);
+ mMonthNumDrawPaint.setTextSize(mDateTextSize);
+ mMonthNumDrawPaint.setColor(mFocusedMonthDateColor);
+ mMonthNumDrawPaint.setStyle(Style.FILL);
+ mMonthNumDrawPaint.setTextAlign(Align.CENTER);
+ }
+
+ private void updateSelectionPositions() {
+ if (mHasSelectedDay) {
+ int selectedPosition = mSelectedDay - mFirstDayOfWeek;
+ if (selectedPosition < 0) {
+ selectedPosition += 7;
+ }
+ if (mShowWeekNumber) {
+ selectedPosition++;
+ }
+ mSelectedLeft = selectedPosition * mWidth / mNumCells;
+ mSelectedRight = (selectedPosition + 1) * mWidth / mNumCells;
+ }
+ }
+ }
+
+ private static final int ADJUSTMENT_SCROLL_DURATION = 500;
+ private static final String DATE_FORMAT = "MM/dd/yyyy";
+ private static final int DAYS_PER_WEEK = 7;
+ private static final String DEFAULT_MAX_DATE = "01/01/2100";
+ private static final String DEFAULT_MIN_DATE = "01/01/1900";
+ private static final boolean DEFAULT_SHOW_WEEK_NUMBER = true;
+ private static final int DEFAULT_SHOWN_WEEK_COUNT = 6;
+ private static final int DEFAULT_WEEK_DAY_TEXT_APPEARANCE_RES_ID = -1;
+ private static final int GOTO_SCROLL_DURATION = 1000;
+ private static final String LOG_TAG = CalendarView.class.getSimpleName();
+ private static final long MILLIS_IN_DAY = 86400000L;
+ private static final long MILLIS_IN_WEEK = CalendarView.DAYS_PER_WEEK
+ * CalendarView.MILLIS_IN_DAY;
+ private static final int SCROLL_CHANGE_DELAY = 40;
+ private static final int SCROLL_HYST_WEEKS = 2;
+ private static final int UNSCALED_BOTTOM_BUFFER = 20;
+ private static final int UNSCALED_LIST_SCROLL_TOP_OFFSET = 2;
+ private static final int UNSCALED_SELECTED_DATE_VERTICAL_BAR_WIDTH = 6;
+ private static final int UNSCALED_WEEK_MIN_VISIBLE_HEIGHT = 12;
+ private static final int UNSCALED_WEEK_SEPARATOR_LINE_WIDTH = 1;
+ private WeeksAdapter mAdapter;
+ private int mBottomBuffer = 20;
+ private Locale mCurrentLocale;
+ private int mCurrentMonthDisplayed;
+ private int mCurrentScrollState = OnScrollListener.SCROLL_STATE_IDLE;
+ private int mCurrentYearDisplayed;
+ private final java.text.DateFormat mDateFormat = new SimpleDateFormat(
+ CalendarView.DATE_FORMAT);
+ private final int mDateTextSize;
+ private String[] mDayLabels;
+ private ViewGroup mDayNamesHeader;
+ private int mDaysPerWeek = 7;
+ private Calendar mFirstDayOfMonth;
+ private int mFirstDayOfWeek;
+ private final int mFocusedMonthDateColor;
+ private float mFriction = .05f;
+ private boolean mIsScrollingUp = false;
+ private int mListScrollTopOffset = 2;
+ private ListView mListView;
+ private Calendar mMaxDate;
+ private Calendar mMinDate;
+ private TextView mMonthName;
+ private OnDateChangeListener mOnDateChangeListener;
+ private long mPreviousScrollPosition;
+ private int mPreviousScrollState = OnScrollListener.SCROLL_STATE_IDLE;
+ private ScrollStateRunnable mScrollStateChangedRunnable = new ScrollStateRunnable();
+ private final Drawable mSelectedDateVerticalBar;
+ private final int mSelectedDateVerticalBarWidth;
+ private final int mSelectedWeekBackgroundColor;
+ private int mShownWeekCount;
+ private boolean mShowWeekNumber;
+ private Calendar mTempDate;
+ private final int mUnfocusedMonthDateColor;
+ private float mVelocityScale = 0.333f;
+ private int mWeekMinVisibleHeight = 12;
+ private final int mWeekNumberColor;
+ private final int mWeekSeparatorLineColor;
+ private final int mWeekSeperatorLineWidth;
+
+ public CalendarView(Context context) {
+ this(context, null);
+ }
+
+ public CalendarView(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.calendarViewStyle);
+ }
+
+ public CalendarView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ setCurrentLocale(Locale.getDefault());
+ TypedArray attributesArray = context.obtainStyledAttributes(attrs,
+ R.styleable.CalendarView, defStyle, R.style.Holo_CalendarView);
+ mShowWeekNumber = attributesArray.getBoolean(
+ R.styleable.CalendarView_showWeekNumber,
+ CalendarView.DEFAULT_SHOW_WEEK_NUMBER);
+ mFirstDayOfWeek = attributesArray.getInt(
+ R.styleable.CalendarView_firstDayOfWeek, 1);
+ String minDate = attributesArray
+ .getString(R.styleable.CalendarView_minDate);
+ if (TextUtils.isEmpty(minDate) || !parseDate(minDate, mMinDate)) {
+ parseDate(CalendarView.DEFAULT_MIN_DATE, mMinDate);
+ }
+ String maxDate = attributesArray
+ .getString(R.styleable.CalendarView_maxDate);
+ if (TextUtils.isEmpty(maxDate) || !parseDate(maxDate, mMaxDate)) {
+ parseDate(CalendarView.DEFAULT_MAX_DATE, mMaxDate);
+ }
+ if (mMaxDate.before(mMinDate)) {
+ throw new IllegalArgumentException(
+ "Max date cannot be before min date.");
+ }
+ mShownWeekCount = attributesArray.getInt(
+ R.styleable.CalendarView_shownWeekCount,
+ CalendarView.DEFAULT_SHOWN_WEEK_COUNT);
+ mSelectedWeekBackgroundColor = attributesArray.getColor(
+ R.styleable.CalendarView_selectedWeekBackgroundColor, 0);
+ mFocusedMonthDateColor = attributesArray.getColor(
+ R.styleable.CalendarView_focusedMonthDateColor, 0);
+ mUnfocusedMonthDateColor = attributesArray.getColor(
+ R.styleable.CalendarView_unfocusedMonthDateColor, 0);
+ mWeekSeparatorLineColor = attributesArray.getColor(
+ R.styleable.CalendarView_weekSeparatorLineColor, 0);
+ mWeekNumberColor = attributesArray.getColor(
+ R.styleable.CalendarView_weekNumberColor, 0);
+ mSelectedDateVerticalBar = attributesArray
+ .getDrawable(R.styleable.CalendarView_selectedDateVerticalBar);
+ attributesArray.getResourceId(
+ R.styleable.CalendarView_dateTextAppearance,
+ android.R.style.TextAppearance_Small);
+ mDateTextSize = (int) (12 * getContext().getResources()
+ .getDisplayMetrics().density);
+ int weekDayTextAppearanceResId = attributesArray.getResourceId(
+ R.styleable.CalendarView_weekDayTextAppearance,
+ CalendarView.DEFAULT_WEEK_DAY_TEXT_APPEARANCE_RES_ID);
+ attributesArray.recycle();
+ DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
+ mWeekMinVisibleHeight = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ CalendarView.UNSCALED_WEEK_MIN_VISIBLE_HEIGHT, displayMetrics);
+ mListScrollTopOffset = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ CalendarView.UNSCALED_LIST_SCROLL_TOP_OFFSET, displayMetrics);
+ mBottomBuffer = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ CalendarView.UNSCALED_BOTTOM_BUFFER, displayMetrics);
+ mSelectedDateVerticalBarWidth = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ CalendarView.UNSCALED_SELECTED_DATE_VERTICAL_BAR_WIDTH,
+ displayMetrics);
+ mWeekSeperatorLineWidth = (int) TypedValue
+ .applyDimension(TypedValue.COMPLEX_UNIT_DIP,
+ CalendarView.UNSCALED_WEEK_SEPARATOR_LINE_WIDTH,
+ displayMetrics);
+ LayoutInflater.inflate(context, R.layout.calendar_view, this, true);
+ FontLoader.apply(this);
+ mListView = (ListView) findViewById(R.id.list);
+ mDayNamesHeader = (ViewGroup) findViewById(R.id.day_names);
+ mMonthName = (TextView) findViewById(R.id.month_name);
+ setUpHeader(weekDayTextAppearanceResId);
+ setUpListView();
+ setUpAdapter();
+ mTempDate.setTimeInMillis(System.currentTimeMillis());
+ if (mTempDate.before(mMinDate)) {
+ goTo(mMinDate, false, true, true);
+ } else if (mMaxDate.before(mTempDate)) {
+ goTo(mMaxDate, false, true, true);
+ } else {
+ goTo(mTempDate, false, true, true);
+ }
+ invalidate();
+ }
+
+ private Calendar getCalendarForLocale(Calendar oldCalendar, Locale locale) {
+ if (oldCalendar == null) {
+ return Calendar.getInstance(locale);
+ } else {
+ final long currentTimeMillis = oldCalendar.getTimeInMillis();
+ Calendar newCalendar = Calendar.getInstance(locale);
+ newCalendar.setTimeInMillis(currentTimeMillis);
+ return newCalendar;
+ }
+ }
+
+ public long getDate() {
+ return mAdapter.mSelectedDate.getTimeInMillis();
+ }
+
+ public int getFirstDayOfWeek() {
+ return mFirstDayOfWeek;
+ }
+
+ public long getMaxDate() {
+ return mMaxDate.getTimeInMillis();
+ }
+
+ public long getMinDate() {
+ return mMinDate.getTimeInMillis();
+ }
+
+ public boolean getShowWeekNumber() {
+ return mShowWeekNumber;
+ }
+
+ private int getWeeksSinceMinDate(Calendar date) {
+ if (date.before(mMinDate)) {
+ throw new IllegalArgumentException("fromDate: "
+ + mMinDate.getTime() + " does not precede toDate: "
+ + date.getTime());
+ }
+ long endTimeMillis = date.getTimeInMillis()
+ + date.getTimeZone().getOffset(date.getTimeInMillis());
+ long startTimeMillis = mMinDate.getTimeInMillis()
+ + mMinDate.getTimeZone().getOffset(mMinDate.getTimeInMillis());
+ long dayOffsetMillis = (mMinDate.get(Calendar.DAY_OF_WEEK) - mFirstDayOfWeek)
+ * CalendarView.MILLIS_IN_DAY;
+ return (int) ((endTimeMillis - startTimeMillis + dayOffsetMillis) / CalendarView.MILLIS_IN_WEEK);
+ }
+
+ @SuppressLint("NewApi")
+ private void goTo(Calendar date, boolean animate, boolean setSelected,
+ boolean forceScroll) {
+ if (date.before(mMinDate) || date.after(mMaxDate)) {
+ throw new IllegalArgumentException("Time not between "
+ + mMinDate.getTime() + " and " + mMaxDate.getTime());
+ }
+ int firstFullyVisiblePosition = mListView.getFirstVisiblePosition();
+ View firstChild = mListView.getChildAt(0);
+ if (firstChild != null && firstChild.getTop() < 0) {
+ firstFullyVisiblePosition++;
+ }
+ int lastFullyVisiblePosition = firstFullyVisiblePosition
+ + mShownWeekCount - 1;
+ if (firstChild != null && firstChild.getTop() > mBottomBuffer) {
+ lastFullyVisiblePosition--;
+ }
+ if (setSelected) {
+ mAdapter.setSelectedDay(date);
+ }
+ int position = getWeeksSinceMinDate(date);
+ if (position < firstFullyVisiblePosition
+ || position > lastFullyVisiblePosition || forceScroll) {
+ mFirstDayOfMonth.setTimeInMillis(date.getTimeInMillis());
+ mFirstDayOfMonth.set(Calendar.DAY_OF_MONTH, 1);
+ setMonthDisplayed(mFirstDayOfMonth);
+ if (mFirstDayOfMonth.before(mMinDate)) {
+ position = 0;
+ } else {
+ position = getWeeksSinceMinDate(mFirstDayOfMonth);
+ }
+ mPreviousScrollState = OnScrollListener.SCROLL_STATE_FLING;
+ if (animate && VERSION.SDK_INT >= 11) {
+ mListView
+ .smoothScrollToPositionFromTop(position,
+ mListScrollTopOffset,
+ CalendarView.GOTO_SCROLL_DURATION);
+ } else {
+ mListView.setSelectionFromTop(position, mListScrollTopOffset);
+ onScrollStateChanged(mListView,
+ OnScrollListener.SCROLL_STATE_IDLE);
+ }
+ } else if (setSelected) {
+ setMonthDisplayed(date);
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return mListView.isEnabled();
+ }
+
+ private boolean isSameDate(Calendar firstDate, Calendar secondDate) {
+ return firstDate.get(Calendar.DAY_OF_YEAR) == secondDate
+ .get(Calendar.DAY_OF_YEAR)
+ && firstDate.get(Calendar.YEAR) == secondDate
+ .get(Calendar.YEAR);
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ setCurrentLocale(newConfig.locale);
+ }
+
+ private void onScroll(AbsListView view, int firstVisibleItem,
+ int visibleItemCount, int totalItemCount) {
+ WeekView child = (WeekView) view.getChildAt(0);
+ if (child == null) {
+ return;
+ }
+ long currScroll = view.getFirstVisiblePosition() * child.getHeight()
+ - child.getBottom();
+ if (currScroll < mPreviousScrollPosition) {
+ mIsScrollingUp = true;
+ } else if (currScroll > mPreviousScrollPosition) {
+ mIsScrollingUp = false;
+ } else {
+ return;
+ }
+ int offset = child.getBottom() < mWeekMinVisibleHeight ? 1 : 0;
+ if (mIsScrollingUp) {
+ child = (WeekView) view.getChildAt(CalendarView.SCROLL_HYST_WEEKS
+ + offset);
+ } else if (offset != 0) {
+ child = (WeekView) view.getChildAt(offset);
+ }
+ int month;
+ if (mIsScrollingUp) {
+ month = child.getMonthOfFirstWeekDay();
+ } else {
+ month = child.getMonthOfLastWeekDay();
+ }
+ int monthDiff;
+ if (mCurrentMonthDisplayed == 11 && month == 0) {
+ monthDiff = 1;
+ } else if (mCurrentMonthDisplayed == 0 && month == 11) {
+ monthDiff = -1;
+ } else {
+ monthDiff = month - mCurrentMonthDisplayed;
+ }
+ if (!mIsScrollingUp && monthDiff > 0 || mIsScrollingUp && monthDiff < 0) {
+ Calendar firstDay = child.getFirstDay();
+ if (mIsScrollingUp) {
+ firstDay.add(Calendar.DAY_OF_MONTH, -CalendarView.DAYS_PER_WEEK);
+ } else {
+ firstDay.add(Calendar.DAY_OF_MONTH, CalendarView.DAYS_PER_WEEK);
+ }
+ setMonthDisplayed(firstDay);
+ }
+ mPreviousScrollPosition = currScroll;
+ mPreviousScrollState = mCurrentScrollState;
+ }
+
+ private void onScrollStateChanged(AbsListView view, int scrollState) {
+ mScrollStateChangedRunnable.doScrollStateChange(view, scrollState);
+ }
+
+ private boolean parseDate(String date, Calendar outDate) {
+ try {
+ outDate.setTime(mDateFormat.parse(date));
+ return true;
+ } catch (ParseException e) {
+ Log.w(CalendarView.LOG_TAG, "Date: " + date + " not in format: "
+ + CalendarView.DATE_FORMAT);
+ return false;
+ }
+ }
+
+ private void setCurrentLocale(Locale locale) {
+ if (locale.equals(mCurrentLocale)) {
+ return;
+ }
+
+ mCurrentLocale = locale;
+ mTempDate = getCalendarForLocale(mTempDate, locale);
+ mFirstDayOfMonth = getCalendarForLocale(mFirstDayOfMonth, locale);
+ mMinDate = getCalendarForLocale(mMinDate, locale);
+ mMaxDate = getCalendarForLocale(mMaxDate, locale);
+ }
+
+ public void setDate(long date) {
+ setDate(date, false, false);
+ }
+
+ public void setDate(long date, boolean animate, boolean center) {
+ mTempDate.setTimeInMillis(date);
+ if (isSameDate(mTempDate, mAdapter.mSelectedDate)) {
+ return;
+ }
+ goTo(mTempDate, animate, true, center);
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ mListView.setEnabled(enabled);
+ }
+
+ public void setFirstDayOfWeek(int firstDayOfWeek) {
+ if (mFirstDayOfWeek == firstDayOfWeek) {
+ return;
+ }
+ mFirstDayOfWeek = firstDayOfWeek;
+ mAdapter.init();
+ mAdapter.notifyDataSetChanged();
+ setUpHeader(CalendarView.DEFAULT_WEEK_DAY_TEXT_APPEARANCE_RES_ID);
+ }
+
+ public void setMaxDate(long maxDate) {
+ mTempDate.setTimeInMillis(maxDate);
+ if (isSameDate(mTempDate, mMaxDate)) {
+ return;
+ }
+ mMaxDate.setTimeInMillis(maxDate);
+ mAdapter.init();
+ Calendar date = mAdapter.mSelectedDate;
+ if (date.after(mMaxDate)) {
+ setDate(mMaxDate.getTimeInMillis());
+ } else {
+ goTo(date, false, true, false);
+ }
+ }
+
+ public void setMinDate(long minDate) {
+ mTempDate.setTimeInMillis(minDate);
+ if (isSameDate(mTempDate, mMinDate)) {
+ return;
+ }
+ mMinDate.setTimeInMillis(minDate);
+ Calendar date = mAdapter.mSelectedDate;
+ if (date.before(mMinDate)) {
+ mAdapter.setSelectedDay(mMinDate);
+ }
+ mAdapter.init();
+ if (date.before(mMinDate)) {
+ setDate(mTempDate.getTimeInMillis());
+ } else {
+ goTo(date, false, true, false);
+ }
+ }
+
+ private void setMonthDisplayed(Calendar calendar) {
+ final int newMonthDisplayed = calendar.get(Calendar.MONTH);
+ final int newYearDisplayed = calendar.get(Calendar.YEAR);
+ if (mCurrentMonthDisplayed != newMonthDisplayed
+ || mCurrentYearDisplayed != newYearDisplayed) {
+ mCurrentMonthDisplayed = newMonthDisplayed;
+ mCurrentYearDisplayed = newYearDisplayed;
+ mAdapter.setFocusMonth(mCurrentMonthDisplayed);
+ final int flags = DateUtils.FORMAT_SHOW_DATE
+ | DateUtils.FORMAT_NO_MONTH_DAY
+ | DateUtils.FORMAT_SHOW_YEAR;
+ final long millis = calendar.getTimeInMillis();
+ String newMonthName = DateUtils.formatDateRange(getContext(),
+ millis, millis, flags);
+ mMonthName.setText(newMonthName);
+ mMonthName.invalidate();
+ }
+ }
+
+ public void setOnDateChangeListener(OnDateChangeListener listener) {
+ mOnDateChangeListener = listener;
+ }
+
+ public void setShowWeekNumber(boolean showWeekNumber) {
+ if (mShowWeekNumber == showWeekNumber) {
+ return;
+ }
+ mShowWeekNumber = showWeekNumber;
+ mAdapter.notifyDataSetChanged();
+ setUpHeader(CalendarView.DEFAULT_WEEK_DAY_TEXT_APPEARANCE_RES_ID);
+ }
+
+ private void setUpAdapter() {
+ if (mAdapter == null) {
+ mAdapter = new WeeksAdapter(getContext());
+ mAdapter.registerDataSetObserver(new DataSetObserver() {
+ @Override
+ public void onChanged() {
+ if (mOnDateChangeListener != null) {
+ Calendar selectedDay = mAdapter.getSelectedDay();
+ mOnDateChangeListener.onSelectedDayChange(
+ CalendarView.this,
+ selectedDay.get(Calendar.YEAR),
+ selectedDay.get(Calendar.MONTH),
+ selectedDay.get(Calendar.DAY_OF_MONTH));
+ }
+ }
+ });
+ mListView.setAdapter(mAdapter);
+ }
+ mAdapter.notifyDataSetChanged();
+ }
+
+ private void setUpHeader(int weekDayTextAppearanceResId) {
+ mDayLabels = new String[mDaysPerWeek];
+ for (int i = mFirstDayOfWeek, count = mFirstDayOfWeek + mDaysPerWeek; i < count; i++) {
+ int calendarDay = i > Calendar.SATURDAY ? i - Calendar.SATURDAY : i;
+ mDayLabels[i - mFirstDayOfWeek] = DateUtils.getDayOfWeekString(
+ calendarDay, DateUtils.LENGTH_SHORTEST);
+ }
+ TextView label = (TextView) mDayNamesHeader.getChildAt(0);
+ if (mShowWeekNumber) {
+ label.setVisibility(View.VISIBLE);
+ } else {
+ label.setVisibility(View.GONE);
+ }
+ for (int i = 1, count = mDayNamesHeader.getChildCount(); i < count; i++) {
+ label = (TextView) mDayNamesHeader.getChildAt(i);
+ if (weekDayTextAppearanceResId > -1) {
+ label.setTextAppearance(getContext(),
+ weekDayTextAppearanceResId);
+ }
+ if (i < mDaysPerWeek + 1) {
+ label.setText(mDayLabels[i - 1]);
+ label.setVisibility(View.VISIBLE);
+ } else {
+ label.setVisibility(View.GONE);
+ }
+ }
+ mDayNamesHeader.invalidate();
+ }
+
+ @SuppressLint("NewApi")
+ private void setUpListView() {
+ mListView.setDivider(null);
+ mListView.setItemsCanFocus(true);
+ mListView.setVerticalScrollBarEnabled(false);
+ mListView.setOnScrollListener(new OnScrollListener() {
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem,
+ int visibleItemCount, int totalItemCount) {
+ CalendarView.this.onScroll(view, firstVisibleItem,
+ visibleItemCount, totalItemCount);
+ }
+
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ CalendarView.this.onScrollStateChanged(view, scrollState);
+ }
+ });
+ if (VERSION.SDK_INT >= 11) {
+ mListView.setFriction(mFriction);
+ mListView.setVelocityScale(mVelocityScale);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckBox.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckBox.java
new file mode 100644
index 0000000000..4a85ddcadf
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckBox.java
@@ -0,0 +1,84 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class CheckBox extends android.widget.CheckBox {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public CheckBox(Context context) {
+ this(context, null);
+ }
+
+ public CheckBox(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.checkboxStyle);
+ }
+
+ public CheckBox(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckedTextView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckedTextView.java
new file mode 100644
index 0000000000..bde009d58d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/CheckedTextView.java
@@ -0,0 +1,85 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class CheckedTextView extends android.widget.CheckedTextView {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public CheckedTextView(Context context) {
+ this(context, null);
+ }
+
+ public CheckedTextView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public CheckedTextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/DatePicker.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/DatePicker.java
new file mode 100644
index 0000000000..b0250917d0
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/DatePicker.java
@@ -0,0 +1,559 @@
+
+package org.holoeverywhere.widget;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.NumberPickerEditText;
+import org.holoeverywhere.util.Arrays;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.text.format.DateFormat;
+import android.text.format.DateUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.SparseArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+
+public class DatePicker extends FrameLayout {
+ private final class Callback implements NumberPicker.OnValueChangeListener,
+ CalendarView.OnDateChangeListener {
+ @Override
+ public void onSelectedDayChange(CalendarView view, int year, int month,
+ int monthDay) {
+ setDate(year, month, monthDay);
+ updateSpinners();
+ notifyDateChanged();
+ }
+
+ @Override
+ public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
+ updateInputState();
+ tempDate.setTimeInMillis(currentDate.getTimeInMillis());
+ if (picker == daySpinner) {
+ int maxDayOfMonth = tempDate
+ .getActualMaximum(Calendar.DAY_OF_MONTH);
+ if (oldVal == maxDayOfMonth && newVal == 1) {
+ tempDate.add(Calendar.DAY_OF_MONTH, 1);
+ } else if (oldVal == 1 && newVal == maxDayOfMonth) {
+ tempDate.add(Calendar.DAY_OF_MONTH, -1);
+ } else {
+ tempDate.add(Calendar.DAY_OF_MONTH, newVal - oldVal);
+ }
+ } else if (picker == monthSpinner) {
+ if (oldVal == 11 && newVal == 0) {
+ tempDate.add(Calendar.MONTH, 1);
+ } else if (oldVal == 0 && newVal == 11) {
+ tempDate.add(Calendar.MONTH, -1);
+ } else {
+ tempDate.add(Calendar.MONTH, newVal - oldVal);
+ }
+ } else if (picker == yearSpinner) {
+ tempDate.set(Calendar.YEAR, newVal);
+ } else {
+ return;
+ }
+ setDate(tempDate.get(Calendar.YEAR), tempDate.get(Calendar.MONTH),
+ tempDate.get(Calendar.DAY_OF_MONTH));
+ updateSpinners();
+ updateCalendarView();
+ notifyDateChanged();
+ }
+
+ }
+
+ public interface OnDateChangedListener {
+ void onDateChanged(DatePicker view, int year, int monthOfYear,
+ int dayOfMonth);
+ }
+
+ private static class SavedState extends BaseSavedState {
+ @SuppressWarnings("all")
+ public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+
+ private final int year, month, day;
+
+ private SavedState(Parcel in) {
+ super(in);
+ year = in.readInt();
+ month = in.readInt();
+ day = in.readInt();
+ }
+
+ private SavedState(Parcelable superState, int year, int month, int day) {
+ super(superState);
+ this.year = year;
+ this.month = month;
+ this.day = day;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
+ dest.writeInt(year);
+ dest.writeInt(month);
+ dest.writeInt(day);
+ }
+ }
+
+ private static final String DATE_FORMAT = "MM/dd/yyyy";
+ private static final String LOG_TAG = DatePicker.class.getSimpleName();
+
+ private static Calendar getCalendarForLocale(Calendar oldCalendar,
+ Locale locale) {
+ if (oldCalendar == null) {
+ return Calendar.getInstance(locale);
+ } else {
+ final long currentTimeMillis = oldCalendar.getTimeInMillis();
+ Calendar newCalendar = Calendar.getInstance(locale);
+ newCalendar.setTimeInMillis(currentTimeMillis);
+ return newCalendar;
+ }
+ }
+
+ private static void setContentDescription(View parent, int childId,
+ int textId) {
+ if (parent == null) {
+ return;
+ }
+ View child = parent.findViewById(childId);
+ if (child != null) {
+ child.setContentDescription(parent.getContext().getText(textId));
+ }
+ }
+
+ private final Callback callback = new Callback();
+ private final java.text.DateFormat dateFormat = new SimpleDateFormat(
+ DatePicker.DATE_FORMAT);
+ private final NumberPicker daySpinner, monthSpinner, yearSpinner;
+ private final InputMethodManager inputMethodManager;
+ private Locale locale;
+ private final CalendarView mCalendarView;
+ private int numberOfMonths;
+ private OnDateChangedListener onDateChangedListener;
+ private String[] shortMonths;
+ private final LinearLayout spinners;
+ private Calendar tempDate, minDate, maxDate, currentDate;
+
+ public DatePicker(Context context) {
+ this(context, null);
+ }
+
+ public DatePicker(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.datePickerStyle);
+ }
+
+ public DatePicker(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.DatePicker, defStyle, R.style.Holo_DatePicker);
+ boolean spinnersShown = a.getBoolean(
+ R.styleable.DatePicker_spinnersShown, true);
+ boolean calendarViewShown = a.getBoolean(
+ R.styleable.DatePicker_calendarViewShown, true);
+ boolean forceShownState = a.getBoolean(
+ R.styleable.DatePicker_forceShownState, false);
+ int startYear = a.getInt(R.styleable.DatePicker_startYear, 1900);
+ int endYear = a.getInt(R.styleable.DatePicker_endYear, 2100);
+ String minDate = a.getString(R.styleable.DatePicker_minDate);
+ String maxDate = a.getString(R.styleable.DatePicker_maxDate);
+ int layoutResourceId = a.getResourceId(R.styleable.DatePicker_layout,
+ R.layout.date_picker_holo);
+ a.recycle();
+ inputMethodManager = (InputMethodManager) context
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ setLocale(Locale.getDefault());
+ LayoutInflater.inflate(context, layoutResourceId, this, true);
+ spinners = (LinearLayout) findViewById(R.id.pickers);
+ mCalendarView = (CalendarView) findViewById(R.id.calendar_view);
+ daySpinner = (NumberPicker) findViewById(R.id.day);
+ monthSpinner = (NumberPicker) findViewById(R.id.month);
+ yearSpinner = (NumberPicker) findViewById(R.id.year);
+ if (((AccessibilityManager) getContext().getSystemService(
+ Context.ACCESSIBILITY_SERVICE)).isEnabled()) {
+ setContentDescriptions();
+ }
+ mCalendarView.setOnDateChangeListener(callback);
+ daySpinner.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
+ daySpinner.setOnLongPressUpdateInterval(100);
+ daySpinner.setOnValueChangedListener(callback);
+ monthSpinner.setMinValue(0);
+ monthSpinner.setMaxValue(numberOfMonths - 1);
+ monthSpinner.setDisplayedValues(shortMonths);
+ monthSpinner.setOnLongPressUpdateInterval(200);
+ monthSpinner.setOnValueChangedListener(callback);
+ yearSpinner.setOnLongPressUpdateInterval(100);
+ yearSpinner.setOnValueChangedListener(callback);
+ if (spinnersShown || calendarViewShown || forceShownState) {
+ setSpinnersShown(spinnersShown);
+ setCalendarViewShown(calendarViewShown);
+ } else {
+ setSpinnersShown(true);
+ setCalendarViewShown(false);
+ }
+ tempDate.clear();
+ if (TextUtils.isEmpty(minDate) || !parseDate(minDate, tempDate)) {
+ tempDate.set(startYear, 0, 1);
+ }
+ setMinDate(tempDate.getTimeInMillis());
+ tempDate.clear();
+ if (TextUtils.isEmpty(maxDate) || !parseDate(maxDate, tempDate)) {
+ tempDate.set(endYear, 11, 31);
+ }
+ setMaxDate(tempDate.getTimeInMillis());
+ currentDate.setTimeInMillis(System.currentTimeMillis());
+ init(currentDate.get(Calendar.YEAR), currentDate.get(Calendar.MONTH),
+ currentDate.get(Calendar.DAY_OF_MONTH), null);
+ reorderSpinners();
+ }
+
+ private void checkInputState(NumberPicker... spinners) {
+ for (NumberPicker spinner : spinners) {
+ NumberPickerEditText input = spinner.getInputField();
+ if (inputMethodManager.isActive(input)) {
+ input.clearFocus();
+ inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+ }
+ }
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ onPopulateAccessibilityEvent(event);
+ return true;
+ }
+
+ @Override
+ protected void dispatchRestoreInstanceState(
+ SparseArray<Parcelable> container) {
+ dispatchThawSelfOnly(container);
+ }
+
+ public CalendarView getCalendarView() {
+ return mCalendarView;
+ }
+
+ public boolean getCalendarViewShown() {
+ return mCalendarView.isShown();
+ }
+
+ public int getDayOfMonth() {
+ return currentDate.get(Calendar.DAY_OF_MONTH);
+ }
+
+ public long getMaxDate() {
+ return mCalendarView.getMaxDate();
+ }
+
+ public long getMinDate() {
+ return mCalendarView.getMinDate();
+ }
+
+ public int getMonth() {
+ return currentDate.get(Calendar.MONTH);
+ }
+
+ public OnDateChangedListener getOnDateChangedListener() {
+ return onDateChangedListener;
+ }
+
+ public boolean getSpinnersShown() {
+ return spinners.isShown();
+ }
+
+ public int getYear() {
+ return currentDate.get(Calendar.YEAR);
+ }
+
+ public void init(int year, int monthOfYear, int dayOfMonth,
+ OnDateChangedListener onDateChangedListener) {
+ setOnDateChangedListener(onDateChangedListener);
+ setDate(year, monthOfYear, dayOfMonth);
+ updateSpinners();
+ updateCalendarView();
+ }
+
+ private boolean isNewDate(int year, int month, int dayOfMonth) {
+ return currentDate.get(Calendar.YEAR) != year
+ || currentDate.get(Calendar.MONTH) != dayOfMonth
+ || currentDate.get(Calendar.DAY_OF_MONTH) != month;
+ }
+
+ private void notifyDateChanged() {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ if (onDateChangedListener != null) {
+ onDateChangedListener.onDateChanged(this, getYear(), getMonth(),
+ getDayOfMonth());
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ setLocale(newConfig.locale);
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ if (VERSION.SDK_INT >= 14) {
+ super.onPopulateAccessibilityEvent(event);
+ }
+ final int flags = DateUtils.FORMAT_SHOW_DATE
+ | DateUtils.FORMAT_SHOW_YEAR;
+ String selectedDateUtterance = DateUtils.formatDateTime(getContext(),
+ currentDate.getTimeInMillis(), flags);
+ event.getText().add(selectedDateUtterance);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ setDate(ss.year, ss.month, ss.day);
+ updateSpinners();
+ updateCalendarView();
+ }
+
+ @Override
+ protected Parcelable onSaveInstanceState() {
+ return new SavedState(super.onSaveInstanceState(), getYear(),
+ getMonth(), getDayOfMonth());
+ }
+
+ private boolean parseDate(String date, Calendar outDate) {
+ try {
+ outDate.setTime(dateFormat.parse(date));
+ return true;
+ } catch (ParseException e) {
+ Log.w(DatePicker.LOG_TAG, "Date: " + date + " not in format: "
+ + DatePicker.DATE_FORMAT);
+ return false;
+ }
+ }
+
+ private void pushSpinner(NumberPicker spinner, int spinnerCount, int i) {
+ if (spinner.getParent() != null
+ && spinner.getParent() instanceof ViewGroup) {
+ ViewGroup parent = (ViewGroup) spinner.getParent();
+ if (parent.getChildAt(i) != spinner) {
+ parent.removeView(spinner);
+ parent.addView(spinner);
+ setImeOptions(spinner, spinnerCount, i);
+ }
+ }
+ }
+
+ private void reorderSpinners() {
+ char[] order = DateFormat.getDateFormatOrder(getContext());
+ final int spinnerCount = order.length;
+ for (int i = 0; i < spinnerCount; i++) {
+ switch (order[i]) {
+ case DateFormat.DATE:
+ pushSpinner(daySpinner, spinnerCount, i);
+ break;
+ case DateFormat.MONTH:
+ pushSpinner(monthSpinner, spinnerCount, i);
+ break;
+ case DateFormat.YEAR:
+ pushSpinner(yearSpinner, spinnerCount, i);
+ break;
+ }
+ }
+ }
+
+ public void setCalendarViewShown(boolean shown) {
+ mCalendarView.setVisibility(shown ? View.VISIBLE : View.GONE);
+ }
+
+ private void setContentDescriptions() {
+ DatePicker.setContentDescription(daySpinner, R.id.increment,
+ R.string.date_picker_increment_day_button);
+ DatePicker.setContentDescription(daySpinner, R.id.decrement,
+ R.string.date_picker_decrement_day_button);
+ DatePicker.setContentDescription(monthSpinner, R.id.increment,
+ R.string.date_picker_increment_month_button);
+ DatePicker.setContentDescription(monthSpinner, R.id.decrement,
+ R.string.date_picker_decrement_month_button);
+ DatePicker.setContentDescription(yearSpinner, R.id.increment,
+ R.string.date_picker_increment_year_button);
+ DatePicker.setContentDescription(yearSpinner, R.id.decrement,
+ R.string.date_picker_decrement_year_button);
+ }
+
+ private void setDate(int year, int month, int dayOfMonth) {
+ currentDate.set(year, month, dayOfMonth);
+ if (currentDate.before(minDate)) {
+ currentDate.setTimeInMillis(minDate.getTimeInMillis());
+ } else if (currentDate.after(maxDate)) {
+ currentDate.setTimeInMillis(maxDate.getTimeInMillis());
+ }
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (isEnabled() == enabled) {
+ return;
+ }
+ super.setEnabled(enabled);
+ daySpinner.setEnabled(enabled);
+ monthSpinner.setEnabled(enabled);
+ yearSpinner.setEnabled(enabled);
+ mCalendarView.setEnabled(enabled);
+ }
+
+ private void setImeOptions(NumberPicker spinner, int spinnerCount,
+ int spinnerIndex) {
+ final int imeOptions;
+ if (spinnerIndex < spinnerCount - 1) {
+ imeOptions = EditorInfo.IME_ACTION_NEXT;
+ } else {
+ imeOptions = EditorInfo.IME_ACTION_DONE;
+ }
+ spinner.getInputField().setImeOptions(imeOptions);
+ }
+
+ public void setLocale(Locale locale) {
+ if (locale == null || locale.equals(this.locale)) {
+ return;
+ }
+ this.locale = locale;
+ tempDate = DatePicker.getCalendarForLocale(tempDate, locale);
+ minDate = DatePicker.getCalendarForLocale(minDate, locale);
+ maxDate = DatePicker.getCalendarForLocale(maxDate, locale);
+ currentDate = DatePicker.getCalendarForLocale(currentDate, locale);
+ numberOfMonths = tempDate.getActualMaximum(Calendar.MONTH) + 1;
+ shortMonths = new String[numberOfMonths];
+ for (int i = 0; i < numberOfMonths; i++) {
+ shortMonths[i] = DateUtils.getMonthString(Calendar.JANUARY + i,
+ DateUtils.LENGTH_MEDIUM);
+ }
+ }
+
+ public void setMaxDate(long maxDateL) {
+ tempDate.setTimeInMillis(maxDateL);
+ if (tempDate.get(Calendar.YEAR) == maxDate.get(Calendar.YEAR)
+ && tempDate.get(Calendar.DAY_OF_YEAR) == maxDate
+ .get(Calendar.DAY_OF_YEAR)) {
+ return;
+ }
+ maxDate.setTimeInMillis(maxDateL);
+ mCalendarView.setMaxDate(maxDateL);
+ if (currentDate.after(maxDate)) {
+ currentDate.setTimeInMillis(maxDate.getTimeInMillis());
+ updateCalendarView();
+ }
+ updateSpinners();
+ }
+
+ public void setMinDate(long minDateL) {
+ tempDate.setTimeInMillis(minDateL);
+ if (tempDate.get(Calendar.YEAR) == minDate.get(Calendar.YEAR)
+ && tempDate.get(Calendar.DAY_OF_YEAR) == minDate
+ .get(Calendar.DAY_OF_YEAR)) {
+ return;
+ }
+ minDate.setTimeInMillis(minDateL);
+ mCalendarView.setMinDate(minDateL);
+ if (currentDate.before(minDate)) {
+ currentDate.setTimeInMillis(minDate.getTimeInMillis());
+ updateCalendarView();
+ }
+ updateSpinners();
+ }
+
+ public void setOnDateChangedListener(
+ OnDateChangedListener onDateChangedListener) {
+ this.onDateChangedListener = onDateChangedListener;
+ }
+
+ public void setSpinnersShown(boolean shown) {
+ spinners.setVisibility(shown ? View.VISIBLE : View.GONE);
+ }
+
+ private void updateCalendarView() {
+ mCalendarView.setDate(currentDate.getTimeInMillis(), false, false);
+ }
+
+ public void updateDate(int year, int month, int dayOfMonth) {
+ if (!isNewDate(year, month, dayOfMonth)) {
+ return;
+ }
+ setDate(year, month, dayOfMonth);
+ updateSpinners();
+ updateCalendarView();
+ notifyDateChanged();
+ }
+
+ private void updateInputState() {
+ if (inputMethodManager != null) {
+ checkInputState(yearSpinner, monthSpinner, daySpinner);
+ }
+ }
+
+ private void updateSpinners() {
+ monthSpinner.setDisplayedValues(null);
+ if (currentDate.equals(minDate)) {
+ daySpinner.setMinValue(currentDate.get(Calendar.DAY_OF_MONTH));
+ daySpinner.setMaxValue(currentDate
+ .getActualMaximum(Calendar.DAY_OF_MONTH));
+ daySpinner.setWrapSelectorWheel(false);
+ monthSpinner.setMinValue(currentDate.get(Calendar.MONTH));
+ monthSpinner.setMaxValue(currentDate
+ .getActualMaximum(Calendar.MONTH));
+ monthSpinner.setWrapSelectorWheel(false);
+ } else if (currentDate.equals(maxDate)) {
+ daySpinner.setMinValue(currentDate
+ .getActualMinimum(Calendar.DAY_OF_MONTH));
+ daySpinner.setMaxValue(currentDate.get(Calendar.DAY_OF_MONTH));
+ daySpinner.setWrapSelectorWheel(false);
+ monthSpinner.setMinValue(currentDate
+ .getActualMinimum(Calendar.MONTH));
+ monthSpinner.setMaxValue(currentDate.get(Calendar.MONTH));
+ monthSpinner.setWrapSelectorWheel(false);
+ } else {
+ daySpinner.setMinValue(1);
+ daySpinner.setMaxValue(currentDate
+ .getActualMaximum(Calendar.DAY_OF_MONTH));
+ daySpinner.setWrapSelectorWheel(true);
+ monthSpinner.setMinValue(0);
+ monthSpinner.setMaxValue(11);
+ monthSpinner.setWrapSelectorWheel(true);
+ }
+ String[] displayedValues = Arrays.copyOfRange(shortMonths,
+ monthSpinner.getMinValue(), monthSpinner.getMaxValue() + 1);
+ monthSpinner.setDisplayedValues(displayedValues);
+ yearSpinner.setMinValue(minDate.get(Calendar.YEAR));
+ yearSpinner.setMaxValue(maxDate.get(Calendar.YEAR));
+ yearSpinner.setWrapSelectorWheel(false);
+ yearSpinner.setValue(currentDate.get(Calendar.YEAR));
+ monthSpinner.setValue(currentDate.get(Calendar.MONTH));
+ daySpinner.setValue(currentDate.get(Calendar.DAY_OF_MONTH));
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Divider.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Divider.java
new file mode 100644
index 0000000000..eb641a9570
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Divider.java
@@ -0,0 +1,42 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal._View;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+
+public class Divider extends _View {
+ public Divider(Context context) {
+ super(context);
+ init(context, null, 0);
+ }
+
+ public Divider(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context, attrs, 0);
+ }
+
+ public Divider(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init(context, attrs, defStyle);
+ }
+
+ protected void init(Context context, AttributeSet attrs, int defStyle) {
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.Divider, defStyle, 0);
+ boolean vertical = a.getInt(R.styleable.Divider_android_orientation,
+ android.widget.LinearLayout.VERTICAL) == android.widget.LinearLayout.VERTICAL;
+ a.recycle();
+ TypedValue value = new TypedValue();
+ context.getTheme().resolveAttribute(
+ vertical ? R.attr.dividerVertical : R.attr.dividerHorizontal,
+ value, true);
+ if (value.resourceId > 0) {
+ setBackgroundResource(value.resourceId);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/EditText.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/EditText.java
new file mode 100644
index 0000000000..e766925317
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/EditText.java
@@ -0,0 +1,98 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuCallbackGetter;
+
+public class EditText extends android.widget.EditText implements ContextMenuCallbackGetter {
+ private boolean allCaps = false;
+ private OnCreateContextMenuListener mOnCreateContextMenuListener;
+ private CharSequence originalText;
+
+ private BufferType originalType;
+
+ public EditText(Context context) {
+ this(context, null);
+ }
+
+ public EditText(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.editTextStyle);
+ }
+
+ public EditText(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ @Override
+ public OnCreateContextMenuListener getOnCreateContextMenuListener() {
+ return mOnCreateContextMenuListener;
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setOnCreateContextMenuListener(OnCreateContextMenuListener l) {
+ super.setOnCreateContextMenuListener(mOnCreateContextMenuListener = l);
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListConnector.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListConnector.java
new file mode 100644
index 0000000000..65c28c2e9a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListConnector.java
@@ -0,0 +1,594 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import android.database.DataSetObserver;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.SystemClock;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ExpandableListAdapter;
+import android.widget.Filter;
+import android.widget.Filterable;
+
+public class ExpandableListConnector extends BaseAdapter implements Filterable {
+ static class GroupMetadata implements Parcelable, Comparable<GroupMetadata> {
+ public static final Parcelable.Creator<GroupMetadata> CREATOR =
+ new Parcelable.Creator<GroupMetadata>() {
+ @Override
+ public GroupMetadata createFromParcel(Parcel in) {
+ GroupMetadata gm = GroupMetadata.obtain(
+ in.readInt(),
+ in.readInt(),
+ in.readInt(),
+ in.readLong());
+ return gm;
+ }
+
+ @Override
+ public GroupMetadata[] newArray(int size) {
+ return new GroupMetadata[size];
+ }
+ };
+
+ final static int REFRESH = -1;
+
+ static GroupMetadata obtain(int flPos, int lastChildFlPos, int gPos, long gId) {
+ GroupMetadata gm = new GroupMetadata();
+ gm.flPos = flPos;
+ gm.lastChildFlPos = lastChildFlPos;
+ gm.gPos = gPos;
+ gm.gId = gId;
+ return gm;
+ }
+
+ int flPos;
+ long gId;
+ int gPos;
+ int lastChildFlPos;
+
+ private GroupMetadata() {
+ }
+
+ @Override
+ public int compareTo(GroupMetadata another) {
+ if (another == null) {
+ throw new IllegalArgumentException();
+ }
+
+ return gPos - another.gPos;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(flPos);
+ dest.writeInt(lastChildFlPos);
+ dest.writeInt(gPos);
+ dest.writeLong(gId);
+ }
+ }
+
+ protected class MyDataSetObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ refreshExpGroupMetadataList(true, true);
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public void onInvalidated() {
+ refreshExpGroupMetadataList(true, true);
+ notifyDataSetInvalidated();
+ }
+ }
+
+ static public class PositionMetadata {
+ private static final int MAX_POOL_SIZE = 5;
+ private static ArrayList<PositionMetadata> sPool =
+ new ArrayList<PositionMetadata>(MAX_POOL_SIZE);
+
+ private static PositionMetadata getRecycledOrCreate() {
+ PositionMetadata pm;
+ synchronized (sPool) {
+ if (sPool.size() > 0) {
+ pm = sPool.remove(0);
+ } else {
+ return new PositionMetadata();
+ }
+ }
+ pm.resetState();
+ return pm;
+ }
+
+ static PositionMetadata obtain(int flatListPos, int type, int groupPos,
+ int childPos, GroupMetadata groupMetadata, int groupInsertIndex) {
+ PositionMetadata pm = getRecycledOrCreate();
+ pm.position = ExpandableListPosition.obtain(type, groupPos, childPos, flatListPos);
+ pm.groupMetadata = groupMetadata;
+ pm.groupInsertIndex = groupInsertIndex;
+ return pm;
+ }
+
+ public int groupInsertIndex;
+ public GroupMetadata groupMetadata;
+ public ExpandableListPosition position;
+
+ private PositionMetadata() {
+ }
+
+ public boolean isExpanded() {
+ return groupMetadata != null;
+ }
+
+ public void recycle() {
+ resetState();
+ synchronized (sPool) {
+ if (sPool.size() < MAX_POOL_SIZE) {
+ sPool.add(this);
+ }
+ }
+ }
+
+ private void resetState() {
+ if (position != null) {
+ position.recycle();
+ position = null;
+ }
+ groupMetadata = null;
+ groupInsertIndex = 0;
+ }
+ }
+
+ private final DataSetObserver mDataSetObserver = new MyDataSetObserver();
+ private ExpandableListAdapter mExpandableListAdapter;
+ private ArrayList<GroupMetadata> mExpGroupMetadataList;
+ private int mMaxExpGroupCount = Integer.MAX_VALUE;
+ private int mTotalExpChildrenCount;
+
+ public ExpandableListConnector(ExpandableListAdapter expandableListAdapter) {
+ mExpGroupMetadataList = new ArrayList<GroupMetadata>();
+ setExpandableListAdapter(expandableListAdapter);
+ }
+
+ @Override
+ public boolean areAllItemsEnabled() {
+ return mExpandableListAdapter.areAllItemsEnabled();
+ }
+
+ boolean collapseGroup(int groupPos) {
+ ExpandableListPosition elGroupPos = ExpandableListPosition.obtain(
+ ExpandableListPosition.GROUP, groupPos, -1, -1);
+ PositionMetadata pm = getFlattenedPos(elGroupPos);
+ elGroupPos.recycle();
+ if (pm == null) {
+ return false;
+ }
+ boolean retValue = collapseGroup(pm);
+ pm.recycle();
+ return retValue;
+ }
+
+ boolean collapseGroup(PositionMetadata posMetadata) {
+ if (posMetadata.groupMetadata == null) {
+ return false;
+ }
+ mExpGroupMetadataList.remove(posMetadata.groupMetadata);
+ refreshExpGroupMetadataList(false, false);
+ notifyDataSetChanged();
+ mExpandableListAdapter.onGroupCollapsed(posMetadata.groupMetadata.gPos);
+ return true;
+ }
+
+ boolean expandGroup(int groupPos) {
+ ExpandableListPosition elGroupPos = ExpandableListPosition.obtain(
+ ExpandableListPosition.GROUP, groupPos, -1, -1);
+ PositionMetadata pm = getFlattenedPos(elGroupPos);
+ elGroupPos.recycle();
+ boolean retValue = expandGroup(pm);
+ pm.recycle();
+ return retValue;
+ }
+
+ boolean expandGroup(PositionMetadata posMetadata) {
+ if (posMetadata.position.groupPos < 0) {
+ throw new RuntimeException("Need group");
+ }
+ if (mMaxExpGroupCount == 0) {
+ return false;
+ }
+ if (posMetadata.groupMetadata != null) {
+ return false;
+ }
+ if (mExpGroupMetadataList.size() >= mMaxExpGroupCount) {
+ GroupMetadata collapsedGm = mExpGroupMetadataList.get(0);
+ int collapsedIndex = mExpGroupMetadataList.indexOf(collapsedGm);
+ collapseGroup(collapsedGm.gPos);
+ if (posMetadata.groupInsertIndex > collapsedIndex) {
+ posMetadata.groupInsertIndex--;
+ }
+ }
+ GroupMetadata expandedGm = GroupMetadata.obtain(
+ GroupMetadata.REFRESH,
+ GroupMetadata.REFRESH,
+ posMetadata.position.groupPos,
+ mExpandableListAdapter.getGroupId(posMetadata.position.groupPos));
+ mExpGroupMetadataList.add(posMetadata.groupInsertIndex, expandedGm);
+ refreshExpGroupMetadataList(false, false);
+ notifyDataSetChanged();
+ mExpandableListAdapter.onGroupExpanded(expandedGm.gPos);
+ return true;
+ }
+
+ int findGroupPosition(long groupIdToMatch, int seedGroupPosition) {
+ int count = mExpandableListAdapter.getGroupCount();
+ if (count == 0) {
+ return AdapterView.INVALID_POSITION;
+ }
+ if (groupIdToMatch == AdapterView.INVALID_ROW_ID) {
+ return AdapterView.INVALID_POSITION;
+ }
+ seedGroupPosition = Math.max(0, seedGroupPosition);
+ seedGroupPosition = Math.min(count - 1, seedGroupPosition);
+ long endTime = SystemClock.uptimeMillis() + AdapterView.SYNC_MAX_DURATION_MILLIS;
+ long rowId;
+ int first = seedGroupPosition;
+ int last = seedGroupPosition;
+ boolean next = false;
+ boolean hitFirst;
+ boolean hitLast;
+ ExpandableListAdapter adapter = getAdapter();
+ if (adapter == null) {
+ return AdapterView.INVALID_POSITION;
+ }
+ while (SystemClock.uptimeMillis() <= endTime) {
+ rowId = adapter.getGroupId(seedGroupPosition);
+ if (rowId == groupIdToMatch) {
+ return seedGroupPosition;
+ }
+ hitLast = last == count - 1;
+ hitFirst = first == 0;
+ if (hitLast && hitFirst) {
+ break;
+ }
+ if (hitFirst || next && !hitLast) {
+ last++;
+ seedGroupPosition = last;
+ next = false;
+ } else if (hitLast || !next && !hitFirst) {
+ first--;
+ seedGroupPosition = first;
+ next = true;
+ }
+ }
+ return AdapterView.INVALID_POSITION;
+ }
+
+ ExpandableListAdapter getAdapter() {
+ return mExpandableListAdapter;
+ }
+
+ @Override
+ public int getCount() {
+ return mExpandableListAdapter.getGroupCount() + mTotalExpChildrenCount;
+ }
+
+ ArrayList<GroupMetadata> getExpandedGroupMetadataList() {
+ return mExpGroupMetadataList;
+ }
+
+ @Override
+ public Filter getFilter() {
+ ExpandableListAdapter adapter = getAdapter();
+ if (adapter instanceof Filterable) {
+ return ((Filterable) adapter).getFilter();
+ } else {
+ return null;
+ }
+ }
+
+ PositionMetadata getFlattenedPos(final ExpandableListPosition pos) {
+ final ArrayList<GroupMetadata> egml = mExpGroupMetadataList;
+ final int numExpGroups = egml.size();
+ int leftExpGroupIndex = 0;
+ int rightExpGroupIndex = numExpGroups - 1;
+ int midExpGroupIndex = 0;
+ GroupMetadata midExpGm;
+ if (numExpGroups == 0) {
+ return PositionMetadata.obtain(pos.groupPos, pos.type,
+ pos.groupPos, pos.childPos, null, 0);
+ }
+ while (leftExpGroupIndex <= rightExpGroupIndex) {
+ midExpGroupIndex = (rightExpGroupIndex - leftExpGroupIndex) / 2 + leftExpGroupIndex;
+ midExpGm = egml.get(midExpGroupIndex);
+ if (pos.groupPos > midExpGm.gPos) {
+ leftExpGroupIndex = midExpGroupIndex + 1;
+ } else if (pos.groupPos < midExpGm.gPos) {
+ rightExpGroupIndex = midExpGroupIndex - 1;
+ } else if (pos.groupPos == midExpGm.gPos) {
+ if (pos.type == ExpandableListPosition.GROUP) {
+ return PositionMetadata.obtain(midExpGm.flPos, pos.type,
+ pos.groupPos, pos.childPos, midExpGm, midExpGroupIndex);
+ } else if (pos.type == ExpandableListPosition.CHILD) {
+ return PositionMetadata.obtain(midExpGm.flPos + pos.childPos
+ + 1, pos.type, pos.groupPos, pos.childPos,
+ midExpGm, midExpGroupIndex);
+ } else {
+ return null;
+ }
+ }
+ }
+ if (pos.type != ExpandableListPosition.GROUP) {
+ return null;
+ }
+ if (leftExpGroupIndex > midExpGroupIndex) {
+ final GroupMetadata leftExpGm = egml.get(leftExpGroupIndex - 1);
+ final int flPos =
+ leftExpGm.lastChildFlPos
+ + pos.groupPos - leftExpGm.gPos;
+
+ return PositionMetadata.obtain(flPos, pos.type, pos.groupPos,
+ pos.childPos, null, leftExpGroupIndex);
+ } else if (rightExpGroupIndex < midExpGroupIndex) {
+ final GroupMetadata rightExpGm = egml.get(++rightExpGroupIndex);
+ final int flPos =
+ rightExpGm.flPos
+ - (rightExpGm.gPos - pos.groupPos);
+ return PositionMetadata.obtain(flPos, pos.type, pos.groupPos,
+ pos.childPos, null, rightExpGroupIndex);
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public Object getItem(int flatListPos) {
+ final PositionMetadata posMetadata = getUnflattenedPos(flatListPos);
+ Object retValue;
+ if (posMetadata.position.type == ExpandableListPosition.GROUP) {
+ retValue = mExpandableListAdapter
+ .getGroup(posMetadata.position.groupPos);
+ } else if (posMetadata.position.type == ExpandableListPosition.CHILD) {
+ retValue = mExpandableListAdapter.getChild(posMetadata.position.groupPos,
+ posMetadata.position.childPos);
+ } else {
+ throw new RuntimeException("Flat list position is of unknown type");
+ }
+ posMetadata.recycle();
+ return retValue;
+ }
+
+ @Override
+ public long getItemId(int flatListPos) {
+ final PositionMetadata posMetadata = getUnflattenedPos(flatListPos);
+ final long groupId = mExpandableListAdapter.getGroupId(posMetadata.position.groupPos);
+ long retValue;
+ if (posMetadata.position.type == ExpandableListPosition.GROUP) {
+ retValue = mExpandableListAdapter.getCombinedGroupId(groupId);
+ } else if (posMetadata.position.type == ExpandableListPosition.CHILD) {
+ final long childId = mExpandableListAdapter.getChildId(posMetadata.position.groupPos,
+ posMetadata.position.childPos);
+ retValue = mExpandableListAdapter.getCombinedChildId(groupId, childId);
+ } else {
+ throw new RuntimeException("Flat list position is of unknown type");
+ }
+ posMetadata.recycle();
+ return retValue;
+ }
+
+ @Override
+ public int getItemViewType(int flatListPos) {
+ final PositionMetadata metadata = getUnflattenedPos(flatListPos);
+ final ExpandableListPosition pos = metadata.position;
+ int retValue;
+ if (mExpandableListAdapter instanceof HeterogeneousExpandableList) {
+ HeterogeneousExpandableList adapter =
+ (HeterogeneousExpandableList) mExpandableListAdapter;
+ if (pos.type == ExpandableListPosition.GROUP) {
+ retValue = adapter.getGroupType(pos.groupPos);
+ } else {
+ final int childType = adapter.getChildType(pos.groupPos, pos.childPos);
+ retValue = adapter.getGroupTypeCount() + childType;
+ }
+ } else {
+ if (pos.type == ExpandableListPosition.GROUP) {
+ retValue = 0;
+ } else {
+ retValue = 1;
+ }
+ }
+ metadata.recycle();
+ return retValue;
+ }
+
+ PositionMetadata getUnflattenedPos(final int flPos) {
+ final ArrayList<GroupMetadata> egml = mExpGroupMetadataList;
+ final int numExpGroups = egml.size();
+ int leftExpGroupIndex = 0;
+ int rightExpGroupIndex = numExpGroups - 1;
+ int midExpGroupIndex = 0;
+ GroupMetadata midExpGm;
+ if (numExpGroups == 0) {
+ return PositionMetadata.obtain(flPos, ExpandableListPosition.GROUP, flPos,
+ -1, null, 0);
+ }
+ while (leftExpGroupIndex <= rightExpGroupIndex) {
+ midExpGroupIndex =
+ (rightExpGroupIndex - leftExpGroupIndex) / 2
+ + leftExpGroupIndex;
+ midExpGm = egml.get(midExpGroupIndex);
+ if (flPos > midExpGm.lastChildFlPos) {
+ leftExpGroupIndex = midExpGroupIndex + 1;
+ } else if (flPos < midExpGm.flPos) {
+ rightExpGroupIndex = midExpGroupIndex - 1;
+ } else if (flPos == midExpGm.flPos) {
+ return PositionMetadata.obtain(flPos, ExpandableListPosition.GROUP,
+ midExpGm.gPos, -1, midExpGm, midExpGroupIndex);
+ } else if (flPos <= midExpGm.lastChildFlPos) {
+ final int childPos = flPos - (midExpGm.flPos + 1);
+ return PositionMetadata.obtain(flPos, ExpandableListPosition.CHILD,
+ midExpGm.gPos, childPos, midExpGm, midExpGroupIndex);
+ }
+ }
+ int insertPosition = 0;
+ int groupPos = 0;
+ if (leftExpGroupIndex > midExpGroupIndex) {
+ final GroupMetadata leftExpGm = egml.get(leftExpGroupIndex - 1);
+ insertPosition = leftExpGroupIndex;
+ groupPos =
+ flPos - leftExpGm.lastChildFlPos + leftExpGm.gPos;
+ } else if (rightExpGroupIndex < midExpGroupIndex) {
+ final GroupMetadata rightExpGm = egml.get(++rightExpGroupIndex);
+ insertPosition = rightExpGroupIndex;
+ groupPos = rightExpGm.gPos - (rightExpGm.flPos - flPos);
+ } else {
+ throw new RuntimeException("Unknown state");
+ }
+ return PositionMetadata.obtain(flPos, ExpandableListPosition.GROUP, groupPos, -1,
+ null, insertPosition);
+ }
+
+ @Override
+ public View getView(int flatListPos, View convertView, ViewGroup parent) {
+ final PositionMetadata posMetadata = getUnflattenedPos(flatListPos);
+ View retValue;
+ if (posMetadata.position.type == ExpandableListPosition.GROUP) {
+ retValue = mExpandableListAdapter.getGroupView(posMetadata.position.groupPos,
+ posMetadata.isExpanded(), convertView, parent);
+ } else if (posMetadata.position.type == ExpandableListPosition.CHILD) {
+ final boolean isLastChild = posMetadata.groupMetadata.lastChildFlPos == flatListPos;
+
+ retValue = mExpandableListAdapter.getChildView(posMetadata.position.groupPos,
+ posMetadata.position.childPos, isLastChild, convertView, parent);
+ } else {
+ throw new RuntimeException("Flat list position is of unknown type");
+ }
+ posMetadata.recycle();
+ return retValue;
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ if (mExpandableListAdapter instanceof HeterogeneousExpandableList) {
+ HeterogeneousExpandableList adapter =
+ (HeterogeneousExpandableList) mExpandableListAdapter;
+ return adapter.getGroupTypeCount() + adapter.getChildTypeCount();
+ } else {
+ return 2;
+ }
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return mExpandableListAdapter.hasStableIds();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ ExpandableListAdapter adapter = getAdapter();
+ return adapter != null ? adapter.isEmpty() : true;
+ }
+
+ @Override
+ public boolean isEnabled(int flatListPos) {
+ final PositionMetadata metadata = getUnflattenedPos(flatListPos);
+ final ExpandableListPosition pos = metadata.position;
+ boolean retValue;
+ if (pos.type == ExpandableListPosition.CHILD) {
+ retValue = mExpandableListAdapter.isChildSelectable(pos.groupPos, pos.childPos);
+ } else {
+ retValue = true;
+ }
+ metadata.recycle();
+ return retValue;
+ }
+
+ public boolean isGroupExpanded(int groupPosition) {
+ GroupMetadata groupMetadata;
+ for (int i = mExpGroupMetadataList.size() - 1; i >= 0; i--) {
+ groupMetadata = mExpGroupMetadataList.get(i);
+ if (groupMetadata.gPos == groupPosition) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void refreshExpGroupMetadataList(boolean forceChildrenCountRefresh,
+ boolean syncGroupPositions) {
+ final ArrayList<GroupMetadata> egml = mExpGroupMetadataList;
+ int egmlSize = egml.size();
+ int curFlPos = 0;
+ mTotalExpChildrenCount = 0;
+ if (syncGroupPositions) {
+ boolean positionsChanged = false;
+ for (int i = egmlSize - 1; i >= 0; i--) {
+ GroupMetadata curGm = egml.get(i);
+ int newGPos = findGroupPosition(curGm.gId, curGm.gPos);
+ if (newGPos != curGm.gPos) {
+ if (newGPos == AdapterView.INVALID_POSITION) {
+ egml.remove(i);
+ egmlSize--;
+ }
+ curGm.gPos = newGPos;
+ if (!positionsChanged) {
+ positionsChanged = true;
+ }
+ }
+ }
+ if (positionsChanged) {
+ Collections.sort(egml);
+ }
+ }
+ int gChildrenCount;
+ int lastGPos = 0;
+ for (int i = 0; i < egmlSize; i++) {
+ GroupMetadata curGm = egml.get(i);
+ if (curGm.lastChildFlPos == GroupMetadata.REFRESH || forceChildrenCountRefresh) {
+ gChildrenCount = mExpandableListAdapter.getChildrenCount(curGm.gPos);
+ } else {
+ gChildrenCount = curGm.lastChildFlPos - curGm.flPos;
+ }
+ mTotalExpChildrenCount += gChildrenCount;
+ curFlPos += curGm.gPos - lastGPos;
+ lastGPos = curGm.gPos;
+ curGm.flPos = curFlPos;
+ curFlPos += gChildrenCount;
+ curGm.lastChildFlPos = curFlPos;
+ }
+ }
+
+ public void setExpandableListAdapter(ExpandableListAdapter expandableListAdapter) {
+ if (mExpandableListAdapter != null) {
+ mExpandableListAdapter.unregisterDataSetObserver(mDataSetObserver);
+ }
+ mExpandableListAdapter = expandableListAdapter;
+ expandableListAdapter.registerDataSetObserver(mDataSetObserver);
+ }
+
+ void setExpandedGroupMetadataList(ArrayList<GroupMetadata> expandedGroupMetadataList) {
+ if (expandedGroupMetadataList == null || mExpandableListAdapter == null) {
+ return;
+ }
+ int numGroups = mExpandableListAdapter.getGroupCount();
+ for (int i = expandedGroupMetadataList.size() - 1; i >= 0; i--) {
+ if (expandedGroupMetadataList.get(i).gPos >= numGroups) {
+ return;
+ }
+ }
+ mExpGroupMetadataList = expandedGroupMetadataList;
+ refreshExpGroupMetadataList(true, false);
+ }
+
+ public void setMaxExpGroupCount(int maxExpGroupCount) {
+ mMaxExpGroupCount = maxExpGroupCount;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListPosition.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListPosition.java
new file mode 100644
index 0000000000..95ce097168
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListPosition.java
@@ -0,0 +1,92 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+
+public class ExpandableListPosition {
+ public final static int CHILD = 1;
+ public final static int GROUP = 2;
+ private static final int MAX_POOL_SIZE = 5;
+ private static ArrayList<ExpandableListPosition> sPool =
+ new ArrayList<ExpandableListPosition>(MAX_POOL_SIZE);
+
+ private static ExpandableListPosition getRecycledOrCreate() {
+ ExpandableListPosition elp;
+ synchronized (sPool) {
+ if (sPool.size() > 0) {
+ elp = sPool.remove(0);
+ } else {
+ return new ExpandableListPosition();
+ }
+ }
+ elp.resetState();
+ return elp;
+ }
+
+ static ExpandableListPosition obtain(int type, int groupPos, int childPos, int flatListPos) {
+ ExpandableListPosition elp = getRecycledOrCreate();
+ elp.type = type;
+ elp.groupPos = groupPos;
+ elp.childPos = childPos;
+ elp.flatListPos = flatListPos;
+ return elp;
+ }
+
+ static ExpandableListPosition obtainChildPosition(int groupPosition, int childPosition) {
+ return obtain(CHILD, groupPosition, childPosition, 0);
+ }
+
+ static ExpandableListPosition obtainGroupPosition(int groupPosition) {
+ return obtain(GROUP, groupPosition, 0, 0);
+ }
+
+ static ExpandableListPosition obtainPosition(long packedPosition) {
+ if (packedPosition == ExpandableListView.PACKED_POSITION_VALUE_NULL) {
+ return null;
+ }
+
+ ExpandableListPosition elp = getRecycledOrCreate();
+ elp.groupPos = ExpandableListView.getPackedPositionGroup(packedPosition);
+ if (ExpandableListView.getPackedPositionType(packedPosition) == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
+ elp.type = CHILD;
+ elp.childPos = ExpandableListView.getPackedPositionChild(packedPosition);
+ } else {
+ elp.type = GROUP;
+ }
+ return elp;
+ }
+
+ public int childPos;
+
+ int flatListPos;
+
+ public int groupPos;
+
+ public int type;
+
+ private ExpandableListPosition() {
+ }
+
+ long getPackedPosition() {
+ if (type == CHILD) {
+ return ExpandableListView.getPackedPositionForChild(groupPos, childPos);
+ } else {
+ return ExpandableListView.getPackedPositionForGroup(groupPos);
+ }
+ }
+
+ public void recycle() {
+ synchronized (sPool) {
+ if (sPool.size() < MAX_POOL_SIZE) {
+ sPool.add(this);
+ }
+ }
+ }
+
+ private void resetState() {
+ groupPos = 0;
+ childPos = 0;
+ flatListPos = 0;
+ type = 0;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListView.java
new file mode 100644
index 0000000000..923d4b0679
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ExpandableListView.java
@@ -0,0 +1,645 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.widget.ExpandableListConnector.PositionMetadata;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.SoundEffectConstants;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.ExpandableListAdapter;
+import android.widget.ListAdapter;
+
+public class ExpandableListView extends ListView {
+ public static class ExpandableListContextMenuInfo implements ContextMenu.ContextMenuInfo {
+ public long id;
+ public long packedPosition;
+ public View targetView;
+
+ public ExpandableListContextMenuInfo(View targetView, long packedPosition, long id) {
+ this.targetView = targetView;
+ this.packedPosition = packedPosition;
+ this.id = id;
+ }
+ }
+
+ public interface OnChildClickListener {
+ boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
+ int childPosition, long id);
+ }
+
+ public interface OnGroupClickListener {
+ boolean onGroupClick(ExpandableListView parent, View v, int groupPosition,
+ long id);
+ }
+
+ public interface OnGroupCollapseListener {
+ void onGroupCollapse(int groupPosition);
+ }
+
+ public interface OnGroupExpandListener {
+ void onGroupExpand(int groupPosition);
+ }
+
+ static class SavedState extends BaseSavedState {
+ public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {
+ @Override
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ ArrayList<ExpandableListConnector.GroupMetadata> expandedGroupMetadataList;
+
+ private SavedState(Parcel in) {
+ super(in.readParcelable(ListView.SavedState.class.getClassLoader()));
+ expandedGroupMetadataList = new ArrayList<ExpandableListConnector.GroupMetadata>();
+ in.readList(expandedGroupMetadataList, ExpandableListConnector.class.getClassLoader());
+ }
+
+ SavedState(
+ Parcelable superState,
+ ArrayList<ExpandableListConnector.GroupMetadata> expandedGroupMetadataList) {
+ super(superState);
+ this.expandedGroupMetadataList = expandedGroupMetadataList;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeList(expandedGroupMetadataList);
+ }
+ }
+
+ public static final int CHILD_INDICATOR_INHERIT = -1;
+ private static final int[] CHILD_LAST_STATE_SET =
+ {
+ android.R.attr.state_last
+ };
+
+ private static final int[] EMPTY_STATE_SET = {};
+ private static final int[] GROUP_EMPTY_STATE_SET =
+ {
+ android.R.attr.state_empty
+ };
+ private static final int[] GROUP_EXPANDED_EMPTY_STATE_SET =
+ {
+ android.R.attr.state_expanded, android.R.attr.state_empty
+ };
+ private static final int[] GROUP_EXPANDED_STATE_SET =
+ {
+ android.R.attr.state_expanded
+ };
+ private static final int[][] GROUP_STATE_SETS = {
+ EMPTY_STATE_SET,
+ GROUP_EXPANDED_STATE_SET,
+ GROUP_EMPTY_STATE_SET,
+ GROUP_EXPANDED_EMPTY_STATE_SET
+ };
+
+ private static final long PACKED_POSITION_INT_MASK_CHILD = 0xFFFFFFFF;
+ private static final long PACKED_POSITION_INT_MASK_GROUP = 0x7FFFFFFF;
+ private static final long PACKED_POSITION_MASK_CHILD = 0x00000000FFFFFFFFL;
+ private static final long PACKED_POSITION_MASK_GROUP = 0x7FFFFFFF00000000L;
+ private static final long PACKED_POSITION_MASK_TYPE = 0x8000000000000000L;
+ private static final long PACKED_POSITION_SHIFT_GROUP = 32;
+ private static final long PACKED_POSITION_SHIFT_TYPE = 63;
+ public static final int PACKED_POSITION_TYPE_CHILD = 1;
+ public static final int PACKED_POSITION_TYPE_GROUP = 0;
+ public static final int PACKED_POSITION_TYPE_NULL = 2;
+ public static final long PACKED_POSITION_VALUE_NULL = 0x00000000FFFFFFFFL;
+
+ public static int getPackedPositionChild(long packedPosition) {
+ if (packedPosition == PACKED_POSITION_VALUE_NULL) {
+ return -1;
+ }
+ if ((packedPosition & PACKED_POSITION_MASK_TYPE) != PACKED_POSITION_MASK_TYPE) {
+ return -1;
+ }
+ return (int) (packedPosition & PACKED_POSITION_MASK_CHILD);
+ }
+
+ public static long getPackedPositionForChild(int groupPosition, int childPosition) {
+ return (long) PACKED_POSITION_TYPE_CHILD << PACKED_POSITION_SHIFT_TYPE
+ | (groupPosition & PACKED_POSITION_INT_MASK_GROUP)
+ << PACKED_POSITION_SHIFT_GROUP
+ | childPosition & PACKED_POSITION_INT_MASK_CHILD;
+ }
+
+ public static long getPackedPositionForGroup(int groupPosition) {
+ return (groupPosition & PACKED_POSITION_INT_MASK_GROUP)
+ << PACKED_POSITION_SHIFT_GROUP;
+ }
+
+ public static int getPackedPositionGroup(long packedPosition) {
+ if (packedPosition == PACKED_POSITION_VALUE_NULL) {
+ return -1;
+ }
+ return (int) ((packedPosition & PACKED_POSITION_MASK_GROUP) >> PACKED_POSITION_SHIFT_GROUP);
+ }
+
+ public static int getPackedPositionType(long packedPosition) {
+ if (packedPosition == PACKED_POSITION_VALUE_NULL) {
+ return PACKED_POSITION_TYPE_NULL;
+ }
+ return (packedPosition & PACKED_POSITION_MASK_TYPE) == PACKED_POSITION_MASK_TYPE
+ ? PACKED_POSITION_TYPE_CHILD
+ : PACKED_POSITION_TYPE_GROUP;
+ }
+
+ private ExpandableListAdapter mAdapter;
+ private Drawable mChildDivider;
+ private Drawable mChildIndicator;
+ private int mChildIndicatorLeft;
+ private int mChildIndicatorRight;
+ private boolean mClipToPadding = false;
+ private ExpandableListConnector mConnector;
+ private Drawable mGroupIndicator;
+ private int mIndicatorLeft;
+ private final Rect mIndicatorRect = new Rect();
+ private int mIndicatorRight;
+ private OnChildClickListener mOnChildClickListener;
+ private OnGroupClickListener mOnGroupClickListener;
+ private OnGroupCollapseListener mOnGroupCollapseListener;
+ private OnGroupExpandListener mOnGroupExpandListener;
+
+ public ExpandableListView(Context context) {
+ this(context, null);
+ }
+
+ public ExpandableListView(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.expandableListViewStyle);
+ }
+
+ public ExpandableListView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ExpandableListView,
+ defStyle, R.style.Holo_ExpandableListView);
+ mGroupIndicator = a
+ .getDrawable(R.styleable.ExpandableListView_android_groupIndicator);
+ mChildIndicator = a
+ .getDrawable(R.styleable.ExpandableListView_android_childIndicator);
+ mIndicatorLeft = a
+ .getDimensionPixelSize(
+ R.styleable.ExpandableListView_android_indicatorLeft, 0);
+ mIndicatorRight = a
+ .getDimensionPixelSize(
+ R.styleable.ExpandableListView_android_indicatorRight, 0);
+ if (mIndicatorRight == 0 && mGroupIndicator != null) {
+ mIndicatorRight = mIndicatorLeft + mGroupIndicator.getIntrinsicWidth();
+ }
+ mChildIndicatorLeft = a.getDimensionPixelSize(
+ R.styleable.ExpandableListView_android_childIndicatorLeft,
+ CHILD_INDICATOR_INHERIT);
+ mChildIndicatorRight = a.getDimensionPixelSize(
+ R.styleable.ExpandableListView_android_childIndicatorRight,
+ CHILD_INDICATOR_INHERIT);
+ mChildDivider = a
+ .getDrawable(R.styleable.ExpandableListView_android_childDivider);
+
+ a.recycle();
+ }
+
+ public boolean collapseGroup(int groupPos) {
+ boolean retValue = mConnector.collapseGroup(groupPos);
+ if (mOnGroupCollapseListener != null) {
+ mOnGroupCollapseListener.onGroupCollapse(groupPos);
+ }
+ return retValue;
+ }
+
+ @Override
+ protected ContextMenuInfo createContextMenuInfo(View view, int flatListPosition, long id) {
+ if (isHeaderOrFooterPosition(flatListPosition)) {
+ return super.createContextMenuInfo(view, flatListPosition, id);
+ }
+ final int adjustedPosition = getFlatPositionForConnector(flatListPosition);
+ PositionMetadata pm = mConnector.getUnflattenedPos(adjustedPosition);
+ ExpandableListPosition pos = pm.position;
+ id = getChildOrGroupId(pos);
+ long packedPosition = pos.getPackedPosition();
+ pm.recycle();
+ return new ExpandableListContextMenuInfo(view, packedPosition, id);
+ }
+
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ super.dispatchDraw(canvas);
+ if (mChildIndicator == null && mGroupIndicator == null) {
+ return;
+ }
+ int saveCount = 0;
+ final boolean clipToPadding = mClipToPadding;
+ if (clipToPadding) {
+ saveCount = canvas.save();
+ final int scrollX = getScrollX();
+ final int scrollY = getScrollY();
+ canvas.clipRect(scrollX + getPaddingLeft(), scrollY + getPaddingTop(),
+ scrollX + getRight() - getLeft() - getPaddingRight(),
+ scrollY + getBottom() - getTop() - getPaddingBottom());
+ }
+ final int headerViewsCount = getHeaderViewsCount();
+ final int lastChildFlPos = getCount() - getFooterViewsCount() - headerViewsCount - 1;
+ final int myB = getBottom();
+ PositionMetadata pos;
+ View item;
+ Drawable indicator;
+ int t, b;
+ int lastItemType = ~(ExpandableListPosition.CHILD | ExpandableListPosition.GROUP);
+ final Rect indicatorRect = mIndicatorRect;
+ final int childCount = getChildCount();
+ for (int i = 0, childFlPos = getFirstVisiblePosition() - headerViewsCount; i < childCount; i++, childFlPos++) {
+ if (childFlPos < 0) {
+ continue;
+ } else if (childFlPos > lastChildFlPos) {
+ break;
+ }
+ item = getChildAt(i);
+ t = item.getTop();
+ b = item.getBottom();
+ if (b < 0 || t > myB) {
+ continue;
+ }
+ pos = mConnector.getUnflattenedPos(childFlPos);
+ if (pos.position.type != lastItemType) {
+ if (pos.position.type == ExpandableListPosition.CHILD) {
+ indicatorRect.left = mChildIndicatorLeft == CHILD_INDICATOR_INHERIT ?
+ mIndicatorLeft : mChildIndicatorLeft;
+ indicatorRect.right = mChildIndicatorRight == CHILD_INDICATOR_INHERIT ?
+ mIndicatorRight : mChildIndicatorRight;
+ } else {
+ indicatorRect.left = mIndicatorLeft;
+ indicatorRect.right = mIndicatorRight;
+ }
+ indicatorRect.left += getPaddingLeft();
+ indicatorRect.right += getPaddingLeft();
+ lastItemType = pos.position.type;
+ }
+
+ if (indicatorRect.left != indicatorRect.right) {
+ if (isStackFromBottom()) {
+ indicatorRect.top = t;
+ indicatorRect.bottom = b;
+ } else {
+ indicatorRect.top = t;
+ indicatorRect.bottom = b;
+ }
+ indicator = getIndicator(pos);
+ if (indicator != null) {
+ indicator.setBounds(indicatorRect);
+ indicator.draw(canvas);
+ }
+ }
+ pos.recycle();
+ }
+
+ if (clipToPadding) {
+ canvas.restoreToCount(saveCount);
+ }
+ }
+
+ @Override
+ void drawDivider(Canvas canvas, Rect bounds, int childIndex) {
+ int flatListPosition = childIndex + getFirstVisiblePosition();
+ if (flatListPosition >= 0) {
+ final int adjustedPosition =
+ getFlatPositionForConnector(flatListPosition);
+ PositionMetadata pos = mConnector.getUnflattenedPos(adjustedPosition);
+ if (pos.position.type ==
+ ExpandableListPosition.CHILD || pos.isExpanded() &&
+ pos.groupMetadata.lastChildFlPos != pos.groupMetadata.flPos) {
+ Drawable divider = mChildDivider;
+ divider.setBounds(bounds);
+ divider.draw(canvas);
+ pos.recycle();
+ return;
+ }
+ pos.recycle();
+ }
+ super.drawDivider(canvas, bounds, flatListPosition);
+ }
+
+ public boolean expandGroup(int groupPos) {
+ return expandGroup(groupPos, false);
+ }
+
+ public boolean expandGroup(int groupPos, boolean animate) {
+ ExpandableListPosition elGroupPos = ExpandableListPosition.obtain(
+ ExpandableListPosition.GROUP, groupPos, -1, -1);
+ PositionMetadata pm = mConnector.getFlattenedPos(elGroupPos);
+ elGroupPos.recycle();
+ boolean retValue = mConnector.expandGroup(pm);
+ if (mOnGroupExpandListener != null) {
+ mOnGroupExpandListener.onGroupExpand(groupPos);
+ }
+ // TODO Make it works on Eclair
+ if (animate && VERSION.SDK_INT >= VERSION_CODES.FROYO) {
+ final int groupFlatPos = pm.position.flatListPos;
+ final int shiftedGroupPosition = groupFlatPos + getHeaderViewsCount();
+ smoothScrollToPosition(shiftedGroupPosition + mAdapter.getChildrenCount(groupPos),
+ shiftedGroupPosition);
+ }
+ pm.recycle();
+ return retValue;
+ }
+
+ private int getAbsoluteFlatPosition(int flatListPosition) {
+ return flatListPosition + getHeaderViewsCount();
+ }
+
+ private long getChildOrGroupId(ExpandableListPosition position) {
+ if (position.type == ExpandableListPosition.CHILD) {
+ return mAdapter.getChildId(position.groupPos, position.childPos);
+ } else {
+ return mAdapter.getGroupId(position.groupPos);
+ }
+ }
+
+ public ExpandableListAdapter getExpandableListAdapter() {
+ return mAdapter;
+ }
+
+ public long getExpandableListPosition(int flatListPosition) {
+ if (isHeaderOrFooterPosition(flatListPosition)) {
+ return PACKED_POSITION_VALUE_NULL;
+ }
+ final int adjustedPosition = getFlatPositionForConnector(flatListPosition);
+ PositionMetadata pm = mConnector.getUnflattenedPos(adjustedPosition);
+ long packedPos = pm.position.getPackedPosition();
+ pm.recycle();
+ return packedPos;
+ }
+
+ public int getFlatListPosition(long packedPosition) {
+ ExpandableListPosition elPackedPos = ExpandableListPosition
+ .obtainPosition(packedPosition);
+ PositionMetadata pm = mConnector.getFlattenedPos(elPackedPos);
+ elPackedPos.recycle();
+ final int flatListPosition = pm.position.flatListPos;
+ pm.recycle();
+ return getAbsoluteFlatPosition(flatListPosition);
+ }
+
+ private int getFlatPositionForConnector(int flatListPosition) {
+ return flatListPosition - getHeaderViewsCount();
+ }
+
+ private Drawable getIndicator(PositionMetadata pos) {
+ Drawable indicator;
+ if (pos.position.type == ExpandableListPosition.GROUP) {
+ indicator = mGroupIndicator;
+ if (indicator != null && indicator.isStateful()) {
+ boolean isEmpty = pos.groupMetadata == null ||
+ pos.groupMetadata.lastChildFlPos == pos.groupMetadata.flPos;
+ final int stateSetIndex =
+ (pos.isExpanded() ? 1 : 0) | // Expanded?
+ (isEmpty ? 2 : 0); // Empty?
+ indicator.setState(GROUP_STATE_SETS[stateSetIndex]);
+ }
+ } else {
+ indicator = mChildIndicator;
+ if (indicator != null && indicator.isStateful()) {
+ final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos
+ ? CHILD_LAST_STATE_SET
+ : EMPTY_STATE_SET;
+ indicator.setState(stateSet);
+ }
+ }
+ return indicator;
+ }
+
+ public long getSelectedId() {
+ long packedPos = getSelectedPosition();
+ if (packedPos == PACKED_POSITION_VALUE_NULL) {
+ return -1;
+ }
+ int groupPos = getPackedPositionGroup(packedPos);
+ if (getPackedPositionType(packedPos) == PACKED_POSITION_TYPE_GROUP) {
+ return mAdapter.getGroupId(groupPos);
+ } else {
+ return mAdapter.getChildId(groupPos, getPackedPositionChild(packedPos));
+ }
+ }
+
+ public long getSelectedPosition() {
+ final int selectedPos = getSelectedItemPosition();
+ return getExpandableListPosition(selectedPos);
+ }
+
+ boolean handleItemClick(View v, int position, long id) {
+ final PositionMetadata posMetadata = mConnector.getUnflattenedPos(position);
+ id = getChildOrGroupId(posMetadata.position);
+ boolean returnValue;
+ if (posMetadata.position.type == ExpandableListPosition.GROUP) {
+ if (mOnGroupClickListener != null) {
+ if (mOnGroupClickListener.onGroupClick(this, v,
+ posMetadata.position.groupPos, id)) {
+ posMetadata.recycle();
+ return true;
+ }
+ }
+ if (posMetadata.isExpanded()) {
+ mConnector.collapseGroup(posMetadata);
+ playSoundEffect(SoundEffectConstants.CLICK);
+ if (mOnGroupCollapseListener != null) {
+ mOnGroupCollapseListener.onGroupCollapse(posMetadata.position.groupPos);
+ }
+ } else {
+ mConnector.expandGroup(posMetadata);
+ playSoundEffect(SoundEffectConstants.CLICK);
+ if (mOnGroupExpandListener != null) {
+ mOnGroupExpandListener.onGroupExpand(posMetadata.position.groupPos);
+ }
+ // TODO Make it works on Eclair
+ if (VERSION.SDK_INT >= VERSION_CODES.FROYO) {
+ final int groupPos = posMetadata.position.groupPos;
+ final int groupFlatPos = posMetadata.position.flatListPos;
+ final int shiftedGroupPosition = groupFlatPos + getHeaderViewsCount();
+ smoothScrollToPosition(
+ shiftedGroupPosition + mAdapter.getChildrenCount(groupPos),
+ shiftedGroupPosition);
+ }
+ }
+ returnValue = true;
+ } else {
+ if (mOnChildClickListener != null) {
+ playSoundEffect(SoundEffectConstants.CLICK);
+ return mOnChildClickListener.onChildClick(this, v, posMetadata.position.groupPos,
+ posMetadata.position.childPos, id);
+ }
+ returnValue = false;
+ }
+ posMetadata.recycle();
+ return returnValue;
+ }
+
+ public boolean isGroupExpanded(int groupPosition) {
+ return mConnector.isGroupExpanded(groupPosition);
+ }
+
+ private boolean isHeaderOrFooterPosition(int position) {
+ final int footerViewsStart = getCount() - getFooterViewsCount();
+ return position < getHeaderViewsCount() || position >= footerViewsStart;
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(ExpandableListView.class.getName());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(ExpandableListView.class.getName());
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ if (!(state instanceof SavedState)) {
+ super.onRestoreInstanceState(state);
+ return;
+ }
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ if (mConnector != null && ss.expandedGroupMetadataList != null) {
+ mConnector.setExpandedGroupMetadataList(ss.expandedGroupMetadataList);
+ }
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ return new SavedState(superState,
+ mConnector != null ? mConnector.getExpandedGroupMetadataList() : null);
+ }
+
+ @Override
+ public boolean performItemClick(View v, int position, long id) {
+ if (isHeaderOrFooterPosition(position)) {
+ return super.performItemClick(v, position, id);
+ }
+ final int adjustedPosition = getFlatPositionForConnector(position);
+ return handleItemClick(v, adjustedPosition, id);
+ }
+
+ public void setAdapter(ExpandableListAdapter adapter) {
+ mAdapter = adapter;
+ if (adapter != null) {
+ mConnector = new ExpandableListConnector(adapter);
+ } else {
+ mConnector = null;
+ }
+ super.setAdapter(mConnector);
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ throw new RuntimeException(
+ "For ExpandableListView, use setAdapter(ExpandableListAdapter) instead of " +
+ "setAdapter(ListAdapter)");
+ }
+
+ public void setChildDivider(Drawable childDivider) {
+ mChildDivider = childDivider;
+ }
+
+ public void setChildIndicator(Drawable childIndicator) {
+ mChildIndicator = childIndicator;
+ }
+
+ public void setChildIndicatorBounds(int left, int right) {
+ mChildIndicatorLeft = left;
+ mChildIndicatorRight = right;
+ }
+
+ @Override
+ public void setClipToPadding(boolean clipToPadding) {
+ super.setClipToPadding(mClipToPadding = clipToPadding);
+ }
+
+ public void setGroupIndicator(Drawable groupIndicator) {
+ mGroupIndicator = groupIndicator;
+ if (mIndicatorRight == 0 && mGroupIndicator != null) {
+ mIndicatorRight = mIndicatorLeft + mGroupIndicator.getIntrinsicWidth();
+ }
+ }
+
+ public void setIndicatorBounds(int left, int right) {
+ mIndicatorLeft = left;
+ mIndicatorRight = right;
+ }
+
+ public void setOnChildClickListener(OnChildClickListener onChildClickListener) {
+ mOnChildClickListener = onChildClickListener;
+ }
+
+ public void setOnGroupClickListener(OnGroupClickListener onGroupClickListener) {
+ mOnGroupClickListener = onGroupClickListener;
+ }
+
+ public void setOnGroupCollapseListener(
+ OnGroupCollapseListener onGroupCollapseListener) {
+ mOnGroupCollapseListener = onGroupCollapseListener;
+ }
+
+ public void setOnGroupExpandListener(
+ OnGroupExpandListener onGroupExpandListener) {
+ mOnGroupExpandListener = onGroupExpandListener;
+ }
+
+ @Override
+ public void setOnItemClickListener(OnItemClickListener l) {
+ super.setOnItemClickListener(l);
+ }
+
+ public boolean setSelectedChild(int groupPosition, int childPosition, boolean shouldExpandGroup) {
+ ExpandableListPosition elChildPos = ExpandableListPosition.obtainChildPosition(
+ groupPosition, childPosition);
+ PositionMetadata flatChildPos = mConnector.getFlattenedPos(elChildPos);
+ if (flatChildPos == null) {
+ if (!shouldExpandGroup) {
+ return false;
+ }
+ expandGroup(groupPosition);
+ flatChildPos = mConnector.getFlattenedPos(elChildPos);
+ if (flatChildPos == null) {
+ throw new IllegalStateException("Could not find child");
+ }
+ }
+ int absoluteFlatPosition = getAbsoluteFlatPosition(flatChildPos.position.flatListPos);
+ super.setSelection(absoluteFlatPosition);
+ elChildPos.recycle();
+ flatChildPos.recycle();
+ return true;
+ }
+
+ public void setSelectedGroup(int groupPosition) {
+ ExpandableListPosition elGroupPos = ExpandableListPosition
+ .obtainGroupPosition(groupPosition);
+ PositionMetadata pm = mConnector.getFlattenedPos(elGroupPos);
+ elGroupPos.recycle();
+ final int absoluteFlatPosition = getAbsoluteFlatPosition(pm.position.flatListPos);
+ super.setSelection(absoluteFlatPosition);
+ pm.recycle();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FastScroller.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FastScroller.java
new file mode 100644
index 0000000000..a36c7f1ee8
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FastScroller.java
@@ -0,0 +1,754 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.NinePatchDrawable;
+import android.os.Handler;
+import android.os.SystemClock;
+import android.support.v4.view.MotionEventCompat;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.ExpandableListAdapter;
+import android.widget.ListAdapter;
+import android.widget.SectionIndexer;
+import android.widget.WrapperListAdapter;
+
+class FastScroller {
+ public class ScrollFade implements Runnable {
+ static final int ALPHA_MAX = 208;
+ static final long FADE_DURATION = 200;
+ long mFadeDuration;
+ long mStartTime;
+
+ int getAlpha() {
+ if (getState() != STATE_EXIT) {
+ return ALPHA_MAX;
+ }
+ int alpha;
+ long now = SystemClock.uptimeMillis();
+ if (now > mStartTime + mFadeDuration) {
+ alpha = 0;
+ } else {
+ alpha = (int) (ALPHA_MAX - (now - mStartTime) * ALPHA_MAX / mFadeDuration);
+ }
+ return alpha;
+ }
+
+ @Override
+ public void run() {
+ if (getState() != STATE_EXIT) {
+ startFade();
+ return;
+ }
+ if (getAlpha() > 0) {
+ mList.invalidate();
+ } else {
+ setState(STATE_NONE);
+ }
+ }
+
+ void startFade() {
+ mFadeDuration = FADE_DURATION;
+ mStartTime = SystemClock.uptimeMillis();
+ setState(STATE_EXIT);
+ }
+ }
+
+ private static final int[] DEFAULT_STATES = new int[0];
+ private static final int FADE_TIMEOUT = 1500;
+ private static int MIN_PAGES = 4;
+ private static final int OVERLAY_AT_THUMB = 1;
+ private static final int OVERLAY_FLOATING = 0;
+ private static final int PENDING_DRAG_DELAY = 180;
+ private static final int[] PRESSED_STATES = new int[] {
+ android.R.attr.state_pressed
+ };
+ private static final int STATE_DRAGGING = 2;
+ private static final int STATE_EXIT = 3;
+ private static final int STATE_NONE = 0;
+ private static final int STATE_VISIBLE = 1;
+ private boolean mAlwaysShow;
+ private boolean mChangedBounds;
+ private final Runnable mDeferStartDrag = new Runnable() {
+ @Override
+ public void run() {
+ if (mList.isAttached()) {
+ beginDrag();
+ final int viewHeight = mList.getHeight();
+ int newThumbY = (int) mInitialTouchY - mThumbH + 10;
+ if (newThumbY < 0) {
+ newThumbY = 0;
+ } else if (newThumbY + mThumbH > viewHeight) {
+ newThumbY = viewHeight - mThumbH;
+ }
+ mThumbY = newThumbY;
+ scrollTo((float) mThumbY / (viewHeight - mThumbH));
+ }
+ mPendingDrag = false;
+ }
+ };
+ private boolean mDrawOverlay;
+ private Handler mHandler = new Handler();
+ float mInitialTouchY;
+ private int mItemCount = -1;
+ ListView mList;
+ ListAdapter mListAdapter;
+ private int mListOffset;
+ private boolean mLongList;
+ private boolean mMatchDragPosition;
+ private Drawable mOverlayDrawable;
+ private Drawable mOverlayDrawableLeft;
+ private Drawable mOverlayDrawableRight;
+ private RectF mOverlayPos;
+ private int mOverlayPosition;
+ private int mOverlaySize;
+ private Paint mPaint;
+ boolean mPendingDrag;
+ private int mPosition;
+ private int mScaledTouchSlop;
+ boolean mScrollCompleted;
+ private ScrollFade mScrollFade;
+ private SectionIndexer mSectionIndexer;
+ private Object[] mSections;
+ private String mSectionText;
+ private int mState;
+ private Drawable mThumbDrawable;
+ int mThumbH;
+ int mThumbW;
+ int mThumbY;
+ private final Rect mTmpRect = new Rect();
+ private Drawable mTrackDrawable;
+ private int mVisibleItem;
+
+ public FastScroller(Context context, ListView listView) {
+ mList = listView;
+ init(context);
+ }
+
+ void beginDrag() {
+ setState(STATE_DRAGGING);
+ if (mListAdapter == null && mList != null) {
+ getSectionsFromIndexer();
+ }
+ if (mList != null) {
+ mList.requestDisallowInterceptTouchEvent(true);
+ mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
+ }
+ cancelFling();
+ }
+
+ private void cancelFling() {
+ MotionEvent cancelFling = MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0);
+ mList.onTouchEvent(cancelFling);
+ cancelFling.recycle();
+ }
+
+ void cancelPendingDrag() {
+ mList.removeCallbacks(mDeferStartDrag);
+ mPendingDrag = false;
+ }
+
+ public void draw(Canvas canvas) {
+ if (mState == STATE_NONE) {
+ return;
+ }
+ final int y = mThumbY;
+ final int viewWidth = mList.getWidth();
+ final FastScroller.ScrollFade scrollFade = mScrollFade;
+ int alpha = -1;
+ if (mState == STATE_EXIT) {
+ alpha = scrollFade.getAlpha();
+ if (alpha < ScrollFade.ALPHA_MAX / 2) {
+ mThumbDrawable.setAlpha(alpha * 2);
+ }
+ int left = 0;
+ switch (mPosition) {
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ left = viewWidth - mThumbW * alpha / ScrollFade.ALPHA_MAX;
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ left = -mThumbW + mThumbW * alpha / ScrollFade.ALPHA_MAX;
+ break;
+ }
+ mThumbDrawable.setBounds(left, 0, left + mThumbW, mThumbH);
+ mChangedBounds = true;
+ }
+ if (mTrackDrawable != null) {
+ final Rect thumbBounds = mThumbDrawable.getBounds();
+ final int left = thumbBounds.left;
+ final int halfThumbHeight = (thumbBounds.bottom - thumbBounds.top) / 2;
+ final int trackWidth = mTrackDrawable.getIntrinsicWidth();
+ final int trackLeft = left + mThumbW / 2 - trackWidth / 2;
+ mTrackDrawable.setBounds(trackLeft, halfThumbHeight,
+ trackLeft + trackWidth, mList.getHeight() - halfThumbHeight);
+ mTrackDrawable.draw(canvas);
+ }
+ canvas.translate(0, y);
+ mThumbDrawable.draw(canvas);
+ canvas.translate(0, -y);
+ if (mState == STATE_DRAGGING && mDrawOverlay) {
+ if (mOverlayPosition == OVERLAY_AT_THUMB) {
+ int left = 0;
+ switch (mPosition) {
+ default:
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ left = Math.max(0,
+ mThumbDrawable.getBounds().left - mThumbW - mOverlaySize);
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ left = Math.min(mThumbDrawable.getBounds().right + mThumbW,
+ mList.getWidth() - mOverlaySize);
+ break;
+ }
+ int top = Math
+ .max(0,
+ Math.min(y + (mThumbH - mOverlaySize) / 2, mList.getHeight()
+ - mOverlaySize));
+ final RectF pos = mOverlayPos;
+ pos.left = left;
+ pos.right = pos.left + mOverlaySize;
+ pos.top = top;
+ pos.bottom = pos.top + mOverlaySize;
+ if (mOverlayDrawable != null) {
+ mOverlayDrawable.setBounds((int) pos.left, (int) pos.top,
+ (int) pos.right, (int) pos.bottom);
+ }
+ }
+ mOverlayDrawable.draw(canvas);
+ final Paint paint = mPaint;
+ float descent = paint.descent();
+ final RectF rectF = mOverlayPos;
+ final Rect tmpRect = mTmpRect;
+ mOverlayDrawable.getPadding(tmpRect);
+ final int hOff = (tmpRect.right - tmpRect.left) / 2;
+ final int vOff = (tmpRect.bottom - tmpRect.top) / 2;
+ canvas.drawText(mSectionText, (int) (rectF.left + rectF.right) / 2 - hOff,
+ (int) (rectF.bottom + rectF.top) / 2 + mOverlaySize / 4 - descent - vOff,
+ paint);
+ } else if (mState == STATE_EXIT) {
+ if (alpha == 0) {
+ setState(STATE_NONE);
+ } else if (mTrackDrawable != null) {
+ mList.invalidate(viewWidth - mThumbW, 0, viewWidth, mList.getHeight());
+ } else {
+ mList.invalidate(viewWidth - mThumbW, y, viewWidth, y + mThumbH);
+ }
+ }
+ }
+
+ SectionIndexer getSectionIndexer() {
+ return mSectionIndexer;
+ }
+
+ Object[] getSections() {
+ if (mListAdapter == null && mList != null) {
+ getSectionsFromIndexer();
+ }
+ return mSections;
+ }
+
+ void getSectionsFromIndexer() {
+ ListAdapter adapter = mList.getAdapter();
+ mSectionIndexer = null;
+ if (adapter instanceof HeaderViewListAdapter) {
+ mListOffset = ((HeaderViewListAdapter) adapter).getHeadersCount();
+ }
+ if (adapter instanceof ListAdapterWrapper) {
+ adapter = ((ListAdapterWrapper) adapter).getWrappedAdapter();
+ }
+ if (adapter instanceof WrapperListAdapter) {
+ adapter = ((WrapperListAdapter) adapter).getWrappedAdapter();
+ }
+ if (adapter instanceof ExpandableListConnector) {
+ ExpandableListAdapter expAdapter = ((ExpandableListConnector) adapter).getAdapter();
+ if (expAdapter instanceof SectionIndexer) {
+ mSectionIndexer = (SectionIndexer) expAdapter;
+ mListAdapter = adapter;
+ mSections = mSectionIndexer.getSections();
+ }
+ } else {
+ if (adapter instanceof SectionIndexer) {
+ mSectionIndexer = (SectionIndexer) adapter;
+ mSections = mSectionIndexer.getSections();
+ if (mSections == null) {
+ mSections = new String[] {
+ " "
+ };
+ }
+ } else {
+ mSections = new String[] {
+ " "
+ };
+ }
+ }
+ mListAdapter = adapter;
+ }
+
+ public int getState() {
+ return mState;
+ }
+
+ private int getThumbPositionForListPosition(int firstVisibleItem, int visibleItemCount,
+ int totalItemCount) {
+ if (mSectionIndexer == null || mListAdapter == null) {
+ getSectionsFromIndexer();
+ }
+ if (mSectionIndexer == null || !mMatchDragPosition) {
+ return (mList.getHeight() - mThumbH) * firstVisibleItem
+ / (totalItemCount - visibleItemCount);
+ }
+ firstVisibleItem -= mListOffset;
+ if (firstVisibleItem < 0) {
+ return 0;
+ }
+ totalItemCount -= mListOffset;
+ final int trackHeight = mList.getHeight() - mThumbH;
+ final int section = mSectionIndexer.getSectionForPosition(firstVisibleItem);
+ final int sectionPos = mSectionIndexer.getPositionForSection(section);
+ final int nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
+ final int sectionCount = mSections.length;
+ final int positionsInSection = nextSectionPos - sectionPos;
+ final View child = mList.getChildAt(0);
+ final float incrementalPos = child == null ? 0 : firstVisibleItem +
+ (float) (mList.getPaddingTop() - child.getTop()) / child.getHeight();
+ final float posWithinSection = (incrementalPos - sectionPos) / positionsInSection;
+ int result = (int) ((section + posWithinSection) / sectionCount * trackHeight);
+ if (firstVisibleItem > 0 && firstVisibleItem + visibleItemCount == totalItemCount) {
+ final View lastChild = mList.getChildAt(visibleItemCount - 1);
+ final float lastItemVisible = (float) (mList.getHeight() - mList.getPaddingBottom()
+ - lastChild.getTop()) / lastChild.getHeight();
+ result += (trackHeight - result) * lastItemVisible;
+ }
+ return result;
+ }
+
+ public int getWidth() {
+ return mThumbW;
+ }
+
+ private void init(Context context) {
+ TypedArray ta = context.getTheme().obtainStyledAttributes(R.styleable.FastScroll);
+ useThumbDrawable(context, ta.getDrawable(R.styleable.FastScroll_fastScrollThumbDrawable));
+ mTrackDrawable = ta.getDrawable(R.styleable.FastScroll_fastScrollTrackDrawable);
+ mOverlayDrawableLeft = ta
+ .getDrawable(R.styleable.FastScroll_fastScrollPreviewBackgroundLeft);
+ mOverlayDrawableRight = ta
+ .getDrawable(R.styleable.FastScroll_fastScrollPreviewBackgroundRight);
+ mOverlayPosition = ta.getInt(R.styleable.FastScroll_fastScrollOverlayPosition,
+ OVERLAY_FLOATING);
+ mScrollCompleted = true;
+ getSectionsFromIndexer();
+ mOverlaySize = context.getResources().getDimensionPixelSize(
+ R.dimen.fastscroll_overlay_size);
+ mOverlayPos = new RectF();
+ mScrollFade = new ScrollFade();
+ mPaint = new Paint();
+ mPaint.setAntiAlias(true);
+ mPaint.setTextAlign(Paint.Align.CENTER);
+ mPaint.setTextSize(mOverlaySize / 2);
+ ColorStateList textColor = ta.getColorStateList(R.styleable.FastScroll_fastScrollTextColor);
+ int textColorNormal = textColor.getDefaultColor();
+ mPaint.setColor(textColorNormal);
+ mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+ if (mList.getWidth() > 0 && mList.getHeight() > 0) {
+ onSizeChanged(mList.getWidth(), mList.getHeight(), 0, 0);
+ }
+ mState = STATE_NONE;
+ refreshDrawableState();
+ ta.recycle();
+ mScaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+ mMatchDragPosition = context.getApplicationInfo().targetSdkVersion >=
+ android.os.Build.VERSION_CODES.HONEYCOMB;
+ setScrollbarPosition(mList.getVerticalScrollbarPosition());
+ }
+
+ public boolean isAlwaysShowEnabled() {
+ return mAlwaysShow;
+ }
+
+ boolean isPointInside(float x, float y) {
+ boolean inTrack = false;
+ switch (mPosition) {
+ default:
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ inTrack = x > mList.getWidth() - mThumbW;
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ inTrack = x < mThumbW;
+ break;
+ }
+ return inTrack && (mTrackDrawable != null || y >= mThumbY && y <= mThumbY + mThumbH);
+ }
+
+ boolean isVisible() {
+ return !(mState == STATE_NONE);
+ }
+
+ boolean onInterceptTouchEvent(MotionEvent ev) {
+ switch (MotionEventCompat.getActionMasked(ev)) {
+ case MotionEvent.ACTION_DOWN:
+ if (mState > STATE_NONE && isPointInside(ev.getX(), ev.getY())) {
+ if (!mList.isInScrollingContainer()) {
+ beginDrag();
+ return true;
+ }
+ mInitialTouchY = ev.getY();
+ startPendingDrag();
+ }
+ break;
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ cancelPendingDrag();
+ break;
+ }
+ return false;
+ }
+
+ void onItemCountChanged(int oldCount, int newCount) {
+ if (mAlwaysShow) {
+ mLongList = true;
+ }
+ }
+
+ void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
+ int totalItemCount) {
+ if (mItemCount != totalItemCount && visibleItemCount > 0) {
+ mItemCount = totalItemCount;
+ mLongList = mItemCount / visibleItemCount >= MIN_PAGES;
+ }
+ if (mAlwaysShow) {
+ mLongList = true;
+ }
+ if (!mLongList) {
+ if (mState != STATE_NONE) {
+ setState(STATE_NONE);
+ }
+ return;
+ }
+ if (totalItemCount - visibleItemCount > 0 && mState != STATE_DRAGGING) {
+ mThumbY = getThumbPositionForListPosition(firstVisibleItem, visibleItemCount,
+ totalItemCount);
+ if (mChangedBounds) {
+ resetThumbPos();
+ mChangedBounds = false;
+ }
+ }
+ mScrollCompleted = true;
+ if (firstVisibleItem == mVisibleItem) {
+ return;
+ }
+ mVisibleItem = firstVisibleItem;
+ if (mState != STATE_DRAGGING) {
+ setState(STATE_VISIBLE);
+ if (!mAlwaysShow) {
+ mHandler.postDelayed(mScrollFade, FADE_TIMEOUT);
+ }
+ }
+ }
+
+ public void onSectionsChanged() {
+ mListAdapter = null;
+ }
+
+ void onSizeChanged(int w, int h, int oldw, int oldh) {
+ if (mThumbDrawable != null) {
+ switch (mPosition) {
+ default:
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ mThumbDrawable.setBounds(w - mThumbW, 0, w, mThumbH);
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ mThumbDrawable.setBounds(0, 0, mThumbW, mThumbH);
+ break;
+ }
+ }
+ if (mOverlayPosition == OVERLAY_FLOATING) {
+ final RectF pos = mOverlayPos;
+ pos.left = (w - mOverlaySize) / 2;
+ pos.right = pos.left + mOverlaySize;
+ pos.top = h / 10;
+ pos.bottom = pos.top + mOverlaySize;
+ if (mOverlayDrawable != null) {
+ mOverlayDrawable.setBounds((int) pos.left, (int) pos.top,
+ (int) pos.right, (int) pos.bottom);
+ }
+ }
+ }
+
+ boolean onTouchEvent(MotionEvent me) {
+ if (mState == STATE_NONE) {
+ return false;
+ }
+ final int action = me.getAction();
+ if (action == MotionEvent.ACTION_DOWN) {
+ if (isPointInside(me.getX(), me.getY())) {
+ if (!mList.isInScrollingContainer()) {
+ beginDrag();
+ return true;
+ }
+ mInitialTouchY = me.getY();
+ startPendingDrag();
+ }
+ } else if (action == MotionEvent.ACTION_UP) {
+ if (mPendingDrag) {
+ beginDrag();
+ final int viewHeight = mList.getHeight();
+ int newThumbY = (int) me.getY() - mThumbH + 10;
+ if (newThumbY < 0) {
+ newThumbY = 0;
+ } else if (newThumbY + mThumbH > viewHeight) {
+ newThumbY = viewHeight - mThumbH;
+ }
+ mThumbY = newThumbY;
+ scrollTo((float) mThumbY / (viewHeight - mThumbH));
+ cancelPendingDrag();
+ }
+ if (mState == STATE_DRAGGING) {
+ if (mList != null) {
+ mList.requestDisallowInterceptTouchEvent(false);
+ mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
+ }
+ setState(STATE_VISIBLE);
+ final Handler handler = mHandler;
+ handler.removeCallbacks(mScrollFade);
+ if (!mAlwaysShow) {
+ handler.postDelayed(mScrollFade, 1000);
+ }
+ mList.invalidate();
+ return true;
+ }
+ } else if (action == MotionEvent.ACTION_MOVE) {
+ if (mPendingDrag) {
+ final float y = me.getY();
+ if (Math.abs(y - mInitialTouchY) > mScaledTouchSlop) {
+ setState(STATE_DRAGGING);
+ if (mListAdapter == null && mList != null) {
+ getSectionsFromIndexer();
+ }
+ if (mList != null) {
+ mList.requestDisallowInterceptTouchEvent(true);
+ mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
+ }
+ cancelFling();
+ cancelPendingDrag();
+ }
+ }
+ if (mState == STATE_DRAGGING) {
+ final int viewHeight = mList.getHeight();
+ int newThumbY = (int) me.getY() - mThumbH + 10;
+ if (newThumbY < 0) {
+ newThumbY = 0;
+ } else if (newThumbY + mThumbH > viewHeight) {
+ newThumbY = viewHeight - mThumbH;
+ }
+ if (Math.abs(mThumbY - newThumbY) < 2) {
+ return true;
+ }
+ mThumbY = newThumbY;
+ if (mScrollCompleted) {
+ scrollTo((float) mThumbY / (viewHeight - mThumbH));
+ }
+ return true;
+ }
+ } else if (action == MotionEvent.ACTION_CANCEL) {
+ cancelPendingDrag();
+ }
+ return false;
+ }
+
+ private void refreshDrawableState() {
+ int[] state = mState == STATE_DRAGGING ? PRESSED_STATES : DEFAULT_STATES;
+ if (mThumbDrawable != null && mThumbDrawable.isStateful()) {
+ mThumbDrawable.setState(state);
+ }
+ if (mTrackDrawable != null && mTrackDrawable.isStateful()) {
+ mTrackDrawable.setState(state);
+ }
+ }
+
+ private void resetThumbPos() {
+ final int viewWidth = mList.getWidth();
+ switch (mPosition) {
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ mThumbDrawable.setBounds(viewWidth - mThumbW, 0, viewWidth, mThumbH);
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ mThumbDrawable.setBounds(0, 0, mThumbW, mThumbH);
+ break;
+ }
+ mThumbDrawable.setAlpha(ScrollFade.ALPHA_MAX);
+ }
+
+ void scrollTo(float position) {
+ int count = mList.getCount();
+ mScrollCompleted = false;
+ float fThreshold = 1.0f / count / 8;
+ final Object[] sections = mSections;
+ int sectionIndex;
+ if (sections != null && sections.length > 1) {
+ final int nSections = sections.length;
+ int section = (int) (position * nSections);
+ if (section >= nSections) {
+ section = nSections - 1;
+ }
+ int exactSection = section;
+ sectionIndex = section;
+ int index = mSectionIndexer.getPositionForSection(section);
+ int nextIndex = count;
+ int prevIndex = index;
+ int prevSection = section;
+ int nextSection = section + 1;
+ if (section < nSections - 1) {
+ nextIndex = mSectionIndexer.getPositionForSection(section + 1);
+ }
+ if (nextIndex == index) {
+ while (section > 0) {
+ section--;
+ prevIndex = mSectionIndexer.getPositionForSection(section);
+ if (prevIndex != index) {
+ prevSection = section;
+ sectionIndex = section;
+ break;
+ } else if (section == 0) {
+ sectionIndex = 0;
+ break;
+ }
+ }
+ }
+ int nextNextSection = nextSection + 1;
+ while (nextNextSection < nSections &&
+ mSectionIndexer.getPositionForSection(nextNextSection) == nextIndex) {
+ nextNextSection++;
+ nextSection++;
+ }
+ float fPrev = (float) prevSection / nSections;
+ float fNext = (float) nextSection / nSections;
+ if (prevSection == exactSection && position - fPrev < fThreshold) {
+ index = prevIndex;
+ } else {
+ index = prevIndex + (int) ((nextIndex - prevIndex) * (position - fPrev)
+ / (fNext - fPrev));
+ }
+ if (index > count - 1) {
+ index = count - 1;
+ }
+ if (mList instanceof ExpandableListView) {
+ ExpandableListView expList = (ExpandableListView) mList;
+ expList.setSelectionFromTop(expList.getFlatListPosition(
+ ExpandableListView.getPackedPositionForGroup(index + mListOffset)), 0);
+ } else if (mList instanceof ListView) {
+ mList.setSelectionFromTop(index + mListOffset, 0);
+ } else {
+ mList.setSelection(index + mListOffset);
+ }
+ } else {
+ int index = (int) (position * count);
+ if (index > count - 1) {
+ index = count - 1;
+ }
+ if (mList instanceof ExpandableListView) {
+ ExpandableListView expList = (ExpandableListView) mList;
+ expList.setSelectionFromTop(expList.getFlatListPosition(
+ ExpandableListView.getPackedPositionForGroup(index + mListOffset)), 0);
+ } else if (mList instanceof ListView) {
+ mList.setSelectionFromTop(index + mListOffset, 0);
+ } else {
+ mList.setSelection(index + mListOffset);
+ }
+ sectionIndex = -1;
+ }
+ if (sectionIndex >= 0) {
+ String text = mSectionText = sections[sectionIndex].toString();
+ mDrawOverlay = (text.length() != 1 || text.charAt(0) != ' ') &&
+ sectionIndex < sections.length;
+ } else {
+ mDrawOverlay = false;
+ }
+ }
+
+ public void setAlwaysShow(boolean alwaysShow) {
+ mAlwaysShow = alwaysShow;
+ if (alwaysShow) {
+ mHandler.removeCallbacks(mScrollFade);
+ setState(STATE_VISIBLE);
+ } else if (mState == STATE_VISIBLE) {
+ mHandler.postDelayed(mScrollFade, FADE_TIMEOUT);
+ }
+ }
+
+ public void setScrollbarPosition(int position) {
+ mPosition = position;
+ switch (position) {
+ default:
+ case View.SCROLLBAR_POSITION_DEFAULT:
+ case View.SCROLLBAR_POSITION_RIGHT:
+ mOverlayDrawable = mOverlayDrawableRight;
+ break;
+ case View.SCROLLBAR_POSITION_LEFT:
+ mOverlayDrawable = mOverlayDrawableLeft;
+ break;
+ }
+ }
+
+ public void setState(int state) {
+ switch (state) {
+ case STATE_NONE:
+ mHandler.removeCallbacks(mScrollFade);
+ mList.invalidate();
+ break;
+ case STATE_VISIBLE:
+ if (mState != STATE_VISIBLE) {
+ resetThumbPos();
+ }
+ case STATE_DRAGGING:
+ mHandler.removeCallbacks(mScrollFade);
+ break;
+ case STATE_EXIT:
+ int viewWidth = mList.getWidth();
+ mList.invalidate(viewWidth - mThumbW, mThumbY, viewWidth, mThumbY + mThumbH);
+ break;
+ }
+ mState = state;
+ refreshDrawableState();
+ }
+
+ void startPendingDrag() {
+ mPendingDrag = true;
+ mList.postDelayed(mDeferStartDrag, PENDING_DRAG_DELAY);
+ }
+
+ void stop() {
+ setState(STATE_NONE);
+ }
+
+ private void useThumbDrawable(Context context, Drawable drawable) {
+ mThumbDrawable = drawable;
+ if (drawable instanceof NinePatchDrawable) {
+ mThumbW = context.getResources().getDimensionPixelSize(
+ R.dimen.fastscroll_thumb_width);
+ mThumbH = context.getResources().getDimensionPixelSize(
+ R.dimen.fastscroll_thumb_height);
+ } else {
+ mThumbW = drawable.getIntrinsicWidth();
+ mThumbH = drawable.getIntrinsicHeight();
+ }
+ mChangedBounds = true;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FrameLayout.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FrameLayout.java
new file mode 100644
index 0000000000..28c271e01a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/FrameLayout.java
@@ -0,0 +1,19 @@
+
+package org.holoeverywhere.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+
+public class FrameLayout extends android.widget.FrameLayout {
+ public FrameLayout(Context context) {
+ super(context);
+ }
+
+ public FrameLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public FrameLayout(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/GridView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/GridView.java
new file mode 100644
index 0000000000..e8cf4b553d
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/GridView.java
@@ -0,0 +1,688 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.IHoloActivity.OnWindowFocusChangeListener;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.widget.HeaderViewListAdapter.ViewInfo;
+import org.holoeverywhere.widget.ListAdapterWrapper.ListAdapterCallback;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Rect;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.support.v4.util.LongSparseArray;
+import android.util.AttributeSet;
+import android.util.SparseBooleanArray;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.HapticFeedbackConstants;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewDebug.ExportedProperty;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.Checkable;
+import android.widget.ListAdapter;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuBuilder.ContextMenuInfoGetter;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+
+public class GridView extends android.widget.GridView implements OnWindowFocusChangeListener,
+ ContextMenuInfoGetter, ListAdapterCallback {
+ private final class MultiChoiceModeWrapper implements
+ org.holoeverywhere.widget.ListView.MultiChoiceModeListener {
+ private org.holoeverywhere.widget.ListView.MultiChoiceModeListener mWrapped;
+
+ @Override
+ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
+ return mWrapped.onActionItemClicked(mode, item);
+ }
+
+ @Override
+ public boolean onCreateActionMode(ActionMode mode, Menu menu) {
+ if (mWrapped.onCreateActionMode(mode, menu)) {
+ setLongClickable(false);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onDestroyActionMode(ActionMode mode) {
+ mWrapped.onDestroyActionMode(mode);
+ mChoiceActionMode = null;
+ clearChoices();
+ invalidateViews();
+ setLongClickable(true);
+ }
+
+ @Override
+ public void onItemCheckedStateChanged(ActionMode mode,
+ int position, long id, boolean checked) {
+ mWrapped.onItemCheckedStateChanged(mode, position, id, checked);
+ if (getCheckedItemCount() == 0) {
+ mode.finish();
+ }
+ }
+
+ @Override
+ public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
+ return mWrapped.onPrepareActionMode(mode, menu);
+ }
+
+ public void setWrapped(org.holoeverywhere.widget.ListView.MultiChoiceModeListener wrapped) {
+ mWrapped = wrapped;
+ }
+ }
+
+ private final class OnItemLongClickListenerWrapper implements OnItemLongClickListener {
+ private OnItemLongClickListener wrapped;
+
+ @Override
+ public boolean onItemLongClick(AdapterView<?> adapterView, View view, int position, long id) {
+ return performItemLongClick(view, position, id);
+ }
+
+ public void setWrapped(OnItemLongClickListener wrapped) {
+ this.wrapped = wrapped;
+ if (wrapped != null) {
+ setLongClickable(true);
+ }
+ }
+ }
+
+ public static final int CHOICE_MODE_MULTIPLE_MODAL = AbsListView.CHOICE_MODE_MULTIPLE_MODAL;
+
+ private static final boolean USE_ACTIVATED = VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB;
+
+ private Activity mActivity;
+ private ListAdapterWrapper mAdapter;
+ private boolean mAdapterHasStableIds;
+ private LongSparseArray<Integer> mCheckedIdStates;
+ private int mCheckedItemCount;
+ private SparseBooleanArray mCheckStates;
+ private ActionMode mChoiceActionMode;
+ private int mChoiceMode;
+ private ContextMenuInfo mContextMenuInfo;
+ private boolean mEnableModalBackgroundWrapper;
+ private boolean mFastScrollEnabled;
+ private final List<ViewInfo> mFooterViewInfos = new ArrayList<ViewInfo>(),
+ mHeaderViewInfos = new ArrayList<ViewInfo>();
+ private boolean mForceHeaderListAdapter = false;
+ private boolean mIsAttached;
+ private int mLastScrollState = OnScrollListener.SCROLL_STATE_IDLE;
+ private MultiChoiceModeWrapper mMultiChoiceModeCallback;
+ private final OnItemLongClickListenerWrapper mOnItemLongClickListenerWrapper;
+ private OnScrollListener mOnScrollListener;
+
+ public GridView(Context context) {
+ this(context, null);
+ }
+
+ public GridView(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.gridViewStyle);
+ }
+
+ @SuppressLint("NewApi")
+ public GridView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ if (context instanceof Activity) {
+ setActivity((Activity) context);
+ }
+ if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
+ setOverScrollMode(OVER_SCROLL_NEVER);
+ }
+
+ mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
+ super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
+ setLongClickable(false);
+ }
+
+ public void addFooterView(View v) {
+ addFooterView(v, null, true);
+ }
+
+ public void addFooterView(View v, Object data, boolean isSelectable) {
+ if (mAdapter != null && !(mAdapter instanceof HeaderViewListAdapter)) {
+ throw new IllegalStateException(
+ "Cannot add footer view to list -- setAdapter has already been called.");
+ }
+ ViewInfo info = new ViewInfo();
+ info.view = v;
+ info.data = data;
+ info.isSelectable = isSelectable;
+ mFooterViewInfos.add(info);
+ if (mAdapter != null) {
+ invalidateViews();
+ }
+ }
+
+ public void addHeaderView(View v) {
+ addHeaderView(v, null, true);
+ }
+
+ public void addHeaderView(View v, Object data, boolean isSelectable) {
+ if (mAdapter != null && !(mAdapter instanceof HeaderViewListAdapter)) {
+ throw new IllegalStateException(
+ "Cannot add header view to list -- setAdapter has already been called.");
+ }
+ ViewInfo info = new ViewInfo();
+ info.view = v;
+ info.data = data;
+ info.isSelectable = isSelectable;
+ mHeaderViewInfos.add(info);
+ if (mAdapter != null) {
+ invalidateViews();
+ }
+ }
+
+ @Override
+ public void clearChoices() {
+ if (mCheckStates != null) {
+ mCheckStates.clear();
+ }
+ if (mCheckedIdStates != null) {
+ mCheckedIdStates.clear();
+ }
+ mCheckedItemCount = 0;
+ }
+
+ protected ContextMenuInfo createContextMenuInfo(View view, int position,
+ long id) {
+ return new AdapterContextMenuInfo(view, position, id);
+ }
+
+ public Activity getActivity() {
+ return mActivity;
+ }
+
+ @Override
+ public int getCheckedItemCount() {
+ return mCheckedItemCount;
+ }
+
+ @Override
+ public long[] getCheckedItemIds() {
+ if (mChoiceMode == CHOICE_MODE_NONE || mCheckedIdStates == null || mAdapter == null) {
+ return new long[0];
+ }
+ final LongSparseArray<Integer> idStates = mCheckedIdStates;
+ final int count = idStates.size();
+ final long[] ids = new long[count];
+ for (int i = 0; i < count; i++) {
+ ids[i] = idStates.keyAt(i);
+ }
+ return ids;
+ }
+
+ @Override
+ public int getCheckedItemPosition() {
+ if (mChoiceMode == CHOICE_MODE_SINGLE && mCheckStates != null && mCheckStates.size() == 1) {
+ return mCheckStates.keyAt(0);
+ }
+ return INVALID_POSITION;
+ }
+
+ @Override
+ public SparseBooleanArray getCheckedItemPositions() {
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ return mCheckStates;
+ }
+ return null;
+ }
+
+ @Deprecated
+ public long[] getCheckItemIds() {
+ return getCheckedItemIds();
+ }
+
+ @Override
+ public int getChoiceMode() {
+ return mChoiceMode;
+ }
+
+ @Override
+ public ContextMenuInfo getContextMenuInfo() {
+ return mContextMenuInfo;
+ }
+
+ public int getFooterViewsCount() {
+ return mFooterViewInfos.size();
+ }
+
+ public int getHeaderViewsCount() {
+ return mHeaderViewInfos.size();
+ }
+
+ public boolean isAttached() {
+ return mIsAttached;
+ }
+
+ @Override
+ @ExportedProperty
+ public boolean isFastScrollEnabled() {
+ return mFastScrollEnabled;
+ }
+
+ public boolean isForceHeaderListAdapter() {
+ return mForceHeaderListAdapter;
+ }
+
+ public boolean isInScrollingContainer() {
+ ViewParent p = getParent();
+ while (p != null && p instanceof ViewGroup) {
+ if (((ViewGroup) p).shouldDelayChildPressedState()) {
+ return true;
+ }
+ p = p.getParent();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isItemChecked(int position) {
+ if (mChoiceMode != CHOICE_MODE_NONE && mCheckStates != null) {
+ return mCheckStates.get(position);
+ }
+ return false;
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mIsAttached = true;
+ }
+
+ @Override
+ public void onChanged() {
+
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mIsAttached = false;
+ }
+
+ @Override
+ protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
+ super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
+ if (gainFocus && getSelectedItemPosition() < 0 && !isInTouchMode()) {
+ if (!mIsAttached && mAdapter != null) {
+ invalidateViews();
+ }
+ }
+ }
+
+ @Override
+ public void onInvalidated() {
+
+ }
+
+ @Override
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ case KeyEvent.KEYCODE_ENTER:
+ if (!isEnabled()) {
+ return true;
+ }
+ if (isClickable() && isPressed() &&
+ getSelectedItemPosition() >= 0 && mAdapter != null &&
+ getSelectedItemPosition() < mAdapter.getCount()) {
+ final View view = getChildAt(getSelectedItemPosition()
+ - getFirstVisiblePosition());
+ if (view != null) {
+ performItemClick(view, getSelectedItemPosition(), getSelectedItemId());
+ view.setPressed(false);
+ }
+ setPressed(false);
+ return true;
+ }
+ break;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+ @Override
+ public View onPrepareView(View view, int position) {
+ if (mCheckStates != null) {
+ setStateOnView(view, mCheckStates.get(position));
+ } else {
+ setStateOnView(view, false);
+ }
+ return view;
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+ if (hasWindowFocus) {
+ invalidate();
+ invalidateViews();
+ }
+ }
+
+ @Override
+ public boolean performItemClick(View view, int position, long id) {
+ boolean handled = false;
+ boolean dispatchItemClick = true;
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ handled = true;
+ boolean checkedStateChanged = false;
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE ||
+ mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null) {
+ boolean newValue = !mCheckStates.get(position, false);
+ mCheckStates.put(position, newValue);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ if (newValue) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ } else {
+ mCheckedIdStates.delete(mAdapter.getItemId(position));
+ }
+ }
+ if (newValue) {
+ mCheckedItemCount++;
+ } else {
+ mCheckedItemCount--;
+ }
+ if (mChoiceActionMode != null) {
+ mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode,
+ position, id, newValue);
+ dispatchItemClick = false;
+ }
+ checkedStateChanged = true;
+ } else if (mChoiceMode == CHOICE_MODE_SINGLE) {
+ boolean newValue = !mCheckStates.get(position, false);
+ if (newValue) {
+ mCheckStates.clear();
+ mCheckStates.put(position, true);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ mCheckedIdStates.clear();
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ }
+ mCheckedItemCount = 1;
+ } else if (mCheckStates.size() == 0 || !mCheckStates.valueAt(0)) {
+ mCheckedItemCount = 0;
+ }
+ checkedStateChanged = true;
+ }
+ if (checkedStateChanged) {
+ updateOnScreenCheckedViews();
+ }
+ }
+ if (dispatchItemClick) {
+ handled |= super.performItemClick(view, position, id);
+ }
+ return handled;
+ }
+
+ public boolean performItemLongClick(final View child,
+ final int longPressPosition, final long longPressId) {
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ if (mChoiceActionMode == null &&
+ (mChoiceActionMode = startActionMode(mMultiChoiceModeCallback)) != null) {
+ setItemChecked(longPressPosition, true);
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ }
+ return true;
+ }
+ boolean handled = false;
+ if (mOnItemLongClickListenerWrapper.wrapped != null) {
+ handled = mOnItemLongClickListenerWrapper.wrapped.onItemLongClick(GridView.this, child,
+ longPressPosition, longPressId);
+ }
+ if (!handled) {
+ mContextMenuInfo = createContextMenuInfo(child, longPressPosition, longPressId);
+ handled = super.showContextMenuForChild(GridView.this);
+ }
+ if (handled) {
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ }
+ return handled;
+ }
+
+ public boolean removeFooterView(View v) {
+ if (mFooterViewInfos.size() > 0) {
+ boolean result = false;
+ if (mAdapter != null && ((HeaderViewListAdapter) mAdapter).removeFooter(v)) {
+ invalidateViews();
+ result = true;
+ }
+ removeViewInfo(v, mFooterViewInfos);
+ return result;
+ }
+ return false;
+ }
+
+ public boolean removeHeaderView(View v) {
+ if (mHeaderViewInfos.size() > 0) {
+ boolean result = false;
+ if (mAdapter != null && ((HeaderViewListAdapter) mAdapter).removeHeader(v)) {
+ invalidateViews();
+ result = true;
+ }
+ removeViewInfo(v, mHeaderViewInfos);
+ return result;
+ }
+ return false;
+ }
+
+ private void removeViewInfo(View v, List<ViewInfo> where) {
+ int len = where.size();
+ for (int i = 0; i < len; ++i) {
+ ViewInfo info = where.get(i);
+ if (info.view == v) {
+ where.remove(i);
+ break;
+ }
+ }
+ }
+
+ protected void reportScrollStateChange(int newState) {
+ if (newState != mLastScrollState) {
+ if (mOnScrollListener != null) {
+ mLastScrollState = newState;
+ mOnScrollListener.onScrollStateChanged(this, newState);
+ }
+ }
+ }
+
+ public final void setActivity(Activity activity) {
+ mActivity = activity;
+ if (mActivity != null) {
+ mActivity.addOnWindowFocusChangeListener(this);
+ }
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ if (adapter == null) {
+ mAdapter = null;
+ } else if (mForceHeaderListAdapter || mHeaderViewInfos.size() > 0
+ || mFooterViewInfos.size() > 0) {
+ mAdapter = new HeaderViewListAdapter(mHeaderViewInfos, mFooterViewInfos, adapter,
+ this);
+ } else {
+ mAdapter = new ListAdapterWrapper(adapter, this);
+ }
+ if (mAdapter != null) {
+ mAdapterHasStableIds = mAdapter.hasStableIds();
+ if (mChoiceMode != CHOICE_MODE_NONE && mAdapterHasStableIds &&
+ mCheckedIdStates == null) {
+ mCheckedIdStates = new LongSparseArray<Integer>();
+ }
+ }
+ if (mCheckStates != null) {
+ mCheckStates.clear();
+ }
+ if (mCheckedIdStates != null) {
+ mCheckedIdStates.clear();
+ }
+ super.setAdapter(mAdapter);
+ }
+
+ @Override
+ public void setChoiceMode(int choiceMode) {
+ mChoiceMode = choiceMode;
+ if (mChoiceActionMode != null) {
+ mChoiceActionMode.finish();
+ mChoiceActionMode = null;
+ }
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ if (mCheckStates == null) {
+ mCheckStates = new SparseBooleanArray();
+ }
+ if (mCheckedIdStates == null && mAdapter != null && mAdapter.hasStableIds()) {
+ mCheckedIdStates = new LongSparseArray<Integer>();
+ }
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ clearChoices();
+ setLongClickable(true);
+ setEnableModalBackgroundWrapper(true);
+ }
+ }
+ }
+
+ public void setEnableModalBackgroundWrapper(boolean enableModalBackgroundWrapper) {
+ if (enableModalBackgroundWrapper == mEnableModalBackgroundWrapper) {
+ return;
+ }
+ mEnableModalBackgroundWrapper = enableModalBackgroundWrapper;
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+ public void setForceHeaderListAdapter(boolean forceHeaderListAdapter) {
+ mForceHeaderListAdapter = forceHeaderListAdapter;
+ }
+
+ @Override
+ public void setItemChecked(int position, boolean value) {
+ if (mChoiceMode == CHOICE_MODE_NONE) {
+ return;
+ }
+ if (value && mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode == null) {
+ mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
+ }
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE || mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ boolean oldValue = mCheckStates.get(position);
+ mCheckStates.put(position, value);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ if (value) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ } else {
+ mCheckedIdStates.delete(mAdapter.getItemId(position));
+ }
+ }
+ if (oldValue != value) {
+ if (value) {
+ mCheckedItemCount++;
+ } else {
+ mCheckedItemCount--;
+ }
+ }
+ if (mChoiceActionMode != null) {
+ final long id = mAdapter.getItemId(position);
+ mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode,
+ position, id, value);
+ }
+ } else {
+ boolean updateIds = mCheckedIdStates != null && mAdapter.hasStableIds();
+ if (value || isItemChecked(position)) {
+ mCheckStates.clear();
+ if (updateIds) {
+ mCheckedIdStates.clear();
+ }
+ }
+ if (value) {
+ mCheckStates.put(position, true);
+ if (updateIds) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ }
+ mCheckedItemCount = 1;
+ } else if (mCheckStates.size() == 0 || !mCheckStates.valueAt(0)) {
+ mCheckedItemCount = 0;
+ }
+ }
+ updateOnScreenCheckedViews();
+ invalidateViews();
+ }
+
+ public void setMultiChoiceModeListener(
+ org.holoeverywhere.widget.ListView.MultiChoiceModeListener listener) {
+ if (mMultiChoiceModeCallback == null) {
+ mMultiChoiceModeCallback = new MultiChoiceModeWrapper();
+ }
+ mMultiChoiceModeCallback.setWrapped(listener);
+ }
+
+ @Override
+ public void setOnItemLongClickListener(OnItemLongClickListener listener) {
+ mOnItemLongClickListenerWrapper.setWrapped(listener);
+ }
+
+ @Override
+ public void setOnScrollListener(OnScrollListener l) {
+ super.setOnScrollListener(mOnScrollListener = l);
+ }
+
+ protected final void setStateOnView(View child, boolean value) {
+ if (child instanceof Checkable) {
+ ((Checkable) child).setChecked(value);
+ } else if (USE_ACTIVATED) {
+ child.setActivated(value);
+ }
+ }
+
+ @Override
+ public boolean showContextMenuForChild(View originalView) {
+ final int longPressPosition = getPositionForView(originalView);
+ if (longPressPosition >= 0) {
+ final long longPressId = mAdapter.getItemId(longPressPosition);
+ boolean handled = false;
+ if (mOnItemLongClickListenerWrapper.wrapped != null) {
+ handled = mOnItemLongClickListenerWrapper.wrapped.onItemLongClick(GridView.this,
+ originalView, longPressPosition, longPressId);
+ }
+ if (!handled) {
+ mContextMenuInfo = createContextMenuInfo(getChildAt(longPressPosition
+ - getFirstVisiblePosition()), longPressPosition, longPressId);
+ handled = super.showContextMenuForChild(originalView);
+ }
+ return handled;
+ }
+ return false;
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ if (mActivity != null) {
+ return mActivity.startActionMode(callback);
+ }
+ throw new RuntimeException("HoloEverywhere.ListView (" + this
+ + ") don't have reference on Activity");
+ }
+
+ private void updateOnScreenCheckedViews() {
+ if (mCheckStates == null) {
+ return;
+ }
+ final int firstPos = getFirstVisiblePosition();
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getChildAt(i);
+ final int position = firstPos + i;
+ final boolean value = mCheckStates.get(position);
+ setStateOnView(child, value);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeaderViewListAdapter.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeaderViewListAdapter.java
new file mode 100644
index 0000000000..b633c23715
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeaderViewListAdapter.java
@@ -0,0 +1,180 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Filter;
+import android.widget.Filterable;
+import android.widget.ListAdapter;
+
+public class HeaderViewListAdapter extends ListAdapterWrapper implements Filterable {
+ public static final class ViewInfo {
+ public Object data;
+ public boolean isSelectable;
+ public View view;
+ }
+
+ private static final List<ViewInfo> EMPTY_INFO_LIST = new ArrayList<ViewInfo>();
+ boolean mAreAllFixedViewsSelectable;
+ private final List<ViewInfo> mFooterViewInfos;
+ private final List<ViewInfo> mHeaderViewInfos;
+ private final boolean mIsFilterable;
+
+ public HeaderViewListAdapter(List<ViewInfo> headerViewInfos,
+ List<ViewInfo> footerViewInfos, ListAdapter adapter, ListAdapterCallback listener) {
+ super(adapter, listener);
+ mIsFilterable = adapter instanceof Filterable;
+ if (headerViewInfos == null) {
+ mHeaderViewInfos = EMPTY_INFO_LIST;
+ } else {
+ mHeaderViewInfos = headerViewInfos;
+ }
+ if (footerViewInfos == null) {
+ mFooterViewInfos = EMPTY_INFO_LIST;
+ } else {
+ mFooterViewInfos = footerViewInfos;
+ }
+ mAreAllFixedViewsSelectable =
+ areAllListInfosSelectable(mHeaderViewInfos)
+ && areAllListInfosSelectable(mFooterViewInfos);
+ }
+
+ @Override
+ public boolean areAllItemsEnabled() {
+ return mAreAllFixedViewsSelectable && getWrappedAdapter().areAllItemsEnabled();
+ }
+
+ private boolean areAllListInfosSelectable(List<ViewInfo> infos) {
+ if (infos != null) {
+ for (ViewInfo info : infos) {
+ if (!info.isSelectable) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public int getCount() {
+ return getFootersCount() + getHeadersCount() + getWrappedAdapter().getCount();
+ }
+
+ @Override
+ public Filter getFilter() {
+ if (mIsFilterable) {
+ return ((Filterable) getWrappedAdapter()).getFilter();
+ }
+ return null;
+ }
+
+ public int getFootersCount() {
+ return mFooterViewInfos.size();
+ }
+
+ public int getHeadersCount() {
+ return mHeaderViewInfos.size();
+ }
+
+ @Override
+ public Object getItem(int position) {
+ int numHeaders = getHeadersCount();
+ if (position < numHeaders) {
+ return mHeaderViewInfos.get(position).data;
+ }
+ final int adjPosition = position - numHeaders;
+ int adapterCount = getWrappedAdapter().getCount();
+ if (adjPosition < adapterCount) {
+ return super.getItem(adjPosition);
+ }
+ return mFooterViewInfos.get(adjPosition - adapterCount).data;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ int numHeaders = getHeadersCount();
+ if (position >= numHeaders) {
+ int adjPosition = position - numHeaders;
+ int adapterCount = getWrappedAdapter().getCount();
+ if (adjPosition < adapterCount) {
+ return super.getItemId(adjPosition);
+ }
+ }
+ return AdapterView.INVALID_ROW_ID;
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ int numHeaders = getHeadersCount();
+ if (getWrappedAdapter() != null && position >= numHeaders) {
+ int adjPosition = position - numHeaders;
+ int adapterCount = getWrappedAdapter().getCount();
+ if (adjPosition < adapterCount) {
+ return super.getItemViewType(adjPosition);
+ }
+ }
+ return AdapterView.ITEM_VIEW_TYPE_HEADER_OR_FOOTER;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ int numHeaders = getHeadersCount();
+ if (position < numHeaders) {
+ convertView = mHeaderViewInfos.get(position).view;
+ } else {
+ final int adjPosition = position - numHeaders;
+ int adapterCount = getWrappedAdapter().getCount();
+ if (adjPosition < adapterCount) {
+ convertView = getWrappedAdapter().getView(adjPosition, convertView, parent);
+ } else {
+ convertView = mFooterViewInfos.get(adjPosition - adapterCount).view;
+ }
+ }
+ return onPrepareView(convertView, position);
+ }
+
+ @Override
+ public boolean isEnabled(int position) {
+ int numHeaders = getHeadersCount();
+ if (position < numHeaders) {
+ return mHeaderViewInfos.get(position).isSelectable;
+ }
+ final int adjPosition = position - numHeaders;
+ int adapterCount = getWrappedAdapter().getCount();
+ if (adjPosition < adapterCount) {
+ return super.isEnabled(adjPosition);
+ }
+ return mFooterViewInfos.get(adjPosition - adapterCount).isSelectable;
+ }
+
+ public boolean removeFooter(View v) {
+ for (int i = 0; i < mFooterViewInfos.size(); i++) {
+ ViewInfo info = mFooterViewInfos.get(i);
+ if (info.view == v) {
+ mFooterViewInfos.remove(i);
+ mAreAllFixedViewsSelectable =
+ areAllListInfosSelectable(mHeaderViewInfos)
+ && areAllListInfosSelectable(mFooterViewInfos);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean removeHeader(View v) {
+ for (int i = 0; i < mHeaderViewInfos.size(); i++) {
+ ViewInfo info = mHeaderViewInfos.get(i);
+ if (info.view == v) {
+ mHeaderViewInfos.remove(i);
+ mAreAllFixedViewsSelectable =
+ areAllListInfosSelectable(mHeaderViewInfos)
+ && areAllListInfosSelectable(mFooterViewInfos);
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeterogeneousExpandableList.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeterogeneousExpandableList.java
new file mode 100644
index 0000000000..2589d0144a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/HeterogeneousExpandableList.java
@@ -0,0 +1,12 @@
+
+package org.holoeverywhere.widget;
+
+public interface HeterogeneousExpandableList {
+ int getChildType(int groupPosition, int childPosition);
+
+ int getChildTypeCount();
+
+ int getGroupType(int groupPosition);
+
+ int getGroupTypeCount();
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/LinearLayout.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/LinearLayout.java
new file mode 100644
index 0000000000..a288b3a6de
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/LinearLayout.java
@@ -0,0 +1,1220 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+public class LinearLayout extends android.widget.LinearLayout {
+ public static final int HORIZONTAL = 0;
+ private static final int INDEX_BOTTOM = 2;
+ private static final int INDEX_CENTER_VERTICAL = 0;
+ private static final int INDEX_FILL = 3;
+ private static final int INDEX_TOP = 1;
+ public static final int LAYOUT_DIRECTION_LTR = 0;
+ public static final int LAYOUT_DIRECTION_RTL = 1;
+ public static final int SHOW_DIVIDER_ALL = 7;
+ public static final int SHOW_DIVIDER_BEGINNING = 1;
+ public static final int SHOW_DIVIDER_END = 4;
+ public static final int SHOW_DIVIDER_MIDDLE = 2;
+ public static final int SHOW_DIVIDER_NONE = 0;
+ public static final int VERTICAL = 1;
+ private static final int VERTICAL_GRAVITY_COUNT = 4;
+
+ public static int getAbsoluteGravity(int gravity, int layoutDirection) {
+ int result = gravity;
+ if ((result & Gravity.RELATIVE_LAYOUT_DIRECTION) > 0) {
+ if ((result & Gravity.START) == Gravity.START) {
+ result &= ~Gravity.START;
+ if (layoutDirection == LAYOUT_DIRECTION_RTL) {
+ result |= Gravity.RIGHT;
+ } else {
+ result |= Gravity.LEFT;
+ }
+ } else if ((result & Gravity.END) == Gravity.END) {
+ result &= ~Gravity.END;
+ if (layoutDirection == LAYOUT_DIRECTION_RTL) {
+ result |= Gravity.LEFT;
+ } else {
+ result |= Gravity.RIGHT;
+ }
+ }
+ result &= ~Gravity.RELATIVE_LAYOUT_DIRECTION;
+ }
+ return result;
+ }
+
+ public static int resolveSizeAndState(int size, int measureSpec, int childMeasuredState) {
+ int result = size;
+ int specMode = MeasureSpec.getMode(measureSpec);
+ int specSize = MeasureSpec.getSize(measureSpec);
+ switch (specMode) {
+ case MeasureSpec.UNSPECIFIED:
+ result = size;
+ break;
+ case MeasureSpec.AT_MOST:
+ if (specSize < size) {
+ result = specSize | MEASURED_STATE_TOO_SMALL;
+ } else {
+ result = size;
+ }
+ break;
+ case MeasureSpec.EXACTLY:
+ result = specSize;
+ break;
+ }
+ return result | childMeasuredState & MEASURED_STATE_MASK;
+ }
+
+ @ViewDebug.ExportedProperty(category = "layout")
+ private boolean mBaselineAligned = true;
+ @ViewDebug.ExportedProperty(category = "layout")
+ private int mBaselineAlignedChildIndex = -1;
+ @ViewDebug.ExportedProperty(category = "measurement")
+ private int mBaselineChildTop = 0;
+ private Drawable mDivider;
+ private int mDividerHeight;
+ private int mDividerPadding;
+ private int mDividerWidth;
+ @ViewDebug.ExportedProperty(category = "measurement", flagMapping = {
+ @ViewDebug.FlagToString(mask = -1,
+ equals = -1, name = "NONE"),
+ @ViewDebug.FlagToString(mask = Gravity.NO_GRAVITY,
+ equals = Gravity.NO_GRAVITY, name = "NONE"),
+ @ViewDebug.FlagToString(mask = Gravity.TOP,
+ equals = Gravity.TOP, name = "TOP"),
+ @ViewDebug.FlagToString(mask = Gravity.BOTTOM,
+ equals = Gravity.BOTTOM, name = "BOTTOM"),
+ @ViewDebug.FlagToString(mask = Gravity.LEFT,
+ equals = Gravity.LEFT, name = "LEFT"),
+ @ViewDebug.FlagToString(mask = Gravity.RIGHT,
+ equals = Gravity.RIGHT, name = "RIGHT"),
+ @ViewDebug.FlagToString(mask = Gravity.START,
+ equals = Gravity.START, name = "START"),
+ @ViewDebug.FlagToString(mask = Gravity.END,
+ equals = Gravity.END, name = "END"),
+ @ViewDebug.FlagToString(mask = Gravity.CENTER_VERTICAL,
+ equals = Gravity.CENTER_VERTICAL, name = "CENTER_VERTICAL"),
+ @ViewDebug.FlagToString(mask = Gravity.FILL_VERTICAL,
+ equals = Gravity.FILL_VERTICAL, name = "FILL_VERTICAL"),
+ @ViewDebug.FlagToString(mask = Gravity.CENTER_HORIZONTAL,
+ equals = Gravity.CENTER_HORIZONTAL, name = "CENTER_HORIZONTAL"),
+ @ViewDebug.FlagToString(mask = Gravity.FILL_HORIZONTAL,
+ equals = Gravity.FILL_HORIZONTAL, name = "FILL_HORIZONTAL"),
+ @ViewDebug.FlagToString(mask = Gravity.CENTER,
+ equals = Gravity.CENTER, name = "CENTER"),
+ @ViewDebug.FlagToString(mask = Gravity.FILL,
+ equals = Gravity.FILL, name = "FILL"),
+ @ViewDebug.FlagToString(mask = Gravity.RELATIVE_LAYOUT_DIRECTION,
+ equals = Gravity.RELATIVE_LAYOUT_DIRECTION, name = "RELATIVE")
+ })
+ private int mGravity = Gravity.START | Gravity.TOP;
+ private int[] mMaxAscent;
+ private int[] mMaxDescent;
+ @ViewDebug.ExportedProperty(category = "measurement")
+ private int mOrientation;
+ private int mShowDividers;
+ @ViewDebug.ExportedProperty(category = "measurement")
+ private int mTotalLength;
+ @ViewDebug.ExportedProperty(category = "layout")
+ private boolean mUseLargestChild;
+
+ @ViewDebug.ExportedProperty(category = "layout")
+ private float mWeightSum;
+
+ public LinearLayout(Context context) {
+ this(context, null);
+ }
+
+ public LinearLayout(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public LinearLayout(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.LinearLayout, defStyle, 0);
+ int index = a.getInt(R.styleable.LinearLayout_android_orientation, -1);
+ if (index >= 0) {
+ setOrientation(index);
+ }
+ index = a.getInt(R.styleable.LinearLayout_android_gravity, -1);
+ if (index >= 0) {
+ setGravity(index);
+ }
+ boolean baselineAligned = a.getBoolean(R.styleable.LinearLayout_android_baselineAligned,
+ true);
+ if (!baselineAligned) {
+ setBaselineAligned(baselineAligned);
+ }
+ mWeightSum = a.getFloat(R.styleable.LinearLayout_android_weightSum, -1.0f);
+ mBaselineAlignedChildIndex = a.getInt(
+ R.styleable.LinearLayout_android_baselineAlignedChildIndex, -1);
+ mUseLargestChild = a.getBoolean(R.styleable.LinearLayout_android_measureWithLargestChild,
+ false);
+ setDividerDrawable(a.getDrawable(R.styleable.LinearLayout_android_divider));
+
+ if (a.hasValue(R.styleable.LinearLayout_showDividers)) {
+ mShowDividers = a.getInt(R.styleable.LinearLayout_showDividers, SHOW_DIVIDER_NONE);
+ } else {
+ mShowDividers = a.getInt(R.styleable.LinearLayout_android_showDividers,
+ SHOW_DIVIDER_NONE);
+ }
+
+ if (a.hasValue(R.styleable.LinearLayout_dividerPadding)) {
+ mDividerPadding = a.getDimensionPixelSize(R.styleable.LinearLayout_dividerPadding, 0);
+ } else {
+ mDividerPadding = a.getDimensionPixelSize(
+ R.styleable.LinearLayout_android_dividerPadding, 0);
+ }
+
+ a.recycle();
+ }
+
+ @Override
+ protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
+ return p instanceof LinearLayout.LayoutParams;
+ }
+
+ void drawDividersHorizontal(Canvas canvas) {
+ final int count = getVirtualChildCount();
+ final boolean isLayoutRtl = isLayoutRtl();
+ for (int i = 0; i < count; i++) {
+ final View child = getVirtualChildAt(i);
+ if (child != null && child.getVisibility() != GONE) {
+ if (hasDividerBeforeChildAt(i)) {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final int position;
+ if (isLayoutRtl) {
+ position = child.getRight() + lp.rightMargin;
+ } else {
+ position = child.getLeft() - lp.leftMargin - mDividerWidth;
+ }
+ drawVerticalDivider(canvas, position);
+ }
+ }
+ }
+ if (hasDividerBeforeChildAt(count)) {
+ final View child = getVirtualChildAt(count - 1);
+ int position;
+ if (child == null) {
+ if (isLayoutRtl) {
+ position = getPaddingLeft();
+ } else {
+ position = getWidth() - getPaddingRight() - mDividerWidth;
+ }
+ } else {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ if (isLayoutRtl) {
+ position = child.getLeft() - lp.leftMargin - mDividerWidth;
+ } else {
+ position = child.getRight() + lp.rightMargin;
+ }
+ }
+ drawVerticalDivider(canvas, position);
+ }
+ }
+
+ void drawDividersVertical(Canvas canvas) {
+ final int count = getVirtualChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getVirtualChildAt(i);
+ if (child != null && child.getVisibility() != GONE) {
+ if (hasDividerBeforeChildAt(i)) {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final int top = child.getTop() - lp.topMargin - mDividerHeight;
+ drawHorizontalDivider(canvas, top);
+ }
+ }
+ }
+ if (hasDividerBeforeChildAt(count)) {
+ final View child = getVirtualChildAt(count - 1);
+ int bottom = 0;
+ if (child == null) {
+ bottom = getHeight() - getPaddingBottom() - mDividerHeight;
+ } else {
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ bottom = child.getBottom() + lp.bottomMargin;
+ }
+ drawHorizontalDivider(canvas, bottom);
+ }
+ }
+
+ void drawHorizontalDivider(Canvas canvas, int top) {
+ mDivider.setBounds(getPaddingLeft() + mDividerPadding, top,
+ getWidth() - getPaddingRight() - mDividerPadding, top + mDividerHeight);
+ mDivider.draw(canvas);
+ }
+
+ void drawVerticalDivider(Canvas canvas, int left) {
+ mDivider.setBounds(left, getPaddingTop() + mDividerPadding,
+ left + mDividerWidth, getHeight() - getPaddingBottom() - mDividerPadding);
+ mDivider.draw(canvas);
+ }
+
+ private void forceUniformHeight(int count, int widthMeasureSpec) {
+ int uniformMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(),
+ MeasureSpec.EXACTLY);
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child.getVisibility() != GONE) {
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
+ if (lp.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT) {
+ int oldWidth = lp.width;
+ lp.width = child.getMeasuredWidth();
+ measureChildWithMargins(child, widthMeasureSpec, 0, uniformMeasureSpec, 0);
+ lp.width = oldWidth;
+ }
+ }
+ }
+ }
+
+ private void forceUniformWidth(int count, int heightMeasureSpec) {
+ int uniformMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(),
+ MeasureSpec.EXACTLY);
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child.getVisibility() != GONE) {
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
+ if (lp.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT) {
+ int oldHeight = lp.height;
+ lp.height = child.getMeasuredHeight();
+ measureChildWithMargins(child, uniformMeasureSpec, 0, heightMeasureSpec, 0);
+ lp.height = oldHeight;
+ }
+ }
+ }
+ }
+
+ @Override
+ protected LayoutParams generateDefaultLayoutParams() {
+ if (mOrientation == HORIZONTAL) {
+ return new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,
+ android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
+ } else if (mOrientation == VERTICAL) {
+ return new LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT,
+ android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+ return null;
+ }
+
+ @Override
+ public LayoutParams generateLayoutParams(AttributeSet attrs) {
+ return new LinearLayout.LayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ protected LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
+ return new LayoutParams(p);
+ }
+
+ @Override
+ public int getBaseline() {
+ if (mBaselineAlignedChildIndex < 0) {
+ return super.getBaseline();
+ }
+ if (getChildCount() <= mBaselineAlignedChildIndex) {
+ throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout "
+ + "set to an index that is out of bounds.");
+ }
+ final View child = getChildAt(mBaselineAlignedChildIndex);
+ final int childBaseline = child.getBaseline();
+ if (childBaseline == -1) {
+ if (mBaselineAlignedChildIndex == 0) {
+ return -1;
+ }
+ throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout "
+ + "points to a View that doesn't know how to get its baseline.");
+ }
+ int childTop = mBaselineChildTop;
+ if (mOrientation == VERTICAL) {
+ final int majorGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;
+ if (majorGravity != Gravity.TOP) {
+ switch (majorGravity) {
+ case Gravity.BOTTOM:
+ childTop = getBottom() - getTop() - getPaddingBottom() - mTotalLength;
+ break;
+ case Gravity.CENTER_VERTICAL:
+ childTop += (getBottom() - getTop() - getPaddingTop() - getPaddingBottom() -
+ mTotalLength) / 2;
+ break;
+ }
+ }
+ }
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
+ return childTop + lp.topMargin + childBaseline;
+ }
+
+ @Override
+ public int getBaselineAlignedChildIndex() {
+ return mBaselineAlignedChildIndex;
+ }
+
+ int getChildrenSkipCount(View child, int index) {
+ return 0;
+ }
+
+ @Override
+ public Drawable getDividerDrawable() {
+ return mDivider;
+ }
+
+ @Override
+ public int getDividerPadding() {
+ return mDividerPadding;
+ }
+
+ public int getDividerWidth() {
+ return mDividerWidth;
+ }
+
+ public int getLayoutDirection() {
+ return LAYOUT_DIRECTION_LTR;
+ }
+
+ int getLocationOffset(View child) {
+ return 0;
+ }
+
+ int getNextLocationOffset(View child) {
+ return 0;
+ }
+
+ @Override
+ public int getOrientation() {
+ return mOrientation;
+ }
+
+ @Override
+ public int getShowDividers() {
+ return mShowDividers;
+ }
+
+ View getVirtualChildAt(int index) {
+ return getChildAt(index);
+ }
+
+ int getVirtualChildCount() {
+ return getChildCount();
+ }
+
+ @Override
+ public float getWeightSum() {
+ return mWeightSum;
+ }
+
+ protected boolean hasDividerBeforeChildAt(int childIndex) {
+ if (childIndex == 0) {
+ return (mShowDividers & SHOW_DIVIDER_BEGINNING) != 0;
+ } else if (childIndex == getChildCount()) {
+ return (mShowDividers & SHOW_DIVIDER_END) != 0;
+ } else if ((mShowDividers & SHOW_DIVIDER_MIDDLE) != 0) {
+ boolean hasVisibleViewBefore = false;
+ for (int i = childIndex - 1; i >= 0; i--) {
+ if (getChildAt(i).getVisibility() != GONE) {
+ hasVisibleViewBefore = true;
+ break;
+ }
+ }
+ return hasVisibleViewBefore;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isBaselineAligned() {
+ return mBaselineAligned;
+ }
+
+ protected boolean isLayoutRtl() {
+ return getLayoutDirection() == LAYOUT_DIRECTION_RTL;
+ }
+
+ @Override
+ public boolean isMeasureWithLargestChildEnabled() {
+ return mUseLargestChild;
+ }
+
+ void layoutHorizontal() {
+ final boolean isLayoutRtl = isLayoutRtl();
+ final int paddingTop = getPaddingTop();
+ int childTop;
+ int childLeft;
+ final int height = getBottom() - getTop();
+ int childBottom = height - getPaddingBottom();
+ int childSpace = height - paddingTop - getPaddingBottom();
+ final int count = getVirtualChildCount();
+ final int majorGravity = mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK;
+ final int minorGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;
+ final boolean baselineAligned = mBaselineAligned;
+ final int[] maxAscent = mMaxAscent;
+ final int[] maxDescent = mMaxDescent;
+ final int layoutDirection = getLayoutDirection();
+ switch (getAbsoluteGravity(majorGravity, layoutDirection)) {
+ case Gravity.RIGHT:
+ childLeft = getPaddingLeft() + getRight() - getLeft() - mTotalLength;
+ break;
+ case Gravity.CENTER_HORIZONTAL:
+ childLeft = getPaddingLeft() + (getRight() - getLeft() - mTotalLength) / 2;
+ break;
+ case Gravity.LEFT:
+ default:
+ childLeft = getPaddingLeft();
+ break;
+ }
+ int start = 0;
+ int dir = 1;
+ if (isLayoutRtl) {
+ start = count - 1;
+ dir = -1;
+ }
+ for (int i = 0; i < count; i++) {
+ int childIndex = start + dir * i;
+ final View child = getVirtualChildAt(childIndex);
+ if (child == null) {
+ childLeft += measureNullChild(childIndex);
+ } else if (child.getVisibility() != GONE) {
+ final int childWidth = child.getMeasuredWidth();
+ final int childHeight = child.getMeasuredHeight();
+ int childBaseline = -1;
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+ if (baselineAligned
+ && lp.height != android.view.ViewGroup.LayoutParams.MATCH_PARENT) {
+ childBaseline = child.getBaseline();
+ }
+ int gravity = lp.gravity;
+ if (gravity < 0) {
+ gravity = minorGravity;
+ }
+ switch (gravity & Gravity.VERTICAL_GRAVITY_MASK) {
+ case Gravity.TOP:
+ childTop = paddingTop + lp.topMargin;
+ if (childBaseline != -1) {
+ childTop += maxAscent[INDEX_TOP] - childBaseline;
+ }
+ break;
+ case Gravity.CENTER_VERTICAL:
+ childTop = paddingTop + (childSpace - childHeight) / 2
+ + lp.topMargin - lp.bottomMargin;
+ break;
+ case Gravity.BOTTOM:
+ childTop = childBottom - childHeight - lp.bottomMargin;
+ if (childBaseline != -1) {
+ int descent = child.getMeasuredHeight() - childBaseline;
+ childTop -= maxDescent[INDEX_BOTTOM] - descent;
+ }
+ break;
+ default:
+ childTop = paddingTop;
+ break;
+ }
+ if (hasDividerBeforeChildAt(childIndex)) {
+ childLeft += mDividerWidth;
+ }
+ childLeft += lp.leftMargin;
+ setChildFrame(child, childLeft + getLocationOffset(child), childTop,
+ childWidth, childHeight);
+ childLeft += childWidth + lp.rightMargin +
+ getNextLocationOffset(child);
+ i += getChildrenSkipCount(child, childIndex);
+ }
+ }
+ }
+
+ void layoutVertical() {
+ final int paddingLeft = getPaddingLeft();
+ int childTop;
+ int childLeft;
+ final int width = getRight() - getLeft();
+ int childRight = width - getPaddingRight();
+ int childSpace = width - paddingLeft - getPaddingRight();
+ final int count = getVirtualChildCount();
+ final int majorGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;
+ final int minorGravity = mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK;
+ switch (majorGravity) {
+ case Gravity.BOTTOM:
+ childTop = getPaddingTop() + getBottom() - getTop() - mTotalLength;
+ break;
+ case Gravity.CENTER_VERTICAL:
+ childTop = getPaddingTop() + (getBottom() - getTop() - mTotalLength) / 2;
+ break;
+ case Gravity.TOP:
+ default:
+ childTop = getPaddingTop();
+ break;
+ }
+ for (int i = 0; i < count; i++) {
+ final View child = getVirtualChildAt(i);
+ if (child == null) {
+ childTop += measureNullChild(i);
+ } else if (child.getVisibility() != GONE) {
+ final int childWidth = child.getMeasuredWidth();
+ final int childHeight = child.getMeasuredHeight();
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+ int gravity = lp.gravity;
+ if (gravity < 0) {
+ gravity = minorGravity;
+ }
+ final int layoutDirection = getLayoutDirection();
+ final int absoluteGravity = getAbsoluteGravity(gravity, layoutDirection);
+ switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
+ case Gravity.CENTER_HORIZONTAL:
+ childLeft = paddingLeft + (childSpace - childWidth) / 2
+ + lp.leftMargin - lp.rightMargin;
+ break;
+ case Gravity.RIGHT:
+ childLeft = childRight - childWidth - lp.rightMargin;
+ break;
+ case Gravity.LEFT:
+ default:
+ childLeft = paddingLeft + lp.leftMargin;
+ break;
+ }
+ if (hasDividerBeforeChildAt(i)) {
+ childTop += mDividerHeight;
+ }
+ childTop += lp.topMargin;
+ setChildFrame(child, childLeft, childTop + getLocationOffset(child),
+ childWidth, childHeight);
+ childTop += childHeight + lp.bottomMargin + getNextLocationOffset(child);
+ i += getChildrenSkipCount(child, i);
+ }
+ }
+ }
+
+ void measureChildBeforeLayout(View child, int childIndex,
+ int widthMeasureSpec, int totalWidth, int heightMeasureSpec,
+ int totalHeight) {
+ measureChildWithMargins(child, widthMeasureSpec, totalWidth,
+ heightMeasureSpec, totalHeight);
+ }
+
+ void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {
+ mTotalLength = 0;
+ int maxHeight = 0;
+ int childState = 0;
+ int alternativeMaxHeight = 0;
+ int weightedMaxHeight = 0;
+ boolean allFillParent = true;
+ float totalWeight = 0;
+ final int count = getVirtualChildCount();
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ boolean matchHeight = false;
+ if (mMaxAscent == null || mMaxDescent == null) {
+ mMaxAscent = new int[VERTICAL_GRAVITY_COUNT];
+ mMaxDescent = new int[VERTICAL_GRAVITY_COUNT];
+ }
+ final int[] maxAscent = mMaxAscent;
+ final int[] maxDescent = mMaxDescent;
+ maxAscent[0] = maxAscent[1] = maxAscent[2] = maxAscent[3] = -1;
+ maxDescent[0] = maxDescent[1] = maxDescent[2] = maxDescent[3] = -1;
+ final boolean baselineAligned = mBaselineAligned;
+ final boolean useLargestChild = mUseLargestChild;
+ final boolean isExactly = widthMode == MeasureSpec.EXACTLY;
+ int largestChildWidth = Integer.MIN_VALUE;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child == null) {
+ mTotalLength += measureNullChild(i);
+ continue;
+ }
+ if (child.getVisibility() == GONE) {
+ i += getChildrenSkipCount(child, i);
+ continue;
+ }
+ if (hasDividerBeforeChildAt(i)) {
+ mTotalLength += mDividerWidth;
+ }
+ final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
+ child.getLayoutParams();
+ totalWeight += lp.weight;
+ if (widthMode == MeasureSpec.EXACTLY && lp.width == 0 && lp.weight > 0) {
+ if (isExactly) {
+ mTotalLength += lp.leftMargin + lp.rightMargin;
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength +
+ lp.leftMargin + lp.rightMargin);
+ }
+ if (baselineAligned) {
+ final int freeSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ child.measure(freeSpec, freeSpec);
+ }
+ } else {
+ int oldWidth = Integer.MIN_VALUE;
+ if (lp.width == 0 && lp.weight > 0) {
+ oldWidth = 0;
+ lp.width = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+ }
+ measureChildBeforeLayout(child, i, widthMeasureSpec,
+ totalWeight == 0 ? mTotalLength : 0,
+ heightMeasureSpec, 0);
+ if (oldWidth != Integer.MIN_VALUE) {
+ lp.width = oldWidth;
+ }
+ final int childWidth = child.getMeasuredWidth();
+ if (isExactly) {
+ mTotalLength += childWidth + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + childWidth + lp.leftMargin +
+ lp.rightMargin + getNextLocationOffset(child));
+ }
+ if (useLargestChild) {
+ largestChildWidth = Math.max(childWidth, largestChildWidth);
+ }
+ }
+ boolean matchHeightLocally = false;
+ if (heightMode != MeasureSpec.EXACTLY
+ && lp.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT) {
+ matchHeight = true;
+ matchHeightLocally = true;
+ }
+ final int margin = lp.topMargin + lp.bottomMargin;
+ final int childHeight = child.getMeasuredHeight() + margin;
+ if (VERSION.SDK_INT >= 11) {
+ childState |= child.getMeasuredState();
+ }
+ if (baselineAligned) {
+ final int childBaseline = child.getBaseline();
+ if (childBaseline != -1) {
+ final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity)
+ & Gravity.VERTICAL_GRAVITY_MASK;
+ final int index = (gravity >> Gravity.AXIS_Y_SHIFT
+ & ~Gravity.AXIS_SPECIFIED) >> 1;
+ maxAscent[index] = Math.max(maxAscent[index], childBaseline);
+ maxDescent[index] = Math.max(maxDescent[index], childHeight - childBaseline);
+ }
+ }
+ maxHeight = Math.max(maxHeight, childHeight);
+ allFillParent = allFillParent
+ && lp.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ if (lp.weight > 0) {
+ weightedMaxHeight = Math.max(weightedMaxHeight,
+ matchHeightLocally ? margin : childHeight);
+ } else {
+ alternativeMaxHeight = Math.max(alternativeMaxHeight,
+ matchHeightLocally ? margin : childHeight);
+ }
+ i += getChildrenSkipCount(child, i);
+ }
+ if (mTotalLength > 0 && hasDividerBeforeChildAt(count)) {
+ mTotalLength += mDividerWidth;
+ }
+ if (maxAscent[INDEX_TOP] != -1 ||
+ maxAscent[INDEX_CENTER_VERTICAL] != -1 ||
+ maxAscent[INDEX_BOTTOM] != -1 ||
+ maxAscent[INDEX_FILL] != -1) {
+ final int ascent = Math.max(maxAscent[INDEX_FILL],
+ Math.max(maxAscent[INDEX_CENTER_VERTICAL],
+ Math.max(maxAscent[INDEX_TOP], maxAscent[INDEX_BOTTOM])));
+ final int descent = Math.max(maxDescent[INDEX_FILL],
+ Math.max(maxDescent[INDEX_CENTER_VERTICAL],
+ Math.max(maxDescent[INDEX_TOP], maxDescent[INDEX_BOTTOM])));
+ maxHeight = Math.max(maxHeight, ascent + descent);
+ }
+ if (useLargestChild &&
+ (widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.UNSPECIFIED)) {
+ mTotalLength = 0;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child == null) {
+ mTotalLength += measureNullChild(i);
+ continue;
+ }
+ if (child.getVisibility() == GONE) {
+ i += getChildrenSkipCount(child, i);
+ continue;
+ }
+ final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
+ child.getLayoutParams();
+ if (isExactly) {
+ mTotalLength += largestChildWidth + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + largestChildWidth +
+ lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ }
+ }
+ }
+ mTotalLength += getPaddingLeft() + getPaddingRight();
+ int widthSize = mTotalLength;
+ widthSize = Math.max(widthSize, getSuggestedMinimumWidth());
+ int widthSizeAndState = resolveSizeAndState(widthSize, widthMeasureSpec, 0);
+ widthSize = widthSizeAndState & MEASURED_SIZE_MASK;
+ int delta = widthSize - mTotalLength;
+ if (delta != 0 && totalWeight > 0.0f) {
+ float weightSum = mWeightSum > 0.0f ? mWeightSum : totalWeight;
+ maxAscent[0] = maxAscent[1] = maxAscent[2] = maxAscent[3] = -1;
+ maxDescent[0] = maxDescent[1] = maxDescent[2] = maxDescent[3] = -1;
+ maxHeight = -1;
+ mTotalLength = 0;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child == null || child.getVisibility() == View.GONE) {
+ continue;
+ }
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+ float childExtra = lp.weight;
+ if (childExtra > 0) {
+ int share = (int) (childExtra * delta / weightSum);
+ weightSum -= childExtra;
+ delta -= share;
+ final int childHeightMeasureSpec = getChildMeasureSpec(
+ heightMeasureSpec, getPaddingTop() + getPaddingBottom() + lp.topMargin
+ + lp.bottomMargin,
+ lp.height);
+ if (lp.width != 0 || widthMode != MeasureSpec.EXACTLY) {
+ int childWidth = child.getMeasuredWidth() + share;
+ if (childWidth < 0) {
+ childWidth = 0;
+ }
+ child.measure(
+ MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY),
+ childHeightMeasureSpec);
+ } else {
+ child.measure(MeasureSpec.makeMeasureSpec(
+ share > 0 ? share : 0, MeasureSpec.EXACTLY),
+ childHeightMeasureSpec);
+ }
+ if (VERSION.SDK_INT >= 11) {
+ childState |= child.getMeasuredState() & MEASURED_STATE_MASK;
+ }
+ }
+ if (isExactly) {
+ mTotalLength += child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + child.getMeasuredWidth() +
+ lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ }
+ boolean matchHeightLocally = heightMode != MeasureSpec.EXACTLY &&
+ lp.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ final int margin = lp.topMargin + lp.bottomMargin;
+ int childHeight = child.getMeasuredHeight() + margin;
+ maxHeight = Math.max(maxHeight, childHeight);
+ alternativeMaxHeight = Math.max(alternativeMaxHeight,
+ matchHeightLocally ? margin : childHeight);
+ allFillParent = allFillParent
+ && lp.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ if (baselineAligned) {
+ final int childBaseline = child.getBaseline();
+ if (childBaseline != -1) {
+ final int gravity = (lp.gravity < 0 ? mGravity : lp.gravity)
+ & Gravity.VERTICAL_GRAVITY_MASK;
+ final int index = (gravity >> Gravity.AXIS_Y_SHIFT
+ & ~Gravity.AXIS_SPECIFIED) >> 1;
+ maxAscent[index] = Math.max(maxAscent[index], childBaseline);
+ maxDescent[index] = Math.max(maxDescent[index],
+ childHeight - childBaseline);
+ }
+ }
+ }
+ mTotalLength += getPaddingLeft() + getPaddingRight();
+ if (maxAscent[INDEX_TOP] != -1 ||
+ maxAscent[INDEX_CENTER_VERTICAL] != -1 ||
+ maxAscent[INDEX_BOTTOM] != -1 ||
+ maxAscent[INDEX_FILL] != -1) {
+ final int ascent = Math.max(maxAscent[INDEX_FILL],
+ Math.max(maxAscent[INDEX_CENTER_VERTICAL],
+ Math.max(maxAscent[INDEX_TOP], maxAscent[INDEX_BOTTOM])));
+ final int descent = Math.max(maxDescent[INDEX_FILL],
+ Math.max(maxDescent[INDEX_CENTER_VERTICAL],
+ Math.max(maxDescent[INDEX_TOP], maxDescent[INDEX_BOTTOM])));
+ maxHeight = Math.max(maxHeight, ascent + descent);
+ }
+ } else {
+ alternativeMaxHeight = Math.max(alternativeMaxHeight, weightedMaxHeight);
+ if (useLargestChild && widthMode != MeasureSpec.EXACTLY) {
+ for (int i = 0; i < count; i++) {
+ final View child = getVirtualChildAt(i);
+ if (child == null || child.getVisibility() == View.GONE) {
+ continue;
+ }
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+ float childExtra = lp.weight;
+ if (childExtra > 0) {
+ child.measure(
+ MeasureSpec.makeMeasureSpec(largestChildWidth, MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(child.getMeasuredHeight(),
+ MeasureSpec.EXACTLY));
+ }
+ }
+ }
+ }
+ if (!allFillParent && heightMode != MeasureSpec.EXACTLY) {
+ maxHeight = alternativeMaxHeight;
+ }
+ maxHeight += getPaddingTop() + getPaddingBottom();
+ maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight());
+ setMeasuredDimension(widthSizeAndState | childState & MEASURED_STATE_MASK,
+ resolveSizeAndState(maxHeight, heightMeasureSpec,
+ childState << MEASURED_HEIGHT_STATE_SHIFT));
+ if (matchHeight) {
+ forceUniformHeight(count, widthMeasureSpec);
+ }
+ }
+
+ int measureNullChild(int childIndex) {
+ return 0;
+ }
+
+ void measureVertical(int widthMeasureSpec, int heightMeasureSpec) {
+ mTotalLength = 0;
+ int maxWidth = 0;
+ int childState = 0;
+ int alternativeMaxWidth = 0;
+ int weightedMaxWidth = 0;
+ boolean allFillParent = true;
+ float totalWeight = 0;
+ final int count = getVirtualChildCount();
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ boolean matchWidth = false;
+ final int baselineChildIndex = mBaselineAlignedChildIndex;
+ final boolean useLargestChild = mUseLargestChild;
+ int largestChildHeight = Integer.MIN_VALUE;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child == null) {
+ mTotalLength += measureNullChild(i);
+ continue;
+ }
+ if (child.getVisibility() == View.GONE) {
+ i += getChildrenSkipCount(child, i);
+ continue;
+ }
+ if (hasDividerBeforeChildAt(i)) {
+ mTotalLength += mDividerHeight;
+ }
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
+ totalWeight += lp.weight;
+ if (heightMode == MeasureSpec.EXACTLY && lp.height == 0 && lp.weight > 0) {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + lp.topMargin + lp.bottomMargin);
+ } else {
+ int oldHeight = Integer.MIN_VALUE;
+ if (lp.height == 0 && lp.weight > 0) {
+ oldHeight = 0;
+ lp.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+ }
+ measureChildBeforeLayout(
+ child, i, widthMeasureSpec, 0, heightMeasureSpec,
+ totalWeight == 0 ? mTotalLength : 0);
+ if (oldHeight != Integer.MIN_VALUE) {
+ lp.height = oldHeight;
+ }
+ final int childHeight = child.getMeasuredHeight();
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + childHeight + lp.topMargin +
+ lp.bottomMargin + getNextLocationOffset(child));
+ if (useLargestChild) {
+ largestChildHeight = Math.max(childHeight, largestChildHeight);
+ }
+ }
+ if (baselineChildIndex >= 0 && baselineChildIndex == i + 1) {
+ mBaselineChildTop = mTotalLength;
+ }
+ if (i < baselineChildIndex && lp.weight > 0) {
+ throw new RuntimeException("A child of LinearLayout with index "
+ + "less than mBaselineAlignedChildIndex has weight > 0, which "
+ + "won't work. Either remove the weight, or don't set "
+ + "mBaselineAlignedChildIndex.");
+ }
+ boolean matchWidthLocally = false;
+ if (widthMode != MeasureSpec.EXACTLY
+ && lp.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT) {
+ matchWidth = true;
+ matchWidthLocally = true;
+ }
+ final int margin = lp.leftMargin + lp.rightMargin;
+ final int measuredWidth = child.getMeasuredWidth() + margin;
+ maxWidth = Math.max(maxWidth, measuredWidth);
+ if (VERSION.SDK_INT >= 11) {
+ childState |= child.getMeasuredState();
+ }
+ allFillParent = allFillParent
+ && lp.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ if (lp.weight > 0) {
+ weightedMaxWidth = Math.max(weightedMaxWidth,
+ matchWidthLocally ? margin : measuredWidth);
+ } else {
+ alternativeMaxWidth = Math.max(alternativeMaxWidth,
+ matchWidthLocally ? margin : measuredWidth);
+ }
+
+ i += getChildrenSkipCount(child, i);
+ }
+ if (mTotalLength > 0 && hasDividerBeforeChildAt(count)) {
+ mTotalLength += mDividerHeight;
+ }
+ if (useLargestChild &&
+ (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED)) {
+ mTotalLength = 0;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child == null) {
+ mTotalLength += measureNullChild(i);
+ continue;
+ }
+ if (child.getVisibility() == GONE) {
+ i += getChildrenSkipCount(child, i);
+ continue;
+ }
+ final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
+ child.getLayoutParams();
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + largestChildHeight +
+ lp.topMargin + lp.bottomMargin + getNextLocationOffset(child));
+ }
+ }
+ mTotalLength += getPaddingTop() + getPaddingBottom();
+ int heightSize = mTotalLength;
+ heightSize = Math.max(heightSize, getSuggestedMinimumHeight());
+ int heightSizeAndState = resolveSizeAndState(heightSize, heightMeasureSpec, 0);
+ heightSize = heightSizeAndState & MEASURED_SIZE_MASK;
+ int delta = heightSize - mTotalLength;
+ if (delta != 0 && totalWeight > 0.0f) {
+ float weightSum = mWeightSum > 0.0f ? mWeightSum : totalWeight;
+ mTotalLength = 0;
+ for (int i = 0; i < count; ++i) {
+ final View child = getVirtualChildAt(i);
+ if (child.getVisibility() == View.GONE) {
+ continue;
+ }
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
+ float childExtra = lp.weight;
+ if (childExtra > 0) {
+ int share = (int) (childExtra * delta / weightSum);
+ weightSum -= childExtra;
+ delta -= share;
+ final int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
+ getPaddingLeft() + getPaddingRight() +
+ lp.leftMargin + lp.rightMargin, lp.width);
+ if (lp.height != 0 || heightMode != MeasureSpec.EXACTLY) {
+ int childHeight = child.getMeasuredHeight() + share;
+ if (childHeight < 0) {
+ childHeight = 0;
+ }
+ child.measure(childWidthMeasureSpec,
+ MeasureSpec.makeMeasureSpec(childHeight, MeasureSpec.EXACTLY));
+ } else {
+ child.measure(childWidthMeasureSpec,
+ MeasureSpec.makeMeasureSpec(share > 0 ? share : 0,
+ MeasureSpec.EXACTLY));
+ }
+ if (VERSION.SDK_INT >= 11) {
+ childState |= child.getMeasuredState()
+ & MEASURED_STATE_MASK >> MEASURED_HEIGHT_STATE_SHIFT;
+ }
+ }
+ final int margin = lp.leftMargin + lp.rightMargin;
+ final int measuredWidth = child.getMeasuredWidth() + margin;
+ maxWidth = Math.max(maxWidth, measuredWidth);
+ boolean matchWidthLocally = widthMode != MeasureSpec.EXACTLY &&
+ lp.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ alternativeMaxWidth = Math.max(alternativeMaxWidth,
+ matchWidthLocally ? margin : measuredWidth);
+ allFillParent = allFillParent
+ && lp.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + child.getMeasuredHeight() +
+ lp.topMargin + lp.bottomMargin + getNextLocationOffset(child));
+ }
+ mTotalLength += getPaddingTop() + getPaddingBottom();
+ } else {
+ alternativeMaxWidth = Math.max(alternativeMaxWidth,
+ weightedMaxWidth);
+ if (useLargestChild && heightMode != MeasureSpec.EXACTLY) {
+ for (int i = 0; i < count; i++) {
+ final View child = getVirtualChildAt(i);
+ if (child == null || child.getVisibility() == View.GONE) {
+ continue;
+ }
+ final LinearLayout.LayoutParams lp =
+ (LinearLayout.LayoutParams) child.getLayoutParams();
+ float childExtra = lp.weight;
+ if (childExtra > 0) {
+ child.measure(MeasureSpec.makeMeasureSpec(child.getMeasuredWidth(),
+ MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(
+ largestChildHeight, MeasureSpec.EXACTLY));
+ }
+ }
+ }
+ }
+ if (!allFillParent && widthMode != MeasureSpec.EXACTLY) {
+ maxWidth = alternativeMaxWidth;
+ }
+ maxWidth += getPaddingLeft() + getPaddingRight();
+ maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth());
+ setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
+ heightSizeAndState);
+ if (matchWidth) {
+ forceUniformWidth(count, heightMeasureSpec);
+ }
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ if (mDivider == null) {
+ return;
+ }
+ if (mOrientation == VERTICAL) {
+ drawDividersVertical(canvas);
+ } else {
+ drawDividersHorizontal(canvas);
+ }
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(LinearLayout.class.getName());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(LinearLayout.class.getName());
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ if (mOrientation == VERTICAL) {
+ layoutVertical();
+ } else {
+ layoutHorizontal();
+ }
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (mOrientation == VERTICAL) {
+ measureVertical(widthMeasureSpec, heightMeasureSpec);
+ } else {
+ measureHorizontal(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+
+ @Override
+ public void setBaselineAligned(boolean baselineAligned) {
+ mBaselineAligned = baselineAligned;
+ }
+
+ @Override
+ public void setBaselineAlignedChildIndex(int i) {
+ if (i < 0 || i >= getChildCount()) {
+ throw new IllegalArgumentException("base aligned child index out "
+ + "of range (0, " + getChildCount() + ")");
+ }
+ mBaselineAlignedChildIndex = i;
+ }
+
+ private void setChildFrame(View child, int left, int top, int width, int height) {
+ child.layout(left, top, left + width, top + height);
+ }
+
+ @Override
+ public void setDividerDrawable(Drawable divider) {
+ if (divider == mDivider) {
+ return;
+ }
+ mDivider = divider;
+ if (divider != null) {
+ mDividerWidth = divider.getIntrinsicWidth();
+ mDividerHeight = divider.getIntrinsicHeight();
+ } else {
+ mDividerWidth = 0;
+ mDividerHeight = 0;
+ }
+ setWillNotDraw(divider == null);
+ requestLayout();
+ }
+
+ @Override
+ public void setDividerPadding(int padding) {
+ mDividerPadding = padding;
+ }
+
+ @Override
+ public void setGravity(int gravity) {
+ if (mGravity != gravity) {
+ if ((gravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) == 0) {
+ gravity |= Gravity.START;
+ }
+ if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == 0) {
+ gravity |= Gravity.TOP;
+ }
+ mGravity = gravity;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setHorizontalGravity(int horizontalGravity) {
+ final int gravity = horizontalGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK;
+ if ((mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) != gravity) {
+ mGravity = mGravity & ~Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK | gravity;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setMeasureWithLargestChildEnabled(boolean enabled) {
+ mUseLargestChild = enabled;
+ }
+
+ @Override
+ public void setOrientation(int orientation) {
+ if (mOrientation != orientation) {
+ mOrientation = orientation;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setShowDividers(int showDividers) {
+ if (showDividers != mShowDividers) {
+ requestLayout();
+ }
+ mShowDividers = showDividers;
+ }
+
+ @Override
+ public void setVerticalGravity(int verticalGravity) {
+ final int gravity = verticalGravity & Gravity.VERTICAL_GRAVITY_MASK;
+ if ((mGravity & Gravity.VERTICAL_GRAVITY_MASK) != gravity) {
+ mGravity = mGravity & ~Gravity.VERTICAL_GRAVITY_MASK | gravity;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setWeightSum(float weightSum) {
+ mWeightSum = Math.max(0.0f, weightSum);
+ }
+
+ @Override
+ public boolean shouldDelayChildPressedState() {
+ return false;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListAdapterWrapper.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListAdapterWrapper.java
new file mode 100644
index 0000000000..aa6dd0a870
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListAdapterWrapper.java
@@ -0,0 +1,135 @@
+
+package org.holoeverywhere.widget;
+
+import android.database.DataSetObserver;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListAdapter;
+import android.widget.WrapperListAdapter;
+
+public class ListAdapterWrapper implements WrapperListAdapter {
+ public static interface ListAdapterCallback {
+ public void onChanged();
+
+ public void onInvalidated();
+
+ public View onPrepareView(View view, int position);
+ }
+
+ private final class WrapperDataSetObserver extends DataSetObserver {
+ private DataSetObserver mDataSetObserver;
+
+ public WrapperDataSetObserver(DataSetObserver dataSetObserver) {
+ mDataSetObserver = dataSetObserver;
+ }
+
+ @Override
+ public void onChanged() {
+ mDataSetObserver.onChanged();
+ if (mCallback != null) {
+ mCallback.onChanged();
+ }
+ }
+
+ @Override
+ public void onInvalidated() {
+ mDataSetObserver.onInvalidated();
+ if (mCallback != null) {
+ mCallback.onInvalidated();
+ }
+ }
+ }
+
+ private final ListAdapterCallback mCallback;
+ private DataSetObserver mLastDataSetObserver;
+ private final ListAdapter mWrapped;
+
+ public ListAdapterWrapper(ListAdapter wrapped) {
+ this(wrapped, null);
+ }
+
+ public ListAdapterWrapper(ListAdapter wrapped, ListAdapterCallback callback) {
+ mWrapped = wrapped;
+ mCallback = callback;
+ }
+
+ @Override
+ public boolean areAllItemsEnabled() {
+ return mWrapped.areAllItemsEnabled();
+ }
+
+ @Override
+ public int getCount() {
+ return mWrapped.getCount();
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return mWrapped.getItem(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return mWrapped.getItemId(position);
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ return mWrapped.getItemViewType(position);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return onPrepareView(mWrapped.getView(position, convertView, parent), position);
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ return mWrapped.getViewTypeCount();
+ }
+
+ @Override
+ public ListAdapter getWrappedAdapter() {
+ return mWrapped;
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return mWrapped.hasStableIds();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return mWrapped.isEmpty();
+ }
+
+ @Override
+ public boolean isEnabled(int position) {
+ return mWrapped.isEnabled(position);
+ }
+
+ public void notifyDataSetChanged() {
+ if (mLastDataSetObserver != null) {
+ mLastDataSetObserver.onChanged();
+ }
+ }
+
+ public View onPrepareView(View view, int position) {
+ if (mCallback != null) {
+ return mCallback.onPrepareView(view, position);
+ }
+ return view;
+ }
+
+ @Override
+ public void registerDataSetObserver(DataSetObserver dataSetObserver) {
+ mWrapped.registerDataSetObserver(mLastDataSetObserver = new WrapperDataSetObserver(
+ dataSetObserver));
+ }
+
+ @Override
+ public void unregisterDataSetObserver(DataSetObserver dataSetObserver) {
+ mWrapped.unregisterDataSetObserver(mLastDataSetObserver);
+ mLastDataSetObserver = null;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListPopupWindow.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListPopupWindow.java
new file mode 100644
index 0000000000..de3f287e62
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListPopupWindow.java
@@ -0,0 +1,858 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.Handler;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.MeasureSpec;
+import android.view.View.OnTouchListener;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.AdapterView;
+import android.widget.ListAdapter;
+
+public class ListPopupWindow {
+ private static class DropDownListView extends ListView {
+ private boolean mHijackFocus;
+ private boolean mListSelectionHidden;
+
+ public DropDownListView(Context context, boolean hijackFocus) {
+ super(context, null, R.attr.dropDownListViewStyle);
+ mHijackFocus = hijackFocus;
+ }
+
+ @Override
+ public boolean hasFocus() {
+ return mHijackFocus || super.hasFocus();
+ }
+
+ @Override
+ public boolean hasWindowFocus() {
+ return mHijackFocus || super.hasWindowFocus();
+ }
+
+ @Override
+ public boolean isFocused() {
+ return mHijackFocus || super.isFocused();
+ }
+
+ @Override
+ public boolean isInTouchMode() {
+ return mHijackFocus && mListSelectionHidden
+ || super.isInTouchMode();
+ }
+
+ @Override
+ public View onPrepareView(View view, int position) {
+ if (view instanceof android.widget.TextView) {
+ ((android.widget.TextView) view).setHorizontallyScrolling(true);
+ }
+ return view;
+ }
+ }
+
+ private class ListSelectorHider implements Runnable {
+ @Override
+ public void run() {
+ clearListSelection();
+ }
+ }
+
+ private class PopupDataSetObserver extends DataSetObserver {
+ @Override
+ public void onChanged() {
+ if (isShowing()) {
+ show();
+ }
+ }
+
+ @Override
+ public void onInvalidated() {
+ dismiss();
+ }
+ }
+
+ private class PopupScrollListener implements ListView.OnScrollListener {
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem,
+ int visibleItemCount, int totalItemCount) {
+ }
+
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ if (scrollState == OnScrollListener.SCROLL_STATE_TOUCH_SCROLL
+ && !isInputMethodNotNeeded()
+ && mPopup.getContentView() != null) {
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ mResizePopupRunnable.run();
+ }
+ }
+ }
+
+ private class PopupTouchInterceptor implements OnTouchListener {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ final int action = event.getAction();
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+ if (action == MotionEvent.ACTION_DOWN && mPopup != null
+ && mPopup.isShowing() && x >= 0 && x < mPopup.getWidth()
+ && y >= 0 && y < mPopup.getHeight()) {
+ mHandler.postDelayed(mResizePopupRunnable,
+ ListPopupWindow.EXPAND_LIST_TIMEOUT);
+ } else if (action == MotionEvent.ACTION_UP) {
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ }
+ return false;
+ }
+ }
+
+ private class ResizePopupRunnable implements Runnable {
+ @Override
+ public void run() {
+ if (mDropDownList != null
+ && mDropDownList.getCount() > mDropDownList.getChildCount()
+ && mDropDownList.getChildCount() <= mListItemExpandMaximum) {
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ show();
+ }
+ }
+ }
+
+ private static final boolean DEBUG = false;
+ private static final int EXPAND_LIST_TIMEOUT = 250;
+ public static final int INPUT_METHOD_FROM_FOCUSABLE = PopupWindow.INPUT_METHOD_FROM_FOCUSABLE;
+ public static final int INPUT_METHOD_NEEDED = PopupWindow.INPUT_METHOD_NEEDED;
+ public static final int INPUT_METHOD_NOT_NEEDED = PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ public static final int MATCH_PARENT = ViewGroup.LayoutParams.MATCH_PARENT;
+ public static final int POSITION_PROMPT_ABOVE = 0;
+ public static final int POSITION_PROMPT_BELOW = 1;
+ private static final String TAG = "ListPopupWindow";
+ public static final int WRAP_CONTENT = ViewGroup.LayoutParams.WRAP_CONTENT;
+ private ListAdapter mAdapter;
+ private Context mContext;
+ private boolean mDropDownAlwaysVisible = false;
+ private View mDropDownAnchorView;
+ private int mDropDownHeight = ViewGroup.LayoutParams.WRAP_CONTENT;
+ private int mDropDownHorizontalOffset;
+ private DropDownListView mDropDownList;
+ private Drawable mDropDownListHighlight;
+ private int mDropDownVerticalOffset;
+ private boolean mDropDownVerticalOffsetSet;
+ private int mDropDownWidth = ViewGroup.LayoutParams.WRAP_CONTENT;
+ private boolean mForceIgnoreOutsideTouch = false;
+ private Handler mHandler = new Handler();
+ private final ListSelectorHider mHideSelector = new ListSelectorHider();
+ private AdapterView.OnItemClickListener mItemClickListener;
+ private AdapterView.OnItemSelectedListener mItemSelectedListener;
+ int mListItemExpandMaximum = Integer.MAX_VALUE;
+ private boolean mModal;
+ private DataSetObserver mObserver;
+ private PopupWindow mPopup;
+ private int mPromptPosition = ListPopupWindow.POSITION_PROMPT_ABOVE;
+ private View mPromptView;
+ private final ResizePopupRunnable mResizePopupRunnable = new ResizePopupRunnable();
+ private final PopupScrollListener mScrollListener = new PopupScrollListener();
+ private Runnable mShowDropDownRunnable;
+ private Rect mTempRect = new Rect();
+ private final PopupTouchInterceptor mTouchInterceptor = new PopupTouchInterceptor();
+
+ public ListPopupWindow(Context context) {
+ this(context, null, R.attr.listPopupWindowStyle, 0);
+ }
+
+ public ListPopupWindow(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.listPopupWindowStyle, 0);
+ }
+
+ public ListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public ListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ mPopup = new PopupWindow(mContext = context, attrs, defStyleAttr, defStyleRes);
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+ }
+
+ private int buildDropDown() {
+ ViewGroup dropDownView;
+ int otherHeights = 0;
+ if (mDropDownList == null) {
+ Context context = mContext;
+ mShowDropDownRunnable = new Runnable() {
+ @Override
+ public void run() {
+ View view = getAnchorView();
+ if (view != null && view.getWindowToken() != null) {
+ show();
+ }
+ }
+ };
+ mDropDownList = new DropDownListView(context, !mModal);
+ if (mDropDownListHighlight != null) {
+ mDropDownList.setSelector(mDropDownListHighlight);
+ }
+ mDropDownList.setAdapter(mAdapter);
+ mDropDownList.setOnItemClickListener(mItemClickListener);
+ mDropDownList.setFocusable(true);
+ mDropDownList.setFocusableInTouchMode(true);
+ mDropDownList
+ .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView<?> parent,
+ View view, int position, long id) {
+
+ if (position != -1) {
+ DropDownListView dropDownList = mDropDownList;
+
+ if (dropDownList != null) {
+ dropDownList.mListSelectionHidden = false;
+ }
+ }
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView<?> parent) {
+ }
+ });
+ mDropDownList.setOnScrollListener(mScrollListener);
+ if (mItemSelectedListener != null) {
+ mDropDownList.setOnItemSelectedListener(mItemSelectedListener);
+ }
+ dropDownView = mDropDownList;
+ View hintView = mPromptView;
+ if (hintView != null) {
+ LinearLayout hintContainer = new LinearLayout(context);
+ hintContainer
+ .setOrientation(android.widget.LinearLayout.VERTICAL);
+ LinearLayout.LayoutParams hintParams = new LinearLayout.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f);
+ switch (mPromptPosition) {
+ case POSITION_PROMPT_BELOW:
+ hintContainer.addView(dropDownView, hintParams);
+ hintContainer.addView(hintView);
+ break;
+ case POSITION_PROMPT_ABOVE:
+ hintContainer.addView(hintView);
+ hintContainer.addView(dropDownView, hintParams);
+ break;
+ default:
+ Log.e(ListPopupWindow.TAG, "Invalid hint position "
+ + mPromptPosition);
+ break;
+ }
+ int widthSpec = MeasureSpec.makeMeasureSpec(mDropDownWidth,
+ MeasureSpec.AT_MOST);
+ int heightSpec = MeasureSpec.UNSPECIFIED;
+ hintView.measure(widthSpec, heightSpec);
+ hintParams = (LinearLayout.LayoutParams) hintView
+ .getLayoutParams();
+ otherHeights = hintView.getMeasuredHeight()
+ + hintParams.topMargin + hintParams.bottomMargin;
+ dropDownView = hintContainer;
+ }
+ mPopup.setContentView(dropDownView);
+ } else {
+ dropDownView = (ViewGroup) mPopup.getContentView();
+ final View view = mPromptView;
+ if (view != null) {
+ LinearLayout.LayoutParams hintParams = (LinearLayout.LayoutParams) view
+ .getLayoutParams();
+ otherHeights = view.getMeasuredHeight() + hintParams.topMargin
+ + hintParams.bottomMargin;
+ }
+ }
+ int padding = 0;
+ Drawable background = mPopup.getBackground();
+ if (background != null) {
+ background.getPadding(mTempRect);
+ padding = mTempRect.top + mTempRect.bottom;
+ if (!mDropDownVerticalOffsetSet) {
+ mDropDownVerticalOffset = -mTempRect.top;
+ }
+ } else {
+ mTempRect.setEmpty();
+ }
+ boolean ignoreBottomDecorations = mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
+ final int maxHeight = getMaxAvailableHeight(getAnchorView(),
+ mDropDownVerticalOffset, ignoreBottomDecorations);
+ if (mDropDownAlwaysVisible
+ || mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ return maxHeight + padding;
+ }
+ final int childWidthSpec;
+ switch (mDropDownWidth) {
+ case ViewGroup.LayoutParams.WRAP_CONTENT:
+ childWidthSpec = MeasureSpec.makeMeasureSpec(mContext
+ .getResources().getDisplayMetrics().widthPixels
+ - (mTempRect.left + mTempRect.right), MeasureSpec.AT_MOST);
+ break;
+ case ViewGroup.LayoutParams.MATCH_PARENT:
+ childWidthSpec = MeasureSpec.makeMeasureSpec(mContext
+ .getResources().getDisplayMetrics().widthPixels
+ - (mTempRect.left + mTempRect.right), MeasureSpec.EXACTLY);
+ break;
+ default:
+ childWidthSpec = MeasureSpec.makeMeasureSpec(mDropDownWidth,
+ MeasureSpec.EXACTLY);
+ break;
+ }
+ final int listContent = measureHeightOfChildren(childWidthSpec, 0, -1,
+ maxHeight - otherHeights, -1);
+ if (listContent > 0) {
+ otherHeights += padding;
+ }
+ return listContent + otherHeights;
+ }
+
+ public void clearListSelection() {
+ final DropDownListView list = mDropDownList;
+ if (list != null) {
+ list.mListSelectionHidden = true;
+ // TODO list.hideSelector();
+ list.requestLayout();
+ }
+ }
+
+ public void dismiss() {
+ mPopup.dismiss();
+ removePromptView();
+ mPopup.setContentView(null);
+ mDropDownList = null;
+ mHandler.removeCallbacks(mResizePopupRunnable);
+ }
+
+ public View getAnchorView() {
+ return mDropDownAnchorView;
+ }
+
+ public int getAnimationStyle() {
+ return mPopup.getAnimationStyle();
+ }
+
+ public Drawable getBackground() {
+ return mPopup.getBackground();
+ }
+
+ public int getHeight() {
+ return mDropDownHeight;
+ }
+
+ public int getHorizontalOffset() {
+ return mDropDownHorizontalOffset;
+ }
+
+ public int getInputMethodMode() {
+ return mPopup.getInputMethodMode();
+ }
+
+ public ListView getListView() {
+ return mDropDownList;
+ }
+
+ private int getMaxAvailableHeight(View anchor, int yOffset,
+ boolean ignoreBottomDecorations) {
+ final Rect displayFrame = new Rect();
+ anchor.getWindowVisibleDisplayFrame(displayFrame);
+ final int[] anchorPos = new int[2];
+ anchor.getLocationOnScreen(anchorPos);
+ int bottomEdge = displayFrame.bottom;
+ if (ignoreBottomDecorations) {
+ Resources res = anchor.getContext().getResources();
+ bottomEdge = res.getDisplayMetrics().heightPixels;
+ }
+ final int distanceToBottom = bottomEdge
+ - (anchorPos[1] + anchor.getHeight()) - yOffset;
+ final int distanceToTop = anchorPos[1] - displayFrame.top + yOffset;
+ int returnedHeight = Math.max(distanceToBottom, distanceToTop);
+ if (mPopup.getBackground() != null) {
+ mPopup.getBackground().getPadding(mTempRect);
+ returnedHeight -= mTempRect.top + mTempRect.bottom;
+ }
+ return returnedHeight;
+ }
+
+ public int getPromptPosition() {
+ return mPromptPosition;
+ }
+
+ public Object getSelectedItem() {
+ if (!isShowing()) {
+ return null;
+ }
+ return mDropDownList.getSelectedItem();
+ }
+
+ public long getSelectedItemId() {
+ if (!isShowing()) {
+ return AdapterView.INVALID_ROW_ID;
+ }
+ return mDropDownList.getSelectedItemId();
+ }
+
+ public int getSelectedItemPosition() {
+ if (!isShowing()) {
+ return AdapterView.INVALID_POSITION;
+ }
+ return mDropDownList.getSelectedItemPosition();
+ }
+
+ public View getSelectedView() {
+ if (!isShowing()) {
+ return null;
+ }
+ return mDropDownList.getSelectedView();
+ }
+
+ public int getSoftInputMode() {
+ return mPopup.getSoftInputMode();
+ }
+
+ public int getVerticalOffset() {
+ if (!mDropDownVerticalOffsetSet) {
+ return 0;
+ }
+ return mDropDownVerticalOffset;
+ }
+
+ public int getWidth() {
+ return mDropDownWidth;
+ }
+
+ public boolean isDropDownAlwaysVisible() {
+ return mDropDownAlwaysVisible;
+ }
+
+ public boolean isInputMethodNotNeeded() {
+ return mPopup.getInputMethodMode() == ListPopupWindow.INPUT_METHOD_NOT_NEEDED;
+ }
+
+ public boolean isModal() {
+ return mModal;
+ }
+
+ public boolean isShowing() {
+ return mPopup.isShowing();
+ }
+
+ private int measureHeightOfChildren(int widthMeasureSpec,
+ int startPosition, int endPosition, final int maxHeight,
+ int disallowPartialChildPosition) {
+ final ListAdapter adapter = mAdapter;
+ if (adapter == null) {
+ return mDropDownList.getListPaddingTop()
+ + mDropDownList.getListPaddingBottom();
+ }
+ int returnedHeight = mDropDownList.getListPaddingTop()
+ + mDropDownList.getListPaddingBottom();
+ final int dividerHeight = mDropDownList.getDividerHeight() > 0
+ && mDropDownList.getDivider() != null ? mDropDownList
+ .getDividerHeight() : 0;
+ int prevHeightWithoutPartialChild = 0;
+ int i;
+ View child;
+ endPosition = endPosition == -1 ? adapter.getCount() - 1 : endPosition;
+ for (i = startPosition; i <= endPosition; ++i) {
+ child = mAdapter.getView(i, null, mDropDownList);
+ if (mDropDownList.getCacheColorHint() != 0) {
+ child.setDrawingCacheBackgroundColor(mDropDownList
+ .getCacheColorHint());
+ }
+ measureScrapChild(child, i, widthMeasureSpec);
+ if (i > 0) {
+ returnedHeight += dividerHeight;
+ }
+ returnedHeight += child.getMeasuredHeight();
+ if (returnedHeight >= maxHeight) {
+ return disallowPartialChildPosition >= 0
+ && i > disallowPartialChildPosition
+ && prevHeightWithoutPartialChild > 0
+ && returnedHeight != maxHeight ? prevHeightWithoutPartialChild
+ : maxHeight;
+ }
+ if (disallowPartialChildPosition >= 0
+ && i >= disallowPartialChildPosition) {
+ prevHeightWithoutPartialChild = returnedHeight;
+ }
+ }
+ return returnedHeight;
+ }
+
+ private void measureScrapChild(View child, int position,
+ int widthMeasureSpec) {
+ ListView.LayoutParams p = (ListView.LayoutParams) child
+ .getLayoutParams();
+ if (p == null) {
+ p = new ListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT, 0);
+ child.setLayoutParams(p);
+ }
+ // TODO p.viewType = mAdapter.getItemViewType(position);
+ // TODO p.forceAdd = true;
+ int childWidthSpec = ViewGroup.getChildMeasureSpec(
+ widthMeasureSpec,
+ mDropDownList.getPaddingLeft()
+ + mDropDownList.getPaddingRight(), p.width);
+ int lpHeight = p.height;
+ int childHeightSpec;
+ if (lpHeight > 0) {
+ childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight,
+ MeasureSpec.EXACTLY);
+ } else {
+ childHeightSpec = MeasureSpec.makeMeasureSpec(0,
+ MeasureSpec.UNSPECIFIED);
+ }
+ child.measure(childWidthSpec, childHeightSpec);
+ }
+
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (isShowing()) {
+ if (keyCode != KeyEvent.KEYCODE_SPACE
+ && (mDropDownList.getSelectedItemPosition() >= 0 || keyCode != KeyEvent.KEYCODE_ENTER
+ && keyCode != KeyEvent.KEYCODE_DPAD_CENTER)) {
+ int curIndex = mDropDownList.getSelectedItemPosition();
+ boolean consumed;
+ final boolean below = !mPopup.isAboveAnchor();
+ final ListAdapter adapter = mAdapter;
+ @SuppressWarnings("unused")
+ boolean allEnabled;
+ int firstItem = Integer.MAX_VALUE;
+ int lastItem = Integer.MIN_VALUE;
+ if (adapter != null) {
+ allEnabled = adapter.areAllItemsEnabled();
+ firstItem = 0;
+ lastItem = adapter.getCount() - 1;
+ /*
+ * TODO firstItem = allEnabled ? 0 : mDropDownList
+ * .lookForSelectablePosition(0, true); lastItem =
+ * allEnabled ? adapter.getCount() - 1 :
+ * mDropDownList.lookForSelectablePosition(
+ * adapter.getCount() - 1, false);
+ */
+ }
+ if (below && keyCode == KeyEvent.KEYCODE_DPAD_UP
+ && curIndex <= firstItem || !below
+ && keyCode == KeyEvent.KEYCODE_DPAD_DOWN
+ && curIndex >= lastItem) {
+ clearListSelection();
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+ show();
+ return true;
+ } else {
+ mDropDownList.mListSelectionHidden = false;
+ }
+ consumed = mDropDownList.onKeyDown(keyCode, event);
+ if (ListPopupWindow.DEBUG) {
+ Log.v(ListPopupWindow.TAG, "Key down: code=" + keyCode
+ + " list consumed=" + consumed);
+ }
+
+ if (consumed) {
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
+ mDropDownList.requestFocusFromTouch();
+ show();
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_ENTER:
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ case KeyEvent.KEYCODE_DPAD_DOWN:
+ case KeyEvent.KEYCODE_DPAD_UP:
+ return true;
+ }
+ } else {
+ if (below && keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
+ if (curIndex == lastItem) {
+ return true;
+ }
+ } else if (!below && keyCode == KeyEvent.KEYCODE_DPAD_UP
+ && curIndex == firstItem) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ @SuppressLint("NewApi")
+ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+ if (VERSION.SDK_INT < 5) {
+ return false;
+ }
+ if (keyCode == KeyEvent.KEYCODE_BACK && isShowing()) {
+ final View anchorView = mDropDownAnchorView;
+ if (event.getAction() == KeyEvent.ACTION_DOWN
+ && event.getRepeatCount() == 0) {
+ KeyEvent.DispatcherState state = anchorView
+ .getKeyDispatcherState();
+ if (state != null) {
+ state.startTracking(event, this);
+ }
+ return true;
+ } else if (event.getAction() == KeyEvent.ACTION_UP) {
+ KeyEvent.DispatcherState state = anchorView
+ .getKeyDispatcherState();
+ if (state != null) {
+ state.handleUpEvent(event);
+ }
+ if (event.isTracking() && !event.isCanceled()) {
+ dismiss();
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ if (isShowing() && mDropDownList.getSelectedItemPosition() >= 0) {
+ boolean consumed = mDropDownList.onKeyUp(keyCode, event);
+ if (consumed) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_ENTER:
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ dismiss();
+ break;
+ }
+ }
+ return consumed;
+ }
+ return false;
+ }
+
+ public boolean performItemClick(int position) {
+ if (isShowing()) {
+ if (mItemClickListener != null) {
+ final DropDownListView list = mDropDownList;
+ final View child = list.getChildAt(position
+ - list.getFirstVisiblePosition());
+ final ListAdapter adapter = list.getAdapter();
+ mItemClickListener.onItemClick(list, child, position,
+ adapter.getItemId(position));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ public void postShow() {
+ mHandler.post(mShowDropDownRunnable);
+ }
+
+ private void removePromptView() {
+ if (mPromptView != null) {
+ final ViewParent parent = mPromptView.getParent();
+ if (parent instanceof ViewGroup) {
+ final ViewGroup group = (ViewGroup) parent;
+ group.removeView(mPromptView);
+ }
+ }
+ }
+
+ public void setAdapter(ListAdapter adapter) {
+ if (mObserver == null) {
+ mObserver = new PopupDataSetObserver();
+ } else if (mAdapter != null) {
+ mAdapter.unregisterDataSetObserver(mObserver);
+ }
+ mAdapter = adapter;
+ if (mAdapter != null) {
+ mAdapter.registerDataSetObserver(mObserver);
+ }
+ if (mDropDownList != null) {
+ mDropDownList.setAdapter(mAdapter);
+ }
+ }
+
+ public void setAnchorView(View anchor) {
+ mDropDownAnchorView = anchor;
+ }
+
+ public void setAnimationStyle(int animationStyle) {
+ mPopup.setAnimationStyle(animationStyle);
+ }
+
+ public void setBackgroundDrawable(Drawable d) {
+ mPopup.setBackgroundDrawable(d);
+ }
+
+ public void setContentWidth(int width) {
+ Drawable popupBackground = mPopup.getBackground();
+ if (popupBackground != null) {
+ popupBackground.getPadding(mTempRect);
+ mDropDownWidth = mTempRect.left + mTempRect.right + width;
+ } else {
+ setWidth(width);
+ }
+ }
+
+ public void setDropDownAlwaysVisible(boolean dropDownAlwaysVisible) {
+ mDropDownAlwaysVisible = dropDownAlwaysVisible;
+ }
+
+ public void setForceIgnoreOutsideTouch(boolean forceIgnoreOutsideTouch) {
+ mForceIgnoreOutsideTouch = forceIgnoreOutsideTouch;
+ }
+
+ public void setHeight(int height) {
+ mDropDownHeight = height;
+ }
+
+ public void setHorizontalOffset(int offset) {
+ mDropDownHorizontalOffset = offset;
+ }
+
+ public void setInputMethodMode(int mode) {
+ mPopup.setInputMethodMode(mode);
+ }
+
+ void setListItemExpandMax(int max) {
+ mListItemExpandMaximum = max;
+ }
+
+ public void setListSelector(Drawable selector) {
+ mDropDownListHighlight = selector;
+ }
+
+ public void setModal(boolean modal) {
+ mModal = true;
+ mPopup.setFocusable(modal);
+ }
+
+ public void setOnDismissListener(PopupWindow.OnDismissListener listener) {
+ mPopup.setOnDismissListener(listener);
+ }
+
+ public void setOnItemClickListener(
+ AdapterView.OnItemClickListener clickListener) {
+ mItemClickListener = clickListener;
+ }
+
+ public void setOnItemSelectedListener(
+ AdapterView.OnItemSelectedListener selectedListener) {
+ mItemSelectedListener = selectedListener;
+ }
+
+ public void setPromptPosition(int position) {
+ mPromptPosition = position;
+ }
+
+ public void setPromptView(View prompt) {
+ boolean showing = isShowing();
+ if (showing) {
+ removePromptView();
+ }
+ mPromptView = prompt;
+ if (showing) {
+ show();
+ }
+ }
+
+ public void setSelection(int position) {
+ DropDownListView list = mDropDownList;
+ if (isShowing() && list != null) {
+ list.mListSelectionHidden = false;
+ list.setSelection(position);
+ if (list.getChoiceMode() != AbsListView.CHOICE_MODE_NONE) {
+ list.setItemChecked(position, true);
+ }
+ }
+ }
+
+ public void setSoftInputMode(int mode) {
+ mPopup.setSoftInputMode(mode);
+ }
+
+ public void setVerticalOffset(int offset) {
+ mDropDownVerticalOffset = offset;
+ mDropDownVerticalOffsetSet = true;
+ }
+
+ public void setWidth(int width) {
+ mDropDownWidth = width;
+ }
+
+ public void show() {
+ int height = buildDropDown();
+ int widthSpec = 0;
+ int heightSpec = 0;
+ boolean noInputMethod = isInputMethodNotNeeded();
+ mPopup.setAllowScrollingAnchorParent(!noInputMethod);
+ if (mPopup.isShowing()) {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ widthSpec = -1;
+ } else if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ widthSpec = getAnchorView().getWidth();
+ } else {
+ widthSpec = mDropDownWidth;
+ }
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ heightSpec = noInputMethod ? height
+ : ViewGroup.LayoutParams.MATCH_PARENT;
+ if (noInputMethod) {
+ mPopup.setWindowLayoutMode(
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ? ViewGroup.LayoutParams.MATCH_PARENT
+ : 0, 0);
+ } else {
+ mPopup.setWindowLayoutMode(
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ? ViewGroup.LayoutParams.MATCH_PARENT
+ : 0, ViewGroup.LayoutParams.MATCH_PARENT);
+ }
+ } else if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ heightSpec = height;
+ } else {
+ heightSpec = mDropDownHeight;
+ }
+ mPopup.setOutsideTouchable(!mForceIgnoreOutsideTouch
+ && !mDropDownAlwaysVisible);
+ mPopup.update(getAnchorView(), mDropDownHorizontalOffset,
+ mDropDownVerticalOffset, widthSpec, heightSpec);
+ } else {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ widthSpec = ViewGroup.LayoutParams.MATCH_PARENT;
+ } else {
+ if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ mPopup.setWidth(getAnchorView().getWidth());
+ } else {
+ mPopup.setWidth(mDropDownWidth);
+ }
+ }
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ heightSpec = ViewGroup.LayoutParams.MATCH_PARENT;
+ } else {
+ if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ mPopup.setHeight(height);
+ } else {
+ mPopup.setHeight(mDropDownHeight);
+ }
+ }
+ mPopup.setWindowLayoutMode(widthSpec, heightSpec);
+ mPopup.setClipToScreenEnabled(true);
+ mPopup.setOutsideTouchable(!mForceIgnoreOutsideTouch
+ && !mDropDownAlwaysVisible);
+ mPopup.setTouchInterceptor(mTouchInterceptor);
+ mPopup.showAsDropDown(getAnchorView(), mDropDownHorizontalOffset,
+ mDropDownVerticalOffset);
+ mDropDownList.setSelection(AdapterView.INVALID_POSITION);
+ if (!mModal || mDropDownList.isInTouchMode()) {
+ clearListSelection();
+ }
+ if (!mModal) {
+ mHandler.post(mHideSelector);
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListView.java
new file mode 100644
index 0000000000..a91a85160c
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ListView.java
@@ -0,0 +1,1029 @@
+
+package org.holoeverywhere.widget;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.holoeverywhere.HoloEverywhere;
+import org.holoeverywhere.IHoloActivity.OnWindowFocusChangeListener;
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.Activity;
+import org.holoeverywhere.drawable.DrawableCompat;
+import org.holoeverywhere.widget.HeaderViewListAdapter.ViewInfo;
+import org.holoeverywhere.widget.ListAdapterWrapper.ListAdapterCallback;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.support.v4.util.LongSparseArray;
+import android.util.AttributeSet;
+import android.util.SparseBooleanArray;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.HapticFeedbackConstants;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewDebug.ExportedProperty;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.Checkable;
+import android.widget.ListAdapter;
+
+import com.actionbarsherlock.internal.view.menu.ContextMenuBuilder.ContextMenuInfoGetter;
+import com.actionbarsherlock.view.ActionMode;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuItem;
+
+public class ListView extends android.widget.ListView implements OnWindowFocusChangeListener,
+ ContextMenuInfoGetter {
+ public interface MultiChoiceModeListener extends ActionMode.Callback {
+ public void onItemCheckedStateChanged(ActionMode mode, int position,
+ long id, boolean checked);
+ }
+
+ private final class MultiChoiceModeWrapper implements MultiChoiceModeListener {
+ private MultiChoiceModeListener mWrapped;
+
+ @Override
+ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
+ return mWrapped.onActionItemClicked(mode, item);
+ }
+
+ @Override
+ public boolean onCreateActionMode(ActionMode mode, Menu menu) {
+ if (mWrapped.onCreateActionMode(mode, menu)) {
+ setLongClickable(false);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onDestroyActionMode(ActionMode mode) {
+ mWrapped.onDestroyActionMode(mode);
+ mChoiceActionMode = null;
+ clearChoices();
+ updateOnScreenCheckedViews();
+ setLongClickable(true);
+ }
+
+ @Override
+ public void onItemCheckedStateChanged(ActionMode mode,
+ int position, long id, boolean checked) {
+ mWrapped.onItemCheckedStateChanged(mode, position, id, checked);
+ if (getCheckedItemCount() == 0) {
+ mode.finish();
+ }
+ }
+
+ @Override
+ public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
+ return mWrapped.onPrepareActionMode(mode, menu);
+ }
+
+ public void setWrapped(MultiChoiceModeListener wrapped) {
+ mWrapped = wrapped;
+ }
+ }
+
+ private final class OnItemLongClickListenerWrapper implements OnItemLongClickListener {
+ private OnItemLongClickListener wrapped;
+
+ @Override
+ public boolean onItemLongClick(AdapterView<?> adapterView, View view, int position, long id) {
+ return performItemLongClick(view, position, id);
+ }
+
+ public void setWrapped(OnItemLongClickListener wrapped) {
+ this.wrapped = wrapped;
+ if (wrapped != null) {
+ setLongClickable(true);
+ }
+ }
+ }
+
+ static final class SavedState extends BaseSavedState {
+ public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
+ @Override
+ public SavedState createFromParcel(Parcel parcel) {
+ return new SavedState(parcel);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ int checkedItemCount;
+ LongSparseArray<Integer> checkIdState;
+ SparseBooleanArray checkState;
+ boolean inActionMode;
+
+ public SavedState(Parcel in) {
+ super(in);
+ inActionMode = in.readByte() != 0;
+ checkedItemCount = in.readInt();
+ checkState = in.readSparseBooleanArray();
+ final int N = in.readInt();
+ if (N > 0) {
+ checkIdState = new LongSparseArray<Integer>();
+ for (int i = 0; i < N; i++) {
+ final long key = in.readLong();
+ final int value = in.readInt();
+ checkIdState.put(key, value);
+ }
+ }
+ }
+
+ public SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeByte((byte) (inActionMode ? 1 : 0));
+ out.writeInt(checkedItemCount);
+ out.writeSparseBooleanArray(checkState);
+ final int N = checkIdState != null ? checkIdState.size() : 0;
+ out.writeInt(N);
+ for (int i = 0; i < N; i++) {
+ out.writeLong(checkIdState.keyAt(i));
+ out.writeInt(checkIdState.valueAt(i));
+ }
+ }
+ }
+
+ public static final int CHOICE_MODE_MULTIPLE = AbsListView.CHOICE_MODE_MULTIPLE;
+ public static final int CHOICE_MODE_MULTIPLE_MODAL = AbsListView.CHOICE_MODE_MULTIPLE_MODAL;
+ public static final int CHOICE_MODE_NONE = AbsListView.CHOICE_MODE_NONE;
+ public static final int CHOICE_MODE_SINGLE = AbsListView.CHOICE_MODE_SINGLE;
+ private static final boolean USE_ACTIVATED = VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB;
+ private Activity mActivity;
+ private ListAdapterWrapper mAdapter;
+ private boolean mAdapterHasStableIds;
+ private LongSparseArray<Integer> mCheckedIdStates;
+ private int mCheckedItemCount;
+ private SparseBooleanArray mCheckStates;
+ private ActionMode mChoiceActionMode;
+ private int mChoiceMode;
+ private ContextMenuInfo mContextMenuInfo;
+ private boolean mEnableModalBackgroundWrapper;
+ private boolean mFastScrollEnabled;
+ private FastScroller mFastScroller;
+ private final List<ViewInfo> mFooterViewInfos = new ArrayList<ViewInfo>(),
+ mHeaderViewInfos = new ArrayList<ViewInfo>();
+ private boolean mForceFastScrollAlwaysVisibleDisable = false;
+ private boolean mForceHeaderListAdapter = false;
+ private boolean mIsAttached;
+ private int mLastScrollState = OnScrollListener.SCROLL_STATE_IDLE;
+ private final ListAdapterCallback mListAdapterCallback = new ListAdapterCallback() {
+ @Override
+ public void onChanged() {
+ if (mFastScroller != null) {
+ mFastScroller.onSectionsChanged();
+ }
+ }
+
+ @Override
+ public void onInvalidated() {
+ if (mFastScroller != null) {
+ mFastScroller.onSectionsChanged();
+ }
+ }
+
+ @Override
+ public View onPrepareView(View view, int position) {
+ return ListView.this.onPrepareView(view, position);
+ }
+ };
+ private MultiChoiceModeWrapper mMultiChoiceModeCallback;
+ private final OnItemLongClickListenerWrapper mOnItemLongClickListenerWrapper;
+ private OnScrollListener mOnScrollListener;
+ private boolean mPaddingFromScroller = false;
+ private int mVerticalScrollbarPosition = SCROLLBAR_POSITION_DEFAULT;
+
+ public ListView(Context context) {
+ this(context, null);
+ }
+
+ public ListView(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.listViewStyle);
+ }
+
+ @SuppressLint("NewApi")
+ public ListView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ if (context instanceof Activity) {
+ setActivity((Activity) context);
+ }
+ if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
+ setOverScrollMode(OVER_SCROLL_NEVER);
+ }
+
+ mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
+ super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
+ setLongClickable(false);
+
+ if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
+ super.setFastScrollAlwaysVisible(false);
+ }
+ super.setFastScrollEnabled(false);
+ super.setChoiceMode(CHOICE_MODE_NONE);
+ TypedArray a = context.obtainStyledAttributes(attrs, new int[] {
+ android.R.attr.fastScrollEnabled,
+ android.R.attr.fastScrollAlwaysVisible,
+ android.R.attr.choiceMode,
+ android.R.attr.overScrollFooter,
+ android.R.attr.overScrollHeader
+ }, defStyle, R.style.Holo_ListView);
+ setFastScrollEnabled(a.getBoolean(0, false));
+ setFastScrollAlwaysVisible(a.getBoolean(1, false));
+ setChoiceMode(a.getInt(2, CHOICE_MODE_NONE));
+ if (!a.hasValue(3) && VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
+ super.setOverscrollFooter(null);
+ }
+ if (!a.hasValue(4) && VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
+ super.setOverscrollHeader(null);
+ }
+ a.recycle();
+ }
+
+ @Override
+ public void addFooterView(View v) {
+ addFooterView(v, null, true);
+ }
+
+ @Override
+ public void addFooterView(View v, Object data, boolean isSelectable) {
+ if (mAdapter != null && !(mAdapter instanceof HeaderViewListAdapter)) {
+ throw new IllegalStateException(
+ "Cannot add footer view to list -- setAdapter has already been called.");
+ }
+ ViewInfo info = new ViewInfo();
+ info.view = v;
+ info.data = data;
+ info.isSelectable = isSelectable;
+ mFooterViewInfos.add(info);
+ if (mAdapter != null) {
+ invalidateViews();
+ }
+ }
+
+ @Override
+ public void addHeaderView(View v) {
+ addHeaderView(v, null, true);
+ }
+
+ @Override
+ public void addHeaderView(View v, Object data, boolean isSelectable) {
+ if (mAdapter != null && !(mAdapter instanceof HeaderViewListAdapter)) {
+ throw new IllegalStateException(
+ "Cannot add header view to list -- setAdapter has already been called.");
+ }
+ ViewInfo info = new ViewInfo();
+ info.view = v;
+ info.data = data;
+ info.isSelectable = isSelectable;
+ mHeaderViewInfos.add(info);
+ if (mAdapter != null) {
+ invalidateViews();
+ }
+ }
+
+ @Override
+ public void clearChoices() {
+ if (mCheckStates != null) {
+ mCheckStates.clear();
+ }
+ if (mCheckedIdStates != null) {
+ mCheckedIdStates.clear();
+ }
+ mCheckedItemCount = 0;
+ }
+
+ protected ContextMenuInfo createContextMenuInfo(View view, int position,
+ long id) {
+ return new AdapterContextMenuInfo(view, position, id);
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ super.draw(canvas);
+ if (mFastScroller != null) {
+ final int scrollY = getScrollY();
+ if (scrollY != 0) {
+ int restoreCount = canvas.save();
+ canvas.translate(0, scrollY);
+ mFastScroller.draw(canvas);
+ canvas.restoreToCount(restoreCount);
+ } else {
+ mFastScroller.draw(canvas);
+ }
+ }
+
+ }
+
+ /**
+ * O_O This method doesn't override super method, but super class invoke it
+ * instead of android.widget.ListView.drawDivider. It's fucking magic of
+ * dalvik?
+ */
+ void drawDivider(Canvas canvas, Rect bounds, int childIndex) {
+ final Drawable divider = getDivider();
+ divider.setBounds(bounds);
+ divider.draw(canvas);
+ }
+
+ public Activity getActivity() {
+ return mActivity;
+ }
+
+ public ListAdapter getAdapterSource() {
+ return mAdapter == null ? null : mAdapter.getWrappedAdapter();
+ }
+
+ @Override
+ public int getCheckedItemCount() {
+ return mCheckedItemCount;
+ }
+
+ @Override
+ public long[] getCheckedItemIds() {
+ if (mChoiceMode == CHOICE_MODE_NONE || mCheckedIdStates == null || mAdapter == null) {
+ return new long[0];
+ }
+ final LongSparseArray<Integer> idStates = mCheckedIdStates;
+ final int count = idStates.size();
+ final long[] ids = new long[count];
+ for (int i = 0; i < count; i++) {
+ ids[i] = idStates.keyAt(i);
+ }
+ return ids;
+ }
+
+ @Override
+ public int getCheckedItemPosition() {
+ if (mChoiceMode == CHOICE_MODE_SINGLE && mCheckStates != null && mCheckStates.size() == 1) {
+ return mCheckStates.keyAt(0);
+ }
+ return INVALID_POSITION;
+ }
+
+ @Override
+ public SparseBooleanArray getCheckedItemPositions() {
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ return mCheckStates;
+ }
+ return null;
+ }
+
+ @Override
+ @Deprecated
+ public long[] getCheckItemIds() {
+ return getCheckedItemIds();
+ }
+
+ @Override
+ public int getChoiceMode() {
+ return mChoiceMode;
+ }
+
+ @Override
+ public ContextMenuInfo getContextMenuInfo() {
+ return mContextMenuInfo;
+ }
+
+ @Override
+ public int getFooterViewsCount() {
+ return mFooterViewInfos.size();
+ }
+
+ @Override
+ public int getHeaderViewsCount() {
+ return mHeaderViewInfos.size();
+ }
+
+ @Override
+ public int getVerticalScrollbarPosition() {
+ return mVerticalScrollbarPosition;
+ }
+
+ @Override
+ public int getVerticalScrollbarWidth() {
+ mForceFastScrollAlwaysVisibleDisable = true;
+ final int superWidth = super.getVerticalScrollbarWidth();
+ mForceFastScrollAlwaysVisibleDisable = false;
+ if (isFastScrollAlwaysVisible()) {
+ return Math.max(superWidth, mFastScroller.getWidth());
+ }
+ return superWidth;
+ }
+
+ void invokeOnItemScrollListener() {
+ final int mFirstPosition = getFirstVisiblePosition();
+ final int mItemCount = getCount();
+ if (mFastScroller != null) {
+ mFastScroller.onScroll(this, mFirstPosition, getChildCount(), mItemCount);
+ }
+ if (mOnScrollListener != null) {
+ mOnScrollListener.onScroll(this, mFirstPosition, getChildCount(), mItemCount);
+ }
+ onScrollChanged(0, 0, 0, 0);
+ }
+
+ public boolean isAttached() {
+ return mIsAttached;
+ }
+
+ @Override
+ public boolean isFastScrollAlwaysVisible() {
+ if (mForceFastScrollAlwaysVisibleDisable) {
+ return false;
+ }
+ return mFastScrollEnabled && mFastScroller.isAlwaysShowEnabled();
+ }
+
+ @Override
+ @ExportedProperty
+ public boolean isFastScrollEnabled() {
+ return mFastScrollEnabled;
+ }
+
+ public boolean isForceHeaderListAdapter() {
+ return mForceHeaderListAdapter;
+ }
+
+ public boolean isInScrollingContainer() {
+ ViewParent p = getParent();
+ while (p != null && p instanceof ViewGroup) {
+ if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH
+ && ((ViewGroup) p).shouldDelayChildPressedState()) {
+ return true;
+ }
+ p = p.getParent();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isItemChecked(int position) {
+ if (mChoiceMode != CHOICE_MODE_NONE && mCheckStates != null) {
+ return mCheckStates.get(position);
+ }
+ return false;
+ }
+
+ public boolean isPaddingFromScroller() {
+ return mPaddingFromScroller;
+ }
+
+ protected boolean isVerticalScrollBarHidden() {
+ return mFastScroller != null && mFastScroller.isVisible();
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mIsAttached = true;
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mIsAttached = false;
+ }
+
+ @Override
+ protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
+ super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
+ if (gainFocus && getSelectedItemPosition() < 0 && !isInTouchMode()) {
+ if (!mIsAttached && mAdapter != null) {
+ updateOnScreenCheckedViews();
+ }
+ }
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ if (!mIsAttached) {
+ return false;
+ }
+ if (mFastScroller != null && mFastScroller.onInterceptTouchEvent(ev)) {
+ return true;
+ }
+ return super.onInterceptTouchEvent(ev);
+ }
+
+ @Override
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ case KeyEvent.KEYCODE_ENTER:
+ if (!isEnabled()) {
+ return true;
+ }
+ if (isClickable() && isPressed() &&
+ getSelectedItemPosition() >= 0 && mAdapter != null &&
+ getSelectedItemPosition() < mAdapter.getCount()) {
+ final View view = getChildAt(getSelectedItemPosition()
+ - getFirstVisiblePosition());
+ if (view != null) {
+ performItemClick(view, getSelectedItemPosition(), getSelectedItemId());
+ view.setPressed(false);
+ }
+ setPressed(false);
+ return true;
+ }
+ break;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ final int mOldItemCount = getCount();
+ super.onLayout(changed, l, t, r, b);
+ final int mItemCount = getCount();
+ if (mFastScroller != null && mItemCount != mOldItemCount) {
+ mFastScroller.onItemCountChanged(mOldItemCount, mItemCount);
+ }
+ }
+
+ public View onPrepareView(View view, int position) {
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ if (mCheckStates != null) {
+ setStateOnView(view, mCheckStates.get(position));
+ } else {
+ setStateOnView(view, false);
+ }
+ }
+ return view;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ if (ss.checkState != null) {
+ mCheckStates = ss.checkState;
+ }
+ if (ss.checkIdState != null) {
+ mCheckedIdStates = ss.checkIdState;
+ }
+ mCheckedItemCount = ss.checkedItemCount;
+ if (ss.inActionMode && mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL
+ && mMultiChoiceModeCallback != null) {
+ mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
+ }
+ requestLayout();
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ SavedState ss = new SavedState(super.onSaveInstanceState());
+ ss.inActionMode = mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null;
+ ss.checkState = mCheckStates;
+ ss.checkIdState = mCheckedIdStates;
+ ss.checkedItemCount = mCheckedItemCount;
+ return ss;
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ if (mFastScroller != null) {
+ mFastScroller.onSizeChanged(w, h, oldw, oldh);
+ }
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ if (!isEnabled()) {
+ return isClickable() || isLongClickable();
+ }
+ if (!mIsAttached) {
+ return false;
+ }
+ if (mFastScroller != null && mFastScroller.onTouchEvent(ev)) {
+ return true;
+ }
+ return super.onTouchEvent(ev);
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
+ super.onWindowFocusChanged(hasWindowFocus);
+ if (hasWindowFocus) {
+ updateOnScreenCheckedViews();
+ }
+ }
+
+ @Override
+ public boolean performItemClick(View view, int position, long id) {
+ boolean handled = false;
+ boolean dispatchItemClick = true;
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ handled = true;
+ boolean checkedStateChanged = false;
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE ||
+ mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null) {
+ boolean newValue = !mCheckStates.get(position, false);
+ mCheckStates.put(position, newValue);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ if (newValue) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ } else {
+ mCheckedIdStates.delete(mAdapter.getItemId(position));
+ }
+ }
+ if (newValue) {
+ mCheckedItemCount++;
+ } else {
+ mCheckedItemCount--;
+ }
+ if (mChoiceActionMode != null) {
+ mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode,
+ position, id, newValue);
+ dispatchItemClick = false;
+ }
+ checkedStateChanged = true;
+ } else if (mChoiceMode == CHOICE_MODE_SINGLE) {
+ boolean newValue = !mCheckStates.get(position, false);
+ if (newValue) {
+ mCheckStates.clear();
+ mCheckStates.put(position, true);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ mCheckedIdStates.clear();
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ }
+ mCheckedItemCount = 1;
+ } else if (mCheckStates.size() == 0 || !mCheckStates.valueAt(0)) {
+ mCheckedItemCount = 0;
+ }
+ checkedStateChanged = true;
+ }
+ if (checkedStateChanged) {
+ updateOnScreenCheckedViews();
+ }
+ }
+ if (dispatchItemClick) {
+ handled |= super.performItemClick(view, position, id);
+ }
+ return handled;
+ }
+
+ public boolean performItemLongClick(final View child,
+ final int longPressPosition, final long longPressId) {
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ if (mChoiceActionMode == null &&
+ (mChoiceActionMode = startActionMode(mMultiChoiceModeCallback)) != null) {
+ setItemChecked(longPressPosition, true);
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ }
+ return true;
+ }
+ boolean handled = false;
+ if (mOnItemLongClickListenerWrapper.wrapped != null) {
+ handled = mOnItemLongClickListenerWrapper.wrapped.onItemLongClick(ListView.this, child,
+ longPressPosition, longPressId);
+ }
+ if (!handled) {
+ mContextMenuInfo = createContextMenuInfo(child, longPressPosition, longPressId);
+ handled = super.showContextMenuForChild(ListView.this);
+ }
+ if (handled) {
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ }
+ return handled;
+ }
+
+ protected void recomputePaddingFromScroller() {
+ final int left = getPaddingLeft();
+ final int top = getPaddingTop();
+ final int right = getPaddingRight();
+ final int bottom = getPaddingBottom();
+ if (mPaddingFromScroller) {
+ final int scrollbarWidth = getVerticalScrollbarWidth();
+ switch (mVerticalScrollbarPosition) {
+ case SCROLLBAR_POSITION_LEFT:
+ setPadding(scrollbarWidth, top, right, bottom);
+ break;
+ case SCROLLBAR_POSITION_RIGHT:
+ case SCROLLBAR_POSITION_DEFAULT:
+ default:
+ setPadding(left, top, scrollbarWidth, bottom);
+ break;
+ }
+ } else {
+ setPadding(0, top, 0, bottom);
+ }
+ }
+
+ @Override
+ public boolean removeFooterView(View v) {
+ if (mFooterViewInfos.size() > 0) {
+ boolean result = false;
+ if (mAdapter != null && ((HeaderViewListAdapter) mAdapter).removeFooter(v)) {
+ invalidateViews();
+ result = true;
+ }
+ removeViewInfo(v, mFooterViewInfos);
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean removeHeaderView(View v) {
+ if (mHeaderViewInfos.size() > 0) {
+ boolean result = false;
+ if (mAdapter != null && ((HeaderViewListAdapter) mAdapter).removeHeader(v)) {
+ invalidateViews();
+ result = true;
+ }
+ removeViewInfo(v, mHeaderViewInfos);
+ return result;
+ }
+ return false;
+ }
+
+ private void removeViewInfo(View v, List<ViewInfo> where) {
+ int len = where.size();
+ for (int i = 0; i < len; ++i) {
+ ViewInfo info = where.get(i);
+ if (info.view == v) {
+ where.remove(i);
+ break;
+ }
+ }
+ }
+
+ protected void reportScrollStateChange(int newState) {
+ if (newState != mLastScrollState) {
+ if (mOnScrollListener != null) {
+ mLastScrollState = newState;
+ mOnScrollListener.onScrollStateChanged(this, newState);
+ }
+ }
+ }
+
+ public final void setActivity(Activity activity) {
+ mActivity = activity;
+ if (mActivity != null) {
+ mActivity.addOnWindowFocusChangeListener(this);
+ }
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ if (adapter == null) {
+ mAdapter = null;
+ } else if (mForceHeaderListAdapter || mHeaderViewInfos.size() > 0
+ || mFooterViewInfos.size() > 0) {
+ mAdapter = new HeaderViewListAdapter(mHeaderViewInfos, mFooterViewInfos, adapter,
+ mListAdapterCallback);
+ } else {
+ mAdapter = new ListAdapterWrapper(adapter, mListAdapterCallback);
+ }
+ if (mAdapter != null) {
+ mAdapterHasStableIds = mAdapter.hasStableIds();
+ if (mChoiceMode != CHOICE_MODE_NONE && mAdapterHasStableIds &&
+ mCheckedIdStates == null) {
+ mCheckedIdStates = new LongSparseArray<Integer>();
+ }
+ }
+ if (mCheckStates != null) {
+ mCheckStates.clear();
+ }
+ if (mCheckedIdStates != null) {
+ mCheckedIdStates.clear();
+ }
+ super.setAdapter(mAdapter);
+ }
+
+ @Override
+ public void setChoiceMode(int choiceMode) {
+ mChoiceMode = choiceMode;
+ if (mChoiceActionMode != null) {
+ mChoiceActionMode.finish();
+ mChoiceActionMode = null;
+ }
+ if (mChoiceMode != CHOICE_MODE_NONE) {
+ if (mCheckStates == null) {
+ mCheckStates = new SparseBooleanArray();
+ }
+ if (mCheckedIdStates == null && mAdapter != null && mAdapter.hasStableIds()) {
+ mCheckedIdStates = new LongSparseArray<Integer>();
+ }
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ clearChoices();
+ setLongClickable(true);
+ setEnableModalBackgroundWrapper(true);
+ }
+ }
+ }
+
+ public void setEnableModalBackgroundWrapper(boolean enableModalBackgroundWrapper) {
+ if (enableModalBackgroundWrapper == mEnableModalBackgroundWrapper) {
+ return;
+ }
+ mEnableModalBackgroundWrapper = enableModalBackgroundWrapper;
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+ @Override
+ public void setFastScrollAlwaysVisible(boolean alwaysShow) {
+ if (alwaysShow && !mFastScrollEnabled) {
+ setFastScrollEnabled(true);
+ }
+ if (mFastScroller != null) {
+ mFastScroller.setAlwaysShow(alwaysShow);
+ }
+ try {
+ Method method = View.class.getDeclaredMethod("computeOpaqueFlags");
+ method.setAccessible(true);
+ method.invoke(this);
+ method = View.class.getDeclaredMethod("recomputePadding");
+ method.setAccessible(true);
+ method.invoke(this);
+ } catch (Exception e) {
+ }
+ if (alwaysShow) {
+ setPaddingFromScroller(true);
+ }
+ }
+
+ @Override
+ public void setFastScrollEnabled(boolean enabled) {
+ mFastScrollEnabled = enabled;
+ if (enabled) {
+ if (mFastScroller == null) {
+ mFastScroller = new FastScroller(getContext(), this);
+ }
+ } else {
+ if (mFastScroller != null) {
+ mFastScroller.stop();
+ mFastScroller = null;
+ }
+ }
+ }
+
+ public void setForceHeaderListAdapter(boolean forceHeaderListAdapter) {
+ mForceHeaderListAdapter = forceHeaderListAdapter;
+ }
+
+ @Override
+ public void setItemChecked(int position, boolean value) {
+ if (mChoiceMode == CHOICE_MODE_NONE) {
+ return;
+ }
+ if (value && mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode == null) {
+ mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
+ }
+ if (mChoiceMode == CHOICE_MODE_MULTIPLE || mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
+ boolean oldValue = mCheckStates.get(position);
+ mCheckStates.put(position, value);
+ if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
+ if (value) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ } else {
+ mCheckedIdStates.delete(mAdapter.getItemId(position));
+ }
+ }
+ if (oldValue != value) {
+ if (value) {
+ mCheckedItemCount++;
+ } else {
+ mCheckedItemCount--;
+ }
+ }
+ if (mChoiceActionMode != null) {
+ final long id = mAdapter.getItemId(position);
+ mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode,
+ position, id, value);
+ }
+ } else {
+ boolean updateIds = mCheckedIdStates != null && mAdapter.hasStableIds();
+ if (value || isItemChecked(position)) {
+ mCheckStates.clear();
+ if (updateIds) {
+ mCheckedIdStates.clear();
+ }
+ }
+ if (value) {
+ mCheckStates.put(position, true);
+ if (updateIds) {
+ mCheckedIdStates.put(mAdapter.getItemId(position), position);
+ }
+ mCheckedItemCount = 1;
+ } else if (mCheckStates.size() == 0 || !mCheckStates.valueAt(0)) {
+ mCheckedItemCount = 0;
+ }
+ }
+ updateOnScreenCheckedViews();
+ }
+
+ public void setMultiChoiceModeListener(MultiChoiceModeListener listener) {
+ if (mMultiChoiceModeCallback == null) {
+ mMultiChoiceModeCallback = new MultiChoiceModeWrapper();
+ }
+ mMultiChoiceModeCallback.setWrapped(listener);
+ }
+
+ @Override
+ public void setOnItemLongClickListener(OnItemLongClickListener listener) {
+ mOnItemLongClickListenerWrapper.setWrapped(listener);
+ }
+
+ @Override
+ public void setOnScrollListener(OnScrollListener l) {
+ super.setOnScrollListener(mOnScrollListener = l);
+ }
+
+ public void setPaddingFromScroller(boolean paddingFromScroller) {
+ mPaddingFromScroller = paddingFromScroller;
+ recomputePaddingFromScroller();
+ }
+
+ @Override
+ public void setSelectionAfterHeaderView() {
+ setSelection(mHeaderViewInfos.size());
+ }
+
+ @Override
+ public void setSelector(int resID) {
+ setSelector(DrawableCompat.getDrawable(getResources(), resID));
+ }
+
+ protected final void setStateOnView(View child, boolean value) {
+ if (child instanceof Checkable) {
+ ((Checkable) child).setChecked(value);
+ } else if (USE_ACTIVATED) {
+ child.setActivated(value);
+ }
+ }
+
+ @Override
+ public void setVerticalScrollbarPosition(int position) {
+ mVerticalScrollbarPosition = position;
+ if (mFastScroller != null) {
+ mFastScroller.setScrollbarPosition(position);
+ }
+ recomputePaddingFromScroller();
+ }
+
+ @Override
+ public boolean showContextMenuForChild(View originalView) {
+ final int longPressPosition = getPositionForView(originalView);
+ if (longPressPosition >= 0) {
+ final long longPressId = mAdapter.getItemId(longPressPosition);
+ boolean handled = false;
+ if (mOnItemLongClickListenerWrapper.wrapped != null) {
+ handled = mOnItemLongClickListenerWrapper.wrapped.onItemLongClick(ListView.this,
+ originalView, longPressPosition, longPressId);
+ }
+ if (!handled) {
+ mContextMenuInfo = createContextMenuInfo(getChildAt(longPressPosition
+ - getFirstVisiblePosition()), longPressPosition, longPressId);
+ handled = super.showContextMenuForChild(originalView);
+ }
+ return handled;
+ }
+ return false;
+ }
+
+ public ActionMode startActionMode(ActionMode.Callback callback) {
+ if (mActivity != null) {
+ return mActivity.startActionMode(callback);
+ }
+ throw new RuntimeException("HoloEverywhere.ListView (" + this
+ + ") don't have reference on Activity");
+ }
+
+ private void updateOnScreenCheckedViews() {
+ if (mCheckStates == null) {
+ return;
+ }
+ final int firstPos = getFirstVisiblePosition();
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ final View child = getChildAt(i);
+ final int position = firstPos + i;
+ final boolean value = mCheckStates.get(position);
+ setStateOnView(child, value);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/MultiAutoCompleteTextView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/MultiAutoCompleteTextView.java
new file mode 100644
index 0000000000..39800cf444
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/MultiAutoCompleteTextView.java
@@ -0,0 +1,179 @@
+
+package org.holoeverywhere.widget;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.text.Editable;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.method.QwertyKeyListener;
+import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.Filter;
+
+public class MultiAutoCompleteTextView extends AutoCompleteTextView {
+ public static class CommaTokenizer implements Tokenizer {
+ @Override
+ public int findTokenEnd(CharSequence text, int cursor) {
+ int i = cursor;
+ int len = text.length();
+ while (i < len) {
+ if (text.charAt(i) == ',') {
+ return i;
+ } else {
+ i++;
+ }
+ }
+ return len;
+ }
+
+ @Override
+ public int findTokenStart(CharSequence text, int cursor) {
+ int i = cursor;
+ while (i > 0 && text.charAt(i - 1) != ',') {
+ i--;
+ }
+ while (i < cursor && text.charAt(i) == ' ') {
+ i++;
+ }
+ return i;
+ }
+
+ @Override
+ public CharSequence terminateToken(CharSequence text) {
+ int i = text.length();
+ while (i > 0 && text.charAt(i - 1) == ' ') {
+ i--;
+ }
+ if (i > 0 && text.charAt(i - 1) == ',') {
+ return text;
+ } else {
+ if (text instanceof Spanned) {
+ SpannableString sp = new SpannableString(text + ", ");
+ TextUtils.copySpansFrom((Spanned) text, 0, text.length(),
+ Object.class, sp, 0);
+ return sp;
+ } else {
+ return text + ", ";
+ }
+ }
+ }
+ }
+
+ public static interface Tokenizer {
+ public int findTokenEnd(CharSequence text, int cursor);
+
+ public int findTokenStart(CharSequence text, int cursor);
+
+ public CharSequence terminateToken(CharSequence text);
+ }
+
+ private Tokenizer mTokenizer;
+
+ public MultiAutoCompleteTextView(Context context) {
+ super(context);
+ }
+
+ public MultiAutoCompleteTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public MultiAutoCompleteTextView(Context context, AttributeSet attrs,
+ int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ public boolean enoughToFilter() {
+ Editable text = getText();
+ int end = getSelectionEnd();
+ if (end < 0 || mTokenizer == null) {
+ return false;
+ }
+ int start = mTokenizer.findTokenStart(text, end);
+ if (end - start >= getThreshold()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(MultiAutoCompleteTextView.class.getName());
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(MultiAutoCompleteTextView.class.getName());
+ }
+
+ @Override
+ protected void onLoadEntries(CharSequence[] entries) {
+ super.onLoadEntries(entries);
+ if (mTokenizer == null) {
+ setTokenizer(new CommaTokenizer());
+ }
+ }
+
+ @Override
+ protected void performFiltering(CharSequence text, int keyCode) {
+ if (enoughToFilter()) {
+ int end = getSelectionEnd();
+ int start = mTokenizer.findTokenStart(text, end);
+ performFiltering(text, start, end, keyCode);
+ } else {
+ dismissDropDown();
+ Filter f = getFilter();
+ if (f != null) {
+ f.filter(null);
+ }
+ }
+ }
+
+ protected void performFiltering(CharSequence text, int start, int end,
+ int keyCode) {
+ getFilter().filter(text.subSequence(start, end), this);
+ }
+
+ @Override
+ public void performValidation() {
+ Validator v = getValidator();
+ if (v == null || mTokenizer == null) {
+ return;
+ }
+ Editable e = getText();
+ int i = getText().length();
+ while (i > 0) {
+ int start = mTokenizer.findTokenStart(e, i);
+ int end = mTokenizer.findTokenEnd(e, start);
+ CharSequence sub = e.subSequence(start, end);
+ if (TextUtils.isEmpty(sub)) {
+ e.replace(start, i, "");
+ } else if (!v.isValid(sub)) {
+ e.replace(start, i, mTokenizer.terminateToken(v.fixText(sub)));
+ }
+ i = start;
+ }
+ }
+
+ @Override
+ protected void replaceText(CharSequence text) {
+ clearComposingText();
+ int end = getSelectionEnd();
+ int start = mTokenizer.findTokenStart(getText(), end);
+ Editable editable = getText();
+ String original = TextUtils.substring(editable, start, end);
+ QwertyKeyListener.markAsReplaced(editable, start, end, original);
+ editable.replace(start, end, mTokenizer.terminateToken(text));
+ }
+
+ public void setTokenizer(Tokenizer t) {
+ mTokenizer = t;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/NumberPicker.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/NumberPicker.java
new file mode 100644
index 0000000000..69e846c16b
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/NumberPicker.java
@@ -0,0 +1,1388 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.NumberPickerEditText;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Paint.Align;
+import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.text.InputFilter;
+import android.text.InputType;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.method.NumberKeyListener;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.util.TypedValue;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.VelocityTracker;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.animation.DecelerateInterpolator;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.ImageButton;
+
+public class NumberPicker extends LinearLayout {
+ class BeginSoftInputOnLongPressCommand implements Runnable {
+ @Override
+ public void run() {
+ showSoftInput();
+ mIngonreMoveEvents = true;
+ }
+ }
+
+ class ChangeCurrentByOneFromLongPressCommand implements Runnable {
+ private boolean mIncrement;
+
+ @Override
+ public void run() {
+ changeValueByOne(mIncrement);
+ postDelayed(this, mLongPressUpdateInterval);
+ }
+
+ private void setStep(boolean increment) {
+ mIncrement = increment;
+ }
+ }
+
+ public interface Formatter {
+ public String format(int value);
+ }
+
+ class InputTextFilter extends NumberKeyListener {
+ @Override
+ public CharSequence filter(CharSequence source, int start, int end,
+ Spanned dest, int dstart, int dend) {
+ if (mDisplayedValues == null) {
+ CharSequence filtered = super.filter(source, start, end, dest,
+ dstart, dend);
+ if (filtered == null) {
+ filtered = source.subSequence(start, end);
+ }
+ String result = String.valueOf(dest.subSequence(0, dstart))
+ + filtered + dest.subSequence(dend, dest.length());
+
+ if ("".equals(result)) {
+ return result;
+ }
+ int val = getSelectedPos(result);
+ if (val > mMaxValue) {
+ return "";
+ } else {
+ return filtered;
+ }
+ } else {
+ CharSequence filtered = String.valueOf(source.subSequence(
+ start, end));
+ if (TextUtils.isEmpty(filtered)) {
+ return "";
+ }
+ String result = String.valueOf(dest.subSequence(0, dstart))
+ + filtered + dest.subSequence(dend, dest.length());
+ String str = String.valueOf(result).toLowerCase();
+ for (String val : mDisplayedValues) {
+ String valLowerCase = val.toLowerCase();
+ if (valLowerCase.startsWith(str)) {
+ postSetSelectionCommand(result.length(), val.length());
+ return val.subSequence(dstart, val.length());
+ }
+ }
+ return "";
+ }
+ }
+
+ @Override
+ protected char[] getAcceptedChars() {
+ return NumberPicker.DIGIT_CHARACTERS;
+ }
+
+ @Override
+ public int getInputType() {
+ return InputType.TYPE_CLASS_TEXT;
+ }
+ }
+
+ public interface OnScrollListener {
+ public static int SCROLL_STATE_FLING = 2;
+ public static int SCROLL_STATE_IDLE = 0;
+ public static int SCROLL_STATE_TOUCH_SCROLL = 1;
+
+ public void onScrollStateChange(NumberPicker view, int scrollState);
+ }
+
+ public interface OnValueChangeListener {
+ void onValueChange(NumberPicker picker, int oldVal, int newVal);
+ }
+
+ class PressedStateHelper implements Runnable {
+ public static final int BUTTON_DECREMENT = 2;
+ public static final int BUTTON_INCREMENT = 1;
+ private static final int MODE_PRESS = 1;
+ private static final int MODE_TAPPED = 2;
+ private int mManagedButton;
+ private int mMode;
+
+ public void buttonPressDelayed(int button) {
+ cancel();
+ mMode = MODE_PRESS;
+ mManagedButton = button;
+ postDelayed(this, ViewConfiguration.getTapTimeout());
+ }
+
+ public void buttonTapped(int button) {
+ cancel();
+ mMode = MODE_TAPPED;
+ mManagedButton = button;
+ post(this);
+ }
+
+ public void cancel() {
+ mMode = 0;
+ mManagedButton = 0;
+ removeCallbacks(this);
+ if (mIncrementVirtualButtonPressed) {
+ mIncrementVirtualButtonPressed = false;
+ invalidate(0, mBottomSelectionDividerBottom, getRight(),
+ getBottom());
+ }
+ mDecrementVirtualButtonPressed = false;
+ if (mDecrementVirtualButtonPressed) {
+ invalidate(0, 0, getRight(), mTopSelectionDividerTop);
+ }
+ }
+
+ @Override
+ public void run() {
+ switch (mMode) {
+ case MODE_PRESS: {
+ switch (mManagedButton) {
+ case BUTTON_INCREMENT: {
+ mIncrementVirtualButtonPressed = true;
+ invalidate(0, mBottomSelectionDividerBottom, getRight(),
+ getBottom());
+ }
+ break;
+ case BUTTON_DECREMENT: {
+ mDecrementVirtualButtonPressed = true;
+ invalidate(0, 0, getRight(), mTopSelectionDividerTop);
+ }
+ }
+ }
+ break;
+ case MODE_TAPPED: {
+ switch (mManagedButton) {
+ case BUTTON_INCREMENT: {
+ if (!mIncrementVirtualButtonPressed) {
+ postDelayed(this,
+ ViewConfiguration.getPressedStateDuration());
+ }
+ mIncrementVirtualButtonPressed ^= true;
+ invalidate(0, mBottomSelectionDividerBottom, getRight(),
+ getBottom());
+ }
+ break;
+ case BUTTON_DECREMENT: {
+ if (!mDecrementVirtualButtonPressed) {
+ postDelayed(this,
+ ViewConfiguration.getPressedStateDuration());
+ }
+ mDecrementVirtualButtonPressed ^= true;
+ invalidate(0, 0, getRight(), mTopSelectionDividerTop);
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ class SetSelectionCommand implements Runnable {
+ private int mSelectionEnd;
+
+ private int mSelectionStart;
+
+ @Override
+ public void run() {
+ mInputText.setSelection(mSelectionStart, mSelectionEnd);
+ }
+ }
+
+ private static final int DEFAULT_LAYOUT_RESOURCE_ID = R.layout.number_picker_with_selector_wheel;
+ private static final long DEFAULT_LONG_PRESS_UPDATE_INTERVAL = 300;
+ private static final char[] DIGIT_CHARACTERS = new char[] {
+ '0', '1', '2',
+ '3', '4', '5', '6', '7', '8', '9'
+ };
+ public static final int FOCUSABLES_ACCESSIBILITY = 0x00000002;
+ private static final int SELECTOR_ADJUSTMENT_DURATION_MILLIS = 800;
+ private static final int SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT = 8;
+ private static final int SELECTOR_WHEEL_ITEM_COUNT = 3;
+ private static final int SELECTOR_WHELL_MIDDLE_ITEM_INDEX = NumberPicker.SELECTOR_WHEEL_ITEM_COUNT / 2;
+ private static final int SIZE_UNSPECIFIED = -1;
+ private static final int SNAP_SCROLL_DURATION = 300;
+ private static final float TOP_AND_BOTTOM_FADING_EDGE_STRENGTH = 0.9f;
+ public static final NumberPicker.Formatter TWO_DIGIT_FORMATTER = new NumberPicker.Formatter() {
+ final Object[] mArgs = new Object[1];
+
+ final StringBuilder mBuilder = new StringBuilder();
+
+ final java.util.Formatter mFmt = new java.util.Formatter(mBuilder,
+ java.util.Locale.US);
+
+ @Override
+ public String format(int value) {
+ mArgs[0] = value;
+ mBuilder.delete(0, mBuilder.length());
+ mFmt.format("%02d", mArgs);
+ return mFmt.toString();
+ }
+ };
+ private static final int UNSCALED_DEFAULT_SELECTION_DIVIDER_HEIGHT = 2;
+ private static final int UNSCALED_DEFAULT_SELECTION_DIVIDERS_DISTANCE = 48;
+ private final Scroller mAdjustScroller;
+ private BeginSoftInputOnLongPressCommand mBeginSoftInputOnLongPressCommand;
+ private int mBottomSelectionDividerBottom;
+ private ChangeCurrentByOneFromLongPressCommand mChangeCurrentByOneFromLongPressCommand;
+ private final boolean mComputeMaxWidth;
+ private int mCurrentScrollOffset;
+ private final ImageButton mDecrementButton;
+ private boolean mDecrementVirtualButtonPressed;
+ private String[] mDisplayedValues;
+ private final Scroller mFlingScroller;
+ private Formatter mFormatter;
+ private final boolean mHasSelectorWheel;
+ private final ImageButton mIncrementButton;
+ private boolean mIncrementVirtualButtonPressed;
+ private boolean mIngonreMoveEvents;
+ private int mInitialScrollOffset = Integer.MIN_VALUE;
+ private final NumberPickerEditText mInputText;
+ private long mLastDownEventTime;
+ private float mLastDownEventY;
+ private float mLastDownOrMoveEventY;
+ private long mLongPressUpdateInterval = NumberPicker.DEFAULT_LONG_PRESS_UPDATE_INTERVAL;
+ private final int mMaxHeight;
+ private int mMaximumFlingVelocity;
+ private int mMaxValue;
+ private int mMaxWidth;
+ private final int mMinHeight;
+ private int mMinimumFlingVelocity;
+ private int mMinValue;
+ private final int mMinWidth;
+ private OnScrollListener mOnScrollListener;
+ private OnValueChangeListener mOnValueChangeListener;
+ private final PressedStateHelper mPressedStateHelper;
+ private int mPreviousScrollerY;
+ private int mScrollState = OnScrollListener.SCROLL_STATE_IDLE;
+ private final Drawable mSelectionDivider;
+ private final int mSelectionDividerHeight;
+ private final int mSelectionDividersDistance;
+ private int mSelectorElementHeight;
+ private final SparseArray<String> mSelectorIndexToStringCache = new SparseArray<String>();
+ private final int[] mSelectorIndices = new int[NumberPicker.SELECTOR_WHEEL_ITEM_COUNT];
+ private int mSelectorTextGapHeight;
+ private final Paint mSelectorWheelPaint;
+ private SetSelectionCommand mSetSelectionCommand;
+ private boolean mShowSoftInputOnTap;
+ private final int mSolidColor;
+ private final int mTextSize;
+ private int mTopSelectionDividerTop;
+ private int mTouchSlop;
+ private int mValue;
+ private VelocityTracker mVelocityTracker;
+ private final Drawable mVirtualButtonPressedDrawable;
+ private boolean mWrapSelectorWheel;
+
+ public NumberPicker(Context context) {
+ this(context, null);
+ }
+
+ public NumberPicker(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.numberPickerStyle);
+ }
+
+ @SuppressLint("NewApi")
+ public NumberPicker(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray attributesArray = context.obtainStyledAttributes(attrs,
+ R.styleable.NumberPicker, defStyle, R.style.Holo_NumberPicker);
+ final int layoutResId = attributesArray.getResourceId(
+ R.styleable.NumberPicker_android_layout,
+ NumberPicker.DEFAULT_LAYOUT_RESOURCE_ID);
+ mHasSelectorWheel = layoutResId == NumberPicker.DEFAULT_LAYOUT_RESOURCE_ID;
+ mSolidColor = attributesArray.getColor(
+ R.styleable.NumberPicker_solidColor, 0);
+ mSelectionDivider = attributesArray
+ .getDrawable(R.styleable.NumberPicker_selectionDivider);
+ final int defSelectionDividerHeight = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ NumberPicker.UNSCALED_DEFAULT_SELECTION_DIVIDER_HEIGHT,
+ getResources().getDisplayMetrics());
+ mSelectionDividerHeight = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_selectionDividerHeight,
+ defSelectionDividerHeight);
+ final int defSelectionDividerDistance = (int) TypedValue
+ .applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP,
+ NumberPicker.UNSCALED_DEFAULT_SELECTION_DIVIDERS_DISTANCE,
+ getResources().getDisplayMetrics());
+ mSelectionDividersDistance = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_selectionDividersDistance,
+ defSelectionDividerDistance);
+ mMinHeight = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_android_minHeight,
+ NumberPicker.SIZE_UNSPECIFIED);
+ mMaxHeight = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_android_maxHeight,
+ NumberPicker.SIZE_UNSPECIFIED);
+ if (mMinHeight != NumberPicker.SIZE_UNSPECIFIED
+ && mMaxHeight != NumberPicker.SIZE_UNSPECIFIED
+ && mMinHeight > mMaxHeight) {
+ throw new IllegalArgumentException("minHeight > maxHeight");
+ }
+ mMinWidth = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_android_minWidth,
+ NumberPicker.SIZE_UNSPECIFIED);
+ mMaxWidth = attributesArray.getDimensionPixelSize(
+ R.styleable.NumberPicker_android_maxWidth,
+ NumberPicker.SIZE_UNSPECIFIED);
+ if (mMinWidth != NumberPicker.SIZE_UNSPECIFIED
+ && mMaxWidth != NumberPicker.SIZE_UNSPECIFIED
+ && mMinWidth > mMaxWidth) {
+ throw new IllegalArgumentException("minWidth > maxWidth");
+ }
+ mComputeMaxWidth = mMaxWidth == NumberPicker.SIZE_UNSPECIFIED;
+ mVirtualButtonPressedDrawable = attributesArray
+ .getDrawable(R.styleable.NumberPicker_virtualButtonPressedDrawable);
+ attributesArray.recycle();
+ mPressedStateHelper = new PressedStateHelper();
+ setWillNotDraw(!mHasSelectorWheel);
+ LayoutInflater.inflate(context, layoutResId, this, true);
+ OnClickListener onClickListener = new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ hideSoftInput();
+ mInputText.clearFocus();
+ if (v.getId() == R.id.increment) {
+ changeValueByOne(true);
+ } else {
+ changeValueByOne(false);
+ }
+ }
+ };
+ OnLongClickListener onLongClickListener = new OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ hideSoftInput();
+ mInputText.clearFocus();
+ if (v.getId() == R.id.increment) {
+ postChangeCurrentByOneFromLongPress(true, 0);
+ } else {
+ postChangeCurrentByOneFromLongPress(false, 0);
+ }
+ return true;
+ }
+ };
+ if (!mHasSelectorWheel) {
+ mIncrementButton = (ImageButton) findViewById(R.id.increment);
+ if (mIncrementButton != null) {
+ mIncrementButton.setOnClickListener(onClickListener);
+ mIncrementButton.setOnLongClickListener(onLongClickListener);
+ }
+ } else {
+ mIncrementButton = null;
+ }
+ if (!mHasSelectorWheel) {
+ mDecrementButton = (ImageButton) findViewById(R.id.decrement);
+ if (mDecrementButton != null) {
+ mDecrementButton.setOnClickListener(onClickListener);
+ mDecrementButton.setOnLongClickListener(onLongClickListener);
+ }
+ } else {
+ mDecrementButton = null;
+ }
+ mInputText = (NumberPickerEditText) findViewById(R.id.numberpicker_input);
+ mInputText.setOnFocusChangeListener(new OnFocusChangeListener() {
+ @Override
+ public void onFocusChange(View v, boolean hasFocus) {
+ if (hasFocus) {
+ mInputText.selectAll();
+ } else {
+ mInputText.setSelection(0, 0);
+ validateInputTextView(mInputText);
+ }
+ }
+ });
+ mInputText.setFilters(new InputFilter[] {
+ new InputTextFilter()
+ });
+ mInputText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
+ mInputText.setImeOptions(EditorInfo.IME_ACTION_DONE);
+ ViewConfiguration configuration = ViewConfiguration.get(context);
+ mTouchSlop = configuration.getScaledTouchSlop();
+ mMinimumFlingVelocity = configuration.getScaledMinimumFlingVelocity();
+ mMaximumFlingVelocity = configuration.getScaledMaximumFlingVelocity()
+ / NumberPicker.SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT;
+ mTextSize = (int) mInputText.getTextSize();
+ Paint paint = new Paint();
+ paint.setAntiAlias(true);
+ paint.setTextAlign(Align.CENTER);
+ paint.setTextSize(mTextSize);
+ paint.setTypeface(mInputText.getTypeface());
+ ColorStateList colors = mInputText.getTextColors();
+ int color = colors
+ .getColorForState(View.ENABLED_STATE_SET, Color.WHITE);
+ paint.setColor(color);
+ mSelectorWheelPaint = paint;
+ mFlingScroller = new Scroller(getContext(), null, true);
+ mAdjustScroller = new Scroller(getContext(),
+ new DecelerateInterpolator(2.5f));
+ updateInputTextView();
+ if (VERSION.SDK_INT >= 16
+ && getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+ setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+ }
+ }
+
+ @Override
+ public void addFocusables(ArrayList<View> views, int direction,
+ int focusableMode) {
+ if ((focusableMode & NumberPicker.FOCUSABLES_ACCESSIBILITY) == NumberPicker.FOCUSABLES_ACCESSIBILITY) {
+ views.add(this);
+ return;
+ }
+ super.addFocusables(views, direction, focusableMode);
+ }
+
+ private void changeValueByOne(boolean increment) {
+ if (mHasSelectorWheel) {
+ mInputText.setVisibility(View.INVISIBLE);
+ if (!moveToFinalScrollerPosition(mFlingScroller)) {
+ moveToFinalScrollerPosition(mAdjustScroller);
+ }
+ mPreviousScrollerY = 0;
+ if (increment) {
+ mFlingScroller.startScroll(0, 0, 0, -mSelectorElementHeight,
+ NumberPicker.SNAP_SCROLL_DURATION);
+ } else {
+ mFlingScroller.startScroll(0, 0, 0, mSelectorElementHeight,
+ NumberPicker.SNAP_SCROLL_DURATION);
+ }
+ invalidate();
+ } else {
+ if (increment) {
+ setValueInternal(mValue + 1, true);
+ } else {
+ setValueInternal(mValue - 1, true);
+ }
+ }
+ }
+
+ @Override
+ public void computeScroll() {
+ Scroller scroller = mFlingScroller;
+ if (scroller.isFinished()) {
+ scroller = mAdjustScroller;
+ if (scroller.isFinished()) {
+ return;
+ }
+ }
+ scroller.computeScrollOffset();
+ int currentScrollerY = scroller.getCurrY();
+ if (mPreviousScrollerY == 0) {
+ mPreviousScrollerY = scroller.getStartY();
+ }
+ scrollBy(0, currentScrollerY - mPreviousScrollerY);
+ mPreviousScrollerY = currentScrollerY;
+ if (scroller.isFinished()) {
+ onScrollerFinished(scroller);
+ } else {
+ invalidate();
+ }
+ }
+
+ private void decrementSelectorIndices(int[] selectorIndices) {
+ for (int i = selectorIndices.length - 1; i > 0; i--) {
+ selectorIndices[i] = selectorIndices[i - 1];
+ }
+ int nextScrollSelectorIndex = selectorIndices[1] - 1;
+ if (mWrapSelectorWheel && nextScrollSelectorIndex < mMinValue) {
+ nextScrollSelectorIndex = mMaxValue;
+ }
+ selectorIndices[0] = nextScrollSelectorIndex;
+ ensureCachedScrollSelectorValue(nextScrollSelectorIndex);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected boolean dispatchHoverEvent(MotionEvent event) {
+ if (!mHasSelectorWheel) {
+ return super.dispatchHoverEvent(event);
+ }
+ if (((AccessibilityManager) getContext().getSystemService(
+ Context.ACCESSIBILITY_SERVICE)).isEnabled()) {
+ switch (event.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_HOVER_ENTER: {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER);
+ if (VERSION.SDK_INT >= 16) {
+ performAccessibilityAction(
+ AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS,
+ null);
+ }
+ }
+ break;
+ case MotionEvent.ACTION_HOVER_MOVE: {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT);
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER);
+ if (VERSION.SDK_INT >= 16) {
+ performAccessibilityAction(
+ AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS,
+ null);
+ }
+ }
+ break;
+ case MotionEvent.ACTION_HOVER_EXIT: {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT);
+ }
+ break;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ final int keyCode = event.getKeyCode();
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_CENTER:
+ case KeyEvent.KEYCODE_ENTER:
+ removeAllCallbacks();
+ break;
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent event) {
+ switch (event.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_CANCEL:
+ case MotionEvent.ACTION_UP:
+ removeAllCallbacks();
+ break;
+ }
+ return super.dispatchTouchEvent(event);
+ }
+
+ @Override
+ public boolean dispatchTrackballEvent(MotionEvent event) {
+ switch (event.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_CANCEL:
+ case MotionEvent.ACTION_UP:
+ removeAllCallbacks();
+ break;
+ }
+ return super.dispatchTrackballEvent(event);
+ }
+
+ private void ensureCachedScrollSelectorValue(int selectorIndex) {
+ SparseArray<String> cache = mSelectorIndexToStringCache;
+ String scrollSelectorValue = cache.get(selectorIndex);
+ if (scrollSelectorValue != null) {
+ return;
+ }
+ if (selectorIndex < mMinValue || selectorIndex > mMaxValue) {
+ scrollSelectorValue = "";
+ } else {
+ if (mDisplayedValues != null) {
+ int displayedValueIndex = selectorIndex - mMinValue;
+ scrollSelectorValue = mDisplayedValues[displayedValueIndex];
+ } else {
+ scrollSelectorValue = formatNumber(selectorIndex);
+ }
+ }
+ cache.put(selectorIndex, scrollSelectorValue);
+ }
+
+ private boolean ensureScrollWheelAdjusted() {
+ int deltaY = mInitialScrollOffset - mCurrentScrollOffset;
+ if (deltaY != 0) {
+ mPreviousScrollerY = 0;
+ if (Math.abs(deltaY) > mSelectorElementHeight / 2) {
+ deltaY += deltaY > 0 ? -mSelectorElementHeight
+ : mSelectorElementHeight;
+ }
+ mAdjustScroller.startScroll(0, 0, 0, deltaY,
+ NumberPicker.SELECTOR_ADJUSTMENT_DURATION_MILLIS);
+ invalidate();
+ return true;
+ }
+ return false;
+ }
+
+ private void fling(int velocityY) {
+ mPreviousScrollerY = 0;
+ if (velocityY > 0) {
+ mFlingScroller
+ .fling(0, 0, 0, velocityY, 0, 0, 0, Integer.MAX_VALUE);
+ } else {
+ mFlingScroller.fling(0, Integer.MAX_VALUE, 0, velocityY, 0, 0, 0,
+ Integer.MAX_VALUE);
+ }
+ invalidate();
+ }
+
+ private String formatNumber(int value) {
+ return mFormatter != null ? mFormatter.format(value) : String
+ .valueOf(value);
+ }
+
+ @Override
+ protected float getBottomFadingEdgeStrength() {
+ return NumberPicker.TOP_AND_BOTTOM_FADING_EDGE_STRENGTH;
+ }
+
+ public String[] getDisplayedValues() {
+ return mDisplayedValues;
+ }
+
+ public NumberPickerEditText getInputField() {
+ return mInputText;
+ }
+
+ public int getMaxValue() {
+ return mMaxValue;
+ }
+
+ public int getMinValue() {
+ return mMinValue;
+ }
+
+ private int getSelectedPos(String value) {
+ if (mDisplayedValues != null) {
+ for (int i = 0; i < mDisplayedValues.length; i++) {
+ value = value.toLowerCase();
+ if (mDisplayedValues[i].toLowerCase().startsWith(value)) {
+ return mMinValue + i;
+ }
+ }
+ }
+ try {
+ return Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ }
+ return mMinValue;
+ }
+
+ @Override
+ public int getSolidColor() {
+ return mSolidColor;
+ }
+
+ @Override
+ protected float getTopFadingEdgeStrength() {
+ return NumberPicker.TOP_AND_BOTTOM_FADING_EDGE_STRENGTH;
+ }
+
+ public int getValue() {
+ return mValue;
+ }
+
+ private int getWrappedSelectorIndex(int selectorIndex) {
+ if (selectorIndex > mMaxValue) {
+ return mMinValue + (selectorIndex - mMaxValue)
+ % (mMaxValue - mMinValue) - 1;
+ } else if (selectorIndex < mMinValue) {
+ return mMaxValue - (mMinValue - selectorIndex)
+ % (mMaxValue - mMinValue) + 1;
+ }
+ return selectorIndex;
+ }
+
+ public boolean getWrapSelectorWheel() {
+ return mWrapSelectorWheel;
+ }
+
+ private void hideSoftInput() {
+ InputMethodManager inputMethodManager = (InputMethodManager) getContext()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (inputMethodManager != null
+ && inputMethodManager.isActive(mInputText)) {
+ inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+ if (mHasSelectorWheel) {
+ mInputText.setVisibility(View.INVISIBLE);
+ }
+ }
+ }
+
+ private void incrementSelectorIndices(int[] selectorIndices) {
+ for (int i = 0; i < selectorIndices.length - 1; i++) {
+ selectorIndices[i] = selectorIndices[i + 1];
+ }
+ int nextScrollSelectorIndex = selectorIndices[selectorIndices.length - 2] + 1;
+ if (mWrapSelectorWheel && nextScrollSelectorIndex > mMaxValue) {
+ nextScrollSelectorIndex = mMinValue;
+ }
+ selectorIndices[selectorIndices.length - 1] = nextScrollSelectorIndex;
+ ensureCachedScrollSelectorValue(nextScrollSelectorIndex);
+ }
+
+ private void initializeFadingEdges() {
+ setVerticalFadingEdgeEnabled(true);
+ setFadingEdgeLength((getBottom() - getTop() - mTextSize) / 2);
+ }
+
+ private void initializeSelectorWheel() {
+ initializeSelectorWheelIndices();
+ int[] selectorIndices = mSelectorIndices;
+ int totalTextHeight = selectorIndices.length * mTextSize;
+ float totalTextGapHeight = getBottom() - getTop() - totalTextHeight;
+ float textGapCount = selectorIndices.length;
+ mSelectorTextGapHeight = (int) (totalTextGapHeight / textGapCount + 0.5f);
+ mSelectorElementHeight = mTextSize + mSelectorTextGapHeight;
+ int editTextTextPosition = mInputText.getBaseline()
+ + mInputText.getTop();
+ mInitialScrollOffset = editTextTextPosition - mSelectorElementHeight
+ * NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX;
+ mCurrentScrollOffset = mInitialScrollOffset;
+ updateInputTextView();
+ }
+
+ private void initializeSelectorWheelIndices() {
+ mSelectorIndexToStringCache.clear();
+ int[] selectorIndices = mSelectorIndices;
+ int current = getValue();
+ for (int i = 0; i < mSelectorIndices.length; i++) {
+ int selectorIndex = current + i
+ - NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX;
+ if (mWrapSelectorWheel) {
+ selectorIndex = getWrappedSelectorIndex(selectorIndex);
+ }
+ selectorIndices[i] = selectorIndex;
+ ensureCachedScrollSelectorValue(selectorIndices[i]);
+ }
+ }
+
+ private int makeMeasureSpec(int measureSpec, int maxSize) {
+ if (maxSize == NumberPicker.SIZE_UNSPECIFIED) {
+ return measureSpec;
+ }
+ final int size = MeasureSpec.getSize(measureSpec);
+ final int mode = MeasureSpec.getMode(measureSpec);
+ switch (mode) {
+ case MeasureSpec.EXACTLY:
+ return measureSpec;
+ case MeasureSpec.AT_MOST:
+ return MeasureSpec.makeMeasureSpec(Math.min(size, maxSize),
+ MeasureSpec.EXACTLY);
+ case MeasureSpec.UNSPECIFIED:
+ return MeasureSpec.makeMeasureSpec(maxSize, MeasureSpec.EXACTLY);
+ default:
+ throw new IllegalArgumentException("Unknown measure mode: " + mode);
+ }
+ }
+
+ private boolean moveToFinalScrollerPosition(Scroller scroller) {
+ scroller.forceFinished(true);
+ int amountToScroll = scroller.getFinalY() - scroller.getCurrY();
+ int futureScrollOffset = (mCurrentScrollOffset + amountToScroll)
+ % mSelectorElementHeight;
+ int overshootAdjustment = mInitialScrollOffset - futureScrollOffset;
+ if (overshootAdjustment != 0) {
+ if (Math.abs(overshootAdjustment) > mSelectorElementHeight / 2) {
+ if (overshootAdjustment > 0) {
+ overshootAdjustment -= mSelectorElementHeight;
+ } else {
+ overshootAdjustment += mSelectorElementHeight;
+ }
+ }
+ amountToScroll += overshootAdjustment;
+ scrollBy(0, amountToScroll);
+ return true;
+ }
+ return false;
+ }
+
+ private void notifyChange(int previous, int current) {
+ if (mOnValueChangeListener != null) {
+ mOnValueChangeListener.onValueChange(this, previous, mValue);
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ removeAllCallbacks();
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ if (!mHasSelectorWheel) {
+ super.onDraw(canvas);
+ return;
+ }
+ float x = (getRight() - getLeft()) / 2;
+ float y = mCurrentScrollOffset;
+ if (mVirtualButtonPressedDrawable != null
+ && mScrollState == OnScrollListener.SCROLL_STATE_IDLE) {
+ if (mDecrementVirtualButtonPressed) {
+
+ mVirtualButtonPressedDrawable
+ .setState(org.holoeverywhere.internal._View.PRESSED_STATE_SET);
+ mVirtualButtonPressedDrawable.setBounds(0, 0, getRight(),
+ mTopSelectionDividerTop);
+ mVirtualButtonPressedDrawable.draw(canvas);
+ }
+ if (mIncrementVirtualButtonPressed) {
+ mVirtualButtonPressedDrawable
+ .setState(org.holoeverywhere.internal._View.PRESSED_STATE_SET);
+ mVirtualButtonPressedDrawable.setBounds(0,
+ mBottomSelectionDividerBottom, getRight(), getBottom());
+ mVirtualButtonPressedDrawable.draw(canvas);
+ }
+ }
+ int[] selectorIndices = mSelectorIndices;
+ for (int i = 0; i < selectorIndices.length; i++) {
+ int selectorIndex = selectorIndices[i];
+ String scrollSelectorValue = mSelectorIndexToStringCache
+ .get(selectorIndex);
+ if (i != NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX
+ || mInputText.getVisibility() != View.VISIBLE) {
+ canvas.drawText(scrollSelectorValue, x, y, mSelectorWheelPaint);
+ }
+ y += mSelectorElementHeight;
+ }
+ if (mSelectionDivider != null) {
+ int topOfTopDivider = mTopSelectionDividerTop;
+ int bottomOfTopDivider = topOfTopDivider + mSelectionDividerHeight;
+ mSelectionDivider.setBounds(0, topOfTopDivider, getRight(),
+ bottomOfTopDivider);
+ mSelectionDivider.draw(canvas);
+ int bottomOfBottomDivider = mBottomSelectionDividerBottom;
+ int topOfBottomDivider = bottomOfBottomDivider
+ - mSelectionDividerHeight;
+ mSelectionDivider.setBounds(0, topOfBottomDivider, getRight(),
+ bottomOfBottomDivider);
+ mSelectionDivider.draw(canvas);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(NumberPicker.class.getName());
+ event.setScrollable(true);
+ event.setScrollY((mMinValue + mValue) * mSelectorElementHeight);
+ event.setMaxScrollY((mMaxValue - mMinValue) * mSelectorElementHeight);
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent event) {
+ if (!mHasSelectorWheel || !isEnabled()) {
+ return false;
+ }
+ switch (event.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_DOWN: {
+ removeAllCallbacks();
+ mInputText.setVisibility(View.INVISIBLE);
+ mLastDownOrMoveEventY = mLastDownEventY = event.getY();
+ mLastDownEventTime = event.getEventTime();
+ mIngonreMoveEvents = false;
+ mShowSoftInputOnTap = false;
+ if (mLastDownEventY < mTopSelectionDividerTop) {
+ if (mScrollState == OnScrollListener.SCROLL_STATE_IDLE) {
+ mPressedStateHelper
+ .buttonPressDelayed(PressedStateHelper.BUTTON_DECREMENT);
+ }
+ } else if (mLastDownEventY > mBottomSelectionDividerBottom) {
+ if (mScrollState == OnScrollListener.SCROLL_STATE_IDLE) {
+ mPressedStateHelper
+ .buttonPressDelayed(PressedStateHelper.BUTTON_INCREMENT);
+ }
+ }
+ getParent().requestDisallowInterceptTouchEvent(true);
+ if (!mFlingScroller.isFinished()) {
+ mFlingScroller.forceFinished(true);
+ mAdjustScroller.forceFinished(true);
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
+ } else if (!mAdjustScroller.isFinished()) {
+ mFlingScroller.forceFinished(true);
+ mAdjustScroller.forceFinished(true);
+ } else if (mLastDownEventY < mTopSelectionDividerTop) {
+ hideSoftInput();
+ postChangeCurrentByOneFromLongPress(false,
+ ViewConfiguration.getLongPressTimeout());
+ } else if (mLastDownEventY > mBottomSelectionDividerBottom) {
+ hideSoftInput();
+ postChangeCurrentByOneFromLongPress(true,
+ ViewConfiguration.getLongPressTimeout());
+ } else {
+ mShowSoftInputOnTap = true;
+ postBeginSoftInputOnLongPressCommand();
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right,
+ int bottom) {
+ if (!mHasSelectorWheel) {
+ super.onLayout(changed, left, top, right, bottom);
+ return;
+ }
+ final int msrdWdth = getMeasuredWidth();
+ final int msrdHght = getMeasuredHeight();
+ final int inptTxtMsrdWdth = mInputText.getMeasuredWidth();
+ final int inptTxtMsrdHght = mInputText.getMeasuredHeight();
+ final int inptTxtLeft = (msrdWdth - inptTxtMsrdWdth) / 2;
+ final int inptTxtTop = (msrdHght - inptTxtMsrdHght) / 2;
+ final int inptTxtRight = inptTxtLeft + inptTxtMsrdWdth;
+ final int inptTxtBottom = inptTxtTop + inptTxtMsrdHght;
+ mInputText.layout(inptTxtLeft, inptTxtTop, inptTxtRight, inptTxtBottom);
+ if (changed) {
+ initializeSelectorWheel();
+ initializeFadingEdges();
+ mTopSelectionDividerTop = (getHeight() - mSelectionDividersDistance)
+ / 2 - mSelectionDividerHeight;
+ mBottomSelectionDividerBottom = mTopSelectionDividerTop + 2
+ * mSelectionDividerHeight + mSelectionDividersDistance;
+ }
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (!mHasSelectorWheel) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ return;
+ }
+ final int newWidthMeasureSpec = makeMeasureSpec(widthMeasureSpec,
+ mMaxWidth);
+ final int newHeightMeasureSpec = makeMeasureSpec(heightMeasureSpec,
+ mMaxHeight);
+ super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec);
+ final int widthSize = resolveSizeAndStateRespectingMinSize(mMinWidth,
+ getMeasuredWidth(), widthMeasureSpec);
+ final int heightSize = resolveSizeAndStateRespectingMinSize(mMinHeight,
+ getMeasuredHeight(), heightMeasureSpec);
+ setMeasuredDimension(widthSize, heightSize);
+ }
+
+ private void onScrollerFinished(Scroller scroller) {
+ if (scroller == mFlingScroller) {
+ if (!ensureScrollWheelAdjusted()) {
+ updateInputTextView();
+ }
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
+ } else {
+ if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
+ updateInputTextView();
+ }
+ }
+ }
+
+ private void onScrollStateChange(int scrollState) {
+ if (mScrollState == scrollState) {
+ return;
+ }
+ mScrollState = scrollState;
+ if (mOnScrollListener != null) {
+ mOnScrollListener.onScrollStateChange(this, scrollState);
+ }
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (!isEnabled() || !mHasSelectorWheel) {
+ return false;
+ }
+ if (mVelocityTracker == null) {
+ mVelocityTracker = VelocityTracker.obtain();
+ }
+ mVelocityTracker.addMovement(event);
+ switch (event.getAction() & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_MOVE: {
+ if (mIngonreMoveEvents) {
+ break;
+ }
+ float currentMoveY = event.getY();
+ if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
+ int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
+ if (deltaDownY > mTouchSlop) {
+ removeAllCallbacks();
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
+ }
+ } else {
+ int deltaMoveY = (int) (currentMoveY - mLastDownOrMoveEventY);
+ scrollBy(0, deltaMoveY);
+ invalidate();
+ }
+ mLastDownOrMoveEventY = currentMoveY;
+ }
+ break;
+ case MotionEvent.ACTION_UP: {
+ removeBeginSoftInputCommand();
+ removeChangeCurrentByOneFromLongPress();
+ mPressedStateHelper.cancel();
+ VelocityTracker velocityTracker = mVelocityTracker;
+ velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
+ int initialVelocity = (int) velocityTracker.getYVelocity();
+ if (Math.abs(initialVelocity) > mMinimumFlingVelocity) {
+ fling(initialVelocity);
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
+ } else {
+ int eventY = (int) event.getY();
+ int deltaMoveY = (int) Math.abs(eventY - mLastDownEventY);
+ long deltaTime = event.getEventTime() - mLastDownEventTime;
+ if (deltaMoveY <= mTouchSlop
+ && deltaTime < ViewConfiguration.getTapTimeout()) {
+ if (mShowSoftInputOnTap) {
+ mShowSoftInputOnTap = false;
+ showSoftInput();
+ } else {
+ int selectorIndexOffset = eventY
+ / mSelectorElementHeight
+ - NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX;
+ if (selectorIndexOffset > 0) {
+ changeValueByOne(true);
+ mPressedStateHelper
+ .buttonTapped(PressedStateHelper.BUTTON_INCREMENT);
+ } else if (selectorIndexOffset < 0) {
+ changeValueByOne(false);
+ mPressedStateHelper
+ .buttonTapped(PressedStateHelper.BUTTON_DECREMENT);
+ }
+ }
+ } else {
+ ensureScrollWheelAdjusted();
+ }
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
+ }
+ mVelocityTracker.recycle();
+ mVelocityTracker = null;
+ }
+ break;
+ }
+ return true;
+ }
+
+ private void postBeginSoftInputOnLongPressCommand() {
+ if (mBeginSoftInputOnLongPressCommand == null) {
+ mBeginSoftInputOnLongPressCommand = new BeginSoftInputOnLongPressCommand();
+ } else {
+ removeCallbacks(mBeginSoftInputOnLongPressCommand);
+ }
+ postDelayed(mBeginSoftInputOnLongPressCommand,
+ ViewConfiguration.getLongPressTimeout());
+ }
+
+ private void postChangeCurrentByOneFromLongPress(boolean increment,
+ long delayMillis) {
+ if (mChangeCurrentByOneFromLongPressCommand == null) {
+ mChangeCurrentByOneFromLongPressCommand = new ChangeCurrentByOneFromLongPressCommand();
+ } else {
+ removeCallbacks(mChangeCurrentByOneFromLongPressCommand);
+ }
+ mChangeCurrentByOneFromLongPressCommand.setStep(increment);
+ postDelayed(mChangeCurrentByOneFromLongPressCommand, delayMillis);
+ }
+
+ private void postSetSelectionCommand(int selectionStart, int selectionEnd) {
+ if (mSetSelectionCommand == null) {
+ mSetSelectionCommand = new SetSelectionCommand();
+ } else {
+ removeCallbacks(mSetSelectionCommand);
+ }
+ mSetSelectionCommand.mSelectionStart = selectionStart;
+ mSetSelectionCommand.mSelectionEnd = selectionEnd;
+ post(mSetSelectionCommand);
+ }
+
+ private void removeAllCallbacks() {
+ if (mChangeCurrentByOneFromLongPressCommand != null) {
+ removeCallbacks(mChangeCurrentByOneFromLongPressCommand);
+ }
+ if (mSetSelectionCommand != null) {
+ removeCallbacks(mSetSelectionCommand);
+ }
+ if (mBeginSoftInputOnLongPressCommand != null) {
+ removeCallbacks(mBeginSoftInputOnLongPressCommand);
+ }
+ mPressedStateHelper.cancel();
+ }
+
+ private void removeBeginSoftInputCommand() {
+ if (mBeginSoftInputOnLongPressCommand != null) {
+ removeCallbacks(mBeginSoftInputOnLongPressCommand);
+ }
+ }
+
+ private void removeChangeCurrentByOneFromLongPress() {
+ if (mChangeCurrentByOneFromLongPressCommand != null) {
+ removeCallbacks(mChangeCurrentByOneFromLongPressCommand);
+ }
+ }
+
+ private int resolveSizeAndStateRespectingMinSize(int minSize,
+ int measuredSize, int measureSpec) {
+ if (minSize != NumberPicker.SIZE_UNSPECIFIED) {
+ final int desiredWidth = Math.max(minSize, measuredSize);
+ return org.holoeverywhere.internal._View
+ .supportResolveSizeAndState(desiredWidth, measureSpec, 0);
+ } else {
+ return measuredSize;
+ }
+ }
+
+ @Override
+ public void scrollBy(int x, int y) {
+ int[] selectorIndices = mSelectorIndices;
+ if (!mWrapSelectorWheel
+ && y > 0
+ && selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX] <= mMinValue) {
+ mCurrentScrollOffset = mInitialScrollOffset;
+ return;
+ }
+ if (!mWrapSelectorWheel
+ && y < 0
+ && selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX] >= mMaxValue) {
+ mCurrentScrollOffset = mInitialScrollOffset;
+ return;
+ }
+ mCurrentScrollOffset += y;
+ while (mCurrentScrollOffset - mInitialScrollOffset > mSelectorTextGapHeight) {
+ mCurrentScrollOffset -= mSelectorElementHeight;
+ decrementSelectorIndices(selectorIndices);
+ setValueInternal(
+ selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX],
+ true);
+ if (!mWrapSelectorWheel
+ && selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX] <= mMinValue) {
+ mCurrentScrollOffset = mInitialScrollOffset;
+ }
+ }
+ while (mCurrentScrollOffset - mInitialScrollOffset < -mSelectorTextGapHeight) {
+ mCurrentScrollOffset += mSelectorElementHeight;
+ incrementSelectorIndices(selectorIndices);
+ setValueInternal(
+ selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX],
+ true);
+ if (!mWrapSelectorWheel
+ && selectorIndices[NumberPicker.SELECTOR_WHELL_MIDDLE_ITEM_INDEX] >= mMaxValue) {
+ mCurrentScrollOffset = mInitialScrollOffset;
+ }
+ }
+ }
+
+ public void setDisplayedValues(String[] displayedValues) {
+ if (mDisplayedValues == displayedValues) {
+ return;
+ }
+ mDisplayedValues = displayedValues;
+ if (mDisplayedValues != null) {
+ mInputText.setRawInputType(InputType.TYPE_CLASS_TEXT
+ | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
+ } else {
+ mInputText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
+ }
+ updateInputTextView();
+ initializeSelectorWheelIndices();
+ tryComputeMaxWidth();
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if (!mHasSelectorWheel) {
+ mIncrementButton.setEnabled(enabled);
+ }
+ if (!mHasSelectorWheel) {
+ mDecrementButton.setEnabled(enabled);
+ }
+ mInputText.setEnabled(enabled);
+ }
+
+ public void setFormatter(Formatter formatter) {
+ if (formatter == mFormatter) {
+ return;
+ }
+ mFormatter = formatter;
+ initializeSelectorWheelIndices();
+ updateInputTextView();
+ }
+
+ public void setMaxValue(int maxValue) {
+ if (mMaxValue == maxValue) {
+ return;
+ }
+ if (maxValue < 0) {
+ throw new IllegalArgumentException("maxValue must be >= 0");
+ }
+ mMaxValue = maxValue;
+ if (mMaxValue < mValue) {
+ mValue = mMaxValue;
+ }
+ boolean wrapSelectorWheel = mMaxValue - mMinValue > mSelectorIndices.length;
+ setWrapSelectorWheel(wrapSelectorWheel);
+ initializeSelectorWheelIndices();
+ updateInputTextView();
+ tryComputeMaxWidth();
+ invalidate();
+ }
+
+ public void setMinValue(int minValue) {
+ if (mMinValue == minValue) {
+ return;
+ }
+ if (minValue < 0) {
+ throw new IllegalArgumentException("minValue must be >= 0");
+ }
+ mMinValue = minValue;
+ if (mMinValue > mValue) {
+ mValue = mMinValue;
+ }
+ boolean wrapSelectorWheel = mMaxValue - mMinValue > mSelectorIndices.length;
+ setWrapSelectorWheel(wrapSelectorWheel);
+ initializeSelectorWheelIndices();
+ updateInputTextView();
+ tryComputeMaxWidth();
+ invalidate();
+ }
+
+ public void setOnLongPressUpdateInterval(long intervalMillis) {
+ mLongPressUpdateInterval = intervalMillis;
+ }
+
+ public void setOnScrollListener(OnScrollListener onScrollListener) {
+ mOnScrollListener = onScrollListener;
+ }
+
+ public void setOnValueChangedListener(
+ OnValueChangeListener onValueChangedListener) {
+ mOnValueChangeListener = onValueChangedListener;
+ }
+
+ public void setValue(int value) {
+ setValueInternal(value, false);
+ }
+
+ private void setValueInternal(int current, boolean notifyChange) {
+ if (mValue == current) {
+ return;
+ }
+ if (mWrapSelectorWheel) {
+ current = getWrappedSelectorIndex(current);
+ } else {
+ current = Math.max(current, mMinValue);
+ current = Math.min(current, mMaxValue);
+ }
+ int previous = mValue;
+ mValue = current;
+ updateInputTextView();
+ if (notifyChange) {
+ notifyChange(previous, current);
+ }
+ initializeSelectorWheelIndices();
+ invalidate();
+ }
+
+ public void setWrapSelectorWheel(boolean wrapSelectorWheel) {
+ final boolean wrappingAllowed = mMaxValue - mMinValue >= mSelectorIndices.length;
+ if ((!wrapSelectorWheel || wrappingAllowed)
+ && wrapSelectorWheel != mWrapSelectorWheel) {
+ mWrapSelectorWheel = wrapSelectorWheel;
+ }
+ }
+
+ private void showSoftInput() {
+ InputMethodManager inputMethodManager = (InputMethodManager) getContext()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (inputMethodManager != null) {
+ if (mHasSelectorWheel) {
+ mInputText.setVisibility(View.VISIBLE);
+ }
+ mInputText.requestFocus();
+ inputMethodManager.showSoftInput(mInputText, 0);
+ }
+ }
+
+ private void tryComputeMaxWidth() {
+ if (!mComputeMaxWidth) {
+ return;
+ }
+ int maxTextWidth = 0;
+ if (mDisplayedValues == null) {
+ float maxDigitWidth = 0;
+ for (int i = 0; i <= 9; i++) {
+ final float digitWidth = mSelectorWheelPaint.measureText(String
+ .valueOf(i));
+ if (digitWidth > maxDigitWidth) {
+ maxDigitWidth = digitWidth;
+ }
+ }
+ int numberOfDigits = 0;
+ int current = mMaxValue;
+ while (current > 0) {
+ numberOfDigits++;
+ current = current / 10;
+ }
+ maxTextWidth = (int) (numberOfDigits * maxDigitWidth);
+ } else {
+ final int valueCount = mDisplayedValues.length;
+ for (int i = 0; i < valueCount; i++) {
+ final float textWidth = mSelectorWheelPaint
+ .measureText(mDisplayedValues[i]);
+ if (textWidth > maxTextWidth) {
+ maxTextWidth = (int) textWidth;
+ }
+ }
+ }
+ maxTextWidth += mInputText.getPaddingLeft()
+ + mInputText.getPaddingRight();
+ if (mMaxWidth != maxTextWidth) {
+ if (maxTextWidth > mMinWidth) {
+ mMaxWidth = maxTextWidth;
+ } else {
+ mMaxWidth = mMinWidth;
+ }
+ invalidate();
+ }
+ }
+
+ private boolean updateInputTextView() {
+ String text = mDisplayedValues == null ? formatNumber(mValue)
+ : mDisplayedValues[mValue - mMinValue];
+ if (!TextUtils.isEmpty(text)
+ && !text.equals(mInputText.getText().toString())) {
+ mInputText.setText(text);
+ return true;
+ }
+ return false;
+ }
+
+ private void validateInputTextView(NumberPickerEditText v) {
+ String str = String.valueOf(v.getText());
+ if (TextUtils.isEmpty(str)) {
+ updateInputTextView();
+ } else {
+ int current = getSelectedPos(str.toString());
+ setValueInternal(current, true);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupMenu.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupMenu.java
new file mode 100644
index 0000000000..bccefe2dad
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupMenu.java
@@ -0,0 +1,102 @@
+
+package org.holoeverywhere.widget;
+
+import android.content.Context;
+import android.view.View;
+
+import com.actionbarsherlock.internal.view.menu.MenuBuilder;
+import com.actionbarsherlock.internal.view.menu.MenuPopupHelper;
+import com.actionbarsherlock.internal.view.menu.MenuPresenter;
+import com.actionbarsherlock.internal.view.menu.PopupMenuHelper;
+import com.actionbarsherlock.internal.view.menu.SubMenuBuilder;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback {
+ public interface OnDismissListener {
+ public void onDismiss(PopupMenu menu);
+ }
+
+ public interface OnMenuItemClickListener {
+ public boolean onMenuItemClick(MenuItem item);
+ }
+
+ private View mAnchor;
+ private Context mContext;
+ private OnDismissListener mDismissListener;
+ private MenuBuilder mMenu;
+ private OnMenuItemClickListener mMenuItemClickListener;
+ private PopupMenuHelper mPopup;
+
+ public PopupMenu(Context context, View anchor) {
+ mContext = context;
+ mMenu = new MenuBuilder(context);
+ mMenu.setCallback(this);
+ mAnchor = anchor;
+ mPopup = new PopupMenuHelper(context, mMenu, mAnchor);
+ mPopup.setCallback(this);
+ }
+
+ public void dismiss() {
+ mPopup.dismiss();
+ }
+
+ public Menu getMenu() {
+ return mMenu;
+ }
+
+ public MenuInflater getMenuInflater() {
+ return new MenuInflater(mContext);
+ }
+
+ public void inflate(int menuRes) {
+ getMenuInflater().inflate(menuRes, mMenu);
+ }
+
+ @Override
+ public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+ if (mDismissListener != null) {
+ mDismissListener.onDismiss(this);
+ }
+ }
+
+ public void onCloseSubMenu(SubMenuBuilder menu) {
+ }
+
+ @Override
+ public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+ if (mMenuItemClickListener != null) {
+ return mMenuItemClickListener.onMenuItemClick(item);
+ }
+ return false;
+ }
+
+ @Override
+ public void onMenuModeChange(MenuBuilder menu) {
+ }
+
+ @Override
+ public boolean onOpenSubMenu(MenuBuilder subMenu) {
+ if (subMenu == null) {
+ return false;
+ }
+ if (!subMenu.hasVisibleItems()) {
+ return true;
+ }
+ new MenuPopupHelper(mContext, subMenu, mAnchor).show();
+ return true;
+ }
+
+ public void setOnDismissListener(OnDismissListener listener) {
+ mDismissListener = listener;
+ }
+
+ public void setOnMenuItemClickListener(OnMenuItemClickListener listener) {
+ mMenuItemClickListener = listener;
+ }
+
+ public void show() {
+ mPopup.show();
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupWindow.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupWindow.java
new file mode 100644
index 0000000000..6f30bf7137
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/PopupWindow.java
@@ -0,0 +1,844 @@
+
+package org.holoeverywhere.widget;
+
+import java.lang.ref.WeakReference;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.drawable.DrawableCompat;
+import org.holoeverywhere.drawable.StateListDrawable;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.os.IBinder;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnTouchListener;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.view.ViewTreeObserver.OnScrollChangedListener;
+import android.view.WindowManager;
+
+public class PopupWindow {
+ public interface OnDismissListener {
+ public void onDismiss();
+ }
+
+ private class PopupViewContainer extends FrameLayout {
+ public PopupViewContainer(Context context) {
+ super(context);
+ }
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+ if (getKeyDispatcherState() == null) {
+ return super.dispatchKeyEvent(event);
+ }
+
+ if (event.getAction() == KeyEvent.ACTION_DOWN
+ && event.getRepeatCount() == 0) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null) {
+ state.startTracking(event, this);
+ }
+ return true;
+ } else if (event.getAction() == KeyEvent.ACTION_UP) {
+ KeyEvent.DispatcherState state = getKeyDispatcherState();
+ if (state != null && state.isTracking(event) && !event.isCanceled()) {
+ dismiss();
+ return true;
+ }
+ }
+ return super.dispatchKeyEvent(event);
+ } else {
+ return super.dispatchKeyEvent(event);
+ }
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+ if (mTouchInterceptor != null && mTouchInterceptor.onTouch(this, ev)) {
+ return true;
+ }
+ return super.dispatchTouchEvent(ev);
+ }
+
+ @Override
+ protected int[] onCreateDrawableState(int extraSpace) {
+ if (mAboveAnchor) {
+ final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+ View.mergeDrawableStates(drawableState, ABOVE_ANCHOR_STATE_SET);
+ return drawableState;
+ } else {
+ return super.onCreateDrawableState(extraSpace);
+ }
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+ if (event.getAction() == MotionEvent.ACTION_DOWN
+ && (x < 0 || x >= getWidth() || y < 0 || y >= getHeight())) {
+ dismiss();
+ return true;
+ } else if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
+ dismiss();
+ return true;
+ } else {
+ return super.onTouchEvent(event);
+ }
+ }
+
+ @Override
+ public void sendAccessibilityEvent(int eventType) {
+ if (mContentView != null) {
+ mContentView.sendAccessibilityEvent(eventType);
+ } else {
+ super.sendAccessibilityEvent(eventType);
+ }
+ }
+ }
+
+ private static final int[] ABOVE_ANCHOR_STATE_SET = new int[] {
+ android.R.attr.state_above_anchor
+ };
+ public static final int INPUT_METHOD_FROM_FOCUSABLE = 0;
+ public static final int INPUT_METHOD_NEEDED = 1;
+ public static final int INPUT_METHOD_NOT_NEEDED = 2;
+ private boolean mAboveAnchor;
+ private Drawable mAboveAnchorBackgroundDrawable;
+ private boolean mAllowScrollingAnchorParent = true;
+ private WeakReference<View> mAnchor;
+ private int mAnchorXoff, mAnchorYoff;
+ private int mAnimationStyle = -1;
+ private Drawable mBackground;
+ private Drawable mBelowAnchorBackgroundDrawable;
+ private boolean mClippingEnabled = true;
+ private boolean mClipToScreen;
+ private View mContentView;
+ private Context mContext;
+ private int[] mDrawingLocation = new int[2];
+ private boolean mFocusable;
+ private int mHeight;
+ private int mHeightMode;
+ private boolean mIgnoreCheekPress = false;
+ private int mInputMethodMode = INPUT_METHOD_FROM_FOCUSABLE;
+ private boolean mIsDropdown;
+ private boolean mIsShowing;
+ private int mLastHeight;
+ private int mLastWidth;
+ private boolean mLayoutInScreen;
+ private boolean mLayoutInsetDecor = false;
+ private boolean mNotTouchModal;
+ private OnDismissListener mOnDismissListener;
+ private OnScrollChangedListener mOnScrollChangedListener =
+ new OnScrollChangedListener() {
+ @Override
+ public void onScrollChanged() {
+ View anchor = mAnchor != null ? mAnchor.get() : null;
+ if (anchor != null && mPopupView != null) {
+ WindowManager.LayoutParams p = (WindowManager.LayoutParams)
+ mPopupView.getLayoutParams();
+
+ updateAboveAnchor(findDropDownPosition(anchor, p, mAnchorXoff, mAnchorYoff));
+ update(p.x, p.y, -1, -1, true);
+ }
+ }
+ };
+ private boolean mOutsideTouchable = false;
+ private int mPopupHeight;
+ private View mPopupView;
+ private int mPopupWidth;
+ private int[] mScreenLocation = new int[2];
+ private int mSoftInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED;
+ private int mSplitTouchEnabled = -1;
+ private Rect mTempRect = new Rect();
+ private boolean mTouchable = true;
+ private OnTouchListener mTouchInterceptor;
+ private int mWidth;
+ private int mWidthMode;
+ private int mWindowLayoutType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+ private WindowManager mWindowManager;
+
+ public PopupWindow() {
+ this(null, 0, 0);
+ }
+
+ public PopupWindow(Context context) {
+ this(context, null);
+ }
+
+ public PopupWindow(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.popupWindowStyle);
+ }
+
+ public PopupWindow(Context context, AttributeSet attrs, int defStyle) {
+ this(context, attrs, defStyle, 0);
+ }
+
+ public PopupWindow(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ mContext = context;
+ mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PopupWindow, defStyleAttr,
+ defStyleRes);
+ mBackground = DrawableCompat
+ .getDrawable(a, R.styleable.PopupWindow_android_popupBackground);
+ final int animStyle = a.getResourceId(R.styleable.PopupWindow_android_popupAnimationStyle,
+ -1);
+ mAnimationStyle = animStyle == R.style.Holo_Animation_PopupWindow ? -1 : animStyle;
+ if (mBackground instanceof StateListDrawable) {
+ StateListDrawable background = (StateListDrawable) mBackground;
+ int aboveAnchorStateIndex = background.getStateDrawableIndex(ABOVE_ANCHOR_STATE_SET);
+ int count = background.getStateCount();
+ int belowAnchorStateIndex = -1;
+ for (int i = 0; i < count; i++) {
+ if (i != aboveAnchorStateIndex) {
+ belowAnchorStateIndex = i;
+ break;
+ }
+ }
+ if (aboveAnchorStateIndex != -1 && belowAnchorStateIndex != -1) {
+ mAboveAnchorBackgroundDrawable = background.getStateDrawable(aboveAnchorStateIndex);
+ mBelowAnchorBackgroundDrawable = background.getStateDrawable(belowAnchorStateIndex);
+ } else {
+ mBelowAnchorBackgroundDrawable = null;
+ mAboveAnchorBackgroundDrawable = null;
+ }
+ }
+ a.recycle();
+ }
+
+ public PopupWindow(int width, int height) {
+ this(null, width, height);
+ }
+
+ public PopupWindow(View contentView) {
+ this(contentView, 0, 0);
+ }
+
+ public PopupWindow(View contentView, int width, int height) {
+ this(contentView, width, height, false);
+ }
+
+ public PopupWindow(View contentView, int width, int height, boolean focusable) {
+ if (contentView != null) {
+ mContext = contentView.getContext();
+ mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
+ }
+ setContentView(contentView);
+ setWidth(width);
+ setHeight(height);
+ setFocusable(focusable);
+ }
+
+ private int computeAnimationResource() {
+ if (mAnimationStyle == -1) {
+ if (mIsDropdown) {
+ return mAboveAnchor ? R.style.Holo_Animation_DropDownUp
+ : R.style.Holo_Animation_DropDownDown;
+ }
+ return 0;
+ }
+ return mAnimationStyle;
+ }
+
+ private int computeFlags(int curFlags) {
+ curFlags &= ~(
+ WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES |
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
+ WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE |
+ WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH |
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS |
+ WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM |
+ WindowManager.LayoutParams.FLAG_SPLIT_TOUCH);
+ if (mIgnoreCheekPress) {
+ curFlags |= WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES;
+ }
+ if (!mFocusable) {
+ curFlags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+ if (mInputMethodMode == INPUT_METHOD_NEEDED) {
+ curFlags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+ }
+ } else if (mInputMethodMode == INPUT_METHOD_NOT_NEEDED) {
+ curFlags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+ }
+ if (!mTouchable) {
+ curFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
+ }
+ if (mOutsideTouchable) {
+ curFlags |= WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
+ }
+ if (!mClippingEnabled) {
+ curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
+ }
+ if (isSplitTouchEnabled()) {
+ curFlags |= WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
+ }
+ if (mLayoutInScreen) {
+ curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+ }
+ if (mLayoutInsetDecor) {
+ curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
+ }
+ if (mNotTouchModal) {
+ curFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
+ }
+ return curFlags;
+ }
+
+ private WindowManager.LayoutParams createPopupLayout(IBinder token) {
+ WindowManager.LayoutParams p = new WindowManager.LayoutParams();
+ p.gravity = Gravity.LEFT | Gravity.TOP;
+ p.width = mLastWidth = mWidth;
+ p.height = mLastHeight = mHeight;
+ if (mBackground != null) {
+ p.format = mBackground.getOpacity();
+ } else {
+ p.format = PixelFormat.TRANSLUCENT;
+ }
+ p.flags = computeFlags(p.flags);
+ p.type = mWindowLayoutType;
+ p.token = token;
+ p.softInputMode = mSoftInputMode;
+ p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
+ return p;
+ }
+
+ public void dismiss() {
+ if (isShowing() && mPopupView != null) {
+ mIsShowing = false;
+ unregisterForScrollChanged();
+ try {
+ mWindowManager.removeViewImmediate(mPopupView);
+ } finally {
+ if (mPopupView != mContentView && mPopupView instanceof ViewGroup) {
+ ((ViewGroup) mPopupView).removeView(mContentView);
+ }
+ mPopupView = null;
+ if (mOnDismissListener != null) {
+ mOnDismissListener.onDismiss();
+ }
+ }
+ }
+ }
+
+ private boolean findDropDownPosition(View anchor, WindowManager.LayoutParams p,
+ int xoff, int yoff) {
+ final int anchorHeight = anchor.getHeight();
+ anchor.getLocationInWindow(mDrawingLocation);
+ p.x = mDrawingLocation[0] + xoff;
+ p.y = mDrawingLocation[1] + anchorHeight + yoff;
+ boolean onTop = false;
+ p.gravity = Gravity.LEFT | Gravity.TOP;
+ anchor.getLocationOnScreen(mScreenLocation);
+ final Rect displayFrame = new Rect();
+ anchor.getWindowVisibleDisplayFrame(displayFrame);
+ int screenY = mScreenLocation[1] + anchorHeight + yoff;
+ final View root = anchor.getRootView();
+ if (screenY + mPopupHeight > displayFrame.bottom ||
+ p.x + mPopupWidth - root.getWidth() > 0) {
+ if (mAllowScrollingAnchorParent) {
+ int scrollX = anchor.getScrollX();
+ int scrollY = anchor.getScrollY();
+ Rect r = new Rect(scrollX, scrollY, scrollX + mPopupWidth + xoff,
+ scrollY + mPopupHeight + anchor.getHeight() + yoff);
+ anchor.requestRectangleOnScreen(r, true);
+ }
+ anchor.getLocationInWindow(mDrawingLocation);
+ p.x = mDrawingLocation[0] + xoff;
+ p.y = mDrawingLocation[1] + anchor.getHeight() + yoff;
+ anchor.getLocationOnScreen(mScreenLocation);
+ onTop = displayFrame.bottom - mScreenLocation[1] - anchor.getHeight() - yoff <
+ mScreenLocation[1] - yoff - displayFrame.top;
+ if (onTop) {
+ p.gravity = Gravity.LEFT | Gravity.BOTTOM;
+ p.y = root.getHeight() - mDrawingLocation[1] + yoff;
+ } else {
+ p.y = mDrawingLocation[1] + anchor.getHeight() + yoff;
+ }
+ }
+ if (mClipToScreen) {
+ final int displayFrameWidth = displayFrame.right - displayFrame.left;
+ int right = p.x + p.width;
+ if (right > displayFrameWidth) {
+ p.x -= right - displayFrameWidth;
+ }
+ if (p.x < displayFrame.left) {
+ p.x = displayFrame.left;
+ p.width = Math.min(p.width, displayFrameWidth);
+ }
+ if (onTop) {
+ int popupTop = mScreenLocation[1] + yoff - mPopupHeight;
+ if (popupTop < 0) {
+ p.y += popupTop;
+ }
+ } else {
+ p.y = Math.max(p.y, displayFrame.top);
+ }
+ }
+ p.gravity |= Gravity.DISPLAY_CLIP_VERTICAL;
+ return onTop;
+ }
+
+ public int getAnimationStyle() {
+ return mAnimationStyle;
+ }
+
+ public Drawable getBackground() {
+ return mBackground;
+ }
+
+ public View getContentView() {
+ return mContentView;
+ }
+
+ public int getHeight() {
+ return mHeight;
+ }
+
+ public int getInputMethodMode() {
+ return mInputMethodMode;
+
+ }
+
+ public int getMaxAvailableHeight(View anchor) {
+ return getMaxAvailableHeight(anchor, 0);
+ }
+
+ public int getMaxAvailableHeight(View anchor, int yOffset) {
+ return getMaxAvailableHeight(anchor, yOffset, false);
+ }
+
+ public int getMaxAvailableHeight(View anchor, int yOffset, boolean ignoreBottomDecorations) {
+ final Rect displayFrame = new Rect();
+ anchor.getWindowVisibleDisplayFrame(displayFrame);
+ final int[] anchorPos = mDrawingLocation;
+ anchor.getLocationOnScreen(anchorPos);
+ int bottomEdge = displayFrame.bottom;
+ if (ignoreBottomDecorations) {
+ Resources res = anchor.getContext().getResources();
+ bottomEdge = res.getDisplayMetrics().heightPixels;
+ }
+ final int distanceToBottom = bottomEdge - (anchorPos[1] + anchor.getHeight()) - yOffset;
+ final int distanceToTop = anchorPos[1] - displayFrame.top + yOffset;
+ int returnedHeight = Math.max(distanceToBottom, distanceToTop);
+ if (mBackground != null) {
+ mBackground.getPadding(mTempRect);
+ returnedHeight -= mTempRect.top + mTempRect.bottom;
+ }
+ return returnedHeight;
+ }
+
+ public int getSoftInputMode() {
+ return mSoftInputMode;
+ }
+
+ public int getWidth() {
+ return mWidth;
+ }
+
+ public int getWindowLayoutType() {
+ return mWindowLayoutType;
+ }
+
+ private void invokePopup(WindowManager.LayoutParams p) {
+ if (mContext != null) {
+ p.packageName = mContext.getPackageName();
+ }
+ if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+ mPopupView.setFitsSystemWindows(mLayoutInsetDecor);
+ }
+ mWindowManager.addView(mPopupView, p);
+ }
+
+ public boolean isAboveAnchor() {
+ return mAboveAnchor;
+ }
+
+ public boolean isClippingEnabled() {
+ return mClippingEnabled;
+ }
+
+ public boolean isFocusable() {
+ return mFocusable;
+ }
+
+ public boolean isLayoutInScreenEnabled() {
+ return mLayoutInScreen;
+ }
+
+ public boolean isOutsideTouchable() {
+ return mOutsideTouchable;
+ }
+
+ public boolean isShowing() {
+ return mIsShowing;
+ }
+
+ public boolean isSplitTouchEnabled() {
+ if (mSplitTouchEnabled < 0 && mContext != null) {
+ return mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB;
+ }
+ return mSplitTouchEnabled == 1;
+ }
+
+ public boolean isTouchable() {
+ return mTouchable;
+ }
+
+ @SuppressWarnings("deprecation")
+ private void preparePopup(WindowManager.LayoutParams p) {
+ if (mContentView == null || mContext == null || mWindowManager == null) {
+ throw new IllegalStateException("You must specify a valid content view by "
+ + "calling setContentView() before attempting to show the popup.");
+ }
+ if (mBackground != null) {
+ final ViewGroup.LayoutParams layoutParams = mContentView.getLayoutParams();
+ int height = ViewGroup.LayoutParams.MATCH_PARENT;
+ if (layoutParams != null &&
+ layoutParams.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ height = ViewGroup.LayoutParams.WRAP_CONTENT;
+ }
+ PopupViewContainer popupViewContainer = new PopupViewContainer(mContext);
+ PopupViewContainer.LayoutParams listParams = new PopupViewContainer.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT, height
+ );
+ popupViewContainer.setBackgroundDrawable(mBackground);
+ popupViewContainer.addView(mContentView, listParams);
+ mPopupView = popupViewContainer;
+ } else {
+ mPopupView = mContentView;
+ }
+ mPopupWidth = p.width;
+ mPopupHeight = p.height;
+ }
+
+ private void registerForScrollChanged(View anchor, int xoff, int yoff) {
+ unregisterForScrollChanged();
+ mAnchor = new WeakReference<View>(anchor);
+ ViewTreeObserver vto = anchor.getViewTreeObserver();
+ if (vto != null) {
+ vto.addOnScrollChangedListener(mOnScrollChangedListener);
+ }
+ mAnchorXoff = xoff;
+ mAnchorYoff = yoff;
+ }
+
+ void setAllowScrollingAnchorParent(boolean enabled) {
+ mAllowScrollingAnchorParent = enabled;
+ }
+
+ public void setAnimationStyle(int animationStyle) {
+ mAnimationStyle = animationStyle;
+ }
+
+ public void setBackgroundDrawable(Drawable background) {
+ mBackground = background;
+ }
+
+ public void setClippingEnabled(boolean enabled) {
+ mClippingEnabled = enabled;
+ }
+
+ public void setClipToScreenEnabled(boolean enabled) {
+ mClipToScreen = enabled;
+ setClippingEnabled(!enabled);
+ }
+
+ public void setContentView(View contentView) {
+ if (isShowing()) {
+ return;
+ }
+ mContentView = contentView;
+ if (mContext == null && mContentView != null) {
+ mContext = mContentView.getContext();
+ }
+ if (mWindowManager == null && mContext != null) {
+ mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
+ }
+ }
+
+ public void setFocusable(boolean focusable) {
+ mFocusable = focusable;
+ }
+
+ public void setHeight(int height) {
+ mHeight = height;
+ }
+
+ public void setIgnoreCheekPress() {
+ mIgnoreCheekPress = true;
+ }
+
+ public void setInputMethodMode(int mode) {
+ mInputMethodMode = mode;
+ }
+
+ public void setLayoutInScreenEnabled(boolean enabled) {
+ mLayoutInScreen = enabled;
+ }
+
+ public void setLayoutInsetDecor(boolean enabled) {
+ mLayoutInsetDecor = enabled;
+ }
+
+ public void setOnDismissListener(OnDismissListener onDismissListener) {
+ mOnDismissListener = onDismissListener;
+ }
+
+ public void setOutsideTouchable(boolean touchable) {
+ mOutsideTouchable = touchable;
+ }
+
+ public void setSoftInputMode(int mode) {
+ mSoftInputMode = mode;
+ }
+
+ public void setSplitTouchEnabled(boolean enabled) {
+ mSplitTouchEnabled = enabled ? 1 : 0;
+ }
+
+ public void setTouchable(boolean touchable) {
+ mTouchable = touchable;
+ }
+
+ public void setTouchInterceptor(OnTouchListener l) {
+ mTouchInterceptor = l;
+ }
+
+ public void setTouchModal(boolean touchModal) {
+ mNotTouchModal = !touchModal;
+ }
+
+ public void setWidth(int width) {
+ mWidth = width;
+ }
+
+ public void setWindowLayoutMode(int widthSpec, int heightSpec) {
+ mWidthMode = widthSpec;
+ mHeightMode = heightSpec;
+ }
+
+ public void setWindowLayoutType(int layoutType) {
+ mWindowLayoutType = layoutType;
+ }
+
+ public void showAsDropDown(View anchor) {
+ showAsDropDown(anchor, 0, 0);
+ }
+
+ public void showAsDropDown(View anchor, int xoff, int yoff) {
+ if (isShowing() || mContentView == null) {
+ return;
+ }
+ registerForScrollChanged(anchor, xoff, yoff);
+ mIsShowing = true;
+ mIsDropdown = true;
+ WindowManager.LayoutParams p = createPopupLayout(anchor.getWindowToken());
+ preparePopup(p);
+ updateAboveAnchor(findDropDownPosition(anchor, p, xoff, yoff));
+ if (mHeightMode < 0) {
+ p.height = mLastHeight = mHeightMode;
+ }
+ if (mWidthMode < 0) {
+ p.width = mLastWidth = mWidthMode;
+ }
+ p.windowAnimations = computeAnimationResource();
+ invokePopup(p);
+ }
+
+ public void showAtLocation(IBinder token, int gravity, int x, int y) {
+ if (isShowing() || mContentView == null) {
+ return;
+ }
+ unregisterForScrollChanged();
+ mIsShowing = true;
+ mIsDropdown = false;
+ WindowManager.LayoutParams p = createPopupLayout(token);
+ p.windowAnimations = computeAnimationResource();
+ preparePopup(p);
+ if (gravity == Gravity.NO_GRAVITY) {
+ gravity = Gravity.TOP | Gravity.LEFT;
+ }
+ p.gravity = gravity;
+ p.x = x;
+ p.y = y;
+ if (mHeightMode < 0) {
+ p.height = mLastHeight = mHeightMode;
+ }
+ if (mWidthMode < 0) {
+ p.width = mLastWidth = mWidthMode;
+ }
+ invokePopup(p);
+ }
+
+ public void showAtLocation(View parent, int gravity, int x, int y) {
+ showAtLocation(parent.getWindowToken(), gravity, x, y);
+ }
+
+ private void unregisterForScrollChanged() {
+ WeakReference<View> anchorRef = mAnchor;
+ View anchor = null;
+ if (anchorRef != null) {
+ anchor = anchorRef.get();
+ }
+ if (anchor != null) {
+ ViewTreeObserver vto = anchor.getViewTreeObserver();
+ vto.removeOnScrollChangedListener(mOnScrollChangedListener);
+ }
+ mAnchor = null;
+ }
+
+ public void update() {
+ if (!isShowing() || mContentView == null) {
+ return;
+ }
+ WindowManager.LayoutParams p = (WindowManager.LayoutParams)
+ mPopupView.getLayoutParams();
+ boolean update = false;
+ final int newAnim = computeAnimationResource();
+ if (newAnim != p.windowAnimations) {
+ p.windowAnimations = newAnim;
+ update = true;
+ }
+ final int newFlags = computeFlags(p.flags);
+ if (newFlags != p.flags) {
+ p.flags = newFlags;
+ update = true;
+ }
+ if (update) {
+ mWindowManager.updateViewLayout(mPopupView, p);
+ }
+ }
+
+ public void update(int width, int height) {
+ WindowManager.LayoutParams p = (WindowManager.LayoutParams)
+ mPopupView.getLayoutParams();
+ update(p.x, p.y, width, height, false);
+ }
+
+ public void update(int x, int y, int width, int height) {
+ update(x, y, width, height, false);
+ }
+
+ public void update(int x, int y, int width, int height, boolean force) {
+ if (width != -1) {
+ mLastWidth = width;
+ setWidth(width);
+ }
+ if (height != -1) {
+ mLastHeight = height;
+ setHeight(height);
+ }
+ if (!isShowing() || mContentView == null) {
+ return;
+ }
+ WindowManager.LayoutParams p = (WindowManager.LayoutParams) mPopupView.getLayoutParams();
+ boolean update = force;
+ final int finalWidth = mWidthMode < 0 ? mWidthMode : mLastWidth;
+ if (width != -1 && p.width != finalWidth) {
+ p.width = mLastWidth = finalWidth;
+ update = true;
+ }
+ final int finalHeight = mHeightMode < 0 ? mHeightMode : mLastHeight;
+ if (height != -1 && p.height != finalHeight) {
+ p.height = mLastHeight = finalHeight;
+ update = true;
+ }
+ if (p.x != x) {
+ p.x = x;
+ update = true;
+ }
+ if (p.y != y) {
+ p.y = y;
+ update = true;
+ }
+ final int newAnim = computeAnimationResource();
+ if (newAnim != p.windowAnimations) {
+ p.windowAnimations = newAnim;
+ update = true;
+ }
+ final int newFlags = computeFlags(p.flags);
+ if (newFlags != p.flags) {
+ p.flags = newFlags;
+ update = true;
+ }
+ if (update) {
+ mWindowManager.updateViewLayout(mPopupView, p);
+ }
+ }
+
+ private void update(View anchor, boolean updateLocation, int xoff, int yoff,
+ boolean updateDimension, int width, int height) {
+ if (!isShowing() || mContentView == null) {
+ return;
+ }
+ WeakReference<View> oldAnchor = mAnchor;
+ final boolean needsUpdate = updateLocation && (mAnchorXoff != xoff || mAnchorYoff != yoff);
+ if (oldAnchor == null || oldAnchor.get() != anchor || needsUpdate && !mIsDropdown) {
+ registerForScrollChanged(anchor, xoff, yoff);
+ } else if (needsUpdate) {
+ mAnchorXoff = xoff;
+ mAnchorYoff = yoff;
+ }
+ WindowManager.LayoutParams p = (WindowManager.LayoutParams) mPopupView.getLayoutParams();
+ if (updateDimension) {
+ if (width == -1) {
+ width = mPopupWidth;
+ } else {
+ mPopupWidth = width;
+ }
+ if (height == -1) {
+ height = mPopupHeight;
+ } else {
+ mPopupHeight = height;
+ }
+ }
+ int x = p.x;
+ int y = p.y;
+ if (updateLocation) {
+ updateAboveAnchor(findDropDownPosition(anchor, p, xoff, yoff));
+ } else {
+ updateAboveAnchor(findDropDownPosition(anchor, p, mAnchorXoff, mAnchorYoff));
+ }
+ update(p.x, p.y, width, height, x != p.x || y != p.y);
+ }
+
+ public void update(View anchor, int width, int height) {
+ update(anchor, false, 0, 0, true, width, height);
+ }
+
+ public void update(View anchor, int xoff, int yoff, int width, int height) {
+ update(anchor, true, xoff, yoff, true, width, height);
+ }
+
+ @SuppressWarnings("deprecation")
+ private void updateAboveAnchor(boolean aboveAnchor) {
+ if (aboveAnchor != mAboveAnchor) {
+ mAboveAnchor = aboveAnchor;
+ if (mBackground != null) {
+ if (mAboveAnchorBackgroundDrawable != null) {
+ if (mAboveAnchor) {
+ mPopupView.setBackgroundDrawable(mAboveAnchorBackgroundDrawable);
+ } else {
+ mPopupView.setBackgroundDrawable(mBelowAnchorBackgroundDrawable);
+ }
+ } else {
+ mPopupView.refreshDrawableState();
+ }
+ }
+ }
+ }
+
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ProgressBar.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ProgressBar.java
new file mode 100644
index 0000000000..2b91824765
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ProgressBar.java
@@ -0,0 +1,870 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.ArrayList;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.drawable.DrawableCompat;
+import org.holoeverywhere.internal._View;
+import org.holoeverywhere.util.Pool;
+import org.holoeverywhere.util.Poolable;
+import org.holoeverywhere.util.PoolableManager;
+import org.holoeverywhere.util.Pools;
+import org.holoeverywhere.util.ReflectHelper;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Bitmap;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.Shader;
+import android.graphics.drawable.Animatable;
+import android.graphics.drawable.AnimationDrawable;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ClipDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.StateListDrawable;
+import android.graphics.drawable.shapes.RoundRectShape;
+import android.graphics.drawable.shapes.Shape;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewDebug;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.animation.AlphaAnimation;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
+import android.view.animation.Transformation;
+
+public class ProgressBar extends android.widget.ProgressBar {
+ private class AccessibilityEventSender implements Runnable {
+ @Override
+ public void run() {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ }
+ }
+
+ private static class RefreshData implements Poolable<RefreshData> {
+ private static final int POOL_MAX = 24;
+ private static final Pool<RefreshData> sPool = Pools
+ .synchronizedPool(Pools.finitePool(
+ new PoolableManager<RefreshData>() {
+ @Override
+ public RefreshData newInstance() {
+ return new RefreshData();
+ }
+
+ @Override
+ public void onAcquired(RefreshData element) {
+ }
+
+ @Override
+ public void onReleased(RefreshData element) {
+ }
+ }, RefreshData.POOL_MAX));
+
+ public static RefreshData obtain(int id, int progress, boolean fromUser) {
+ RefreshData rd = RefreshData.sPool.acquire();
+ rd.id = id;
+ rd.progress = progress;
+ rd.fromUser = fromUser;
+ return rd;
+ }
+
+ public boolean fromUser;
+ public int id;
+ private boolean mIsPooled;
+ private RefreshData mNext;
+
+ public int progress;
+
+ @Override
+ public RefreshData getNextPoolable() {
+ return mNext;
+ }
+
+ @Override
+ public boolean isPooled() {
+ return mIsPooled;
+ }
+
+ public void recycle() {
+ RefreshData.sPool.release(this);
+ }
+
+ @Override
+ public void setNextPoolable(RefreshData element) {
+ mNext = element;
+ }
+
+ @Override
+ public void setPooled(boolean isPooled) {
+ mIsPooled = isPooled;
+ }
+ }
+
+ private class RefreshProgressRunnable implements Runnable {
+ @Override
+ public void run() {
+ synchronized (ProgressBar.this) {
+ final int count = mRefreshData.size();
+ for (int i = 0; i < count; i++) {
+ final RefreshData rd = mRefreshData.get(i);
+ doRefreshProgress(rd.id, rd.progress, rd.fromUser, true);
+ rd.recycle();
+ }
+ mRefreshData.clear();
+ mRefreshIsPosted = false;
+ }
+ }
+ }
+
+ protected static class SavedState extends BaseSavedState {
+ public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {
+ @Override
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ int progress;
+
+ int secondaryProgress;
+
+ protected SavedState(Parcel in) {
+ super(in);
+ progress = in.readInt();
+ secondaryProgress = in.readInt();
+ }
+
+ protected SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeInt(progress);
+ out.writeInt(secondaryProgress);
+ }
+ }
+
+ private static final int MAX_LEVEL = 10000;
+ private static final int TIMEOUT_SEND_ACCESSIBILITY_EVENT = 200;
+ private AccessibilityEventSender mAccessibilityEventSender;
+ private AlphaAnimation mAnimation;
+ private boolean mAttached;
+ private int mBehavior;
+ private Drawable mCurrentDrawable;
+ private int mDuration;
+ private boolean mHasAnimation;
+ private boolean mIndeterminate;
+ private Drawable mIndeterminateDrawable;
+ private boolean mInDrawing;
+ private Interpolator mInterpolator;
+ private int mMax;
+ protected int mMinWidth, mMaxWidth, mMinHeight, mMaxHeight;
+ private boolean mNoInvalidate;
+ private boolean mOnlyIndeterminate;
+ private int mProgress;
+ private Drawable mProgressDrawable;
+ private final ArrayList<RefreshData> mRefreshData = new ArrayList<RefreshData>();
+ private boolean mRefreshIsPosted;
+ private RefreshProgressRunnable mRefreshProgressRunnable;
+ private Bitmap mSampleTile;
+ private int mSecondaryProgress;
+ private boolean mShouldStartAnimationDrawable;
+ private Transformation mTransformation;
+ private long mUiThreadId;
+
+ public ProgressBar(Context context) {
+ this(context, null);
+ }
+
+ public ProgressBar(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.progressBarStyle);
+ }
+
+ public ProgressBar(Context context, AttributeSet attrs, int defStyle) {
+ this(context, attrs, defStyle, R.style.Holo_ProgressBar);
+ }
+
+ public ProgressBar(Context context, AttributeSet attrs, int defStyle,
+ int styleRes) {
+ super(context, attrs, defStyle);
+ mUiThreadId = Thread.currentThread().getId();
+ initProgressBar();
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.ProgressBar, defStyle, styleRes);
+ mNoInvalidate = true;
+
+ Drawable drawable = a.getDrawable(R.styleable.ProgressBar_android_progressDrawable);
+ if (drawable != null) {
+ drawable = tileify(drawable, false);
+ setProgressDrawable(drawable);
+ }
+ mDuration = a.getInt(
+ R.styleable.ProgressBar_android_indeterminateDuration,
+ mDuration);
+ mMinWidth = a.getDimensionPixelSize(
+ R.styleable.ProgressBar_android_minWidth, mMinWidth);
+ mMaxWidth = a.getDimensionPixelSize(
+ R.styleable.ProgressBar_android_maxWidth, mMaxWidth);
+ mMinHeight = a.getDimensionPixelSize(
+ R.styleable.ProgressBar_android_minHeight, mMinHeight);
+ mMaxHeight = a.getDimensionPixelSize(
+ R.styleable.ProgressBar_android_maxHeight, mMaxHeight);
+ mBehavior = a.getInt(
+ R.styleable.ProgressBar_android_indeterminateBehavior,
+ mBehavior);
+ final int resID = a.getResourceId(
+ R.styleable.ProgressBar_android_interpolator,
+ android.R.anim.linear_interpolator);
+ if (resID > 0) {
+ setInterpolator(context, resID);
+ }
+ setMax(a.getInt(R.styleable.ProgressBar_android_max, mMax));
+ setProgress(a.getInt(R.styleable.ProgressBar_android_progress,
+ mProgress));
+ setSecondaryProgress(a.getInt(
+ R.styleable.ProgressBar_android_secondaryProgress,
+ mSecondaryProgress));
+ drawable = DrawableCompat.getDrawable(a,
+ R.styleable.ProgressBar_android_indeterminateDrawable);
+ if (drawable != null) {
+ drawable = tileifyIndeterminate(drawable);
+ setIndeterminateDrawable(drawable);
+ }
+ mOnlyIndeterminate = a.getBoolean(
+ R.styleable.ProgressBar_android_indeterminateOnly,
+ mOnlyIndeterminate);
+ mNoInvalidate = false;
+ setIndeterminate(mOnlyIndeterminate
+ || a.getBoolean(R.styleable.ProgressBar_android_indeterminate,
+ mIndeterminate));
+ a.recycle();
+ }
+
+ private synchronized void doRefreshProgress(int id, int progress,
+ boolean fromUser, boolean callBackToApp) {
+ float scale = mMax > 0 ? (float) progress / (float) mMax : 0;
+ final Drawable d = mCurrentDrawable;
+ if (d != null) {
+ Drawable progressDrawable = null;
+ if (d instanceof LayerDrawable) {
+ progressDrawable = ((LayerDrawable) d)
+ .findDrawableByLayerId(id);
+ }
+ final int level = (int) (scale * ProgressBar.MAX_LEVEL);
+ (progressDrawable != null ? progressDrawable : d).setLevel(level);
+ } else {
+ invalidate();
+ }
+ if (callBackToApp && id == R.id.progress) {
+ onProgressRefresh(scale, fromUser);
+ }
+ }
+
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ updateDrawableState();
+ }
+
+ protected Drawable getCurrentDrawable() {
+ return mCurrentDrawable;
+ }
+
+ private Shape getDrawableShape() {
+ final float[] roundedCorners = new float[] {
+ 5, 5, 5, 5, 5, 5, 5, 5
+ };
+ return new RoundRectShape(roundedCorners, null, null);
+ }
+
+ @Override
+ public Drawable getIndeterminateDrawable() {
+ return mIndeterminateDrawable;
+ }
+
+ @Override
+ public Interpolator getInterpolator() {
+ return mInterpolator;
+ }
+
+ @Override
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getMax() {
+ return mMax;
+ }
+
+ @Override
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getProgress() {
+ return mIndeterminate ? 0 : mProgress;
+ }
+
+ @Override
+ public Drawable getProgressDrawable() {
+ return mProgressDrawable;
+ }
+
+ public int getResolvedLayoutDirection() {
+ return 0;
+ }
+
+ public int getResolvedLayoutDirection(Drawable who) {
+ return who == mProgressDrawable || who == mIndeterminateDrawable ? getResolvedLayoutDirection()
+ : 0;
+ }
+
+ @Override
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized int getSecondaryProgress() {
+ return mIndeterminate ? 0 : mSecondaryProgress;
+ }
+
+ public synchronized final void incrementProgress(int diff) {
+ setProgress(mProgress + diff);
+ }
+
+ public synchronized final void incrementSecondaryProgress(int diff) {
+ setSecondaryProgress(mSecondaryProgress + diff);
+ }
+
+ private void initProgressBar() {
+ mMax = 100;
+ mProgress = 0;
+ mSecondaryProgress = 0;
+ mIndeterminate = false;
+ mOnlyIndeterminate = false;
+ mDuration = 4000;
+ mBehavior = Animation.RESTART;
+ mMinWidth = 24;
+ mMaxWidth = 48;
+ mMinHeight = 24;
+ mMaxHeight = 48;
+ }
+
+ @Override
+ public void invalidateDrawable(Drawable dr) {
+ if (!mInDrawing) {
+ if (verifyDrawable(dr)) {
+ final Rect dirty = dr.getBounds();
+ final int scrollX = getScrollX() + getPaddingLeft();
+ final int scrollY = getScrollY() + getPaddingTop();
+
+ invalidate(dirty.left + scrollX, dirty.top + scrollY,
+ dirty.right + scrollX, dirty.bottom + scrollY);
+ } else {
+ super.invalidateDrawable(dr);
+ }
+ }
+ }
+
+ @Override
+ @ViewDebug.ExportedProperty(category = "progress")
+ public synchronized boolean isIndeterminate() {
+ return mIndeterminate;
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void jumpDrawablesToCurrentState() {
+ super.jumpDrawablesToCurrentState();
+ if (mProgressDrawable != null) {
+ mProgressDrawable.jumpToCurrentState();
+ }
+ if (mIndeterminateDrawable != null) {
+ mIndeterminateDrawable.jumpToCurrentState();
+ }
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ if (mIndeterminate) {
+ startAnimation();
+ }
+ if (mRefreshData != null) {
+ synchronized (this) {
+ final int count = mRefreshData.size();
+ for (int i = 0; i < count; i++) {
+ final RefreshData rd = mRefreshData.get(i);
+ doRefreshProgress(rd.id, rd.progress, rd.fromUser, true);
+ rd.recycle();
+ }
+ mRefreshData.clear();
+ }
+ }
+ mAttached = true;
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ if (mIndeterminate) {
+ stopAnimation();
+ }
+ if (mRefreshProgressRunnable != null) {
+ removeCallbacks(mRefreshProgressRunnable);
+ }
+ if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
+ removeCallbacks(mRefreshProgressRunnable);
+ }
+ if (mAccessibilityEventSender != null) {
+ removeCallbacks(mAccessibilityEventSender);
+ }
+ super.onDetachedFromWindow();
+ mAttached = false;
+ }
+
+ @Override
+ protected synchronized void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ Drawable d = mCurrentDrawable;
+ if (d != null) {
+ canvas.save();
+ canvas.translate(getPaddingLeft(), getPaddingTop());
+ long time = getDrawingTime();
+ if (mHasAnimation) {
+ mAnimation.getTransformation(time, mTransformation);
+ float scale = mTransformation.getAlpha();
+ try {
+ mInDrawing = true;
+ d.setLevel((int) (scale * ProgressBar.MAX_LEVEL));
+ } finally {
+ mInDrawing = false;
+ }
+ postInvalidate();
+ }
+ d.draw(canvas);
+ canvas.restore();
+ if (mShouldStartAnimationDrawable && d instanceof Animatable) {
+ ((Animatable) d).start();
+ mShouldStartAnimationDrawable = false;
+ }
+ }
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(ProgressBar.class.getName());
+ event.setItemCount(mMax);
+ event.setCurrentItemIndex(mProgress);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(ProgressBar.class.getName());
+ }
+
+ @Override
+ protected synchronized void onMeasure(int widthMeasureSpec,
+ int heightMeasureSpec) {
+ Drawable d = mCurrentDrawable;
+ int dw = 0;
+ int dh = 0;
+ if (d != null) {
+ dw = Math
+ .max(mMinWidth, Math.min(mMaxWidth, d.getIntrinsicWidth()));
+ dh = Math.max(mMinHeight,
+ Math.min(mMaxHeight, d.getIntrinsicHeight()));
+ }
+ updateDrawableState();
+ dw += getPaddingLeft() + getPaddingRight();
+ dh += getPaddingTop() + getPaddingBottom();
+ setMeasuredDimension(
+ _View.supportResolveSizeAndState(dw, widthMeasureSpec, 0),
+ _View.supportResolveSizeAndState(dh, heightMeasureSpec, 0));
+ }
+
+ protected void onProgressRefresh(float scale, boolean fromUser) {
+ try {
+ if (((AccessibilityManager) AccessibilityManager.class.getMethod(
+ "getInstance", Context.class).invoke(null, getContext()))
+ .isEnabled()) {
+ scheduleAccessibilityEventSender();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ setProgress(ss.progress);
+ setSecondaryProgress(ss.secondaryProgress);
+ }
+
+ @Override
+ public Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ SavedState ss = new SavedState(superState);
+ ss.progress = mProgress;
+ ss.secondaryProgress = mSecondaryProgress;
+ return ss;
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ updateDrawableBounds(w, h);
+ }
+
+ @Override
+ public void onVisibilityChanged(View changedView, int visibility) {
+ super.onVisibilityChanged(changedView, visibility);
+ if (mIndeterminate) {
+ if (visibility == android.view.View.GONE
+ || visibility == android.view.View.INVISIBLE) {
+ stopAnimation();
+ } else {
+ startAnimation();
+ }
+ }
+ }
+
+ @Override
+ public void postInvalidate() {
+ if (!mNoInvalidate) {
+ super.postInvalidate();
+ }
+ }
+
+ private synchronized void refreshProgress(int id, int progress,
+ boolean fromUser) {
+ if (mUiThreadId == Thread.currentThread().getId()) {
+ doRefreshProgress(id, progress, fromUser, true);
+ } else if (mRefreshData != null) {
+ if (mRefreshProgressRunnable == null) {
+ mRefreshProgressRunnable = new RefreshProgressRunnable();
+ }
+
+ final RefreshData rd = RefreshData.obtain(id, progress, fromUser);
+ mRefreshData.add(rd);
+ if (mAttached && !mRefreshIsPosted) {
+ post(mRefreshProgressRunnable);
+ mRefreshIsPosted = true;
+ }
+ }
+ }
+
+ private void scheduleAccessibilityEventSender() {
+ if (mAccessibilityEventSender == null) {
+ mAccessibilityEventSender = new AccessibilityEventSender();
+ } else {
+ removeCallbacks(mAccessibilityEventSender);
+ }
+ postDelayed(mAccessibilityEventSender,
+ ProgressBar.TIMEOUT_SEND_ACCESSIBILITY_EVENT);
+ }
+
+ @Override
+ public synchronized void setIndeterminate(boolean indeterminate) {
+ if ((!mOnlyIndeterminate || !mIndeterminate)
+ && indeterminate != mIndeterminate) {
+ mIndeterminate = indeterminate;
+
+ if (indeterminate) {
+ // swap between indeterminate and regular backgrounds
+ mCurrentDrawable = mIndeterminateDrawable;
+ startAnimation();
+ } else {
+ mCurrentDrawable = mProgressDrawable;
+ stopAnimation();
+ }
+ }
+ }
+
+ @Override
+ public void setIndeterminateDrawable(Drawable d) {
+ if (d != null) {
+ d.setCallback(this);
+ }
+ mIndeterminateDrawable = d;
+ if (mIndeterminate) {
+ mCurrentDrawable = d;
+ postInvalidate();
+ }
+ }
+
+ @Override
+ public void setInterpolator(Context context, int resID) {
+ setInterpolator(AnimationUtils.loadInterpolator(context, resID));
+ }
+
+ @Override
+ public void setInterpolator(Interpolator interpolator) {
+ mInterpolator = interpolator;
+ }
+
+ @Override
+ public synchronized void setMax(int max) {
+ if (max < 0) {
+ max = 0;
+ }
+ if (max != mMax) {
+ mMax = max;
+ postInvalidate();
+
+ if (mProgress > max) {
+ mProgress = max;
+ }
+ refreshProgress(R.id.progress, mProgress, false);
+ }
+ }
+
+ @Override
+ public synchronized void setProgress(int progress) {
+ setProgress(progress, false);
+ }
+
+ synchronized void setProgress(int progress, boolean fromUser) {
+ if (mIndeterminate) {
+ return;
+ }
+ if (progress < 0) {
+ progress = 0;
+ }
+ if (progress > mMax) {
+ progress = mMax;
+ }
+ if (progress != mProgress) {
+ mProgress = progress;
+ refreshProgress(R.id.progress, mProgress, fromUser);
+ }
+ }
+
+ @Override
+ public void setProgressDrawable(Drawable d) {
+ boolean needUpdate;
+ if (mProgressDrawable != null && d != mProgressDrawable) {
+ mProgressDrawable.setCallback(null);
+ needUpdate = true;
+ } else {
+ needUpdate = false;
+ }
+ if (d != null) {
+ d.setCallback(this);
+ int drawableHeight = d.getMinimumHeight();
+ if (mMaxHeight < drawableHeight) {
+ mMaxHeight = drawableHeight;
+ requestLayout();
+ }
+ }
+ mProgressDrawable = d;
+ if (!mIndeterminate) {
+ mCurrentDrawable = d;
+ postInvalidate();
+ }
+ if (needUpdate) {
+ updateDrawableBounds(getWidth(), getHeight());
+ updateDrawableState();
+ doRefreshProgress(R.id.progress, mProgress, false, false);
+ doRefreshProgress(R.id.secondaryProgress, mSecondaryProgress,
+ false, false);
+ }
+ }
+
+ @Override
+ public synchronized void setSecondaryProgress(int secondaryProgress) {
+ if (mIndeterminate) {
+ return;
+ }
+ if (secondaryProgress < 0) {
+ secondaryProgress = 0;
+ }
+ if (secondaryProgress > mMax) {
+ secondaryProgress = mMax;
+ }
+ if (secondaryProgress != mSecondaryProgress) {
+ mSecondaryProgress = secondaryProgress;
+ refreshProgress(R.id.secondaryProgress, mSecondaryProgress, false);
+ }
+ }
+
+ @Override
+ public void setVisibility(int v) {
+ if (getVisibility() != v) {
+ super.setVisibility(v);
+ if (mIndeterminate) {
+ if (v == android.view.View.GONE
+ || v == android.view.View.INVISIBLE) {
+ stopAnimation();
+ } else {
+ startAnimation();
+ }
+ }
+ }
+ }
+
+ void startAnimation() {
+ if (getVisibility() != android.view.View.VISIBLE) {
+ return;
+ }
+ if (mIndeterminateDrawable instanceof Animatable) {
+ mShouldStartAnimationDrawable = true;
+ mHasAnimation = false;
+ } else {
+ mHasAnimation = true;
+ if (mInterpolator == null) {
+ mInterpolator = new LinearInterpolator();
+ }
+ if (mTransformation == null) {
+ mTransformation = new Transformation();
+ } else {
+ mTransformation.clear();
+ }
+ if (mAnimation == null) {
+ mAnimation = new AlphaAnimation(0.0f, 1.0f);
+ } else {
+ mAnimation.reset();
+ }
+ mAnimation.setRepeatMode(mBehavior);
+ mAnimation.setRepeatCount(Animation.INFINITE);
+ mAnimation.setDuration(mDuration);
+ mAnimation.setInterpolator(mInterpolator);
+ mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
+ }
+ postInvalidate();
+ }
+
+ void stopAnimation() {
+ mHasAnimation = false;
+ if (mIndeterminateDrawable instanceof Animatable) {
+ ((Animatable) mIndeterminateDrawable).stop();
+ mShouldStartAnimationDrawable = false;
+ }
+ postInvalidate();
+ }
+
+ private Drawable tileify(Drawable drawable, boolean clip) {
+ if (drawable instanceof LayerDrawable) {
+ LayerDrawable background = (LayerDrawable) drawable;
+ final int N = background.getNumberOfLayers();
+ Drawable[] outDrawables = new Drawable[N];
+ for (int i = 0; i < N; i++) {
+ int id = background.getId(i);
+ outDrawables[i] = tileify(background.getDrawable(i),
+ id == R.id.progress || id == R.id.secondaryProgress);
+ }
+ LayerDrawable newBg = new LayerDrawable(outDrawables);
+ for (int i = 0; i < N; i++) {
+ newBg.setId(i, background.getId(i));
+ }
+ return newBg;
+ } else if (drawable instanceof StateListDrawable) {
+ StateListDrawable in = (StateListDrawable) drawable;
+ StateListDrawable out = new StateListDrawable();
+ int numStates = ReflectHelper
+ .invoke(in, "getStateCount", int.class);
+ for (int i = 0; i < numStates; i++) {
+ out.addState(
+ ReflectHelper.invoke(in, "getStateSet", int[].class, i),
+ tileify(ReflectHelper.invoke(in, "getStateDrawable",
+ Drawable.class, i), clip));
+ }
+ return out;
+ } else if (drawable instanceof BitmapDrawable) {
+ final Bitmap tileBitmap = ((BitmapDrawable) drawable).getBitmap();
+ if (mSampleTile == null) {
+ mSampleTile = tileBitmap;
+ }
+ final ShapeDrawable shapeDrawable = new ShapeDrawable(
+ getDrawableShape());
+ final BitmapShader bitmapShader = new BitmapShader(tileBitmap,
+ Shader.TileMode.REPEAT, Shader.TileMode.CLAMP);
+ shapeDrawable.getPaint().setShader(bitmapShader);
+ return clip ? new ClipDrawable(shapeDrawable, Gravity.LEFT,
+ ClipDrawable.HORIZONTAL) : shapeDrawable;
+ }
+ return drawable;
+ }
+
+ private Drawable tileifyIndeterminate(Drawable drawable) {
+ if (drawable instanceof AnimationDrawable) {
+ AnimationDrawable background = (AnimationDrawable) drawable;
+ final int N = background.getNumberOfFrames();
+ AnimationDrawable newBg = new AnimationDrawable();
+ newBg.setOneShot(background.isOneShot());
+ for (int i = 0; i < N; i++) {
+ Drawable frame = tileify(background.getFrame(i), true);
+ frame.setLevel(10000);
+ newBg.addFrame(frame, background.getDuration(i));
+ }
+ newBg.setLevel(10000);
+ drawable = newBg;
+ }
+ return drawable;
+ }
+
+ private void updateDrawableBounds(int w, int h) {
+ int right = w - getPaddingRight() - getPaddingLeft();
+ int bottom = h - getPaddingBottom() - getPaddingTop();
+ int top = 0;
+ int left = 0;
+ if (mIndeterminateDrawable != null) {
+ if (mOnlyIndeterminate
+ && !(mIndeterminateDrawable instanceof AnimationDrawable)) {
+ final int intrinsicWidth = mIndeterminateDrawable
+ .getIntrinsicWidth();
+ final int intrinsicHeight = mIndeterminateDrawable
+ .getIntrinsicHeight();
+ final float intrinsicAspect = (float) intrinsicWidth
+ / intrinsicHeight;
+ final float boundAspect = (float) w / h;
+ if (intrinsicAspect != boundAspect) {
+ if (boundAspect > intrinsicAspect) {
+ final int width = (int) (h * intrinsicAspect);
+ left = (w - width) / 2;
+ right = left + width;
+ } else {
+ final int height = (int) (w * (1 / intrinsicAspect));
+ top = (h - height) / 2;
+ bottom = top + height;
+ }
+ }
+ }
+ mIndeterminateDrawable.setBounds(left, top, right, bottom);
+ }
+ if (mProgressDrawable != null) {
+ mProgressDrawable.setBounds(0, 0, right, bottom);
+ }
+ }
+
+ private void updateDrawableState() {
+ int[] state = getDrawableState();
+ if (mProgressDrawable != null && mProgressDrawable.isStateful()) {
+ mProgressDrawable.setState(state);
+ }
+ if (mIndeterminateDrawable != null
+ && mIndeterminateDrawable.isStateful()) {
+ mIndeterminateDrawable.setState(state);
+ }
+ }
+
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ return who == mProgressDrawable || who == mIndeterminateDrawable
+ || super.verifyDrawable(who);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/RadioButton.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/RadioButton.java
new file mode 100644
index 0000000000..e909c86b9e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/RadioButton.java
@@ -0,0 +1,84 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class RadioButton extends android.widget.RadioButton {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public RadioButton(Context context) {
+ this(context, null);
+ }
+
+ public RadioButton(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.radioButtonStyle);
+ }
+
+ public RadioButton(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Scroller.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Scroller.java
new file mode 100644
index 0000000000..b7ca637124
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Scroller.java
@@ -0,0 +1,307 @@
+
+package org.holoeverywhere.widget;
+
+import android.content.Context;
+import android.hardware.SensorManager;
+import android.os.Build;
+import android.util.FloatMath;
+import android.view.ViewConfiguration;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Interpolator;
+
+public class Scroller {
+ private static float ALPHA = 800;
+ private static float DECELERATION_RATE = (float) (Math.log(0.75) / Math
+ .log(0.9));
+ private static final int DEFAULT_DURATION = 250;
+ private static float END_TENSION = 0.6f;
+ private static final int FLING_MODE = 1;
+ private static final int NB_SAMPLES = 100;
+ private static final int SCROLL_MODE = 0;
+ private static final float[] SPLINE = new float[Scroller.NB_SAMPLES + 1];
+ private static float START_TENSION = 0.4f;
+ private static float sViscousFluidNormalize;
+ private static float sViscousFluidScale;
+ static {
+ float x_min = 0.0f;
+ for (int i = 0; i <= Scroller.NB_SAMPLES; i++) {
+ final float t = (float) i / Scroller.NB_SAMPLES;
+ float x_max = 1.0f;
+ float x, tx, coef;
+ while (true) {
+ x = x_min + (x_max - x_min) / 2.0f;
+ coef = 3.0f * x * (1.0f - x);
+ tx = coef
+ * ((1.0f - x) * Scroller.START_TENSION + x
+ * Scroller.END_TENSION) + x * x * x;
+ if (Math.abs(tx - t) < 1E-5) {
+ break;
+ }
+ if (tx > t) {
+ x_max = x;
+ } else {
+ x_min = x;
+ }
+ }
+ final float d = coef + x * x * x;
+ Scroller.SPLINE[i] = d;
+ }
+ Scroller.SPLINE[Scroller.NB_SAMPLES] = 1.0f;
+ Scroller.sViscousFluidScale = 8.0f;
+ Scroller.sViscousFluidNormalize = 1.0f;
+ Scroller.sViscousFluidNormalize = 1.0f / Scroller.viscousFluid(1.0f);
+ }
+
+ static float viscousFluid(float x) {
+ x *= Scroller.sViscousFluidScale;
+ if (x < 1.0f) {
+ x -= 1.0f - (float) Math.exp(-x);
+ } else {
+ float start = 0.36787944117f; // 1/e == exp(-1)
+ x = 1.0f - (float) Math.exp(1.0f - x);
+ x = start + x * (1.0f - start);
+ }
+ x *= Scroller.sViscousFluidNormalize;
+ return x;
+ }
+
+ private int mCurrX;
+ private int mCurrY;
+ private float mDeceleration;
+ private float mDeltaX;
+ private float mDeltaY;
+ private int mDuration;
+ private float mDurationReciprocal;
+ private int mFinalX;
+ private int mFinalY;
+ private boolean mFinished;
+ private boolean mFlywheel;
+ private Interpolator mInterpolator;
+ private int mMaxX;
+ private int mMaxY;
+ private int mMinX;
+ private int mMinY;
+ private int mMode;
+ private final float mPpi;
+
+ private long mStartTime;
+
+ private int mStartX;
+ private int mStartY;
+
+ private float mVelocity;
+
+ public Scroller(Context context) {
+ this(context, null);
+ }
+
+ public Scroller(Context context, Interpolator interpolator) {
+ this(
+ context,
+ interpolator,
+ context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB);
+ }
+
+ public Scroller(Context context, Interpolator interpolator, boolean flywheel) {
+ mFinished = true;
+ mInterpolator = interpolator;
+ mPpi = context.getResources().getDisplayMetrics().density * 160.0f;
+ mDeceleration = computeDeceleration(ViewConfiguration
+ .getScrollFriction());
+ mFlywheel = flywheel;
+ }
+
+ public void abortAnimation() {
+ mCurrX = mFinalX;
+ mCurrY = mFinalY;
+ mFinished = true;
+ }
+
+ private float computeDeceleration(float friction) {
+ return SensorManager.GRAVITY_EARTH * 39.37f * mPpi * friction;
+ }
+
+ public boolean computeScrollOffset() {
+ if (mFinished) {
+ return false;
+ }
+ int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime);
+ if (timePassed < mDuration) {
+ switch (mMode) {
+ case SCROLL_MODE:
+ float x = timePassed * mDurationReciprocal;
+ if (mInterpolator == null) {
+ x = Scroller.viscousFluid(x);
+ } else {
+ x = mInterpolator.getInterpolation(x);
+ }
+ mCurrX = mStartX + Math.round(x * mDeltaX);
+ mCurrY = mStartY + Math.round(x * mDeltaY);
+ break;
+ case FLING_MODE:
+ final float t = (float) timePassed / mDuration;
+ final int index = (int) (Scroller.NB_SAMPLES * t);
+ final float t_inf = (float) index / Scroller.NB_SAMPLES;
+ final float t_sup = (float) (index + 1) / Scroller.NB_SAMPLES;
+ final float d_inf = Scroller.SPLINE[index];
+ final float d_sup = Scroller.SPLINE[index + 1];
+ final float distanceCoef = d_inf + (t - t_inf)
+ / (t_sup - t_inf) * (d_sup - d_inf);
+ mCurrX = mStartX
+ + Math.round(distanceCoef * (mFinalX - mStartX));
+ mCurrX = Math.min(mCurrX, mMaxX);
+ mCurrX = Math.max(mCurrX, mMinX);
+ mCurrY = mStartY
+ + Math.round(distanceCoef * (mFinalY - mStartY));
+ mCurrY = Math.min(mCurrY, mMaxY);
+ mCurrY = Math.max(mCurrY, mMinY);
+ if (mCurrX == mFinalX && mCurrY == mFinalY) {
+ mFinished = true;
+ }
+ break;
+ }
+ } else {
+ mCurrX = mFinalX;
+ mCurrY = mFinalY;
+ mFinished = true;
+ }
+ return true;
+ }
+
+ public void extendDuration(int extend) {
+ int passed = timePassed();
+ mDuration = passed + extend;
+ mDurationReciprocal = 1.0f / mDuration;
+ mFinished = false;
+ }
+
+ public void fling(int startX, int startY, int velocityX, int velocityY,
+ int minX, int maxX, int minY, int maxY) {
+ if (mFlywheel && !mFinished) {
+ float oldVel = getCurrVelocity();
+ float dx = mFinalX - mStartX;
+ float dy = mFinalY - mStartY;
+ float hyp = FloatMath.sqrt(dx * dx + dy * dy);
+ float ndx = dx / hyp;
+ float ndy = dy / hyp;
+ float oldVelocityX = ndx * oldVel;
+ float oldVelocityY = ndy * oldVel;
+ if (Math.signum(velocityX) == Math.signum(oldVelocityX)
+ && Math.signum(velocityY) == Math.signum(oldVelocityY)) {
+ velocityX += oldVelocityX;
+ velocityY += oldVelocityY;
+ }
+ }
+ mMode = Scroller.FLING_MODE;
+ mFinished = false;
+ float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY
+ * velocityY);
+ mVelocity = velocity;
+ final double l = Math.log(Scroller.START_TENSION * velocity
+ / Scroller.ALPHA);
+ mDuration = (int) (1000.0 * Math.exp(l
+ / (Scroller.DECELERATION_RATE - 1.0)));
+ mStartTime = AnimationUtils.currentAnimationTimeMillis();
+ mStartX = startX;
+ mStartY = startY;
+ float coeffX = velocity == 0 ? 1.0f : velocityX / velocity;
+ float coeffY = velocity == 0 ? 1.0f : velocityY / velocity;
+ int totalDistance = (int) (Scroller.ALPHA * Math
+ .exp(Scroller.DECELERATION_RATE
+ / (Scroller.DECELERATION_RATE - 1.0) * l));
+ mMinX = minX;
+ mMaxX = maxX;
+ mMinY = minY;
+ mMaxY = maxY;
+ mFinalX = startX + Math.round(totalDistance * coeffX);
+ mFinalX = Math.min(mFinalX, mMaxX);
+ mFinalX = Math.max(mFinalX, mMinX);
+ mFinalY = startY + Math.round(totalDistance * coeffY);
+ mFinalY = Math.min(mFinalY, mMaxY);
+ mFinalY = Math.max(mFinalY, mMinY);
+ }
+
+ public final void forceFinished(boolean finished) {
+ mFinished = finished;
+ }
+
+ public float getCurrVelocity() {
+ return mVelocity - mDeceleration * timePassed() / 2000.0f;
+ }
+
+ public final int getCurrX() {
+ return mCurrX;
+ }
+
+ public final int getCurrY() {
+ return mCurrY;
+ }
+
+ public final int getDuration() {
+ return mDuration;
+ }
+
+ public final int getFinalX() {
+ return mFinalX;
+ }
+
+ public final int getFinalY() {
+ return mFinalY;
+ }
+
+ public final int getStartX() {
+ return mStartX;
+ }
+
+ public final int getStartY() {
+ return mStartY;
+ }
+
+ public final boolean isFinished() {
+ return mFinished;
+ }
+
+ public boolean isScrollingInDirection(float xvel, float yvel) {
+ return !mFinished
+ && Math.signum(xvel) == Math.signum(mFinalX - mStartX)
+ && Math.signum(yvel) == Math.signum(mFinalY - mStartY);
+ }
+
+ public void setFinalX(int newX) {
+ mFinalX = newX;
+ mDeltaX = mFinalX - mStartX;
+ mFinished = false;
+ }
+
+ public void setFinalY(int newY) {
+ mFinalY = newY;
+ mDeltaY = mFinalY - mStartY;
+ mFinished = false;
+ }
+
+ public final void setFriction(float friction) {
+ mDeceleration = computeDeceleration(friction);
+ }
+
+ public void startScroll(int startX, int startY, int dx, int dy) {
+ startScroll(startX, startY, dx, dy, Scroller.DEFAULT_DURATION);
+ }
+
+ public void startScroll(int startX, int startY, int dx, int dy, int duration) {
+ mMode = Scroller.SCROLL_MODE;
+ mFinished = false;
+ mDuration = duration;
+ mStartTime = AnimationUtils.currentAnimationTimeMillis();
+ mStartX = startX;
+ mStartY = startY;
+ mFinalX = startX + dx;
+ mFinalY = startY + dy;
+ mDeltaX = dx;
+ mDeltaY = dy;
+ mDurationReciprocal = 1.0f / mDuration;
+ }
+
+ public int timePassed() {
+ return (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SeekBar.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SeekBar.java
new file mode 100644
index 0000000000..32accb536a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SeekBar.java
@@ -0,0 +1,75 @@
+
+package org.holoeverywhere.widget;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+public class SeekBar extends AbsSeekBar {
+ public interface OnSeekBarChangeListener {
+ void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser);
+
+ void onStartTrackingTouch(SeekBar seekBar);
+
+ void onStopTrackingTouch(SeekBar seekBar);
+ }
+
+ private OnSeekBarChangeListener mOnSeekBarChangeListener;
+
+ public SeekBar(Context context) {
+ this(context, null);
+ }
+
+ public SeekBar(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.seekBarStyle);
+ }
+
+ public SeekBar(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(SeekBar.class.getName());
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(SeekBar.class.getName());
+ }
+
+ @Override
+ public void onProgressRefresh(float scale, boolean fromUser) {
+ super.onProgressRefresh(scale, fromUser);
+ if (mOnSeekBarChangeListener != null) {
+ mOnSeekBarChangeListener.onProgressChanged(this, getProgress(),
+ fromUser);
+ }
+ }
+
+ @Override
+ void onStartTrackingTouch() {
+ super.onStartTrackingTouch();
+ if (mOnSeekBarChangeListener != null) {
+ mOnSeekBarChangeListener.onStartTrackingTouch(this);
+ }
+ }
+
+ @Override
+ void onStopTrackingTouch() {
+ super.onStopTrackingTouch();
+ if (mOnSeekBarChangeListener != null) {
+ mOnSeekBarChangeListener.onStopTrackingTouch(this);
+ }
+ }
+
+ public void setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
+ mOnSeekBarChangeListener = l;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SimpleExpandableListAdapter.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SimpleExpandableListAdapter.java
new file mode 100644
index 0000000000..b23c516464
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/SimpleExpandableListAdapter.java
@@ -0,0 +1,149 @@
+
+package org.holoeverywhere.widget;
+
+import java.util.List;
+import java.util.Map;
+
+import org.holoeverywhere.LayoutInflater;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class SimpleExpandableListAdapter extends BaseExpandableListAdapter {
+ private List<? extends List<? extends Map<String, ?>>> mChildData;
+ private String[] mChildFrom;
+ private int mChildLayout;
+ private int[] mChildTo;
+ private int mCollapsedGroupLayout;
+ private int mExpandedGroupLayout;
+ private List<? extends Map<String, ?>> mGroupData;
+ private String[] mGroupFrom;
+ private int[] mGroupTo;
+ private LayoutInflater mInflater;
+ private int mLastChildLayout;
+
+ public SimpleExpandableListAdapter(Context context,
+ List<? extends Map<String, ?>> groupData, int expandedGroupLayout,
+ int collapsedGroupLayout, String[] groupFrom, int[] groupTo,
+ List<? extends List<? extends Map<String, ?>>> childData,
+ int childLayout, int lastChildLayout, String[] childFrom,
+ int[] childTo) {
+ mGroupData = groupData;
+ mExpandedGroupLayout = expandedGroupLayout;
+ mCollapsedGroupLayout = collapsedGroupLayout;
+ mGroupFrom = groupFrom;
+ mGroupTo = groupTo;
+ mChildData = childData;
+ mChildLayout = childLayout;
+ mLastChildLayout = lastChildLayout;
+ mChildFrom = childFrom;
+ mChildTo = childTo;
+ mInflater = LayoutInflater.from(context);
+ }
+
+ public SimpleExpandableListAdapter(Context context,
+ List<? extends Map<String, ?>> groupData, int expandedGroupLayout,
+ int collapsedGroupLayout, String[] groupFrom, int[] groupTo,
+ List<? extends List<? extends Map<String, ?>>> childData,
+ int childLayout, String[] childFrom, int[] childTo) {
+ this(context, groupData, expandedGroupLayout, collapsedGroupLayout,
+ groupFrom, groupTo, childData, childLayout, childLayout,
+ childFrom, childTo);
+ }
+
+ public SimpleExpandableListAdapter(Context context,
+ List<? extends Map<String, ?>> groupData, int groupLayout,
+ String[] groupFrom, int[] groupTo,
+ List<? extends List<? extends Map<String, ?>>> childData,
+ int childLayout, String[] childFrom, int[] childTo) {
+ this(context, groupData, groupLayout, groupLayout, groupFrom, groupTo, childData,
+ childLayout, childLayout, childFrom, childTo);
+ }
+
+ private void bindView(View view, Map<String, ?> data, String[] from, int[] to) {
+ int len = to.length;
+
+ for (int i = 0; i < len; i++) {
+ TextView v = (TextView) view.findViewById(to[i]);
+ if (v != null) {
+ v.setText((String) data.get(from[i]));
+ }
+ }
+ }
+
+ @Override
+ public Object getChild(int groupPosition, int childPosition) {
+ return mChildData.get(groupPosition).get(childPosition);
+ }
+
+ @Override
+ public long getChildId(int groupPosition, int childPosition) {
+ return childPosition;
+ }
+
+ @Override
+ public int getChildrenCount(int groupPosition) {
+ return mChildData.get(groupPosition).size();
+ }
+
+ @Override
+ public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
+ View convertView, ViewGroup parent) {
+ View v;
+ if (convertView == null) {
+ v = newChildView(isLastChild, parent);
+ } else {
+ v = convertView;
+ }
+ bindView(v, mChildData.get(groupPosition).get(childPosition), mChildFrom, mChildTo);
+ return v;
+ }
+
+ @Override
+ public Object getGroup(int groupPosition) {
+ return mGroupData.get(groupPosition);
+ }
+
+ @Override
+ public int getGroupCount() {
+ return mGroupData.size();
+ }
+
+ @Override
+ public long getGroupId(int groupPosition) {
+ return groupPosition;
+ }
+
+ @Override
+ public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
+ ViewGroup parent) {
+ View v;
+ if (convertView == null) {
+ v = newGroupView(isExpanded, parent);
+ } else {
+ v = convertView;
+ }
+ bindView(v, mGroupData.get(groupPosition), mGroupFrom, mGroupTo);
+ return v;
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return true;
+ }
+
+ @Override
+ public boolean isChildSelectable(int groupPosition, int childPosition) {
+ return true;
+ }
+
+ public View newChildView(boolean isLastChild, ViewGroup parent) {
+ return mInflater.inflate(isLastChild ? mLastChildLayout : mChildLayout, parent, false);
+ }
+
+ public View newGroupView(boolean isExpanded, ViewGroup parent) {
+ return mInflater.inflate(isExpanded ? mExpandedGroupLayout : mCollapsedGroupLayout,
+ parent, false);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Spinner.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Spinner.java
new file mode 100644
index 0000000000..a90cf9f5fa
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Spinner.java
@@ -0,0 +1,699 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.app.AlertDialog;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.res.TypedArray;
+import android.database.DataSetObserver;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.AbsListView;
+import android.widget.ListAdapter;
+import android.widget.SpinnerAdapter;
+
+public class Spinner extends AbsSpinner implements OnClickListener {
+ private class DialogPopup implements SpinnerPopup,
+ DialogInterface.OnClickListener {
+ private ListAdapter mListAdapter;
+ private AlertDialog mPopup;
+ private CharSequence mPrompt;
+
+ @Override
+ public void dismiss() {
+ mPopup.dismiss();
+ mPopup = null;
+ }
+
+ @Override
+ public Drawable getBackground() {
+ return null;
+ }
+
+ @Override
+ public CharSequence getHintText() {
+ return mPrompt;
+ }
+
+ @Override
+ public int getHorizontalOffset() {
+ return 0;
+ }
+
+ @Override
+ public int getVerticalOffset() {
+ return 0;
+ }
+
+ @Override
+ public boolean isShowing() {
+ return mPopup != null ? mPopup.isShowing() : false;
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, final int which) {
+ setSelection(which);
+ if (mOnItemClickListener != null) {
+ performItemClick(null, which, mListAdapter.getItemId(which));
+ }
+ dismiss();
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ mListAdapter = adapter;
+ }
+
+ @Override
+ public void setBackgroundDrawable(Drawable bg) {
+ Log.e(Spinner.TAG,
+ "Cannot set popup background for MODE_DIALOG, ignoring");
+ }
+
+ @Override
+ public void setHorizontalOffset(int px) {
+ Log.e(Spinner.TAG,
+ "Cannot set horizontal offset for MODE_DIALOG, ignoring");
+ }
+
+ @Override
+ public void setPromptText(CharSequence hintText) {
+ mPrompt = hintText;
+ }
+
+ @Override
+ public void setVerticalOffset(int px) {
+ Log.e(Spinner.TAG,
+ "Cannot set vertical offset for MODE_DIALOG, ignoring");
+ }
+
+ @Override
+ public void show() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
+ if (mPrompt != null) {
+ builder.setTitle(mPrompt);
+ }
+ mPopup = builder.setSingleChoiceItems(mListAdapter,
+ getSelectedItemPosition(), this).show();
+ }
+ }
+
+ private static class DropDownAdapter implements ListAdapter, SpinnerAdapter {
+ private SpinnerAdapter mAdapter;
+ private ListAdapter mListAdapter;
+
+ public DropDownAdapter(SpinnerAdapter adapter) {
+ mAdapter = adapter;
+ if (adapter instanceof ListAdapter) {
+ mListAdapter = (ListAdapter) adapter;
+ }
+ }
+
+ @Override
+ public boolean areAllItemsEnabled() {
+ final ListAdapter adapter = mListAdapter;
+ if (adapter != null) {
+ return adapter.areAllItemsEnabled();
+ } else {
+ return true;
+ }
+ }
+
+ @Override
+ public int getCount() {
+ return mAdapter == null ? 0 : mAdapter.getCount();
+ }
+
+ @Override
+ public View getDropDownView(int position, View convertView,
+ ViewGroup parent) {
+ return mAdapter == null ? null : mAdapter.getDropDownView(position,
+ convertView, parent);
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return mAdapter == null ? null : mAdapter.getItem(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return mAdapter == null ? -1 : mAdapter.getItemId(position);
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ return 0;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return getDropDownView(position, convertView, parent);
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ return 1;
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return mAdapter != null && mAdapter.hasStableIds();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return getCount() == 0;
+ }
+
+ @Override
+ public boolean isEnabled(int position) {
+ final ListAdapter adapter = mListAdapter;
+ if (adapter != null) {
+ return adapter.isEnabled(position);
+ } else {
+ return true;
+ }
+ }
+
+ @Override
+ public void registerDataSetObserver(DataSetObserver observer) {
+ if (mAdapter != null) {
+ mAdapter.registerDataSetObserver(observer);
+ }
+ }
+
+ @Override
+ public void unregisterDataSetObserver(DataSetObserver observer) {
+ if (mAdapter != null) {
+ mAdapter.unregisterDataSetObserver(observer);
+ }
+ }
+ }
+
+ private class DropdownPopup extends ListPopupWindow implements SpinnerPopup,
+ PopupWindow.OnDismissListener {
+ private ListAdapter mAdapter;
+ private CharSequence mHintText;
+
+ private boolean mSelectionSetted = false;
+
+ public DropdownPopup(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, R.attr.listPopupWindowStyle);
+ setAnchorView(Spinner.this);
+ setModal(true);
+ setPromptPosition(ListPopupWindow.POSITION_PROMPT_ABOVE);
+ setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(android.widget.AdapterView<?> parent,
+ final View v, final int position, long id) {
+ Spinner.this.setSelection(position);
+ if (mOnItemClickListener != null) {
+ Spinner.this.performItemClick(v, position,
+ mAdapter.getItemId(position));
+ }
+ dismiss();
+ }
+ });
+ }
+
+ @Override
+ public CharSequence getHintText() {
+ return mHintText;
+ }
+
+ @Override
+ public void onDismiss() {
+ mSelectionSetted = false;
+ }
+
+ @Override
+ public void setAdapter(ListAdapter adapter) {
+ super.setAdapter(adapter);
+ mAdapter = adapter;
+ }
+
+ @Override
+ public void setPromptText(CharSequence hintText) {
+ mHintText = hintText;
+ }
+
+ @Override
+ public void show() {
+ final Drawable background = getBackground();
+ int bgOffset = 0;
+ if (background != null) {
+ background.getPadding(mTempRect);
+ bgOffset = -mTempRect.left;
+ } else {
+ mTempRect.left = mTempRect.right = 0;
+ }
+ final int spinnerPaddingLeft = getPaddingLeft();
+ if (mDropDownWidth == LayoutParams.WRAP_CONTENT) {
+ final int spinnerWidth = Spinner.this.getWidth();
+ final int spinnerPaddingRight = getPaddingRight();
+ int contentWidth = measureContentWidth(
+ (SpinnerAdapter) mAdapter, getBackground());
+ final int contentWidthLimit = getContext().getResources()
+ .getDisplayMetrics().widthPixels
+ - mTempRect.left
+ - mTempRect.right;
+ if (contentWidth > contentWidthLimit) {
+ contentWidth = contentWidthLimit;
+ }
+ setContentWidth(Math.max(contentWidth, spinnerWidth
+ - spinnerPaddingLeft - spinnerPaddingRight));
+ } else if (mDropDownWidth == LayoutParams.MATCH_PARENT) {
+ final int spinnerWidth = Spinner.this.getWidth();
+ final int spinnerPaddingRight = getPaddingRight();
+ setContentWidth(spinnerWidth - spinnerPaddingLeft
+ - spinnerPaddingRight);
+ } else {
+ setContentWidth(mDropDownWidth);
+ }
+ setHorizontalOffset(bgOffset + spinnerPaddingLeft);
+ setInputMethodMode(ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
+ super.show();
+ getListView().setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
+ if (!mSelectionSetted) {
+ mSelectionSetted = true;
+ setSelection(Spinner.this.getSelectedItemPosition());
+ }
+ setOnDismissListener(this);
+ }
+ }
+
+ private interface SpinnerPopup {
+ public void dismiss();
+
+ public Drawable getBackground();
+
+ public CharSequence getHintText();
+
+ public int getHorizontalOffset();
+
+ public int getVerticalOffset();
+
+ public boolean isShowing();
+
+ public void setAdapter(ListAdapter adapter);
+
+ public void setBackgroundDrawable(Drawable bg);
+
+ public void setHorizontalOffset(int px);
+
+ public void setPromptText(CharSequence hintText);
+
+ public void setVerticalOffset(int px);
+
+ public void show();
+ }
+
+ private static final int MAX_ITEMS_MEASURED = 15;
+ public static final int MODE_DIALOG = 0;
+ public static final int MODE_DROPDOWN = 1;
+ private static final int MODE_THEME = -1;
+ private static final String TAG = "Spinner";
+ private boolean mDisableChildrenWhenDisabled;
+ int mDropDownWidth;
+ private int mGravity;
+
+ private SpinnerPopup mPopup;
+
+ private DropDownAdapter mTempAdapter;
+
+ private Rect mTempRect = new Rect();
+
+ public Spinner(Context context) {
+ this(context, null);
+ }
+
+ public Spinner(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.spinnerStyle);
+ }
+
+ public Spinner(Context context, AttributeSet attrs, int defStyle) {
+ this(context, attrs, defStyle, Spinner.MODE_THEME);
+ }
+
+ public Spinner(Context context, AttributeSet attrs, int defStyle, int mode) {
+ super(context, attrs, defStyle);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.Spinner, defStyle, R.style.Holo_Spinner);
+ if (mode == Spinner.MODE_THEME) {
+ mode = a.getInt(R.styleable.Spinner_spinnerMode,
+ Spinner.MODE_DIALOG);
+ }
+ switch (mode) {
+ case MODE_DIALOG: {
+ mPopup = new DialogPopup();
+ break;
+ }
+ case MODE_DROPDOWN: {
+ DropdownPopup popup = new DropdownPopup(context, attrs, defStyle);
+ mDropDownWidth = a.getLayoutDimension(
+ R.styleable.Spinner_android_dropDownWidth,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+ popup.setBackgroundDrawable(a
+ .getDrawable(R.styleable.Spinner_android_popupBackground));
+ final int verticalOffset = a.getDimensionPixelOffset(
+ R.styleable.Spinner_dropDownVerticalOffset, 0);
+ if (verticalOffset != 0) {
+ popup.setVerticalOffset(verticalOffset);
+ }
+ final int horizontalOffset = a.getDimensionPixelOffset(
+ R.styleable.Spinner_dropDownHorizontalOffset, 0);
+ if (horizontalOffset != 0) {
+ popup.setHorizontalOffset(horizontalOffset);
+ }
+ mPopup = popup;
+ break;
+
+ }
+ }
+ mGravity = a
+ .getInt(R.styleable.Spinner_android_gravity, Gravity.CENTER);
+ mPopup.setPromptText(a.getString(R.styleable.Spinner_android_prompt));
+ mDisableChildrenWhenDisabled = a.getBoolean(
+ R.styleable.Spinner_disableChildrenWhenDisabled, false);
+ a.recycle();
+ if (mTempAdapter != null) {
+ mPopup.setAdapter(mTempAdapter);
+ mTempAdapter = null;
+ }
+ }
+
+ public Spinner(Context context, int mode) {
+ this(context, null, R.attr.spinnerStyle, mode);
+ }
+
+ @Override
+ public int getBaseline() {
+ View child = null;
+ if (getChildCount() > 0) {
+ child = getChildAt(0);
+ } else if (getAdapter() != null && getAdapter().getCount() > 0) {
+ child = makeAndAddView(0);
+ mRecycler.put(0, child);
+ removeAllViewsInLayout();
+ }
+ if (child != null) {
+ final int childBaseline = child.getBaseline();
+ return childBaseline >= 0 ? child.getTop() + childBaseline : -1;
+ } else {
+ return -1;
+ }
+ }
+
+ public int getDropDownHorizontalOffset() {
+ return mPopup.getHorizontalOffset();
+ }
+
+ public int getDropDownVerticalOffset() {
+ return mPopup.getVerticalOffset();
+ }
+
+ public int getDropDownWidth() {
+ return mDropDownWidth;
+ }
+
+ public int getGravity() {
+ return mGravity;
+ }
+
+ public Drawable getPopupBackground() {
+ return mPopup.getBackground();
+ }
+
+ public CharSequence getPrompt() {
+ return mPopup.getHintText();
+ }
+
+ public void internalSetOnItemClickListener(OnItemClickListener l) {
+ super.setOnItemClickListener(l);
+ }
+
+ @Override
+ public void layout(int delta, boolean animate) {
+ int childrenLeft = mSpinnerPadding.left;
+ int childrenWidth = getRight() - getLeft() - mSpinnerPadding.left
+ - mSpinnerPadding.right;
+ if (mDataChanged) {
+ handleDataChanged();
+ }
+ if (mItemCount == 0) {
+ resetList();
+ return;
+ }
+ if (mNextSelectedPosition >= 0) {
+ setSelectedPositionInt(mNextSelectedPosition);
+ }
+ recycleAllViews();
+ removeAllViewsInLayout();
+ mFirstPosition = mSelectedPosition;
+ View sel = makeAndAddView(mSelectedPosition);
+ int width = sel.getMeasuredWidth();
+ int selectedOffset = childrenLeft;
+ switch (mGravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
+ case Gravity.CENTER_HORIZONTAL:
+ selectedOffset = childrenLeft + childrenWidth / 2 - width / 2;
+ break;
+ case Gravity.RIGHT:
+ selectedOffset = childrenLeft + childrenWidth - width;
+ break;
+ }
+ sel.offsetLeftAndRight(selectedOffset);
+ mRecycler.clear();
+ invalidate();
+ checkSelectionChanged();
+ mDataChanged = false;
+ mNeedSync = false;
+ setNextSelectedPositionInt(mSelectedPosition);
+ }
+
+ private View makeAndAddView(int position) {
+ View child;
+ if (!mDataChanged) {
+ child = mRecycler.get(position);
+ if (child != null) {
+ setUpChild(child);
+ return child;
+ }
+ }
+ child = mAdapter.getView(position, null, this);
+ setUpChild(child);
+ return child;
+ }
+
+ int measureContentWidth(SpinnerAdapter adapter, Drawable background) {
+ if (adapter == null) {
+ return 0;
+ }
+ int width = 0;
+ View itemView = null;
+ int itemType = 0;
+ final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(0,
+ MeasureSpec.UNSPECIFIED);
+ final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0,
+ MeasureSpec.UNSPECIFIED);
+ int start = Math.max(0, getSelectedItemPosition());
+ final int end = Math.min(adapter.getCount(), start
+ + Spinner.MAX_ITEMS_MEASURED);
+ final int count = end - start;
+ start = Math.max(0, start - (Spinner.MAX_ITEMS_MEASURED - count));
+ for (int i = start; i < end; i++) {
+ final int positionType = adapter.getItemViewType(i);
+ if (positionType != itemType) {
+ itemType = positionType;
+ itemView = null;
+ }
+ itemView = adapter.getView(i, itemView, this);
+ if (itemView.getLayoutParams() == null) {
+ itemView.setLayoutParams(new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ }
+ itemView.measure(widthMeasureSpec, heightMeasureSpec);
+ width = Math.max(width, itemView.getMeasuredWidth());
+ }
+ if (background != null) {
+ background.getPadding(mTempRect);
+ width += mTempRect.left + mTempRect.right;
+ }
+ return width;
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ setSelection(which);
+ dialog.dismiss();
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ if (mPopup != null && mPopup.isShowing()) {
+ mPopup.dismiss();
+ }
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(Spinner.class.getName());
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(Spinner.class.getName());
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ layout(0, false);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ if (mPopup != null
+ && MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.AT_MOST) {
+ final int measuredWidth = getMeasuredWidth();
+ setMeasuredDimension(
+ Math.min(
+ Math.max(
+ measuredWidth,
+ measureContentWidth(getAdapter(),
+ getBackground())), MeasureSpec
+ .getSize(widthMeasureSpec)),
+ getMeasuredHeight());
+ }
+ }
+
+ @Override
+ public boolean performClick() {
+ boolean handled = super.performClick();
+ if (!handled) {
+ handled = true;
+ if (!mPopup.isShowing()) {
+ mPopup.show();
+ }
+ }
+ return handled;
+ }
+
+ @Override
+ public void setAdapter(SpinnerAdapter adapter) {
+ super.setAdapter(adapter);
+ if (mPopup != null) {
+ mPopup.setAdapter(new DropDownAdapter(adapter));
+ } else {
+ mTempAdapter = new DropDownAdapter(adapter);
+ }
+ }
+
+ public void setDropDownHorizontalOffset(int pixels) {
+ mPopup.setHorizontalOffset(pixels);
+ }
+
+ public void setDropDownVerticalOffset(int pixels) {
+ mPopup.setVerticalOffset(pixels);
+ }
+
+ public void setDropDownWidth(int pixels) {
+ if (!(mPopup instanceof DropdownPopup)) {
+ Log.e(Spinner.TAG,
+ "Cannot set dropdown width for MODE_DIALOG, ignoring");
+ return;
+ }
+ mDropDownWidth = pixels;
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if (mDisableChildrenWhenDisabled) {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ getChildAt(i).setEnabled(enabled);
+ }
+ }
+ }
+
+ public void setGravity(int gravity) {
+ if (mGravity != gravity) {
+ if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == 0) {
+ gravity |= Gravity.LEFT;
+ }
+ mGravity = gravity;
+ requestLayout();
+ }
+ }
+
+ @Override
+ public void setOnItemClickListener(OnItemClickListener l) {
+ throw new RuntimeException(
+ "setOnItemClickListener cannot be used with a spinner.");
+ }
+
+ public void setPopupBackgroundDrawable(Drawable background) {
+ if (!(mPopup instanceof DropdownPopup)) {
+ Log.e(Spinner.TAG,
+ "setPopupBackgroundDrawable: incompatible spinner mode; ignoring...");
+ return;
+ }
+ ((DropdownPopup) mPopup).setBackgroundDrawable(background);
+ }
+
+ public void setPopupBackgroundResource(int resId) {
+ setPopupBackgroundDrawable(getContext().getResources().getDrawable(
+ resId));
+ }
+
+ public void setPrompt(CharSequence prompt) {
+ mPopup.setPromptText(prompt);
+ }
+
+ public void setPromptId(int promptId) {
+ setPrompt(getContext().getText(promptId));
+ }
+
+ private void setUpChild(View child) {
+ ViewGroup.LayoutParams lp = child.getLayoutParams();
+ if (lp == null) {
+ lp = generateDefaultLayoutParams();
+ }
+ addViewInLayout(child, 0, lp);
+ child.setSelected(hasFocus());
+ if (mDisableChildrenWhenDisabled) {
+ child.setEnabled(isEnabled());
+ }
+ int childHeightSpec = ViewGroup.getChildMeasureSpec(mHeightMeasureSpec,
+ mSpinnerPadding.top + mSpinnerPadding.bottom, lp.height);
+ int childWidthSpec = ViewGroup.getChildMeasureSpec(mWidthMeasureSpec,
+ mSpinnerPadding.left + mSpinnerPadding.right, lp.width);
+ child.measure(childWidthSpec, childHeightSpec);
+ int childLeft = 0;
+ int childTop = mSpinnerPadding.top
+ + (getMeasuredHeight() - mSpinnerPadding.bottom
+ - mSpinnerPadding.top - child.getMeasuredHeight()) / 2;
+ int childBottom = childTop + child.getMeasuredHeight();
+ int width = child.getMeasuredWidth();
+ int childRight = childLeft + width;
+ child.layout(childLeft, childTop, childRight, childBottom);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Switch.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Switch.java
new file mode 100644
index 0000000000..0d6a36d3da
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Switch.java
@@ -0,0 +1,593 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+import org.holoeverywhere.text.AllCapsTransformationMethod;
+import org.holoeverywhere.text.TransformationMethod;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.support.v4.view.MotionEventCompat;
+import android.text.Layout;
+import android.text.StaticLayout;
+import android.text.TextPaint;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.VelocityTracker;
+import android.view.ViewConfiguration;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.CompoundButton;
+
+public class Switch extends CompoundButton {
+ private static final int[] CHECKED_STATE_SET = {
+ android.R.attr.state_checked
+ };
+ private static final int MONOSPACE = 3;
+ private static final int SANS = 1;
+ private static final int SERIF = 2;
+ private static final int TOUCH_MODE_DOWN = 1;
+ private static final int TOUCH_MODE_DRAGGING = 2;
+ private static final int TOUCH_MODE_IDLE = 0;
+ private int mMinFlingVelocity;
+ private Layout mOffLayout;
+ private Layout mOnLayout;
+ private int mSwitchBottom;
+ private int mSwitchHeight;
+ private int mSwitchLeft;
+ private int mSwitchMinWidth;
+ private int mSwitchPadding;
+ private int mSwitchRight;
+ private int mSwitchTop;
+ private TransformationMethod mSwitchTransformationMethod;
+ private int mSwitchWidth;
+ private final Rect mTempRect = new Rect();
+ private ColorStateList mTextColors;
+ private CharSequence mTextOff;
+ private CharSequence mTextOn;
+ private TextPaint mTextPaint;
+ private Drawable mThumbDrawable;
+ private float mThumbPosition;
+ private int mThumbTextPadding;
+ private int mThumbWidth;
+ private boolean mToggleWhenClick;
+ private int mTouchMode;
+ private int mTouchSlop;
+ private float mTouchX;
+ private float mTouchY;
+ private Drawable mTrackDrawable;
+ private VelocityTracker mVelocityTracker = VelocityTracker.obtain();
+
+ public Switch(Context context) {
+ this(context, null);
+ }
+
+ public Switch(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.switchStyle);
+ }
+
+ public Switch(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
+ Resources res = getResources();
+ mTextPaint.density = res.getDisplayMetrics().density;
+ // TODO
+ // mTextPaint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale);
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ R.styleable.Switch, defStyle, 0);
+ mThumbDrawable = a.getDrawable(R.styleable.Switch_thumb);
+ mTrackDrawable = a.getDrawable(R.styleable.Switch_track);
+ mTextOn = a.getText(R.styleable.Switch_textOn);
+ mTextOff = a.getText(R.styleable.Switch_textOff);
+ mThumbTextPadding = a.getDimensionPixelSize(
+ R.styleable.Switch_thumbTextPadding, 0);
+ mSwitchMinWidth = a.getDimensionPixelSize(
+ R.styleable.Switch_switchMinWidth, 0);
+ mSwitchPadding = a.getDimensionPixelSize(
+ R.styleable.Switch_switchPadding, 0);
+ mToggleWhenClick = a.getBoolean(R.styleable.Switch_toggleWhenClick, true);
+ int appearance = a.getResourceId(R.styleable.Switch_switchTextAppearance, 0);
+ if (appearance != 0) {
+ setSwitchTextAppearance(context, appearance);
+ }
+ a.recycle();
+ ViewConfiguration config = ViewConfiguration.get(context);
+ mTouchSlop = config.getScaledTouchSlop();
+ mMinFlingVelocity = config.getScaledMinimumFlingVelocity();
+ refreshDrawableState();
+ setChecked(isChecked());
+ }
+
+ private void animateThumbToCheckedState(boolean newCheckedState) {
+ // TODO animate!
+ // float targetPos = newCheckedState ? 0 : getThumbScrollRange();
+ // mThumbPosition = targetPos;
+ setChecked(newCheckedState);
+ }
+
+ private void cancelSuperTouch(MotionEvent ev) {
+ MotionEvent cancel = MotionEvent.obtain(ev);
+ cancel.setAction(MotionEvent.ACTION_CANCEL);
+ super.onTouchEvent(cancel);
+ cancel.recycle();
+ }
+
+ @Override
+ protected void drawableStateChanged() {
+ super.drawableStateChanged();
+ int[] myDrawableState = getDrawableState();
+ if (mThumbDrawable != null) {
+ mThumbDrawable.setState(myDrawableState);
+ }
+ if (mTrackDrawable != null) {
+ mTrackDrawable.setState(myDrawableState);
+ }
+ invalidate();
+ }
+
+ @Override
+ public int getCompoundPaddingRight() {
+ int padding = super.getCompoundPaddingRight() + mSwitchWidth;
+ if (!TextUtils.isEmpty(getText())) {
+ padding += mSwitchPadding;
+ }
+ return padding;
+ }
+
+ public int getSwitchMinWidth() {
+ return mSwitchMinWidth;
+ }
+
+ public int getSwitchPadding() {
+ return mSwitchPadding;
+ }
+
+ private boolean getTargetCheckedState() {
+ return mThumbPosition >= getThumbScrollRange() / 2;
+ }
+
+ public CharSequence getTextOff() {
+ return mTextOff;
+ }
+
+ public CharSequence getTextOn() {
+ return mTextOn;
+ }
+
+ public Drawable getThumbDrawable() {
+ return mThumbDrawable;
+ }
+
+ private int getThumbScrollRange() {
+ if (mTrackDrawable == null) {
+ return 0;
+ }
+ mTrackDrawable.getPadding(mTempRect);
+ return mSwitchWidth - mThumbWidth - mTempRect.left - mTempRect.right;
+ }
+
+ public int getThumbTextPadding() {
+ return mThumbTextPadding;
+ }
+
+ public Drawable getTrackDrawable() {
+ return mTrackDrawable;
+ }
+
+ private boolean hitThumb(float x, float y) {
+ mThumbDrawable.getPadding(mTempRect);
+ final int thumbTop = mSwitchTop - mTouchSlop;
+ final int thumbLeft = mSwitchLeft + (int) (mThumbPosition + 0.5f) - mTouchSlop;
+ final int thumbRight = thumbLeft + mThumbWidth +
+ mTempRect.left + mTempRect.right + mTouchSlop;
+ final int thumbBottom = mSwitchBottom + mTouchSlop;
+ return x > thumbLeft && x < thumbRight && y > thumbTop && y < thumbBottom;
+ }
+
+ public boolean isToggleWhenClick() {
+ return mToggleWhenClick;
+ }
+
+ @Override
+ public void jumpDrawablesToCurrentState() {
+ super.jumpDrawablesToCurrentState();
+ mThumbDrawable.jumpToCurrentState();
+ mTrackDrawable.jumpToCurrentState();
+ }
+
+ private Layout makeLayout(CharSequence text) {
+ final CharSequence transformed = mSwitchTransformationMethod != null
+ ? mSwitchTransformationMethod.getTransformation(text, this)
+ : text;
+ return new StaticLayout(transformed, mTextPaint,
+ (int) Math.ceil(Layout.getDesiredWidth(transformed, mTextPaint)),
+ Layout.Alignment.ALIGN_NORMAL, 1.f, 0, true);
+ }
+
+ @Override
+ protected int[] onCreateDrawableState(int extraSpace) {
+ final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+ if (isChecked()) {
+ mergeDrawableStates(drawableState, CHECKED_STATE_SET);
+ }
+ return drawableState;
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ int switchLeft = mSwitchLeft;
+ int switchTop = mSwitchTop;
+ int switchRight = mSwitchRight;
+ int switchBottom = mSwitchBottom;
+ mTrackDrawable.setBounds(switchLeft, switchTop, switchRight, switchBottom);
+ mTrackDrawable.draw(canvas);
+ final int saveState = canvas.save();
+ mTrackDrawable.getPadding(mTempRect);
+ int switchInnerLeft = switchLeft + mTempRect.left;
+ int switchInnerTop = switchTop + mTempRect.top;
+ int switchInnerRight = switchRight - mTempRect.right;
+ int switchInnerBottom = switchBottom - mTempRect.bottom;
+ canvas.clipRect(switchInnerLeft, switchTop, switchInnerRight, switchBottom);
+ mThumbDrawable.getPadding(mTempRect);
+ final int thumbPos = (int) (mThumbPosition + 0.5f);
+ int thumbLeft = switchInnerLeft - mTempRect.left + thumbPos;
+ int thumbRight = switchInnerLeft + thumbPos + mThumbWidth + mTempRect.right;
+ mThumbDrawable.setBounds(thumbLeft, switchTop, thumbRight, switchBottom);
+ mThumbDrawable.draw(canvas);
+ if (mTextColors != null) {
+ mTextPaint.setColor(mTextColors.getColorForState(getDrawableState(),
+ mTextColors.getDefaultColor()));
+ }
+ mTextPaint.drawableState = getDrawableState();
+ Layout switchText = getTargetCheckedState() ? mOnLayout : mOffLayout;
+ canvas.translate((thumbLeft + thumbRight) / 2 - switchText.getWidth() / 2,
+ (switchInnerTop + switchInnerBottom) / 2 - switchText.getHeight() / 2);
+ switchText.draw(canvas);
+ canvas.restoreToCount(saveState);
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(Switch.class.getName());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(Switch.class.getName());
+ CharSequence switchText = isChecked() ? mTextOn : mTextOff;
+ if (!TextUtils.isEmpty(switchText)) {
+ CharSequence oldText = info.getText();
+ if (TextUtils.isEmpty(oldText)) {
+ info.setText(switchText);
+ } else {
+ StringBuilder newText = new StringBuilder();
+ newText.append(oldText).append(' ').append(switchText);
+ info.setText(newText);
+ }
+ }
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ super.onLayout(changed, left, top, right, bottom);
+ mThumbPosition = isChecked() ? getThumbScrollRange() : 0;
+ int switchRight = getWidth() - getPaddingRight();
+ int switchLeft = switchRight - mSwitchWidth;
+ int switchTop = 0;
+ int switchBottom = 0;
+ switch (getGravity() & Gravity.VERTICAL_GRAVITY_MASK) {
+ default:
+ case Gravity.TOP:
+ switchTop = getPaddingTop();
+ switchBottom = switchTop + mSwitchHeight;
+ break;
+ case Gravity.CENTER_VERTICAL:
+ switchTop = (getPaddingTop() + getHeight() - getPaddingBottom()) / 2 -
+ mSwitchHeight / 2;
+ switchBottom = switchTop + mSwitchHeight;
+ break;
+ case Gravity.BOTTOM:
+ switchBottom = getHeight() - getPaddingBottom();
+ switchTop = switchBottom - mSwitchHeight;
+ break;
+ }
+ mSwitchLeft = switchLeft;
+ mSwitchTop = switchTop;
+ mSwitchBottom = switchBottom;
+ mSwitchRight = switchRight;
+ }
+
+ @Override
+ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ int heightSize = MeasureSpec.getSize(heightMeasureSpec);
+ if (mOnLayout == null) {
+ mOnLayout = makeLayout(mTextOn);
+ }
+ if (mOffLayout == null) {
+ mOffLayout = makeLayout(mTextOff);
+ }
+ mTrackDrawable.getPadding(mTempRect);
+ final int maxTextWidth = Math.max(mOnLayout.getWidth(), mOffLayout.getWidth());
+ final int switchWidth = Math.max(mSwitchMinWidth,
+ maxTextWidth * 2 + mThumbTextPadding * 4 + mTempRect.left + mTempRect.right);
+ final int switchHeight = mTrackDrawable.getIntrinsicHeight();
+ mThumbWidth = maxTextWidth + mThumbTextPadding * 2;
+ switch (widthMode) {
+ case MeasureSpec.AT_MOST:
+ widthSize = Math.min(widthSize, switchWidth);
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ widthSize = switchWidth;
+ break;
+ case MeasureSpec.EXACTLY:
+ break;
+ }
+ switch (heightMode) {
+ case MeasureSpec.AT_MOST:
+ heightSize = Math.min(heightSize, switchHeight);
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ heightSize = switchHeight;
+ break;
+ case MeasureSpec.EXACTLY:
+ break;
+ }
+ mSwitchWidth = switchWidth;
+ mSwitchHeight = switchHeight;
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ final int measuredHeight = getMeasuredHeight();
+ if (measuredHeight < switchHeight) {
+ setMeasuredDimension(getMeasuredWidth(), switchHeight);
+ }
+ }
+
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ super.onPopulateAccessibilityEvent(event);
+ CharSequence text = isChecked() ? mOnLayout.getText() : mOffLayout.getText();
+ if (!TextUtils.isEmpty(text)) {
+ event.getText().add(text);
+ }
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ mVelocityTracker.addMovement(ev);
+ switch (MotionEventCompat.getActionMasked(ev)) {
+ case MotionEvent.ACTION_DOWN: {
+ final float x = ev.getX();
+ final float y = ev.getY();
+ if (isEnabled() && hitThumb(x, y)) {
+ mTouchMode = TOUCH_MODE_DOWN;
+ mTouchX = x;
+ mTouchY = y;
+ }
+ return true;
+ }
+ case MotionEvent.ACTION_MOVE: {
+ switch (mTouchMode) {
+ case TOUCH_MODE_IDLE:
+ break;
+ case TOUCH_MODE_DOWN: {
+ final float x = ev.getX();
+ final float y = ev.getY();
+ if (Math.abs(x - mTouchX) > mTouchSlop ||
+ Math.abs(y - mTouchY) > mTouchSlop) {
+ mTouchMode = TOUCH_MODE_DRAGGING;
+ getParent().requestDisallowInterceptTouchEvent(true);
+ mTouchX = x;
+ mTouchY = y;
+ return true;
+ }
+ break;
+ }
+ case TOUCH_MODE_DRAGGING: {
+ final float x = ev.getX();
+ final float dx = x - mTouchX;
+ float newPos = Math.max(0,
+ Math.min(mThumbPosition + dx, getThumbScrollRange()));
+ if (newPos != mThumbPosition) {
+ mThumbPosition = newPos;
+ mTouchX = x;
+ invalidate();
+ }
+ return true;
+ }
+ }
+ break;
+ }
+ case MotionEvent.ACTION_UP:
+ if (mTouchMode == TOUCH_MODE_DOWN && mToggleWhenClick) {
+ toggle();
+ cancelSuperTouch(ev);
+ mTouchMode = TOUCH_MODE_IDLE;
+ mVelocityTracker.clear();
+ return true;
+ }
+ case MotionEvent.ACTION_CANCEL: {
+ if (mTouchMode == TOUCH_MODE_DRAGGING) {
+ stopDrag(ev);
+ return true;
+ }
+ mTouchMode = TOUCH_MODE_IDLE;
+ mVelocityTracker.clear();
+ break;
+ }
+ }
+ return super.onTouchEvent(ev);
+ }
+
+ @Override
+ public void setChecked(boolean checked) {
+ super.setChecked(checked);
+ mThumbPosition = checked ? getThumbScrollRange() : 0;
+ invalidate();
+ }
+
+ public void setSwitchMinWidth(int pixels) {
+ mSwitchMinWidth = pixels;
+ requestLayout();
+ }
+
+ public void setSwitchPadding(int pixels) {
+ mSwitchPadding = pixels;
+ requestLayout();
+ }
+
+ public void setSwitchTextAppearance(Context context, int resid) {
+ TypedArray appearance =
+ context.obtainStyledAttributes(resid,
+ R.styleable.TextAppearance);
+ ColorStateList colors;
+ int ts;
+ colors = appearance.getColorStateList(R.styleable.
+ TextAppearance_android_textColor);
+ if (colors != null) {
+ mTextColors = colors;
+ } else {
+ mTextColors = getTextColors();
+ }
+ ts = appearance.getDimensionPixelSize(R.styleable.
+ TextAppearance_android_textSize, 0);
+ if (ts != 0) {
+ if (ts != mTextPaint.getTextSize()) {
+ mTextPaint.setTextSize(ts);
+ requestLayout();
+ }
+ }
+ int typefaceIndex, styleIndex;
+ typefaceIndex = appearance.getInt(R.styleable.
+ TextAppearance_android_typeface, -1);
+ styleIndex = appearance.getInt(R.styleable.
+ TextAppearance_android_textStyle, -1);
+ setSwitchTypefaceByIndex(typefaceIndex, styleIndex);
+ boolean allCaps = appearance.getBoolean(R.styleable.
+ TextAppearance_android_textAllCaps, false);
+ if (allCaps) {
+ mSwitchTransformationMethod = new AllCapsTransformationMethod(getContext());
+ mSwitchTransformationMethod.setLengthChangesAllowed(true);
+ } else {
+ mSwitchTransformationMethod = null;
+ }
+ appearance.recycle();
+ }
+
+ public void setSwitchTypeface(Typeface tf) {
+ if (mTextPaint.getTypeface() != tf) {
+ mTextPaint.setTypeface(tf);
+ requestLayout();
+ invalidate();
+ }
+ }
+
+ public void setSwitchTypeface(Typeface tf, int style) {
+ if (style > 0) {
+ if (tf == null) {
+ tf = Typeface.defaultFromStyle(style);
+ } else {
+ tf = Typeface.create(tf, style);
+ }
+ setSwitchTypeface(tf);
+ int typefaceStyle = tf != null ? tf.getStyle() : 0;
+ int need = style & ~typefaceStyle;
+ mTextPaint.setFakeBoldText((need & Typeface.BOLD) != 0);
+ mTextPaint.setTextSkewX((need & Typeface.ITALIC) != 0 ? -0.25f : 0);
+ } else {
+ mTextPaint.setFakeBoldText(false);
+ mTextPaint.setTextSkewX(0);
+ setSwitchTypeface(tf);
+ }
+ }
+
+ private void setSwitchTypefaceByIndex(int typefaceIndex, int styleIndex) {
+ Typeface tf = null;
+ switch (typefaceIndex) {
+ case SANS:
+ tf = Typeface.SANS_SERIF;
+ break;
+ case SERIF:
+ tf = Typeface.SERIF;
+ break;
+ case MONOSPACE:
+ tf = Typeface.MONOSPACE;
+ break;
+ }
+ setSwitchTypeface(tf, styleIndex);
+ }
+
+ public void setTextOff(CharSequence textOff) {
+ mTextOff = textOff;
+ requestLayout();
+ }
+
+ public void setTextOn(CharSequence textOn) {
+ mTextOn = textOn;
+ requestLayout();
+ }
+
+ public void setThumbDrawable(Drawable thumb) {
+ mThumbDrawable = thumb;
+ requestLayout();
+ }
+
+ public void setThumbResource(int resId) {
+ setThumbDrawable(getContext().getResources().getDrawable(resId));
+ }
+
+ public void setThumbTextPadding(int pixels) {
+ mThumbTextPadding = pixels;
+ requestLayout();
+ }
+
+ public void setToggleWhenClick(boolean mToggleWhenClick) {
+ this.mToggleWhenClick = mToggleWhenClick;
+ }
+
+ public void setTrackDrawable(Drawable track) {
+ mTrackDrawable = track;
+ requestLayout();
+ }
+
+ public void setTrackResource(int resId) {
+ setTrackDrawable(getContext().getResources().getDrawable(resId));
+ }
+
+ private void stopDrag(MotionEvent ev) {
+ mTouchMode = TOUCH_MODE_IDLE;
+ boolean commitChange = ev.getAction() == MotionEvent.ACTION_UP && isEnabled();
+ cancelSuperTouch(ev);
+ if (commitChange) {
+ boolean newState;
+ mVelocityTracker.computeCurrentVelocity(1000);
+ float xvel = mVelocityTracker.getXVelocity();
+ if (Math.abs(xvel) > mMinFlingVelocity) {
+ newState = xvel > 0;
+ } else {
+ newState = getTargetCheckedState();
+ }
+ animateThumbToCheckedState(newState);
+ } else {
+ animateThumbToCheckedState(isChecked());
+ }
+ }
+
+ @Override
+ protected boolean verifyDrawable(Drawable who) {
+ return super.verifyDrawable(who) || who == mThumbDrawable || who == mTrackDrawable;
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TextView.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TextView.java
new file mode 100644
index 0000000000..9fb274a53e
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TextView.java
@@ -0,0 +1,84 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class TextView extends android.widget.TextView {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public TextView(Context context) {
+ this(context, null);
+ }
+
+ public TextView(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.textViewStyle);
+ }
+
+ public TextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TimePicker.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TimePicker.java
new file mode 100644
index 0000000000..962074bd7f
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/TimePicker.java
@@ -0,0 +1,464 @@
+
+package org.holoeverywhere.widget;
+
+import java.text.DateFormatSymbols;
+import java.util.Calendar;
+import java.util.Locale;
+
+import org.holoeverywhere.FontLoader;
+import org.holoeverywhere.LayoutInflater;
+import org.holoeverywhere.R;
+import org.holoeverywhere.internal.NumberPickerEditText;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.format.DateUtils;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.FrameLayout;
+
+public class TimePicker extends FrameLayout {
+ public interface OnTimeChangedListener {
+ void onTimeChanged(TimePicker view, int hourOfDay, int minute);
+ }
+
+ private static class SavedState extends BaseSavedState {
+ @SuppressWarnings("unused")
+ public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
+ @Override
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ @Override
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+
+ private final int mHour, mMinute;
+
+ private SavedState(Parcel in) {
+ super(in);
+ mHour = in.readInt();
+ mMinute = in.readInt();
+ }
+
+ private SavedState(Parcelable superState, int hour, int minute) {
+ super(superState);
+ mHour = hour;
+ mMinute = minute;
+ }
+
+ public int getHour() {
+ return mHour;
+ }
+
+ public int getMinute() {
+ return mMinute;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
+ dest.writeInt(mHour);
+ dest.writeInt(mMinute);
+ }
+ }
+
+ private static final boolean DEFAULT_ENABLED_STATE = true;
+ private static final int HOURS_IN_HALF_DAY = 12;
+ private static final OnTimeChangedListener NO_OP_CHANGE_LISTENER = new OnTimeChangedListener() {
+ @Override
+ public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
+ }
+ };
+
+ private static void setContentDescription(View parent, int childId,
+ int textId) {
+ if (parent == null) {
+ return;
+ }
+ View child = parent.findViewById(childId);
+ if (child != null) {
+ child.setContentDescription(parent.getContext().getText(textId));
+ }
+ }
+
+ private final Button mAmPmButton;
+ private final String[] mAmPmStrings;
+ private Context mContext;
+ private Locale mCurrentLocale;
+ private final TextView mDivider;
+ private final NumberPicker mHourSpinner, mMinuteSpinner, mAmPmSpinner;
+ private final NumberPickerEditText mHourSpinnerInput, mMinuteSpinnerInput,
+ mAmPmSpinnerInput;
+ private boolean mIs24HourView, mIsAm;
+
+ private boolean mIsEnabled = TimePicker.DEFAULT_ENABLED_STATE;
+
+ private OnTimeChangedListener mOnTimeChangedListener;
+
+ private Calendar mTempCalendar;
+
+ public TimePicker(Context context) {
+ this(context, null);
+ }
+
+ public TimePicker(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.timePickerStyle);
+ }
+
+ public TimePicker(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mContext = context;
+ setCurrentLocale(Locale.getDefault());
+ TypedArray attributesArray = context.obtainStyledAttributes(attrs,
+ R.styleable.TimePicker, defStyle, R.style.Holo_TimePicker);
+ int layoutResourceId = attributesArray.getResourceId(
+ R.styleable.TimePicker_layout, R.layout.time_picker_holo);
+ attributesArray.recycle();
+ LayoutInflater.inflate(mContext, layoutResourceId, this, true);
+ FontLoader.apply(this);
+ mHourSpinner = (NumberPicker) findViewById(R.id.hour);
+ mHourSpinner
+ .setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
+ @Override
+ public void onValueChange(NumberPicker spinner, int oldVal,
+ int newVal) {
+ updateInputState();
+ if (!is24HourView()) {
+ if (oldVal == TimePicker.HOURS_IN_HALF_DAY - 1
+ && newVal == TimePicker.HOURS_IN_HALF_DAY
+ || oldVal == TimePicker.HOURS_IN_HALF_DAY
+ && newVal == TimePicker.HOURS_IN_HALF_DAY - 1) {
+ mIsAm = !mIsAm;
+ updateAmPmControl();
+ }
+ }
+ onTimeChanged();
+ }
+ });
+ mHourSpinnerInput = mHourSpinner.getInputField();
+ mHourSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
+ mDivider = (TextView) findViewById(R.id.divider);
+ if (mDivider != null) {
+ mDivider.setText(R.string.time_picker_separator);
+ }
+ mMinuteSpinner = (NumberPicker) findViewById(R.id.minute);
+ mMinuteSpinner.setMinValue(0);
+ mMinuteSpinner.setMaxValue(59);
+ mMinuteSpinner.setOnLongPressUpdateInterval(100);
+ mMinuteSpinner.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
+ mMinuteSpinner
+ .setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
+ @Override
+ public void onValueChange(NumberPicker spinner, int oldVal,
+ int newVal) {
+ updateInputState();
+ int minValue = mMinuteSpinner.getMinValue();
+ int maxValue = mMinuteSpinner.getMaxValue();
+ if (oldVal == maxValue && newVal == minValue) {
+ int newHour = mHourSpinner.getValue() + 1;
+ if (!is24HourView()
+ && newHour == TimePicker.HOURS_IN_HALF_DAY) {
+ mIsAm = !mIsAm;
+ updateAmPmControl();
+ }
+ mHourSpinner.setValue(newHour);
+ } else if (oldVal == minValue && newVal == maxValue) {
+ int newHour = mHourSpinner.getValue() - 1;
+ if (!is24HourView()
+ && newHour == TimePicker.HOURS_IN_HALF_DAY - 1) {
+ mIsAm = !mIsAm;
+ updateAmPmControl();
+ }
+ mHourSpinner.setValue(newHour);
+ }
+ onTimeChanged();
+ }
+ });
+ mMinuteSpinnerInput = mMinuteSpinner.getInputField();
+ mMinuteSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
+ mAmPmStrings = new DateFormatSymbols().getAmPmStrings();
+ View amPmView = findViewById(R.id.amPm);
+ if (amPmView instanceof Button) {
+ mAmPmSpinner = null;
+ mAmPmSpinnerInput = null;
+ mAmPmButton = (Button) amPmView;
+ mAmPmButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View button) {
+ button.requestFocus();
+ mIsAm = !mIsAm;
+ updateAmPmControl();
+ onTimeChanged();
+ }
+ });
+ } else {
+ mAmPmButton = null;
+ mAmPmSpinner = (NumberPicker) amPmView;
+ mAmPmSpinner.setMinValue(0);
+ mAmPmSpinner.setMaxValue(1);
+ mAmPmSpinner.setDisplayedValues(mAmPmStrings);
+ mAmPmSpinner
+ .setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
+ @Override
+ public void onValueChange(NumberPicker picker,
+ int oldVal, int newVal) {
+ updateInputState();
+ picker.requestFocus();
+ mIsAm = !mIsAm;
+ updateAmPmControl();
+ onTimeChanged();
+ }
+ });
+ mAmPmSpinnerInput = mAmPmSpinner.getInputField();
+ mAmPmSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_DONE);
+ }
+ updateHourControl();
+ updateAmPmControl();
+ setOnTimeChangedListener(TimePicker.NO_OP_CHANGE_LISTENER);
+ setCurrentHour(mTempCalendar.get(Calendar.HOUR_OF_DAY));
+ setCurrentMinute(mTempCalendar.get(Calendar.MINUTE));
+ if (!isEnabled()) {
+ setEnabled(false);
+ }
+ setContentDescriptions();
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ if (VERSION.SDK_INT >= 14) {
+ onPopulateAccessibilityEvent(event);
+ return true;
+ } else {
+ return super.dispatchPopulateAccessibilityEvent(event);
+ }
+ }
+
+ @Override
+ public int getBaseline() {
+ return mHourSpinner.getBaseline();
+ }
+
+ public Integer getCurrentHour() {
+ int currentHour = mHourSpinner.getValue();
+ if (is24HourView()) {
+ return currentHour;
+ } else if (mIsAm) {
+ return currentHour % TimePicker.HOURS_IN_HALF_DAY;
+ } else {
+ return currentHour % TimePicker.HOURS_IN_HALF_DAY
+ + TimePicker.HOURS_IN_HALF_DAY;
+ }
+ }
+
+ public Integer getCurrentMinute() {
+ return mMinuteSpinner.getValue();
+ }
+
+ public boolean is24HourView() {
+ return mIs24HourView;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return mIsEnabled;
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ setCurrentLocale(newConfig.locale);
+ }
+
+ @SuppressLint("NewApi")
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ super.onPopulateAccessibilityEvent(event);
+ int flags = DateUtils.FORMAT_SHOW_TIME;
+ if (mIs24HourView) {
+ flags |= DateUtils.FORMAT_24HOUR;
+ } else {
+ flags |= DateUtils.FORMAT_12HOUR;
+ }
+ mTempCalendar.set(Calendar.HOUR_OF_DAY, getCurrentHour());
+ mTempCalendar.set(Calendar.MINUTE, getCurrentMinute());
+ String selectedDateUtterance = DateUtils.formatDateTime(mContext,
+ mTempCalendar.getTimeInMillis(), flags);
+ event.getText().add(selectedDateUtterance);
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Parcelable state) {
+ SavedState ss = (SavedState) state;
+ super.onRestoreInstanceState(ss.getSuperState());
+ setCurrentHour(ss.getHour());
+ setCurrentMinute(ss.getMinute());
+ }
+
+ @Override
+ protected Parcelable onSaveInstanceState() {
+ Parcelable superState = super.onSaveInstanceState();
+ return new SavedState(superState, getCurrentHour(), getCurrentMinute());
+ }
+
+ private void onTimeChanged() {
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ if (mOnTimeChangedListener != null) {
+ mOnTimeChangedListener.onTimeChanged(this, getCurrentHour(),
+ getCurrentMinute());
+ }
+ }
+
+ private void setContentDescriptions() {
+ TimePicker.setContentDescription(mMinuteSpinner, R.id.increment,
+ R.string.time_picker_increment_minute_button);
+ TimePicker.setContentDescription(mMinuteSpinner, R.id.decrement,
+ R.string.time_picker_decrement_minute_button);
+ TimePicker.setContentDescription(mHourSpinner, R.id.increment,
+ R.string.time_picker_increment_hour_button);
+ TimePicker.setContentDescription(mHourSpinner, R.id.decrement,
+ R.string.time_picker_decrement_hour_button);
+ if (mAmPmSpinner != null) {
+ TimePicker.setContentDescription(mAmPmSpinner, R.id.increment,
+ R.string.time_picker_increment_set_pm_button);
+ TimePicker.setContentDescription(mAmPmSpinner, R.id.decrement,
+ R.string.time_picker_decrement_set_am_button);
+ }
+ }
+
+ public void setCurrentHour(Integer currentHour) {
+ if (currentHour == null || currentHour == getCurrentHour()) {
+ return;
+ }
+ if (!is24HourView()) {
+ if (currentHour >= TimePicker.HOURS_IN_HALF_DAY) {
+ mIsAm = false;
+ if (currentHour > TimePicker.HOURS_IN_HALF_DAY) {
+ currentHour = currentHour - TimePicker.HOURS_IN_HALF_DAY;
+ }
+ } else {
+ mIsAm = true;
+ if (currentHour == 0) {
+ currentHour = TimePicker.HOURS_IN_HALF_DAY;
+ }
+ }
+ updateAmPmControl();
+ }
+ mHourSpinner.setValue(currentHour);
+ onTimeChanged();
+ }
+
+ private void setCurrentLocale(Locale locale) {
+ if (locale.equals(mCurrentLocale)) {
+ return;
+ }
+ mCurrentLocale = locale;
+ mTempCalendar = Calendar.getInstance(locale);
+ }
+
+ public void setCurrentMinute(Integer currentMinute) {
+ if (currentMinute == getCurrentMinute()) {
+ return;
+ }
+ mMinuteSpinner.setValue(currentMinute);
+ onTimeChanged();
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (mIsEnabled == enabled) {
+ return;
+ }
+ super.setEnabled(enabled);
+ mMinuteSpinner.setEnabled(enabled);
+ if (mDivider != null) {
+ mDivider.setEnabled(enabled);
+ }
+ mHourSpinner.setEnabled(enabled);
+ if (mAmPmSpinner != null) {
+ mAmPmSpinner.setEnabled(enabled);
+ } else {
+ mAmPmButton.setEnabled(enabled);
+ }
+ mIsEnabled = enabled;
+ }
+
+ public void setIs24HourView(Boolean is24HourView) {
+ if (mIs24HourView == is24HourView) {
+ return;
+ }
+ mIs24HourView = is24HourView;
+ int currentHour = getCurrentHour();
+ updateHourControl();
+ setCurrentHour(currentHour);
+ updateAmPmControl();
+ }
+
+ public void setOnTimeChangedListener(
+ OnTimeChangedListener onTimeChangedListener) {
+ mOnTimeChangedListener = onTimeChangedListener;
+ }
+
+ private void updateAmPmControl() {
+ if (is24HourView()) {
+ if (mAmPmSpinner != null) {
+ mAmPmSpinner.setVisibility(View.GONE);
+ } else {
+ mAmPmButton.setVisibility(View.GONE);
+ }
+ } else {
+ int index = mIsAm ? Calendar.AM : Calendar.PM;
+ if (mAmPmSpinner != null) {
+ mAmPmSpinner.setValue(index);
+ mAmPmSpinner.setVisibility(View.VISIBLE);
+ } else {
+ mAmPmButton.setText(mAmPmStrings[index]);
+ mAmPmButton.setVisibility(View.VISIBLE);
+ }
+ }
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+ }
+
+ private void updateHourControl() {
+ if (is24HourView()) {
+ mHourSpinner.setMinValue(0);
+ mHourSpinner.setMaxValue(23);
+ mHourSpinner.setFormatter(NumberPicker.TWO_DIGIT_FORMATTER);
+ } else {
+ mHourSpinner.setMinValue(1);
+ mHourSpinner.setMaxValue(12);
+ mHourSpinner.setFormatter(null);
+ }
+ }
+
+ private void updateInputState() {
+ InputMethodManager inputMethodManager = (InputMethodManager) mContext
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (inputMethodManager != null) {
+ if (inputMethodManager.isActive(mHourSpinnerInput)) {
+ mHourSpinnerInput.clearFocus();
+ inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+ } else if (inputMethodManager.isActive(mMinuteSpinnerInput)) {
+ mMinuteSpinnerInput.clearFocus();
+ inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+ } else if (inputMethodManager.isActive(mAmPmSpinnerInput)) {
+ mAmPmSpinnerInput.clearFocus();
+ inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+ }
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Toast.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Toast.java
new file mode 100644
index 0000000000..d7fb6bc098
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/Toast.java
@@ -0,0 +1,48 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.Gravity;
+
+public class Toast extends android.widget.Toast {
+ public static final int LENGTH_LONG = android.widget.Toast.LENGTH_LONG;
+ public static final int LENGTH_SHORT = android.widget.Toast.LENGTH_SHORT;
+ private static final String TAG = "Toast";
+
+ public static Toast makeText(Context context, CharSequence s, int duration) {
+ Toast toast = new Toast(context);
+ toast.setDuration(duration);
+ TextView view = new TextView(context);
+ view.setText(s);
+ view.setTextColor(0xFFFFFFFF);
+ view.setGravity(Gravity.CENTER);
+ view.setBackgroundResource(R.drawable.toast_frame);
+ toast.setView(view);
+ return toast;
+ }
+
+ public static Toast makeText(Context context, int resId, int duration) {
+ return Toast.makeText(context, context.getResources().getString(resId),
+ duration);
+ }
+
+ public Toast(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void setText(CharSequence s) {
+ if (getView() == null) {
+ return;
+ }
+ try {
+ ((TextView) getView()).setText(s);
+ } catch (ClassCastException e) {
+ Log.e(Toast.TAG, "This Toast was not created with Toast.makeText",
+ e);
+ }
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ToggleButton.java b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ToggleButton.java
new file mode 100644
index 0000000000..4398966662
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/library/src/org/holoeverywhere/widget/ToggleButton.java
@@ -0,0 +1,84 @@
+
+package org.holoeverywhere.widget;
+
+import org.holoeverywhere.R;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Build.VERSION;
+import android.util.AttributeSet;
+
+public class ToggleButton extends android.widget.ToggleButton {
+ private boolean allCaps = false;
+ private CharSequence originalText;
+ private BufferType originalType;
+
+ public ToggleButton(Context context) {
+ this(context, null);
+ }
+
+ public ToggleButton(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.buttonStyleToggle);
+ }
+
+ public ToggleButton(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ TypedArray a = getContext().obtainStyledAttributes(attrs,
+ R.styleable.TextView, defStyle, 0);
+ if (a.hasValue(R.styleable.TextView_android_textAllCaps)) {
+ allCaps = a.getBoolean(R.styleable.TextView_android_textAllCaps,
+ false);
+ } else {
+ allCaps = a.getBoolean(R.styleable.TextView_textAllCaps, false);
+ }
+ CharSequence text = null;
+ if (a.hasValue(R.styleable.TextView_android_text)) {
+ text = a.getText(R.styleable.TextView_android_text);
+ }
+ a.recycle();
+ if (text != null) {
+ setText(text);
+ }
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ public void dispatchDisplayHint(int hint) {
+ onDisplayHint(hint);
+ }
+
+ public boolean isAllCaps() {
+ return allCaps;
+ }
+
+ @Override
+ @SuppressLint("NewApi")
+ protected void onDisplayHint(int hint) {
+ if (VERSION.SDK_INT >= 8) {
+ super.onDisplayHint(hint);
+ }
+ }
+
+ @Override
+ public void setAllCaps(boolean allCaps) {
+ this.allCaps = allCaps;
+ updateTextState();
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ originalText = text;
+ originalType = type;
+ updateTextState();
+ }
+
+ private void updateTextState() {
+ if (originalText == null) {
+ super.setText(null, originalType);
+ return;
+ }
+ super.setText(allCaps ? originalText.toString().toUpperCase()
+ : originalText, originalType);
+ }
+}
diff --git a/android/3rd_party/HoloEverywhere/support-library/android-support-v4-r13.jar b/android/3rd_party/HoloEverywhere/support-library/android-support-v4-r13.jar
new file mode 100644
index 0000000000..428bdbc02a
--- /dev/null
+++ b/android/3rd_party/HoloEverywhere/support-library/android-support-v4-r13.jar
Binary files differ
diff --git a/android/MapsWithMePro/install-run.sh b/android/MapsWithMePro/install-run.sh
new file mode 100755
index 0000000000..f05e85f58a
--- /dev/null
+++ b/android/MapsWithMePro/install-run.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#1
+adb -s S557026e32038 uninstall com.mapswithme.maps.pro
+adb -s S557026e32038 install bin/MapsWithMePro-debug.apk
+adb -s S557026e32038 shell am start -a android.intent.action.MAIN -n com.mapswithme.maps.pro/com.mapswithme.maps.DownloadResourcesActivity
+#2
+adb -s 4df1615c2383596f uninstall com.mapswithme.maps.pro
+adb -s 4df1615c2383596f install -r bin/MapsWithMePro-debug.apk
+adb -s 4df1615c2383596f shell am start -a android.intent.action.MAIN -n com.mapswithme.maps.pro/com.mapswithme.maps.DownloadResourcesActivity
+#3
+adb -s B0CB060325140SCN uninstall com.mapswithme.maps.pro
+adb -s B0CB060325140SCN install -r bin/MapsWithMePro-debug.apk
+adb -s B0CB060325140SCN shell am start -a android.intent.action.MAIN -n com.mapswithme.maps.pro/com.mapswithme.maps.DownloadResourcesActivity